Project Soon

Log Format and MCBE Saving Mechanics

While the log format is rarely used in MCBE, it still is used to add an another layer to reduce overhead while keep the integrity of the database in rare cases of sudden shutdown. I previously ignored it, as the worlds I saw never had any data in the log file anyway. However, it may include certain updates which adds additional information to the world which was added recently, especially if you stopped playing right after you did some changes to your world.

I therefore went through the log format docs, and found it quite easy to read it, after misunderstanding some of it. Then I had no idea how the actual key-value format worked, so I had to check the source and interpret it. It took a couple of hours before I finished it, and I managed to integrate it into the current pipeline pretty neatly.

After having been able to read a whole world, one can notice from the generated image that it does not save the whole world. I suspect this has nothing to do with my interpretation of the format, but more that MCBE seem to only save what has changed. This of course reduces the amount of data being saved, and it falls on the developer to generate the whole map and patch it with the saved world. This makes my job a bit harder, because I rather not want to interpret each versions world creation functions. I do hope that MCJE does not take upon this feature, even though the save may become a lot smaller, and maybe reduce saving overhead. I assume this wont be the case, due to the specific nature of how MCJE stores its data.