1
0
mirror of https://github.com/pyrollo/display_modpack.git synced 2025-07-04 09:00:44 +02:00

Update the entities as soon as mapblock is loaded

Useful e.g. after /clearobjects
Introduces the group `display_lib_node`
This commit is contained in:
Thomas--S
2018-01-27 17:40:42 +01:00
parent 78e3b85274
commit 1c1be8a7c1
5 changed files with 19 additions and 9 deletions

View File

@ -80,4 +80,6 @@ This is a helper to register entities used for display.
})
**Note:** Nodes in the `display_lib_node` group will have their entities updated as soon as the mapblock is loaded (Useful after /clearobjects).

View File

@ -230,5 +230,11 @@ function display_lib.register_display_entity(entity_name)
end
end
minetest.register_lbm({
label = "Update display_lib entities",
name = "display_lib:update_entities",
run_at_every_load = true,
nodenames = {"group:display_lib_node"},
action = function(pos, node) display_lib.update_entities(pos) end,
})