Interface GameEventDispatcher
- All Known Implementing Classes:
SimpleGameEventDispatcher
public interface GameEventDispatcher
A game event dispatcher dispatches game events to its listeners.
- Mappings:
Namespace Name named net/minecraft/world/event/listener/GameEventDispatcherintermediary net/minecraft/class_5713official equ
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final GameEventDispatcherAn unmodifiable, empty (non-operative) dispatcher. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(GameEventListener listener) Adds a listener to this dispatcher.booleandispatch(RegistryEntry<GameEvent> event, Vec3d pos, GameEvent.Emitter emitter, GameEventDispatcher.DispatchCallback callback) Dispatches an event to all the listeners in this dispatcher.booleanisEmpty()Returns whether this dispatcher has no listeners.voidremoveListener(GameEventListener listener) Removes a listener from this dispatcher if it is present.
-
Field Details
-
EMPTY
An unmodifiable, empty (non-operative) dispatcher.- Mappings:
Namespace Name Mixin selector named EMPTYLnet/minecraft/world/event/listener/GameEventDispatcher;EMPTY:Lnet/minecraft/world/event/listener/GameEventDispatcher;intermediary field_28181Lnet/minecraft/class_5713;field_28181:Lnet/minecraft/class_5713;official aLequ;a:Lequ;
-
-
Method Details
-
isEmpty
boolean isEmpty()Returns whether this dispatcher has no listeners.- Mappings:
Namespace Name Mixin selector named isEmptyLnet/minecraft/world/event/listener/GameEventDispatcher;isEmpty()Zintermediary method_32942Lnet/minecraft/class_5713;method_32942()Zofficial aLequ;a()Z
-
addListener
Adds a listener to this dispatcher.- Parameters:
listener- the listener to add- Mappings:
Namespace Name Mixin selector named addListenerLnet/minecraft/world/event/listener/GameEventDispatcher;addListener(Lnet/minecraft/world/event/listener/GameEventListener;)Vintermediary method_32944Lnet/minecraft/class_5713;method_32944(Lnet/minecraft/class_5714;)Vofficial aLequ;a(Leqt;)V
-
removeListener
Removes a listener from this dispatcher if it is present.- Parameters:
listener- the listener to remove- Mappings:
Namespace Name Mixin selector named removeListenerLnet/minecraft/world/event/listener/GameEventDispatcher;removeListener(Lnet/minecraft/world/event/listener/GameEventListener;)Vintermediary method_32945Lnet/minecraft/class_5713;method_32945(Lnet/minecraft/class_5714;)Vofficial bLequ;b(Leqt;)V
-
dispatch
boolean dispatch(RegistryEntry<GameEvent> event, Vec3d pos, GameEvent.Emitter emitter, GameEventDispatcher.DispatchCallback callback) Dispatches an event to all the listeners in this dispatcher.- Parameters:
event- the event- Mappings:
Namespace Name Mixin selector named dispatchLnet/minecraft/world/event/listener/GameEventDispatcher;dispatch(Lnet/minecraft/registry/entry/RegistryEntry;Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/world/event/GameEvent$Emitter;Lnet/minecraft/world/event/listener/GameEventDispatcher$DispatchCallback;)Zintermediary method_32943Lnet/minecraft/class_5713;method_32943(Lnet/minecraft/class_6880;Lnet/minecraft/class_243;Lnet/minecraft/class_5712$class_7397;Lnet/minecraft/class_5713$class_7721;)Zofficial aLequ;a(Ljj;Lfqj;Leqr$a;Lequ$a;)Z
-