Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IIrc compress_type could be 3? #149

Closed
ch-yx opened this issue Jul 2, 2021 · 1 comment
Closed

IIrc compress_type could be 3? #149

ch-yx opened this issue Jul 2, 2021 · 1 comment

Comments

@ch-yx
Copy link

ch-yx commented Jul 2, 2021

@staticmethod
def _decompress(compress_type: int, data: bytes) -> nbt.NBTFile:
"""Convert a bytes object into an NBTFile"""
if compress_type == world_utils.VERSION_GZIP:
return nbt.load(gzip.decompress(data), compressed=False)
elif compress_type == world_utils.VERSION_DEFLATE:
return nbt.load(zlib.decompress(data), compressed=False)
raise ChunkLoadError(f"Invalid compression type {compress_type}")

last time i check minecraft code, compress_type may be 3.
Im not sure if this value is still allowed.

@ch-yx
Copy link
Author

ch-yx commented Jul 2, 2021

ah it is there.
21w17a\client\net\minecraft\world\level\chunk\storage\RegionFileVersion.java
seems that it is still here in 21w17a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants