mirror of
https://github.com/Minestom/Minestom.git
synced 2025-02-15 20:02:01 +01:00
Made PacketDecoder more readable
This commit is contained in:
parent
e619dd6a8e
commit
408ce03cfb
@ -13,7 +13,8 @@ public class PacketDecoder extends ByteToMessageDecoder {
|
||||
@Override
|
||||
protected void decode(ChannelHandlerContext ctx, ByteBuf buf, List<Object> list) {
|
||||
if (buf.readableBytes() > 0) {
|
||||
list.add(new InboundPacket(Utils.readVarInt(buf), buf));
|
||||
final int packetId = Utils.readVarInt(buf);
|
||||
list.add(new InboundPacket(packetId, buf));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user