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

should COMPRESSION_NONE be 3? #8

Closed
17183248569 opened this issue Jun 23, 2020 · 2 comments
Closed

should COMPRESSION_NONE be 3? #8

17183248569 opened this issue Jun 23, 2020 · 2 comments

Comments

@17183248569
Copy link

in your code it is 0.
i m not sure but i think that it should be 3.

@MestreLion
Copy link
Owner

This is possibly related to issue #4 : up until then there was no COMPRESSION_NONE (either 3 or 0). This is a constant I made up just to have a "falsy" value for compression in a blank object . But MCA "specs" mention only two possible values, 1 for Gzip and 2 for Zlib, and in practice Minecraft only used Zlib in all it's chunks since then.

This possibly changed with the introduction of the so called "external chunks". Perhaps 0 (or 3) is now used to indicate the chunks data is in an external file.

McWorldLib was not yet updated to support this new feature

@MestreLion
Copy link
Owner

External MCC chunks are not yet supported, but I changed the COMPRESSION_* "enum" handling to properly reflect the WIki. Now COMPRESSION_NONE is 3 and it's not an invalid value. The invalid value of 0 is now unnamed, and RegionChunk's constructor by default uses 2 (COMPRESSION_ZLIB) instead of the invalid 0, as it's the only compression used by Minecraft client

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