From eb78b4e217af706fcf05c8d326ed4a779f63f58f Mon Sep 17 00:00:00 2001 From: Joachim Stolberg Date: Tue, 18 May 2021 21:39:20 +0200 Subject: [PATCH] Fix issue with unknown items --- logic/doorcontroller2.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logic/doorcontroller2.lua b/logic/doorcontroller2.lua index d8409a7..d8c2f76 100644 --- a/logic/doorcontroller2.lua +++ b/logic/doorcontroller2.lua @@ -153,7 +153,7 @@ end local function exchange_node(pos, item, param2) local node = minetest.get_node_or_nil(pos) if node and is_simple_node(node.name) then - if item and item:get_name() ~= "" then + if item and item:get_name() ~= "" and minetest.registered_nodes[item:get_name()] then minetest.swap_node(pos, {name = item:get_name(), param2 = param2}) else minetest.remove_node(pos)