diff --git a/mods/ITEMS/mcl_core/functions.lua b/mods/ITEMS/mcl_core/functions.lua index b7623bf11..ad2346dd9 100644 --- a/mods/ITEMS/mcl_core/functions.lua +++ b/mods/ITEMS/mcl_core/functions.lua @@ -1581,7 +1581,7 @@ end -- MUST NOT be called if there is a snow cover node above pos. function mcl_core.clear_snow_dirt(pos, node) local def = minetest.registered_nodes[node.name] - if def._mcl_snowless then + if def and def._mcl_snowless then minetest.swap_node(pos, {name = def._mcl_snowless, param2=node.param2}) end end @@ -1602,7 +1602,7 @@ function mcl_core.on_snowable_construct(pos) -- Make snowed if needed if minetest.get_item_group(anode.name, "snow_cover") == 1 then local def = minetest.registered_nodes[node.name] - if def._mcl_snowed then + if def and def._mcl_snowed then minetest.swap_node(pos, {name = def._mcl_snowed, param2=node.param2}) end end @@ -1623,7 +1623,7 @@ function mcl_core.on_snow_construct(pos) local npos = {x=pos.x, y=pos.y-1, z=pos.z} local node = minetest.get_node(npos) local def = minetest.registered_nodes[node.name] - if def._mcl_snowed then + if def and def._mcl_snowed then minetest.swap_node(npos, {name = def._mcl_snowed, param2=node.param2}) end end