接口 GameEventDispatcher

  • 所有已知实现类:
    SimpleGameEventDispatcher

    public interface GameEventDispatcher
    A game event dispatcher dispatches game events to its listeners.
    Mappings:
    Namespace Name
    official cnu
    intermediary net/minecraft/class_5713
    named net/minecraft/world/event/listener/GameEventDispatcher
    • 字段详细资料

      • EMPTY

        static final GameEventDispatcher EMPTY
        An unmodifiable, empty (non-operative) dispatcher.
        Mappings:
        Namespace Name Mixin selector
        official a Lcnu;a:Lcnu;
        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;
    • 方法详细资料

      • isEmpty

        boolean isEmpty()
        Returns whether this dispatcher has no listeners.
        Mappings:
        Namespace Name Mixin selector
        official a Lcnu;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.
        参数:
        listener - the listener to add
        Mappings:
        Namespace Name Mixin selector
        official a Lcnu;a(Lcnv;)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.
        参数:
        listener - the listener to remove
        Mappings:
        Namespace Name Mixin selector
        official b Lcnu;b(Lcnv;)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

        void dispatch​(GameEvent event,
                      @Nullable
                      @Nullable Entity entity,
                      BlockPos pos)
        Dispatches an event to all the listeners in this dispatcher.
        参数:
        event - the event
        entity - an entity related to the event
        pos - the block position of the event
        Mappings:
        Namespace Name Mixin selector
        official a Lcnu;a(Lcnt;Lasl;Lgb;)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