类 EventNetworkChannel
An event-bus like object on which
CustomPayloadEvent
s are posted.
These events are fired from the network thread, and so should not interact with most game state by default.
CustomPayloadEvent.Context.enqueueWork(Runnable)
can be used to handle the message on the main server or client
thread.- 另请参阅:
-
嵌套类概要
从类继承的嵌套类/接口 net.minecraftforge.network.Channel
Channel.VersionTest
-
字段概要
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明<T extends CustomPayloadEvent>
EventNetworkChanneladdListener
(Consumer<T> eventListener) void
encode
(FriendlyByteBuf out, FriendlyByteBuf message) registerObject
(Object object) void
unregisterObject
(Object object) 从类继承的方法 net.minecraftforge.network.Channel
getName, getName, getProtocolVersion, isRemotePresent, reply, send, send, toVanillaPacket, validate
-
构造器详细资料
-
EventNetworkChannel
EventNetworkChannel(NetworkInstance instance)
-
-
方法详细资料
-
addListener
-
registerObject
-
unregisterObject
-
encode
- 指定者:
encode
在类中Channel<FriendlyByteBuf>
-