當前位置: 首頁>>代碼示例>>Java>>正文


Java Biome.getSpawnableList方法代碼示例

本文整理匯總了Java中net.minecraft.world.biome.Biome.getSpawnableList方法的典型用法代碼示例。如果您正苦於以下問題:Java Biome.getSpawnableList方法的具體用法?Java Biome.getSpawnableList怎麽用?Java Biome.getSpawnableList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraft.world.biome.Biome的用法示例。


在下文中一共展示了Biome.getSpawnableList方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getPossibleCreatures

import net.minecraft.world.biome.Biome; //導入方法依賴的package包/類
@Override
public List<Biome.SpawnListEntry> getPossibleCreatures(EnumCreatureType creatureType, BlockPos pos) {
	Biome biome = this.world.getBiome(pos);

	/*
	 * if (this.mapFeaturesEnabled) { if (creatureType ==
	 * EnumCreatureType.MONSTER &&
	 * this.scatteredFeatureGenerator.isSwampHut(pos)) { return
	 * this.scatteredFeatureGenerator.getScatteredFeatureSpawnList(); }
	 * 
	 * if (creatureType == EnumCreatureType.MONSTER &&
	 * this.settings.useMonuments &&
	 * this.oceanMonumentGenerator.isPositionInStructure(this.world, pos)) {
	 * return this.oceanMonumentGenerator.getScatteredFeatureSpawnList(); }
	 * }
	 */

	return biome.getSpawnableList(creatureType);
}
 
開發者ID:trigg,項目名稱:Firma,代碼行數:20,代碼來源:FirmaChunkGen.java

示例2: getPossibleCreatures

import net.minecraft.world.biome.Biome; //導入方法依賴的package包/類
@Override
public List<Biome.SpawnListEntry> getPossibleCreatures(EnumCreatureType creatureType, BlockPos pos) {
    Biome biome = this.world.getBiome(pos);

    for (MapGenStructure structure : this.structureGenerators)
    {
        if (this.featureSpawnListActions.containsKey(structure)) {
            List<Biome.SpawnListEntry> list = this.featureSpawnListActions.get(structure).apply(structure, creatureType, pos);
            if (list != null) {
                return list;
            }
        }
    }

    return biome.getSpawnableList(creatureType);
}
 
開發者ID:stuebz88,項目名稱:modName,代碼行數:17,代碼來源:ChunkProviderBasic.java

示例3: getPossibleCreatures

import net.minecraft.world.biome.Biome; //導入方法依賴的package包/類
public List<Biome.SpawnListEntry> getPossibleCreatures(EnumCreatureType creatureType, BlockPos pos)
{
    if (creatureType == EnumCreatureType.MONSTER)
    {
        if (this.genNetherBridge.isInsideStructure(pos))
        {
            return this.genNetherBridge.getSpawnList();
        }

        if (this.genNetherBridge.isPositionInStructure(this.world, pos) && this.world.getBlockState(pos.down()).getBlock() == Blocks.NETHER_BRICK)
        {
            return this.genNetherBridge.getSpawnList();
        }
    }

    Biome biome = this.world.getBiome(pos);
    return biome.getSpawnableList(creatureType);
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:19,代碼來源:ChunkProviderHell.java

示例4: getPossibleCreatures

import net.minecraft.world.biome.Biome; //導入方法依賴的package包/類
public List<Biome.SpawnListEntry> getPossibleCreatures(EnumCreatureType creatureType, BlockPos pos)
{
    Biome biome = this.worldObj.getBiome(pos);

    if (this.mapFeaturesEnabled)
    {
        if (creatureType == EnumCreatureType.MONSTER && this.scatteredFeatureGenerator.isSwampHut(pos))
        {
            return this.scatteredFeatureGenerator.getScatteredFeatureSpawnList();
        }

        if (creatureType == EnumCreatureType.MONSTER && this.settings.useMonuments && this.oceanMonumentGenerator.isPositionInStructure(this.worldObj, pos))
        {
            return this.oceanMonumentGenerator.getScatteredFeatureSpawnList();
        }
    }

    return biome.getSpawnableList(creatureType);
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:20,代碼來源:ChunkProviderOverworld.java

示例5: addSpawn

import net.minecraft.world.biome.Biome; //導入方法依賴的package包/類
/**
 * Add a spawn entry for the supplied entity in the supplied {@link BiomeGenBase} list
 * @param entityClass Entity class added
 * @param weightedProb Probability
 * @param min Min spawn count
 * @param max Max spawn count
 * @param typeOfCreature Type of spawn
 * @param biomes List of biomes
 */
public static void addSpawn(Class <? extends EntityLiving > entityClass, int weightedProb, int min, int max, EnumCreatureType typeOfCreature, Biome... biomes)
{
    for (Biome biome : biomes)
    {
        List<SpawnListEntry> spawns = biome.getSpawnableList(typeOfCreature);

        boolean found = false;
        for (SpawnListEntry entry : spawns)
        {
            //Adjusting an existing spawn entry
            if (entry.entityClass == entityClass)
            {
                entry.itemWeight = weightedProb;
                entry.minGroupCount = min;
                entry.maxGroupCount = max;
                found = true;
                break;
            }
        }

        if (!found)
            spawns.add(new SpawnListEntry(entityClass, weightedProb, min, max));
    }
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:34,代碼來源:EntityRegistry.java

示例6: getBiomeList

import net.minecraft.world.biome.Biome; //導入方法依賴的package包/類
private static Biome[] getBiomeList() {
	List<Biome> biomes = new ArrayList<Biome>();
	List<Biome> biomeList = BiomeUtils.getBiomeList();
	for (Biome currentBiome : biomeList) {
		List<SpawnListEntry> spawnList = currentBiome.getSpawnableList(EnumCreatureType.MONSTER);
		for (SpawnListEntry spawnEntry : spawnList) {
			if (spawnEntry.entityClass == EntityEnderman.class) {
				biomes.add(currentBiome);
			}
		}
	}
	return biomes.toArray(new Biome[biomes.size()]);
}
 
開發者ID:p455w0rd,項目名稱:EndermanEvolution,代碼行數:14,代碼來源:ModEntities.java

示例7: getPossibleCreatures

import net.minecraft.world.biome.Biome; //導入方法依賴的package包/類
public List<Biome.SpawnListEntry> getPossibleCreatures(EnumCreatureType creatureType, BlockPos pos)
{
    Biome biome = this.worldObj.getBiome(pos);
    return biome.getSpawnableList(creatureType);
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:6,代碼來源:ChunkProviderFlat.java

示例8: getPossibleCreatures

import net.minecraft.world.biome.Biome; //導入方法依賴的package包/類
public List<Biome.SpawnListEntry> getPossibleCreatures(EnumCreatureType creatureType, BlockPos pos)
{
    Biome biome = this.world.getBiome(pos);
    return biome.getSpawnableList(creatureType);
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:6,代碼來源:ChunkProviderDebug.java


注:本文中的net.minecraft.world.biome.Biome.getSpawnableList方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。