public static class WorldEvent.PotentialSpawns extends WorldEvent
WorldServer#getSpawnListEntryForTypeAt(EnumCreatureType, BlockPos)
as well as
WorldServer#canCreatureTypeSpawnHere(EnumCreatureType, SpawnListEntry, BlockPos)
where the latter checks for identity, meaning both events must add the same instance.
Canceling the event will result in a empty list, meaning no entity will be spawned.WorldEvent.CreateSpawnPosition, WorldEvent.Load, WorldEvent.PotentialSpawns, WorldEvent.Save, WorldEvent.Unload
Modifier and Type | Field and Description |
---|---|
private java.util.List<Biome.SpawnListEntry> |
list |
private BlockPos |
pos |
private EntityClassification |
type |
Constructor and Description |
---|
PotentialSpawns(IWorld world,
EntityClassification type,
BlockPos pos,
java.util.List<Biome.SpawnListEntry> oldList) |
Modifier and Type | Method and Description |
---|---|
java.util.List<Biome.SpawnListEntry> |
getList() |
BlockPos |
getPos() |
EntityClassification |
getType() |
getWorld
private final EntityClassification type
private final BlockPos pos
private final java.util.List<Biome.SpawnListEntry> list
public PotentialSpawns(IWorld world, EntityClassification type, BlockPos pos, java.util.List<Biome.SpawnListEntry> oldList)
public EntityClassification getType()
public BlockPos getPos()
public java.util.List<Biome.SpawnListEntry> getList()