Change set_node to swap_node for update events
This commit is contained in:
parent
82a37ee4f7
commit
53bb9bd51c
@ -117,7 +117,8 @@ local function handle_update_event(event)
|
||||
if oldnode.name ~= event.oldnode.name or oldnode.param2 ~= event.oldnode.param2 then
|
||||
return
|
||||
end
|
||||
minetest.set_node(event.pos, event.node)
|
||||
minetest.swap_node(event.pos, event.node)
|
||||
mcl_redstone._update_neighbours(event.pos, event.oldnode)
|
||||
update_event_tab[h] = nil
|
||||
end
|
||||
|
||||
|
@ -225,8 +225,9 @@ function mcl_redstone._update_neighbours(pos, oldnode)
|
||||
end
|
||||
|
||||
function mcl_redstone.swap_node(pos, node)
|
||||
local oldnode = minetest.get_node(pos)
|
||||
minetest.swap_node(pos, node)
|
||||
mcl_redstone._update_neighbours(pos, node)
|
||||
mcl_redstone._update_neighbours(pos, oldnode)
|
||||
end
|
||||
|
||||
-- Update neighbouring wires and components at pos. Oldnode is the previous
|
||||
|
Loading…
x
Reference in New Issue
Block a user