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
Event.HasResult, Event.Result
Modifier and Type | Field and Description |
---|---|
private java.util.List<Biome.SpawnListEntry> |
list |
private BlockPos |
pos |
private EnumCreatureType |
type |
Constructor and Description |
---|
PotentialSpawns(World world,
EnumCreatureType type,
BlockPos pos,
java.util.List<Biome.SpawnListEntry> oldList) |
Modifier and Type | Method and Description |
---|---|
java.util.List<Biome.SpawnListEntry> |
getList() |
BlockPos |
getPos() |
EnumCreatureType |
getType() |
getWorld
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
private final EnumCreatureType type
private final BlockPos pos
private final java.util.List<Biome.SpawnListEntry> list
public PotentialSpawns(World world, EnumCreatureType type, BlockPos pos, java.util.List<Biome.SpawnListEntry> oldList)
public EnumCreatureType getType()
public BlockPos getPos()
public java.util.List<Biome.SpawnListEntry> getList()