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:
@ -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).
|
||||
|
||||
|
||||
|
@ -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,
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user