Class EntityEvent

java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.entity.EntityEvent
Direct Known Subclasses:
EntityEvent.EnteringSection, EntityEvent.EntityConstructing, EntityEvent.Size, EntityInvulnerabilityCheckEvent, EntityJoinLevelEvent, EntityLeaveLevelEvent, EntityMobGriefingEvent, EntityMountEvent, EntityStruckByLightningEvent, EntityTeleportEvent, EntityTickEvent, EntityTravelToDimensionEvent, ItemEvent, LivingEvent, MobSpawnEvent, ProjectileImpactEvent

public abstract class EntityEvent extends net.neoforged.bus.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 NeoForge.EVENT_BUS.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    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 
    Fired whenever the entity's Pose changes for manipulating the resulting EntityDimensions.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final net.minecraft.world.entity.Entity
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    EntityEvent(net.minecraft.world.entity.Entity entity)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.world.entity.Entity
     

    Methods inherited from class java.lang.Object

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

    • entity

      private final net.minecraft.world.entity.Entity entity
  • Constructor Details

    • EntityEvent

      public EntityEvent(net.minecraft.world.entity.Entity entity)
  • Method Details

    • getEntity

      public net.minecraft.world.entity.Entity getEntity()