1
0
mirror of https://github.com/GeyserMC/Geyser.git synced 2025-12-29 11:49:16 +00:00

Packet ids can't be negative

This commit is contained in:
Tim203
2021-12-16 21:58:40 +01:00
parent a4399f0c1e
commit 9c672c9919

View File

@@ -112,7 +112,7 @@ public class JavaCustomPayloadTranslator extends PacketTranslator<ClientboundCus
throw new IllegalStateException("Packet data should be at least 2 bytes long");
}
int packetId = data[0];
int packetId = data[0] & 0xFF;
ByteBuf packetData = Unpooled.wrappedBuffer(data, 1, data.length - 1);
var toSend = new UnknownPacket();