Class NetworkInstance

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

@Internal public final class NetworkInstance extends Object
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 Details

  • Constructor Details

  • Method Details

    • 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 CustomPayloadEvent> void addListener(Consumer<T> eventListener)
    • registerObject

      public void registerObject(Object object)
    • unregisterObject

      public void unregisterObject(Object object)
    • dispatch

      public boolean dispatch(CustomPayloadEvent event)
    • addChild

      public NetworkInstance addChild(ResourceLocation name)
      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

      void registrationChange(ResourceLocation name, boolean registered)
    • isRemotePresent

      boolean isRemotePresent(Connection con)