Interface GameEventDispatcher

All Known Implementing Classes:
SimpleGameEventDispatcher

public interface GameEventDispatcher
A game event dispatcher dispatches game events to its listeners.
Mappings:
Namespace Name
official czw
intermediary net/minecraft/class_5713
named net/minecraft/world/event/listener/GameEventDispatcher
  • Field Details

    • EMPTY

      static final GameEventDispatcher EMPTY
      An unmodifiable, empty (non-operative) dispatcher.
      Mappings:
      Namespace Name Mixin selector
      official a Lczw;a:Lczw;
      intermediary field_28181 Lnet/minecraft/class_5713;field_28181:Lnet/minecraft/class_5713;
      named EMPTY Lnet/minecraft/world/event/listener/GameEventDispatcher;EMPTY:Lnet/minecraft/world/event/listener/GameEventDispatcher;
  • Method Details

    • isEmpty

      boolean isEmpty()
      Returns whether this dispatcher has no listeners.
      Mappings:
      Namespace Name Mixin selector
      official a Lczw;a()Z
      intermediary method_32942 Lnet/minecraft/class_5713;method_32942()Z
      named isEmpty Lnet/minecraft/world/event/listener/GameEventDispatcher;isEmpty()Z
    • addListener

      void addListener(GameEventListener listener)
      Adds a listener to this dispatcher.
      Parameters:
      listener - the listener to add
      Mappings:
      Namespace Name Mixin selector
      official a Lczw;a(Lczx;)V
      intermediary method_32944 Lnet/minecraft/class_5713;method_32944(Lnet/minecraft/class_5714;)V
      named addListener Lnet/minecraft/world/event/listener/GameEventDispatcher;addListener(Lnet/minecraft/world/event/listener/GameEventListener;)V
    • removeListener

      void removeListener(GameEventListener listener)
      Removes a listener from this dispatcher if it is present.
      Parameters:
      listener - the listener to remove
      Mappings:
      Namespace Name Mixin selector
      official b Lczw;b(Lczx;)V
      intermediary method_32945 Lnet/minecraft/class_5713;method_32945(Lnet/minecraft/class_5714;)V
      named removeListener Lnet/minecraft/world/event/listener/GameEventDispatcher;removeListener(Lnet/minecraft/world/event/listener/GameEventListener;)V
    • dispatch

      boolean dispatch(GameEvent event, Vec3d pos, GameEvent.Emitter emitter, BiConsumer<GameEventListener,Vec3d> onListenerAccept)
      Dispatches an event to all the listeners in this dispatcher.
      Parameters:
      event - the event
      Mappings:
      Namespace Name Mixin selector
      official a Lczw;a(Lczv;Ldwq;Lczv$a;Ljava/util/function/BiConsumer;)Z
      intermediary method_32943 Lnet/minecraft/class_5713;method_32943(Lnet/minecraft/class_5712;Lnet/minecraft/class_243;Lnet/minecraft/class_5712$class_7397;Ljava/util/function/BiConsumer;)Z
      named dispatch Lnet/minecraft/world/event/listener/GameEventDispatcher;dispatch(Lnet/minecraft/world/event/GameEvent;Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/world/event/GameEvent$Emitter;Ljava/util/function/BiConsumer;)Z