Hoppers: Don't suck from fuel and dst at once

This commit is contained in:
Wuzzy 2017-08-04 03:42:24 +02:00
parent 4e45d66678
commit 5d5355867c

@ -265,10 +265,10 @@ minetest.register_abm({
local upnode = minetest.get_node(uppos) local upnode = minetest.get_node(uppos)
if not minetest.registered_nodes[upnode.name] then return end if not minetest.registered_nodes[upnode.name] then return end
local g = minetest.registered_nodes[upnode.name].groups.container local g = minetest.registered_nodes[upnode.name].groups.container
mcl_util.move_item_container(uppos, pos) local sucked = mcl_util.move_item_container(uppos, pos)
-- Also suck in non-fuel items from furnace fuel slot -- Also suck in non-fuel items from furnace fuel slot
if g == 4 then if not sucked and g == 4 then
local finv = minetest.get_inventory({type="node", pos=uppos}) local finv = minetest.get_inventory({type="node", pos=uppos})
if finv and not mcl_util.is_fuel(finv:get_stack("fuel", 1)) then if finv and not mcl_util.is_fuel(finv:get_stack("fuel", 1)) then
mcl_util.move_item_container(uppos, pos, "fuel") mcl_util.move_item_container(uppos, pos, "fuel")