make kindname comparison more reliable.

This commit is contained in:
trans_soup 2023-10-22 21:44:47 +02:00
parent 0bdbc5539a
commit 4436b9068a

View file

@ -1,7 +1,7 @@
local function is_same_kind (pos, kindname)
local node = minetest.get_node(pos)
local node_kindname = minetest.registered_items[node.name].kindname
return kindname == node_kindname
return kindname and node_kindname and kindname == node_kindname
end
function blockgame.check_for_stacking (pos)