public static class LivingSpawnEvent.CheckSpawn extends LivingSpawnEvent
LivingSpawnEvent.AllowDespawn, LivingSpawnEvent.CheckSpawn, LivingSpawnEvent.SpecialSpawn
LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEvent
EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing, EntityEvent.EyeHeight
Modifier and Type | Field and Description |
---|---|
private AbstractSpawner |
spawner |
private SpawnReason |
spawnReason |
Constructor and Description |
---|
CheckSpawn(MobEntity entity,
IWorld world,
double x,
double y,
double z,
AbstractSpawner spawner,
SpawnReason spawnReason)
CheckSpawn is fired when an Entity is about to be spawned.
|
Modifier and Type | Method and Description |
---|---|
AbstractSpawner |
getSpawner() |
SpawnReason |
getSpawnReason() |
boolean |
isSpawner() |
getWorld, getX, getY, getZ
getEntityLiving
getEntity
@Nullable private final AbstractSpawner spawner
private final SpawnReason spawnReason
public CheckSpawn(MobEntity entity, IWorld world, double x, double y, double z, @Nullable AbstractSpawner spawner, SpawnReason spawnReason)
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 WorldSpawnerpublic boolean isSpawner()
@Nullable public AbstractSpawner getSpawner()
public SpawnReason getSpawnReason()