aboutsummaryrefslogtreecommitdiff
path: root/display.lua
diff options
context:
space:
mode:
Diffstat (limited to 'display.lua')
-rw-r--r--display.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/display.lua b/display.lua
index 2fed40f..6994e4e 100644
--- a/display.lua
+++ b/display.lua
@@ -162,6 +162,9 @@ function display_api.update_entities(pos)
local node = minetest.get_node(pos)
local ndef = minetest.registered_nodes[node.name]
local ov = get_orientation_values(node)
+ if not ndef or not ov then
+ return
+ end
for _, objref in pairs(get_display_objrefs(pos, true)) do
local edef = ndef.display_entities[objref:get_luaentity().name]
@@ -283,6 +286,9 @@ end
function display_api.on_rotate(pos, node, user, _, new_param2)
node.param2 = new_param2
local ov = get_orientation_values(node)
+ if not ov then
+ return
+ end
if ov.restricted or not display_api.is_rotation_restricted() then
minetest.swap_node(pos, node)