public final class WorldEntitySpawner
extends java.lang.Object
Constructor and Description |
---|
WorldEntitySpawner() |
Modifier and Type | Method and Description |
---|---|
static boolean |
canCreatureTypeSpawnAtLocation(EntityLiving.SpawnPlacementType spawnPlacementTypeIn,
World worldIn,
BlockPos pos) |
static boolean |
canCreatureTypeSpawnBody(EntityLiving.SpawnPlacementType spawnPlacementTypeIn,
World worldIn,
BlockPos pos) |
int |
findChunksForSpawning(WorldServer worldServerIn,
boolean spawnHostileMobs,
boolean spawnPeacefulMobs,
boolean spawnOnSetTickRate)
adds all chunks within the spawn radius of the players to eligibleChunksForSpawning.
|
static boolean |
isValidEmptySpawnBlock(IBlockState state) |
static void |
performWorldGenSpawning(World worldIn,
Biome biomeIn,
int centerX,
int centerZ,
int diameterX,
int diameterZ,
java.util.Random randomIn)
Called during chunk generation to spawn initial creatures.
|
public int findChunksForSpawning(WorldServer worldServerIn, boolean spawnHostileMobs, boolean spawnPeacefulMobs, boolean spawnOnSetTickRate)
public static boolean isValidEmptySpawnBlock(IBlockState state)
public static boolean canCreatureTypeSpawnAtLocation(EntityLiving.SpawnPlacementType spawnPlacementTypeIn, World worldIn, BlockPos pos)
public static boolean canCreatureTypeSpawnBody(EntityLiving.SpawnPlacementType spawnPlacementTypeIn, World worldIn, BlockPos pos)
public static void performWorldGenSpawning(World worldIn, Biome biomeIn, int centerX, int centerZ, int diameterX, int diameterZ, java.util.Random randomIn)
centerX
- The X coordinate of the point to spawn mobs arround.centerZ
- The Z coordinate of the point to spawn mobs arround.diameterX
- The X diameter of the rectangle to spawn mobs indiameterZ
- The Z diameter of the rectangle to spawn mobs in