FutureChunks, NBT, Python. Oh My!

So recently I’ve been working on trying to smooth out some issues pertaining to how files are loaded and Chunks work, and I’ve been redoing a lot of backend things dealing with all of that. One of those changes was the inclusion of FutureChunks, which is (in theory) going to replace all the null chunk checks. Currently, they cause the main thread to stall due to them being hastily thrown together and not at all optimized, but I opened an issue on the Github for it and I plan to fix all the issues dealing with it soon.

Next major change was how Chunk loading/saving works. I originally just dumped the data into an output stream and force read it back, and it was bulky and slow and took up a lot of space on disk for not a lot of gain. I trimmed up a lot of the fat (aka removed the unused blocklight storage) and rewrote the loading/saving code to use the NBT file format. This also means that the old worlds will no longer work, but there is a noticeable speed increase loading and saving things, so that’s a plus. There is, however, a caveat with this. I had to extend the NBT format to deal with the Block array Voxel uses (Voxel stores some simple BlockMetadata, like rotation, with the Block ID in a long instead of an int), so all the current Minecraft NBT tools WILL NOT WORK with Voxel NBT files.

However, fear not. There is a new repo on the Lux Vacuos github, PyNBT. This is going to be modified to work with the Voxel NBT files from here on out. It runs on Python, and should be used as the basis for any implementations to use or to modify existing NBT utilities.