Stop crash when placing redstone dust next to unknown nodes

This commit is contained in:
teknomunk 2024-11-29 13:39:44 -06:00
parent e57749f287
commit b4f077cc74

@ -166,7 +166,7 @@ local function update_redstone_wire(orig, update_neighbor)
local pos = vector.offset(orig, part[1], part[2], part[3])
local node = core.get_node(pos)
local def = core.registered_nodes[node.name]
if def.groups.redstone or 0 ~= 0 then
if def and def.groups.redstone or 0 ~= 0 then
mask = mask + part[4]
if update_neighbor and def.groups.redstone_wire or 0 ~= 0 then
update_redstone_wire(pos)