Class EntityMountEvent

java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.entity.EntityEvent
net.neoforged.neoforge.event.entity.EntityMountEvent
All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent

public class EntityMountEvent extends EntityEvent implements net.neoforged.bus.api.ICancellableEvent
This event gets fired whenever a entity mounts/dismounts another entity.
entityBeingMounted can be null, be sure to check for that.

This event is ICancellableEvent.
If this event is canceled, the entity does not mount/dismount the other entity.

This event does not have a result.
invalid reference
HasResult


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

    • entityMounting

      private final Entity entityMounting
    • entityBeingMounted

      private final Entity entityBeingMounted
    • level

      private final Level level
    • isMounting

      private final boolean isMounting
  • Constructor Details

    • EntityMountEvent

      public EntityMountEvent(Entity entityMounting, Entity entityBeingMounted, Level level, boolean isMounting)
  • Method Details

    • isMounting

      public boolean isMounting()
    • isDismounting

      public boolean isDismounting()
    • getEntityMounting

      public Entity getEntityMounting()
    • getEntityBeingMounted

      public Entity getEntityBeingMounted()
    • getLevel

      public Level getLevel()