From 6eaa6cde54177aaa8aca67730c10955ea717b8fe Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 12 Jun 2017 21:04:35 +0200 Subject: [PATCH] Fix another large chest item duplication bug --- mods/ITEMS/mcl_chests/init.lua | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/mods/ITEMS/mcl_chests/init.lua b/mods/ITEMS/mcl_chests/init.lua index ff8225bd7d..84d0890ac5 100644 --- a/mods/ITEMS/mcl_chests/init.lua +++ b/mods/ITEMS/mcl_chests/init.lua @@ -304,12 +304,14 @@ minetest.register_node("mcl_chests:"..basename.."_right", { minetest.log("action", player:get_player_name().. " moves stuff to chest at "..minetest.pos_to_string(pos)) -- BEGIN OF LISTRING WORKAROUND - local other_pos = get_chest_neighborpos(pos, minetest.get_node(pos).param2, "right") - local other_inv = minetest.get_inventory({type="node", pos=other_pos}) - local leftover = other_inv:add_item("main", stack) - if not leftover:is_empty() then - local inv = minetest.get_inventory({type="node", pos=pos}) - inv:add_item("main", leftover) + if listname == "input" then + local other_pos = get_chest_neighborpos(pos, minetest.get_node(pos).param2, "right") + local other_inv = minetest.get_inventory({type="node", pos=other_pos}) + local leftover = other_inv:add_item("main", stack) + if not leftover:is_empty() then + local inv = minetest.get_inventory({type="node", pos=pos}) + inv:add_item("main", leftover) + end end -- END OF LISTRING WORKAROUND end,