Class VanillaPacketSplitter

java.lang.Object
net.minecraftforge.network.VanillaPacketSplitter

public class VanillaPacketSplitter extends Object
A custom payload channel that allows sending vanilla server-to-client packets, even if they would normally be too large for the vanilla protocol. This is achieved by splitting them into multiple custom payload packets.
  • Field Details

  • Constructor Details

    • VanillaPacketSplitter

      public VanillaPacketSplitter()
  • Method Details

    • register

      public static void register()
    • appendPackets

      public static void appendPackets(ConnectionProtocol protocol, PacketFlow direction, Packet<?> packet, List<? super Packet<?>> out)
      Append the given packet to the given list. If the packet needs to be split, multiple packets will be appened. Otherwise only the packet itself.
    • heuristicIsDefinitelySmallEnough

      private static boolean heuristicIsDefinitelySmallEnough(Packet<?> packet)
    • onClientPacket

      private static void onClientPacket(NetworkEvent.ServerCustomPayloadEvent event)
    • getRemoteCompatibility

      public static VanillaPacketSplitter.RemoteCompatibility getRemoteCompatibility(Connection manager)
    • isRemoteCompatible

      public static boolean isRemoteCompatible(Connection manager)