mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
refactor: WorldRegions and chunks saving
This commit is contained in:
parent
f206042b00
commit
c67e4b04bb
8 changed files with 50 additions and 45 deletions
|
|
@ -59,8 +59,10 @@ std::shared_ptr<Chunk> ChunksStorage::create(int x, int z) {
|
|||
auto data = regions.getChunk(chunk->x, chunk->z);
|
||||
if (data) {
|
||||
chunk->decode(data.get());
|
||||
|
||||
auto invs = regions.fetchInventories(chunk->x, chunk->z);
|
||||
chunk->setBlockInventories(std::move(invs));
|
||||
|
||||
chunk->flags.loaded = true;
|
||||
for(auto& entry : chunk->inventories) {
|
||||
level->inventories->store(entry.second);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue