From 4db935e91e7d0db070a151d980b51c2d9c304295 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 19 May 2018 02:30:23 +0200 Subject: [PATCH] Update falling nodes after being moved by piston --- mods/ITEMS/REDSTONE/mesecons_mvps/init.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/mods/ITEMS/REDSTONE/mesecons_mvps/init.lua b/mods/ITEMS/REDSTONE/mesecons_mvps/init.lua index 61cd234edd..f9e573aad6 100644 --- a/mods/ITEMS/REDSTONE/mesecons_mvps/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_mvps/init.lua @@ -380,3 +380,20 @@ mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_light_blue") mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_pink") mesecon.register_on_mvps_move(mesecon.move_hot_nodes) + +-- Check for falling after moving node +mesecon.register_on_mvps_move(function(moved_nodes) + for i = 1, #moved_nodes do + local moved_node = moved_nodes[i] + mesecon.on_placenode(moved_node.pos, moved_node.node) + minetest.after(0, function() + minetest.check_for_falling(moved_node.oldpos) + minetest.check_for_falling(moved_node.pos) + end) + local node_def = minetest.registered_nodes[moved_node.node.name] + if node_def and node_def.mesecon and node_def.mesecon.on_mvps_move then + node_def.mesecon.on_mvps_move(moved_node.pos, moved_node.node, + moved_node.oldpos, moved_node.meta) + end + end +end)