Only apply max known pack restrictions Serverbound

This commit is contained in:
Shane Freeder
2025-06-11 10:12:48 +01:00
parent 21ecd344ba
commit 669fda298c

View File

@@ -36,7 +36,7 @@ public class KnownPacksPacket implements MinecraftPacket {
public void decode(ByteBuf buf, ProtocolUtils.Direction direction, public void decode(ByteBuf buf, ProtocolUtils.Direction direction,
ProtocolVersion protocolVersion) { ProtocolVersion protocolVersion) {
final int packCount = ProtocolUtils.readVarInt(buf); final int packCount = ProtocolUtils.readVarInt(buf);
if (packCount > MAX_LENGTH_PACKS) { if (direction == ProtocolUtils.Direction.SERVERBOUND && packCount > MAX_LENGTH_PACKS) {
throw TOO_MANY_PACKS; throw TOO_MANY_PACKS;
} }