suppress false warning: Packet PLAY_ENTITY_METADATA did not used all bytes sent

This commit is contained in:
bixilon 2020-06-08 14:11:17 +02:00
parent 5be76225fa
commit 44bcaf43ee
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4

View File

@ -160,7 +160,7 @@ public class Network {
try {
ClientboundPacket packet = clazz.getConstructor().newInstance();
packet.read(inPacketBuffer, connection.getVersion());
if (inPacketBuffer.getBytesLeft() > 0) {
if (inPacketBuffer.getBytesLeft() > 0 && p != Packets.Clientbound.PLAY_ENTITY_METADATA) { // entity meta data uses mostly all data, but this happens in the handling thread
// warn not all data used
Log.protocol(String.format("[IN] Packet %s did not used all bytes sent", ((p != null) ? p.name() : "UNKNOWN")));
}