From 2adc89cbada137c524f036f99676d90c9c84fc1e Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Tue, 14 Feb 2017 01:31:24 +0100 Subject: [PATCH] Make hoppers pull before push --- mods/mcl_hoppers/init.lua | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/mods/mcl_hoppers/init.lua b/mods/mcl_hoppers/init.lua index b44cb9182..75cee7485 100644 --- a/mods/mcl_hoppers/init.lua +++ b/mods/mcl_hoppers/init.lua @@ -164,9 +164,6 @@ minetest.register_abm({ local uppos = {x=pos.x,y=pos.y+1,z=pos.z} local downpos = {x=pos.x,y=pos.y-1,z=pos.z} - -- Move an item from the hopper into container below - mcl_util.move_item_container(pos, "main", -1, downpos) - -- Suck an item from the container above into the hopper local upnode = minetest.get_node(uppos) local g = minetest.registered_nodes[upnode.name].groups.container @@ -178,6 +175,8 @@ minetest.register_abm({ mcl_util.move_item_container(uppos, "dst", -1, pos) end + -- Move an item from the hopper into container below + mcl_util.move_item_container(pos, "main", -1, downpos) end, }) @@ -204,9 +203,6 @@ minetest.register_abm({ local frontnode = minetest.get_node(front) - -- Move an item from the hopper into the container to which the hopper points to - mcl_util.move_item_container(pos, "main", -1, front) - -- Suck an item from the container above into the hopper local abovenode = minetest.get_node(above) local g = minetest.registered_nodes[abovenode.name].groups.container @@ -217,6 +213,9 @@ minetest.register_abm({ -- Furnace output mcl_util.move_item_container(above, "dst", -1, pos) end + + -- Move an item from the hopper into the container to which the hopper points to + mcl_util.move_item_container(pos, "main", -1, front) end })