Class LivingSpawnEvent.AllowDespawn
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.entity.EntityEvent
net.minecraftforge.event.entity.living.LivingEvent
net.minecraftforge.event.entity.living.LivingSpawnEvent
net.minecraftforge.event.entity.living.LivingSpawnEvent.AllowDespawn
- Enclosing class:
- LivingSpawnEvent
Fired each tick for despawnable mobs to allow control over despawning.
Event.Result.DEFAULT
will pass the mob on to vanilla despawn mechanics.
Event.Result.ALLOW
will force the mob to despawn.
Event.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
- Author:
- cpw
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.living.LivingSpawnEvent
LivingSpawnEvent.AllowDespawn, LivingSpawnEvent.CheckSpawn, LivingSpawnEvent.SpecialSpawn
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.living.LivingEvent
LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEvent, LivingEvent.LivingVisibilityEvent
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.EntityEvent
EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing, EntityEvent.Size
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Constructor Summary
-
Method Summary
Methods inherited from class net.minecraftforge.event.entity.living.LivingSpawnEvent
getWorld, getX, getY, getZ
Methods inherited from class net.minecraftforge.event.entity.living.LivingEvent
getEntityLiving
Methods inherited from class net.minecraftforge.event.entity.EntityEvent
getEntity
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
-
Constructor Details
-
AllowDespawn
-