当前位置: 首页>>代码示例>>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;未经允许,请勿转载。