-
Notifications
You must be signed in to change notification settings - Fork 46
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
Deserialize crashes on empty sections #31
Comments
Ah yes, I faced this problem already some time ago in the MCASelector but didn't think this would be a problem here. |
I added an extra check for sections that have a Y index outside of 0-15 and a check for palette content. Empty sections like those added by Minecraft will be treated as non-existent. The changes are currently available with the latest commit on the master branch, if everything works fine i'll make a release. |
I uncovered another issue. Sometimes you have a valid index, but the section is still empty (or at least missing the Palette). Here's how I addressed that: |
Yes, I also addressed this issue, see |
With Minecraft 1.14, there are sometimes empty sections in the chunks. They look something like this:
Not sure why they appear, but they should be handled gracefully.
The code in
Chunk.deserialize()
tries to create a new Section here:NBT/src/main/java/net/querz/nbt/mca/Chunk.java
Line 76 in 8cedf1e
...but fails on a NullPointerException in the Section constructor since there's no
Palette
member here:NBT/src/main/java/net/querz/nbt/mca/Section.java
Line 21 in 8cedf1e
The text was updated successfully, but these errors were encountered: