aboutsummaryrefslogtreecommitdiff
path: root/display_api
diff options
context:
space:
mode:
authorPierre-Yves Rollo <dev@pyrollo.com>2018-12-08 19:27:08 +0100
committerPierre-Yves Rollo <dev@pyrollo.com>2018-12-08 19:27:08 +0100
commitffe113c62a10aac12597bf883680e8049edcd310 (patch)
treec81be8b8cdd074ff93a3c0f0cb13cff328b038ac /display_api
parente94a1b21f6e7cfcb8d24311a5f13aba6af7e4336 (diff)
downloaddisplay_modpack_no_craft-ffe113c62a10aac12597bf883680e8049edcd310.tar.gz
display_modpack_no_craft-ffe113c62a10aac12597bf883680e8049edcd310.zip
Remove entity where display node not found
Diffstat (limited to 'display_api')
-rw-r--r--display_api/display.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/display_api/display.lua b/display_api/display.lua
index eefeac0..a8cee66 100644
--- a/display_api/display.lua
+++ b/display_api/display.lua
@@ -133,6 +133,9 @@ function update_entity(entity)
-- Call on_display_update callback of a node for one of its display entities
ndef.display_entities[entity.name].on_display_update(entity.nodepos,
entity.object)
+ else
+ -- Display node has been removed, remove entity also
+ entity.object:remove()
end
end