Fix crash for wires next to unknown nodes
This commit is contained in:
parent
b5bd2d411b
commit
0ac265d3b0
@ -110,11 +110,13 @@ local function update_wire(pos)
|
||||
local pos2 = pos:add(entry.dir)
|
||||
local node2 = minetest.get_node(pos2)
|
||||
local ndef2 = minetest.registered_nodes[node2.name]
|
||||
local redstone = ndef2._mcl_redstone
|
||||
local connects_to = redstone and redstone.connects_to
|
||||
if ndef2 then
|
||||
local redstone = ndef2._mcl_redstone
|
||||
local connects_to = redstone and redstone.connects_to
|
||||
|
||||
if connects_to and connects_to(node2, -entry.dir) then
|
||||
wireflags = bit.bor(wireflags, entry.mask)
|
||||
if connects_to and connects_to(node2, -entry.dir) then
|
||||
wireflags = bit.bor(wireflags, entry.mask)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user