public static class LivingSpawnEvent.AllowDespawn extends LivingSpawnEvent
Result#DEFAULT
will pass the mob on to vanilla despawn mechanics.
Result#ALLOW
will force the mob to despawn.
Result#DENY
will force the mob to remain.
This is fired every tick for every despawnable entity. Be efficient in your handlers.
Note: this is not fired if the mob is definitely going to otherwise despawn. It is fired to check if
the mob can be allowed to despawn. See EntityLiving.despawnEntity()
LivingSpawnEvent.AllowDespawn, LivingSpawnEvent.CheckSpawn, LivingSpawnEvent.SpecialSpawn
LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEvent
EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing
Event.HasResult, Event.Result
Constructor and Description |
---|
AllowDespawn(EntityLiving entity) |
getWorld, getX, getY, getZ
getEntityLiving
getEntity
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
public AllowDespawn(EntityLiving entity)