mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
add entity on_save event and SAVED_DATA variable
This commit is contained in:
parent
e301dbe164
commit
08cc78289d
6 changed files with 36 additions and 4 deletions
|
|
@ -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()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue