Class EntityTickEvent.Pre
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.entity.EntityEvent
net.neoforged.neoforge.event.tick.EntityTickEvent
net.neoforged.neoforge.event.tick.EntityTickEvent.Pre
- 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.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.neoforged.neoforge.event.tick.EntityTickEvent
EntityTickEvent.Post, EntityTickEvent.PreNested classes/interfaces inherited from class net.neoforged.neoforge.event.entity.EntityEvent
EntityEvent.EnteringSection, EntityEvent.EntityConstructing, EntityEvent.Size -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetCanceled(boolean canceled) Cancels this event, preventing the current tick from being executed for the entity.Methods inherited from class net.neoforged.neoforge.event.entity.EntityEvent
getEntityMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.bus.api.ICancellableEvent
isCanceled
-
Constructor Details
-
Pre
-
-
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.Postwill not be fired for the current tick.- Specified by:
setCanceledin interfacenet.neoforged.bus.api.ICancellableEvent
-