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.Pre
Nested classes/interfaces inherited from class net.neoforged.neoforge.event.entity.EntityEvent
EntityEvent.EnteringSection, EntityEvent.EntityConstructing, EntityEvent.Size
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
setCanceled
(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
getEntity
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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.Post
will not be fired for the current tick.- Specified by:
setCanceled
in interfacenet.neoforged.bus.api.ICancellableEvent
-