Package net.minecraftforge.event
Class VanillaGameEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.VanillaGameEvent
public class VanillaGameEvent
extends net.minecraftforge.eventbus.api.Event
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
MinecraftForge.EVENT_BUS
. Cancel this event to prevent Vanilla from posting the
GameEvent
to all nearby GameEventListeners
.-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Field Summary
Modifier and TypeFieldDescriptionprivate final GameEvent.Context
private final Level
private final Vec3
private final GameEvent
-
Constructor Summary
ConstructorDescriptionVanillaGameEvent
(Level level, GameEvent vanillaEvent, Vec3 position, GameEvent.Context context) -
Method Summary
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Field Details
-
level
-
vanillaEvent
-
position
-
context
-
-
Constructor Details
-
VanillaGameEvent
public VanillaGameEvent(Level level, GameEvent vanillaEvent, Vec3 position, GameEvent.Context context)
-
-
Method Details