Class NetworkInstance
java.lang.Object
net.minecraftforge.fmllegacy.network.NetworkInstance
-
Field Summary
Modifier and TypeFieldDescriptionprivate ResourceLocation
private net.minecraftforge.eventbus.api.IEventBus
private String
-
Constructor Summary
ConstructorDescriptionNetworkInstance(ResourceLocation channelName, Supplier<String> networkProtocolVersion, Predicate<String> clientAcceptedVersions, Predicate<String> serverAcceptedVersions)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addGatherListener(Consumer<NetworkEvent.GatherLoginPayloadsEvent> eventListener)
<T extends NetworkEvent>
voidaddListener(Consumer<T> eventListener)
(package private) boolean
dispatch(NetworkDirection side, ICustomPacket<?> packet, Connection manager)
(package private) void
dispatchEvent(NetworkEvent networkEvent)
(package private) void
dispatchGatherLogin(List<NetworkRegistry.LoginPayload> loginPayloadList, boolean isLocal)
(package private) void
dispatchLoginPacket(NetworkEvent.LoginPayloadEvent loginPayloadEvent)
(package private) String
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
isRemotePresent(Connection manager)
void
registerObject(Object object)
(package private) boolean
tryClientVersionOnServer(String clientVersion)
(package private) boolean
tryServerVersionOnClient(String serverVersion)
void
unregisterObject(Object object)
-
Field Details
-
channelName
-
networkProtocolVersion
-
clientAcceptedVersions
-
serverAcceptedVersions
-
networkEventBus
private final net.minecraftforge.eventbus.api.IEventBus networkEventBus
-
-
Constructor Details
-
NetworkInstance
-
-
Method Details
-
getChannelName
-
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
-
addGatherListener
-
registerObject
-
unregisterObject
-
dispatch
-
getNetworkProtocolVersion
String getNetworkProtocolVersion() -
tryServerVersionOnClient
-
tryClientVersionOnServer
-
dispatchGatherLogin
-
dispatchLoginPacket
-
dispatchEvent
-
isRemotePresent
-