public static class LivingSpawnEvent.CheckSpawn extends LivingSpawnEvent
LivingSpawnEvent.AllowDespawn, LivingSpawnEvent.CheckSpawn, LivingSpawnEvent.SpecialSpawn
LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEvent
EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing
Event.HasResult, Event.Result
Modifier and Type | Field and Description |
---|---|
private boolean |
isSpawner |
private MobSpawnerBaseLogic |
spawner |
Constructor and Description |
---|
CheckSpawn(EntityLiving entity,
World world,
float x,
float y,
float z)
Deprecated.
Use
CheckSpawn#CheckSpawn(EntityLiving, World, float, float, float, MobSpawnerBaseLogic) instead |
CheckSpawn(EntityLiving entity,
World world,
float x,
float y,
float z,
boolean isSpawner)
Deprecated.
Use
CheckSpawn##CheckSpawn(EntityLiving, World, float, float, float, MobSpawnerBaseLogic)
with a spawner instance, or null if not a spawner
CheckSpawn is fired when an Entity is about to be spawned. |
CheckSpawn(EntityLiving entity,
World world,
float x,
float y,
float z,
MobSpawnerBaseLogic spawner)
CheckSpawn is fired when an Entity is about to be spawned.
|
Modifier and Type | Method and Description |
---|---|
MobSpawnerBaseLogic |
getSpawner() |
boolean |
isSpawner() |
getWorld, getX, getY, getZ
getEntityLiving
getEntity
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
private final boolean isSpawner
@Nullable private final MobSpawnerBaseLogic spawner
public CheckSpawn(EntityLiving entity, World world, float x, float y, float z, @Nullable MobSpawnerBaseLogic spawner)
entity
- the spawning entityworld
- the world to spawn inx
- x coordinatey
- y coordinatez
- z coordinatespawner
- position of the MobSpawner
null if it this spawn is coming from a WorldSpawner@Deprecated public CheckSpawn(EntityLiving entity, World world, float x, float y, float z, boolean isSpawner)
CheckSpawn##CheckSpawn(EntityLiving, World, float, float, float, MobSpawnerBaseLogic)
with a spawner instance, or null if not a spawner
CheckSpawn is fired when an Entity is about to be spawned.entity
- the spawning entityworld
- the world to spawn inx
- x coordinatey
- y coordinatez
- z coordinateisSpawner
- true if this spawn is done by a MobSpawner,
false if it this spawn is coming from a WorldSpawner@Deprecated public CheckSpawn(EntityLiving entity, World world, float x, float y, float z)
CheckSpawn#CheckSpawn(EntityLiving, World, float, float, float, MobSpawnerBaseLogic)
insteadpublic boolean isSpawner()
@Nullable public MobSpawnerBaseLogic getSpawner()