mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
feat: add app.save_world() function and update documentation
This commit is contained in:
parent
96577ee041
commit
ed7dc1f901
8 changed files with 48 additions and 7 deletions
|
|
@ -58,6 +58,10 @@ Level::Level(
|
|||
events->listen(LevelEventType::EVT_CHUNK_HIDDEN, [this](LevelEventType, Chunk* chunk) {
|
||||
chunks->decref(chunk);
|
||||
});
|
||||
chunks->setOnUnload([this](const Chunk& chunk) {
|
||||
AABB aabb = chunk.getAABB();
|
||||
entities->despawn(entities->getAllInside(aabb));
|
||||
});
|
||||
inventories = std::make_unique<Inventories>(*this);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue