Class EntityEvent.Size

java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.entity.EntityEvent
net.minecraftforge.event.entity.EntityEvent.Size
Enclosing class:
EntityEvent

public static class EntityEvent.Size extends EntityEvent
This event is fired whenever the Pose changes, and in a few other hardcoded scenarios.
CAREFUL: This is also fired in the Entity constructor. Therefore the entity(subclass) might not be fully initialized. Check Entity#isAddedToWorld() or !Entity#firstUpdate.
If you change the player's size, you probably want to set the eye height accordingly as well

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

    • pose

      private final Pose pose
    • oldSize

      private final EntitySize oldSize
    • newSize

      private EntitySize newSize
    • oldEyeHeight

      private final float oldEyeHeight
    • newEyeHeight

      private float newEyeHeight
  • Constructor Details

  • Method Details

    • getPose

      public Pose getPose()
    • getOldSize

      public EntitySize getOldSize()
    • getNewSize

      public EntitySize getNewSize()
    • setNewSize

      public void setNewSize(EntitySize size)
    • setNewSize

      public void setNewSize(EntitySize size, boolean updateEyeHeight)
      Set the new size of the entity. Set updateEyeHeight to true to also update the eye height according to the new size.
    • getOldEyeHeight

      public float getOldEyeHeight()
    • getNewEyeHeight

      public float getNewEyeHeight()
    • setNewEyeHeight

      public void setNewEyeHeight(float newHeight)