Package net.minecraft.src
Class SpawnerAnimals
java.lang.Object
net.minecraft.src.SpawnerAnimals
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancanCreatureTypeSpawnAtLocation(EnumCreatureType type, World world, int i, int j, int k) static booleancanCreatureTypeSpawnInMaterial(EnumCreatureType type, Material material) static booleancanEntitySpawnDuringWorldGen(Class<? extends EntityLiving> entityClass, World world, int x, int y, int z) static booleancheckIfAnimalCanSpawn(SpawnListEntry entry, World world, int x, int y, int z) intfindChunksForSpawning(WorldServer par1WorldServer, boolean par2, boolean par3, boolean par4) adds all chunks within the spawn radius of the players to eligibleChunksForSpawning. pars: the world, hostileCreatures, passiveCreatures. returns number of eligible chunks.protected static ChunkPositiongetRandomSpawningPointInChunk(World par0World, int par1, int par2) Given a chunk, find a random position in it.static floatgetVerticalOffsetForPos(EnumCreatureType type, World world, int i, int j, int k) static voidperformWorldGenSpawning(World par0World, BiomeGenBase par1BiomeGenBase, int par2, int par3, int par4, int par5, Random par6Random) Called during chunk generation to spawn initial creatures.static voidremoveCustomWorldGenSpawnBehavior(Class<? extends EntityLiving> entityClass) static voidsetWorldGenSpawnBehavior(Class<? extends EntityLiving> entityClass, SpawnBehavior spawnBehavior)
-
Constructor Details
-
SpawnerAnimals
public SpawnerAnimals()
-
-
Method Details
-
getRandomSpawningPointInChunk
Given a chunk, find a random position in it. -
findChunksForSpawning
public int findChunksForSpawning(WorldServer par1WorldServer, boolean par2, boolean par3, boolean par4) adds all chunks within the spawn radius of the players to eligibleChunksForSpawning. pars: the world, hostileCreatures, passiveCreatures. returns number of eligible chunks. -
performWorldGenSpawning
public static void performWorldGenSpawning(World par0World, BiomeGenBase par1BiomeGenBase, int par2, int par3, int par4, int par5, Random par6Random) Called during chunk generation to spawn initial creatures. -
checkIfAnimalCanSpawn
-
canCreatureTypeSpawnAtLocation
public static boolean canCreatureTypeSpawnAtLocation(EnumCreatureType type, World world, int i, int j, int k) -
getVerticalOffsetForPos
public static float getVerticalOffsetForPos(EnumCreatureType type, World world, int i, int j, int k) -
canCreatureTypeSpawnInMaterial
-
canEntitySpawnDuringWorldGen
public static boolean canEntitySpawnDuringWorldGen(Class<? extends EntityLiving> entityClass, World world, int x, int y, int z) -
setWorldGenSpawnBehavior
public static void setWorldGenSpawnBehavior(Class<? extends EntityLiving> entityClass, SpawnBehavior spawnBehavior) -
removeCustomWorldGenSpawnBehavior
-