类 SimpleGameEventDispatcher
- java.lang.Object
-
- net.minecraft.world.event.listener.SimpleGameEventDispatcher
-
- 所有已实现的接口:
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 cnsintermediary net/minecraft/class_5711named net/minecraft/world/event/listener/SimpleGameEventDispatcher
-
-
字段概要
字段 修饰符和类型 字段 说明 private List<GameEventListener>listenersprivate Worldworld-
从接口继承的字段 net.minecraft.world.event.listener.GameEventDispatcher
EMPTY
-
-
构造器概要
构造器 构造器 说明 SimpleGameEventDispatcher(World world)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidaddListener(GameEventListener listener)Adds a listener to this dispatcher.voiddispatch(GameEvent event, @Nullable Entity entity, BlockPos pos)Dispatches an event to all the listeners in this dispatcher.private booleandispatchTo(World world, GameEvent event, @Nullable Entity entity, BlockPos pos, GameEventListener listener)booleanisEmpty()Returns whether this dispatcher has no listeners.voidremoveListener(GameEventListener listener)Removes a listener from this dispatcher if it is present.
-
-
-
字段详细资料
-
listeners
private final List<GameEventListener> listeners
- Mappings:
Namespace Name Mixin selector official bLcns;b:Ljava/util/List;intermediary field_28142Lnet/minecraft/class_5711;field_28142:Ljava/util/List;named listenersLnet/minecraft/world/event/listener/SimpleGameEventDispatcher;listeners:Ljava/util/List;
-
world
private final World world
- Mappings:
Namespace Name Mixin selector official cLcns;c:Lbvr;intermediary field_28143Lnet/minecraft/class_5711;field_28143:Lnet/minecraft/class_1937;named worldLnet/minecraft/world/event/listener/SimpleGameEventDispatcher;world:Lnet/minecraft/world/World;
-
-
构造器详细资料
-
SimpleGameEventDispatcher
public SimpleGameEventDispatcher(World world)
- Mappings:
Namespace Name Mixin selector official <init>Lcns;<init>(Lbvr;)Vintermediary <init>Lnet/minecraft/class_5711;<init>(Lnet/minecraft/class_1937;)Vnamed <init>Lnet/minecraft/world/event/listener/SimpleGameEventDispatcher;<init>(Lnet/minecraft/world/World;)V
-
-
方法详细资料
-
isEmpty
public boolean isEmpty()
Returns whether this dispatcher has no listeners.- 指定者:
isEmpty在接口中GameEventDispatcher- Mappings:
Namespace Name Mixin selector official aLcnu;a()Zintermediary method_32942Lnet/minecraft/class_5713;method_32942()Znamed isEmptyLnet/minecraft/world/event/listener/GameEventDispatcher;isEmpty()Z
-
addListener
public void addListener(GameEventListener listener)
Adds a listener to this dispatcher.- 指定者:
addListener在接口中GameEventDispatcher- 参数:
listener- the listener to add- Mappings:
Namespace Name Mixin selector official aLcnu;a(Lcnv;)Vintermediary method_32944Lnet/minecraft/class_5713;method_32944(Lnet/minecraft/class_5714;)Vnamed addListenerLnet/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.- 指定者:
removeListener在接口中GameEventDispatcher- 参数:
listener- the listener to remove- Mappings:
Namespace Name Mixin selector official bLcnu;b(Lcnv;)Vintermediary method_32945Lnet/minecraft/class_5713;method_32945(Lnet/minecraft/class_5714;)Vnamed removeListenerLnet/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.- 指定者:
dispatch在接口中GameEventDispatcher- 参数:
event- the evententity- an entity related to the eventpos- the block position of the event- Mappings:
Namespace Name Mixin selector official aLcnu;a(Lcnt;Lasl;Lgb;)Vintermediary method_32943Lnet/minecraft/class_5713;method_32943(Lnet/minecraft/class_5712;Lnet/minecraft/class_1297;Lnet/minecraft/class_2338;)Vnamed dispatchLnet/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 aLcns;a(Lbvr;Lcnt;Lasl;Lgb;Lcnv;)Zintermediary method_32936Lnet/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;)Znamed dispatchToLnet/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
-
-