Class NetworkInstance

java.lang.Object
net.minecraftforge.fml.network.NetworkInstance

public class NetworkInstance extends Object
  • Field Details

    • channelName

      private final ResourceLocation channelName
    • networkProtocolVersion

      private final String networkProtocolVersion
    • clientAcceptedVersions

      private final Predicate<String> clientAcceptedVersions
    • serverAcceptedVersions

      private final Predicate<String> serverAcceptedVersions
    • networkEventBus

      private final net.minecraftforge.eventbus.api.IEventBus networkEventBus
  • Constructor Details

  • Method Details

    • getChannelName

      public ResourceLocation 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

      public <T extends NetworkEvent> void addListener(Consumer<T> eventListener)
    • addGatherListener

      public void addGatherListener(Consumer<NetworkEvent.GatherLoginPayloadsEvent> eventListener)
    • registerObject

      public void registerObject(Object object)
    • unregisterObject

      public void unregisterObject(Object object)
    • dispatch

      boolean dispatch(NetworkDirection side, ICustomPacket<?> packet, NetworkManager manager)
    • getNetworkProtocolVersion

      String getNetworkProtocolVersion()
    • tryServerVersionOnClient

      boolean tryServerVersionOnClient(String serverVersion)
    • tryClientVersionOnServer

      boolean tryClientVersionOnServer(String clientVersion)
    • dispatchGatherLogin

      void dispatchGatherLogin(List<NetworkRegistry.LoginPayload> loginPayloadList, boolean isLocal)
    • dispatchLoginPacket

      void dispatchLoginPacket(NetworkEvent.LoginPayloadEvent loginPayloadEvent)
    • dispatchEvent

      void dispatchEvent(NetworkEvent networkEvent)
    • isRemotePresent

      public boolean isRemotePresent(NetworkManager manager)