public final class SpawnerAnimals
extends java.lang.Object
Constructor and Description |
---|
SpawnerAnimals() |
Modifier and Type | Method and Description |
---|---|
static boolean |
canCreatureTypeSpawnAtLocation(EntityLiving.SpawnPlacementType spawnPlacementTypeIn,
World worldIn,
BlockPos pos) |
int |
findChunksForSpawning(WorldServer worldServerIn,
boolean spawnHostileMobs,
boolean spawnPeacefulMobs,
boolean p_77192_4_)
adds all chunks within the spawn radius of the players to eligibleChunksForSpawning. pars: the world,
hostileCreatures, passiveCreatures. returns number of eligible chunks.
|
protected static BlockPos |
getRandomChunkPosition(World worldIn,
int x,
int z) |
static void |
performWorldGenSpawning(World worldIn,
BiomeGenBase biomeIn,
int p_77191_2_,
int p_77191_3_,
int p_77191_4_,
int p_77191_5_,
java.util.Random randomIn)
Called during chunk generation to spawn initial creatures.
|
public int findChunksForSpawning(WorldServer worldServerIn, boolean spawnHostileMobs, boolean spawnPeacefulMobs, boolean p_77192_4_)
worldServerIn
- The incoming worldserverprotected static BlockPos getRandomChunkPosition(World worldIn, int x, int z)
public static boolean canCreatureTypeSpawnAtLocation(EntityLiving.SpawnPlacementType spawnPlacementTypeIn, World worldIn, BlockPos pos)
public static void performWorldGenSpawning(World worldIn, BiomeGenBase biomeIn, int p_77191_2_, int p_77191_3_, int p_77191_4_, int p_77191_5_, java.util.Random randomIn)
biomeIn
- The biome to use for the weighted entity listrandomIn
- The random to use for mob spawning