Packet ids can't be negative

This commit is contained in:
Tim203 2021-12-16 21:58:40 +01:00
parent a4399f0c1e
commit 9c672c9919
No known key found for this signature in database
GPG key ID: 064EE9F5BF7C3EE8

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();