Class MobSpawnEvent.AllowDespawn
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.entity.EntityEvent
net.neoforged.neoforge.event.entity.living.MobSpawnEvent
net.neoforged.neoforge.event.entity.living.MobSpawnEvent.AllowDespawn
- Enclosing class:
MobSpawnEvent
This event is fired from
It fires once per tick per mob that is attempting to despawn.
It is not fired if the mob is persistent (meaning it may not despawn).
Mob.checkDespawn()
.It fires once per tick per mob that is attempting to despawn.
It is not fired if the mob is persistent (meaning it may not despawn).
This event is not cancellable, but does have a result.
Event.Result.DEFAULT
indicates that default despawn mechanics should be used.
Event.Result.ALLOW
indicates that the mob should forcefully despawn.
Event.Result.DENY
indicates that the mob should forcefully stay spawned.
This event is fired on the main Forge event bus, only on the logical server.
- Author:
- cpw
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class net.neoforged.neoforge.event.entity.living.MobSpawnEvent
MobSpawnEvent.AllowDespawn, MobSpawnEvent.FinalizeSpawn, MobSpawnEvent.PositionCheck, MobSpawnEvent.SpawnPlacementCheck
Nested classes/interfaces inherited from class net.neoforged.neoforge.event.entity.EntityEvent
EntityEvent.EnteringSection, EntityEvent.EntityConstructing, EntityEvent.Size
Nested classes/interfaces inherited from class net.neoforged.bus.api.Event
net.neoforged.bus.api.Event.HasResult, net.neoforged.bus.api.Event.Result
-
Constructor Summary
-
Method Summary
Methods inherited from class net.neoforged.neoforge.event.entity.living.MobSpawnEvent
getEntity, getLevel, getX, getY, getZ
Methods inherited from class net.neoforged.bus.api.Event
getResult, hasResult, setResult
-
Constructor Details
-
AllowDespawn
-