fix: slow world saving

This commit is contained in:
MihailRis 2024-08-14 01:31:56 +03:00
parent 5fa6b14f05
commit 6ff90bfef3

View File

@ -750,7 +750,9 @@ void Chunks::save(Chunk* chunk) {
chunk->flags.entities = true;
}
worldFiles->getRegions().put(
chunk, json::to_binary(root, true)
chunk,
chunk->flags.entities ? json::to_binary(root, true)
: std::vector<ubyte>()
);
}
}