From adf1023e35176efbb1e4cf0a9b0df50dc6ffe374 Mon Sep 17 00:00:00 2001 From: TheMode Date: Tue, 7 Sep 2021 01:31:34 +0200 Subject: [PATCH] There is no commit here - fix compression Signed-off-by: TheMode --- src/main/java/net/minestom/server/utils/PacketUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/minestom/server/utils/PacketUtils.java b/src/main/java/net/minestom/server/utils/PacketUtils.java index 0cae41f01..c8c005341 100644 --- a/src/main/java/net/minestom/server/utils/PacketUtils.java +++ b/src/main/java/net/minestom/server/utils/PacketUtils.java @@ -198,7 +198,7 @@ public final class PacketUtils { if (packetSize >= MinecraftServer.getCompressionThreshold()) { // Packet large enough, compress buffer.position(contentStart); - final ByteBuffer uncompressedContent = buffer.slice().limit(contentStart + packetSize); + final ByteBuffer uncompressedContent = buffer.slice().limit(packetSize); final ByteBuffer uncompressedCopy = localBuffer().put(uncompressedContent).flip(); Deflater deflater = COMPRESSOR.get();