Package net.neoforged.neoforge.event
Class VanillaGameEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.VanillaGameEvent
- All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent
public class VanillaGameEvent
extends net.neoforged.bus.api.Event
implements net.neoforged.bus.api.ICancellableEvent
VanillaGameEvent is fired on the server whenever one of Vanilla's
This allows for listening to Vanilla's events in a more structured and global way that is not tied to needing a block entity listener.
This event is fired on the
Cancel this event to prevent Vanilla from posting the
GameEvents
fire. This allows for listening to Vanilla's events in a more structured and global way that is not tied to needing a block entity listener.
This event is fired on the
NeoForge.EVENT_BUS
. Cancel this event to prevent Vanilla from posting the
GameEvent
to all nearby GameEventListeners
.-
Field Summary
Modifier and TypeFieldDescriptionprivate final GameEvent.Context
private final Level
private final Vec3
-
Constructor Summary
ConstructorDescriptionVanillaGameEvent
(Level level, Holder<GameEvent> vanillaEvent, Vec3 position, GameEvent.Context context) -
Method Summary
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, setCanceled
-
Field Details
-
level
-
vanillaEvent
-
position
-
context
-
-
Constructor Details
-
VanillaGameEvent
public VanillaGameEvent(Level level, Holder<GameEvent> vanillaEvent, Vec3 position, GameEvent.Context context)
-
-
Method Details