add entity on_save event and SAVED_DATA variable

This commit is contained in:
MihailRis
2024-07-05 18:35:46 +03:00
parent e301dbe164
commit 08cc78289d
6 changed files with 36 additions and 4 deletions
+1
View File
@@ -713,6 +713,7 @@ void Chunks::save(Chunk* chunk) {
auto root = dynamic::create_map();
auto& list = root->putList("data");
for (auto& entity : entities) {
level->entities->onSave(entity);
list.put(level->entities->serialize(entity));
}
if (!entities.empty()) {