Only apply max known pack restrictions Serverbound
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user