mirror of
https://github.com/Nan1t/NanoLimbo.git
synced 2025-07-09 19:40:14 +02:00
Debug log about received packets
This commit is contained in:
parent
1e4b4389d5
commit
a439aa9847
@ -29,8 +29,8 @@ public class PacketDecoder extends MessageToMessageDecoder<ByteBuf> {
|
|||||||
Packet packet = mappings.getPacket(packetId);
|
Packet packet = mappings.getPacket(packetId);
|
||||||
|
|
||||||
if (packet != null) {
|
if (packet != null) {
|
||||||
|
Logger.debug("Received packet %s", packet.toString());
|
||||||
try {
|
try {
|
||||||
Logger.debug("Received packet %s", packet.toString());
|
|
||||||
packet.decode(msg, version);
|
packet.decode(msg, version);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.warning("Cannot decode packet 0x%s: %s", Integer.toHexString(packetId), e.getMessage());
|
Logger.warning("Cannot decode packet 0x%s: %s", Integer.toHexString(packetId), e.getMessage());
|
||||||
|
@ -40,4 +40,9 @@ public class PacketHandshake implements PacketIn {
|
|||||||
this.port = msg.readUnsignedShort();
|
this.port = msg.readUnsignedShort();
|
||||||
this.nextState = State.getById(msg.readVarInt());
|
this.nextState = State.getById(msg.readVarInt());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return getClass().getSimpleName();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user