From a31da5efd50c3874f272ca91127662537e1c4826 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Tue, 5 Sep 2017 15:15:00 +0200 Subject: [PATCH] Don't call minetest.add_item for empty itemstring --- mods/ITEMS/mcl_core/functions.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_core/functions.lua b/mods/ITEMS/mcl_core/functions.lua index b5f801b887..2c866f1aff 100644 --- a/mods/ITEMS/mcl_core/functions.lua +++ b/mods/ITEMS/mcl_core/functions.lua @@ -90,6 +90,9 @@ end local function drop_attached_node(p) local nn = minetest.get_node(p).name + if nn == "air" or nn == "ignore" then + return + end minetest.remove_node(p) for _, item in pairs(minetest.get_node_drops(nn, "")) do local pos = { @@ -97,7 +100,9 @@ local function drop_attached_node(p) y = p.y + math.random()/2 - 0.25, z = p.z + math.random()/2 - 0.25, } - minetest.add_item(pos, item) + if item ~= "" then + minetest.add_item(pos, item) + end end end