Class EntityLeaveLevelEvent

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

public class EntityLeaveLevelEvent extends EntityEvent
This event is fired whenever an Entity leaves a Level. This event is fired whenever an entity is removed from the level in LevelCallback.onTrackingEnd(Object).

This event is not cancellable and does not have a result.

This event is fired on the main Forge event bus on both logical sides.

  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraftforge.event.entity.EntityEvent

    EntityEvent.EnteringSection, EntityEvent.EntityConstructing

    Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event

    net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final Level
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the level the entity is set to leave.

    Methods inherited from class net.minecraftforge.event.entity.EntityEvent

    getEntity

    Methods inherited from class net.minecraftforge.eventbus.api.Event

    getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • level

      private final Level level
  • Constructor Details

    • EntityLeaveLevelEvent

      public EntityLeaveLevelEvent(Entity entity, Level level)
  • Method Details

    • getLevel

      public Level getLevel()
      Returns the level the entity is set to leave.
      Returns:
      the level the entity is set to leave