1
0
mirror of https://github.com/pyrollo/display_modpack.git synced 2025-07-04 00:51:21 +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

@ -26,6 +26,8 @@ display_lib.register_display_entity("steles:text")
for i, material in ipairs(steles.materials) do
local ndef = minetest.registered_nodes[material]
local groups = table.copy(ndef.groups)
groups.display_lib_node = 1
if ndef then
local parts = material:split(":")
@ -44,7 +46,7 @@ for i, material in ipairs(steles.materials) do
{-7/16, -0.5, -4/16, 7/16, -4/16, 4/16}
}
},
groups = ndef.groups,
groups = groups,
display_entities = {
["steles:text"] = {
on_display_update = font_lib.on_display_update,