Don't warn on superfluous bytes

Should be looked into, but not now™️
This commit is contained in:
Nassim Jahnke 2021-09-16 18:17:44 +02:00
parent 73093c0ff2
commit 4940ed66c1
No known key found for this signature in database
GPG Key ID: 6BE3B555EBC5982B

View File

@ -58,7 +58,7 @@ public final class Chunk1_18Type extends Type<Chunk> {
sections[i] = sectionType.read(sectionsBuf); sections[i] = sectionType.read(sectionsBuf);
} }
} finally { } finally {
if (sectionsBuf.readableBytes() > 0) { if (sectionsBuf.readableBytes() > 0 && Via.getManager().isDebug()) {
Via.getPlatform().getLogger().warning("Found " + sectionsBuf.readableBytes() + " more bytes than expected while reading the chunk: " + chunkX + "/" + chunkZ); Via.getPlatform().getLogger().warning("Found " + sectionsBuf.readableBytes() + " more bytes than expected while reading the chunk: " + chunkX + "/" + chunkZ);
} }
sectionsBuf.release(); sectionsBuf.release();