chunky
chunky copied to clipboard
Fix ChunkDataVersion issues with third party applications
Some WorldPainter worlds have their ChunkDataVersion set to a version prior to minecraft's support for worlds with >=256 height.
This PR changes how we create ChunkData objects to be based on the actual block range found in a chunk, rather than its version
This PR is somewhat difficult to test. We still have #1175 which may or may not be related which could be causing issues. There are certain moments when I can sometimes load 1 chunk or 20k chunks to the correct 0 to 320 height. Other times I can do 0 to 256.
Retyping the Scene Y clip does not fix this inconsistent behaviour. I have tried both loading/reloading with it set to 256 and 320.
Retyping the Map Y clip does not fix things either.
The Reload chunks button can sometimes give us the correct height... and sometimes not.. even without changing the selection.
Loading 10k chunks

Map view (max Map Y clip 320) gives an indication as to where terrain should be

Map view with max Map Y clip at 256 shows that terrain in the preview is still cut at 256.

Loading just 1024 chunks

The screenshots in the previous comment worried me so I didn't merge this PR yet. Are these issues caused by this PR or could this be merged?
If this PR is fine, could you please rebase it, @NotStirred? :pray: