twoolie / NBT

Python Parser/Writer for the NBT file format, and it's container the RegionFile.
MIT License
362 stars 74 forks source link

Mixed compatibility with 1.12.2 #93

Open bsinglet opened 6 years ago

bsinglet commented 6 years ago

I've been using the example scripts on save files from the latest version, 1.12.2, with mixed results. I'm not sure yet if the problems are in the main library or just the examples themselves. Summary of what I've found so far: -biome_analysis.py seems to work on these save files, correctly enumerates biome types. -mob_analysis.py seems to work, too, listing every mob in the world folder. -regionfile_analysis.py doesn't work, gives errors like: "chunk 2,1 is not a valid NBT file: outer object is not a TAG_Compound, but '\n'" for each chunk in the region file. Digging into this indicates that it is successfully finding the chunks in the region file, but not successfully parsing them. -block_analysis.py reports: "0 total blocks in region, 0 are non-air (0.0000%)" for all of the save files I've produced using version 1.12.2. Which seems to indicate that it's not finding anything at all.

I'm going to look into the underlying reasons more, but it looks like the major difference between biome_analysis and regionfile_analysis is that the former uses the library heavily, while the latter duplicates a lot of the work in order to get a more detailed view. Hopefully that means the library is still fully compatible with modern saves and we just need to update some of the examples.

mfld-fr commented 5 years ago

Hello @bsinglet, so to summarize, have to test again the following scripts:

Is it acceptable for you if this issue is worked only on the latest MC version (today 1.13.2), and not on the previous 1.12.2 as you reported ?

macfreek commented 5 years ago

@mfld-fr for me that would be acceptable, especially if there is a warning if an older file is opened.

mfld-fr commented 5 years ago

@macfreek : that's fine, indeed that's your own opinion, not the "voice of the customer" 😄

mfld-fr commented 5 years ago

Just tested with latest version 1.13.2: no problem found with regionfile_analysis -v, but failure confirmed for block_analysis. Updated the above summary.

mfld-fr commented 5 years ago

The reported failing 'block analysis' example is now working with both McRegion and Anvil formats after being updated in #106. You could close this issue.