Class EntityEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.entity.EntityEvent
Direct Known Subclasses:
EntityEvent.CanUpdate, EntityEvent.EnteringSection, EntityEvent.EntityConstructing, EntityEvent.Size, EntityJoinWorldEvent, EntityLeaveWorldEvent, EntityMobGriefingEvent, EntityMountEvent, EntityStruckByLightningEvent, EntityTeleportEvent, EntityTravelToDimensionEvent, ItemEvent, LivingEvent, PlaySoundAtEntityEvent, ProjectileImpactEvent, RenderNameplateEvent, ZombieEvent

public class EntityEvent extends net.minecraftforge.eventbus.api.Event
EntityEvent is fired when an event involving any Entity occurs.
If a method utilizes this Event as its parameter, the method will receive every child event of this class.

entity contains the entity that caused this event to occur.

All children of this event are fired on the MinecraftForge.EVENT_BUS.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    CanUpdate is fired when an Entity is being created.
    static class 
    This event is fired on server and client after an Entity has entered a different section.
    static class 
    EntityConstructing is fired when an Entity is being created.
    static class 
    This event is fired whenever the Pose changes, and in a few other hardcoded scenarios.
    CAREFUL: This is also fired in the Entity constructor.

    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 Entity
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    EntityEvent​(Entity entity)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     

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

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

    Methods inherited from class java.lang.Object

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

    • entity

      private final Entity entity
  • Constructor Details

    • EntityEvent

      public EntityEvent(Entity entity)
  • Method Details

    • getEntity

      public Entity getEntity()