Created
May 31, 2024 14:12
-
-
Save Alluseri/6877e7bd65d3fb45ea95f0be0c77cb47 to your computer and use it in GitHub Desktop.
BTA item/chunk ban fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static CompoundTag readCompressedCompoundTag(final DataInputStream dis) throws IOException { | |
final int length = Short.toUnsignedInt(dis.readShort()); | |
if (length == 0) { | |
return null; | |
} | |
final byte[] data = new byte[length]; | |
dis.readFully(data); | |
return NbtIo.readCompressed(new ByteArrayInputStream(data)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment