Class SimpleGameEventDispatcher

java.lang.Object
net.minecraft.world.event.listener.SimpleGameEventDispatcher
All Implemented Interfaces:
GameEventDispatcher

public class SimpleGameEventDispatcher extends Object implements GameEventDispatcher
A simple game event dispatcher implementation that has hooks to debug info senders.
API Note:
Vanilla Minecraft creates it on a per-chunk-section basis.
Mappings:
Namespace Name
official cti
intermediary net/minecraft/class_5711
named net/minecraft/world/event/listener/SimpleGameEventDispatcher
  • Field Details

    • listeners

      private final List<GameEventListener> listeners
      Mappings:
      Namespace Name Mixin selector
      official b Lcti;b:Ljava/util/List;
      intermediary field_28142 Lnet/minecraft/class_5711;field_28142:Ljava/util/List;
      named listeners Lnet/minecraft/world/event/listener/SimpleGameEventDispatcher;listeners:Ljava/util/List;
    • field_38613

      private final Set<GameEventListener> field_38613
      Mappings:
      Namespace Name Mixin selector
      official c Lcti;c:Ljava/util/Set;
      intermediary field_38613 Lnet/minecraft/class_5711;field_38613:Ljava/util/Set;
      named field_38613 Lnet/minecraft/world/event/listener/SimpleGameEventDispatcher;field_38613:Ljava/util/Set;
    • field_38614

      private final List<GameEventListener> field_38614
      Mappings:
      Namespace Name Mixin selector
      official d Lcti;d:Ljava/util/List;
      intermediary field_38614 Lnet/minecraft/class_5711;field_38614:Ljava/util/List;
      named field_38614 Lnet/minecraft/world/event/listener/SimpleGameEventDispatcher;field_38614:Ljava/util/List;
    • field_38615

      private boolean field_38615
      Mappings:
      Namespace Name Mixin selector
      official e Lcti;e:Z
      intermediary field_38615 Lnet/minecraft/class_5711;field_38615:Z
      named field_38615 Lnet/minecraft/world/event/listener/SimpleGameEventDispatcher;field_38615:Z
    • world

      private final World world
      Mappings:
      Namespace Name Mixin selector
      official f Lcti;f:Lcay;
      intermediary field_28143 Lnet/minecraft/class_5711;field_28143:Lnet/minecraft/class_1937;
      named world Lnet/minecraft/world/event/listener/SimpleGameEventDispatcher;world:Lnet/minecraft/world/World;
  • Constructor Details

    • SimpleGameEventDispatcher

      public SimpleGameEventDispatcher(World world)
  • Method Details

    • isEmpty

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

      public void addListener(GameEventListener listener)
      Adds a listener to this dispatcher.
      Specified by:
      addListener in interface GameEventDispatcher
      Parameters:
      listener - the listener to add
      Mappings:
      Namespace Name Mixin selector
      official a Lctk;a(Lctl;)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

      public void removeListener(GameEventListener listener)
      Removes a listener from this dispatcher if it is present.
      Specified by:
      removeListener in interface GameEventDispatcher
      Parameters:
      listener - the listener to remove
      Mappings:
      Namespace Name Mixin selector
      official b Lctk;b(Lctl;)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

      public void dispatch(GameEvent event, @Nullable @Nullable Entity entity, BlockPos pos)
      Dispatches an event to all the listeners in this dispatcher.
      Specified by:
      dispatch in interface GameEventDispatcher
      Parameters:
      event - the event
      entity - an entity related to the event
      pos - the block position of the event
      Mappings:
      Namespace Name Mixin selector
      official a Lctk;a(Lctj;Laxp;Lgk;)V
      intermediary method_32943 Lnet/minecraft/class_5713;method_32943(Lnet/minecraft/class_5712;Lnet/minecraft/class_1297;Lnet/minecraft/class_2338;)V
      named dispatch Lnet/minecraft/world/event/listener/GameEventDispatcher;dispatch(Lnet/minecraft/world/event/GameEvent;Lnet/minecraft/entity/Entity;Lnet/minecraft/util/math/BlockPos;)V
    • dispatchTo

      private boolean dispatchTo(World world, GameEvent event, @Nullable @Nullable Entity entity, BlockPos pos, GameEventListener listener)
      Mappings:
      Namespace Name Mixin selector
      official a Lcti;a(Lcay;Lctj;Laxp;Lgk;Lctl;)Z
      intermediary method_32936 Lnet/minecraft/class_5711;method_32936(Lnet/minecraft/class_1937;Lnet/minecraft/class_5712;Lnet/minecraft/class_1297;Lnet/minecraft/class_2338;Lnet/minecraft/class_5714;)Z
      named dispatchTo Lnet/minecraft/world/event/listener/SimpleGameEventDispatcher;dispatchTo(Lnet/minecraft/world/World;Lnet/minecraft/world/event/GameEvent;Lnet/minecraft/entity/Entity;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/world/event/listener/GameEventListener;)Z