From 6c92873314bd0da081bf24b308692ea06eec5f33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elias=20=C3=85str=C3=B6m?= Date: Mon, 23 Sep 2024 20:47:31 +0200 Subject: [PATCH] Only update nodes that has not changed --- mods/ITEMS/REDSTONE/mcl_redstone/logic.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mods/ITEMS/REDSTONE/mcl_redstone/logic.lua b/mods/ITEMS/REDSTONE/mcl_redstone/logic.lua index 9bc3e81b0..74e59c348 100644 --- a/mods/ITEMS/REDSTONE/mcl_redstone/logic.lua +++ b/mods/ITEMS/REDSTONE/mcl_redstone/logic.lua @@ -208,10 +208,14 @@ local function schedule_update(pos, update) local param2 = update.param2 or 0 mcl_redstone._schedule_event(delay, priority, pos, function() + -- Only update if node is not the same or has not changed. local node = minetest.get_node(pos) if update.name == node.name and param2 == node.param2 then return end + if node.name ~= oldnode.name or node.param2 ~= oldnode.param2 then + return + end minetest.swap_node(pos, { name = update.name,