feat: add app.save_world() function and update documentation

This commit is contained in:
MihailRis
2024-12-25 15:15:11 +03:00
parent 96577ee041
commit ed7dc1f901
8 changed files with 48 additions and 7 deletions
+4
View File
@@ -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);
}