mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
fix: chunks not saving
This commit is contained in:
parent
218304ba77
commit
6e1fe28f1a
1 changed files with 2 additions and 2 deletions
|
|
@ -743,13 +743,13 @@ void Chunks::save(Chunk* chunk) {
|
|||
)
|
||||
);
|
||||
auto entities = level->entities->getAllInside(aabb);
|
||||
auto root = dynamic::create_map();
|
||||
if (!entities.empty()) {
|
||||
auto root = dynamic::create_map();
|
||||
root->put("data", level->entities->serialize(entities));
|
||||
level->entities->despawn(std::move(entities));
|
||||
chunk->flags.entities = true;
|
||||
worldFiles->getRegions().put(chunk, json::to_binary(root, true));
|
||||
}
|
||||
worldFiles->getRegions().put(chunk, json::to_binary(root, true));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue