Package net.minecraftforge.network
Class 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.- 
Field SummaryFieldsModifier and TypeFieldDescription(package private) final Map<io.netty.util.AttributeKey<?>, Function<Connection, ?>> (package private) final Consumer<Connection> private final ResourceLocation(package private) final Channel.VersionTestprivate final Set<ResourceLocation> private final net.minecraftforge.eventbus.api.IEventBusprivate final int(package private) final ServerStatusPing.ChannelData(package private) final Channel.VersionTest
- 
Constructor SummaryConstructorsConstructorDescriptionNetworkInstance(ResourceLocation channelName, int networkProtocolVersion, Channel.VersionTest clientAcceptedVersions, Channel.VersionTest serverAcceptedVersions, Map<io.netty.util.AttributeKey<?>, Function<Connection, ?>> attributes, Consumer<Connection> channelHandler) 
- 
Method SummaryModifier and TypeMethodDescriptionaddChild(ResourceLocation name) Registers another name that will have its CustomPayloadEvents redirected to this channel.<T extends CustomPayloadEvent>
 voidaddListener(Consumer<T> eventListener) booleandispatch(CustomPayloadEvent event) (package private) ResourceLocation(package private) intprivate voidhandleError(net.minecraftforge.eventbus.api.IEventBus iEventBus, net.minecraftforge.eventbus.api.Event event, net.minecraftforge.eventbus.api.IEventListener[] iEventListeners, int i, Throwable throwable) (package private) booleanvoidregisterObject(Object object) (package private) voidregistrationChange(ResourceLocation name, boolean registered) voidunregisterObject(Object object) 
- 
Field Details- 
networkEventBusprivate final net.minecraftforge.eventbus.api.IEventBus networkEventBus
- 
channelName
- 
networkProtocolVersionprivate final int networkProtocolVersion
- 
clientAcceptedVersions
- 
serverAcceptedVersions
- 
attributes
- 
channelHandler
- 
pingData
- 
ids
 
- 
- 
Constructor Details- 
NetworkInstanceNetworkInstance(ResourceLocation channelName, int networkProtocolVersion, Channel.VersionTest clientAcceptedVersions, Channel.VersionTest serverAcceptedVersions, Map<io.netty.util.AttributeKey<?>, Function<Connection, ?>> attributes, Consumer<Connection> channelHandler) 
 
- 
- 
Method Details- 
handleErrorprivate 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
- 
addChildRegisters another name that will have its CustomPayloadEvents redirected to this channel. Like the main name, this must be unique across all channels.
- 
getChannelNameResourceLocation getChannelName()
- 
getNetworkProtocolVersionint getNetworkProtocolVersion()
- 
registrationChange
- 
isRemotePresent
 
-