Package net.minecraftforge.event.world
Class WorldEvent.PotentialSpawns
- java.lang.Object
-
- net.minecraftforge.eventbus.api.Event
-
- net.minecraftforge.event.world.WorldEvent
-
- net.minecraftforge.event.world.WorldEvent.PotentialSpawns
-
- Enclosing class:
- WorldEvent
public static class WorldEvent.PotentialSpawns extends WorldEvent
Called by WorldServer to gather a list of all possible entities that can spawn at the specified location. If an entry is added to the list, it needs to be a globally unique instance. The event is called inWorldServer#getSpawnListEntryForTypeAt(EnumCreatureType, BlockPos)
as well asWorldServer#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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.minecraftforge.event.world.WorldEvent
WorldEvent.CreateSpawnPosition, WorldEvent.Load, WorldEvent.PotentialSpawns, WorldEvent.Save, WorldEvent.Unload
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<MobSpawnInfo.Spawners>
list
private BlockPos
pos
private EntityClassification
type
-
Constructor Summary
Constructors Constructor Description PotentialSpawns(IWorld world, EntityClassification type, BlockPos pos, java.util.List<MobSpawnInfo.Spawners> oldList)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<MobSpawnInfo.Spawners>
getList()
BlockPos
getPos()
EntityClassification
getType()
-
Methods inherited from class net.minecraftforge.event.world.WorldEvent
getWorld
-
-
-
-
Field Detail
-
type
private final EntityClassification type
-
pos
private final BlockPos pos
-
list
private final java.util.List<MobSpawnInfo.Spawners> list
-
-
Constructor Detail
-
PotentialSpawns
public PotentialSpawns(IWorld world, EntityClassification type, BlockPos pos, java.util.List<MobSpawnInfo.Spawners> oldList)
-
-
Method Detail
-
getType
public EntityClassification getType()
-
getPos
public BlockPos getPos()
-
getList
public java.util.List<MobSpawnInfo.Spawners> getList()
-
-