Class EntityTickEvent.Pre

java.lang.Object
net.neoforged.bus.api.Event
All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent
Enclosing class:
EntityTickEvent

public static class EntityTickEvent.Pre extends EntityTickEvent implements net.neoforged.bus.api.ICancellableEvent
EntityTickEvent.Pre is fired once per game tick, per entity, before the entity performs work for the current tick.

This event fires on both the logical server and logical client.

  • Constructor Details

    • Pre

      public Pre(Entity entity)
  • Method Details

    • setCanceled

      public void setCanceled(boolean canceled)
      Cancels this event, preventing the current tick from being executed for the entity.

      Additionally, if this event is canceled, then EntityTickEvent.Post will not be fired for the current tick.

      Specified by:
      setCanceled in interface net.neoforged.bus.api.ICancellableEvent