类 NetworkInstance
java.lang.Object
net.minecraftforge.network.NetworkInstance
This is essentially the shared common class for
SimpleChannel
and EventNetworkChannel
.
I've now introduced Channel
as that common modder facing base class. I am basically using this
as the internal API and Channel
as the public.-
字段概要
字段修饰符和类型字段说明(专用程序包) final Map
<io.netty.util.AttributeKey<?>, Function<Connection, ?>> (专用程序包) final Consumer
<Connection> private final ResourceLocation
(专用程序包) final Channel.VersionTest
private final Set
<ResourceLocation> private final net.minecraftforge.eventbus.api.IEventBus
private final int
(专用程序包) final ServerStatusPing.ChannelData
(专用程序包) final Channel.VersionTest
-
构造器概要
构造器构造器说明NetworkInstance
(ResourceLocation channelName, int networkProtocolVersion, Channel.VersionTest clientAcceptedVersions, Channel.VersionTest serverAcceptedVersions, Map<io.netty.util.AttributeKey<?>, Function<Connection, ?>> attributes, Consumer<Connection> channelHandler) -
方法概要
修饰符和类型方法说明addChild
(ResourceLocation name) Registers another name that will have its CustomPayloadEvents redirected to this channel.<T extends CustomPayloadEvent>
voidaddListener
(Consumer<T> eventListener) boolean
dispatch
(CustomPayloadEvent event) (专用程序包) ResourceLocation
(专用程序包) int
private void
handleError
(net.minecraftforge.eventbus.api.IEventBus iEventBus, net.minecraftforge.eventbus.api.Event event, net.minecraftforge.eventbus.api.IEventListener[] iEventListeners, int i, Throwable throwable) (专用程序包) boolean
void
registerObject
(Object object) (专用程序包) void
registrationChange
(ResourceLocation name, boolean registered) void
unregisterObject
(Object object)
-
字段详细资料
-
networkEventBus
private final net.minecraftforge.eventbus.api.IEventBus networkEventBus -
channelName
-
networkProtocolVersion
private final int networkProtocolVersion -
clientAcceptedVersions
-
serverAcceptedVersions
-
attributes
-
channelHandler
-
pingData
-
ids
-
-
构造器详细资料
-
NetworkInstance
NetworkInstance(ResourceLocation channelName, int networkProtocolVersion, Channel.VersionTest clientAcceptedVersions, Channel.VersionTest serverAcceptedVersions, Map<io.netty.util.AttributeKey<?>, Function<Connection, ?>> attributes, Consumer<Connection> channelHandler)
-
-
方法详细资料
-
handleError
private void handleError(net.minecraftforge.eventbus.api.IEventBus iEventBus, net.minecraftforge.eventbus.api.Event event, net.minecraftforge.eventbus.api.IEventListener[] iEventListeners, int i, Throwable throwable) -
addListener
-
registerObject
-
unregisterObject
-
dispatch
-
addChild
Registers another name that will have its CustomPayloadEvents redirected to this channel. Like the main name, this must be unique across all channels. -
getChannelName
ResourceLocation getChannelName() -
getNetworkProtocolVersion
int getNetworkProtocolVersion() -
registrationChange
-
isRemotePresent
-