don't parse broken packets

This commit is contained in:
Bixilon 2020-06-29 17:22:44 +02:00
parent 007d21f9e0
commit b39065091d
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4

View File

@ -214,6 +214,8 @@ public class Network {
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.warn(String.format("[IN] Could not parse packet %s completely (used=%d, available=%d, total=%d)", ((p != null) ? p.name() : "null"), inPacketBuffer.getPosition(), inPacketBuffer.getBytesLeft(), inPacketBuffer.getLength()));
binQueueIn.remove(0);
continue;
}
if (packet instanceof PacketLoginSuccess) {