r/howdidtheycodeit • u/smhtncr • May 23 '21
Question Minecraft World Saving
In a minecraft world there are lot's of blocks and their states. And some npc's. How do they save it.
46
Upvotes
r/howdidtheycodeit • u/smhtncr • May 23 '21
In a minecraft world there are lot's of blocks and their states. And some npc's. How do they save it.
View all comments
Show parent comment
41
u/kid38 May 23 '21
To add a little bit of "how" to your great answer: Minecraft world consists of "chunks", 16×16×256 block segments. And chunks group up into regions, consisting of 32×32 chunks, which is how the game actually stores all the data (if you delete one of the region files, it erases all the changes to the world in that region, like you say). So that allows the game to only load a small part of the world around players (plus the chunk loaders).