Class EntityLeaveWorldEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.entity.EntityEvent
net.minecraftforge.event.entity.EntityLeaveWorldEvent

public class EntityLeaveWorldEvent extends EntityEvent
EntityLeaveWorldEvent is fired when an Entity leaves the world.
This event is fired whenever an Entity is removed from the world in ClientLevel.removeEntity(int, Entity.RemovalReason), ServerLevel.removeEntityComplete(Entity, boolean).

world contains the world from which the entity is removed.

This event is not Cancelable.

This event does not have a result. Event.HasResult

This event is fired on the MinecraftForge.EVENT_BUS
  • Field Details

    • world

      private final Level world
  • Constructor Details

    • EntityLeaveWorldEvent

      public EntityLeaveWorldEvent(Entity entity, Level world)
  • Method Details

    • getWorld

      public Level getWorld()