Package net.minecraftforge.network
Class VanillaPacketSplitter
java.lang.Object
net.minecraftforge.network.VanillaPacketSplitter
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.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final ResourceLocationprivate static final org.apache.logging.log4j.Loggerprivate static final intprivate static final intprivate static final intprivate static final List<PacketBuffer>private static final byteprivate static final byteprivate static final ResourceLocationprivate static final Stringprivate static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidappendPackets(ProtocolType protocol, PacketDirection direction, IPacket<?> packet, List<? super IPacket<?>> out) Append the given packet to the given list.getRemoteCompatibility(NetworkManager manager) private static booleanheuristicIsDefinitelySmallEnough(IPacket<?> packet) static booleanisRemoteCompatible(NetworkManager manager) private static voidstatic voidregister()
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
CHANNEL
-
V11_DUMMY_CHANNEL
-
VERSION
- See Also:
-
VERSION_11
- See Also:
-
PROTOCOL_MAX
private static final int PROTOCOL_MAX- See Also:
-
PAYLOAD_TO_CLIENT_MAX
private static final int PAYLOAD_TO_CLIENT_MAX- See Also:
-
PART_SIZE
private static final int PART_SIZE- See Also:
-
STATE_FIRST
private static final byte STATE_FIRST- See Also:
-
STATE_LAST
private static final byte STATE_LAST- See Also:
-
receivedBuffers
-
-
Constructor Details
-
VanillaPacketSplitter
public VanillaPacketSplitter()
-
-
Method Details
-
register
public static void register() -
appendPackets
public static void appendPackets(ProtocolType protocol, PacketDirection direction, IPacket<?> packet, List<? super IPacket<?>> 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
-
onClientPacket
-
getRemoteCompatibility
public static VanillaPacketSplitter.RemoteCompatibility getRemoteCompatibility(NetworkManager manager) -
isRemoteCompatible
-