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.- 
Nested Class SummaryNested classes/interfaces inherited from class net.neoforged.bus.api.Eventnet.neoforged.bus.api.Event.HasResult, net.neoforged.bus.api.Event.Result
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final GameEvent.Contextprivate final Levelprivate final Vec3private final GameEvent
- 
Constructor SummaryConstructorsConstructorDescriptionVanillaGameEvent(Level level, GameEvent vanillaEvent, Vec3 position, GameEvent.Context context) 
- 
Method SummaryMethods inherited from class net.neoforged.bus.api.EventgetResult, hasResult, setResultMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.bus.api.ICancellableEventisCanceled, setCanceled
- 
Field Details- 
level
- 
vanillaEvent
- 
position
- 
context
 
- 
- 
Constructor Details- 
VanillaGameEventpublic VanillaGameEvent(Level level, GameEvent vanillaEvent, Vec3 position, GameEvent.Context context) 
 
- 
- 
Method Details