Fix item drop when digging mv furnace

Fixed crash when digging mv furnace
This commit is contained in:
tenplus1 2016-04-06 22:17:29 +01:00 committed by Ekdohibs
parent 3db3a9cc32
commit 322615542e

View File

@ -157,13 +157,13 @@ function technic.machine_after_dig_node(pos, oldnode, oldmetadata, player)
if oldmetadata.inventory.upgrade1 and oldmetadata.inventory.upgrade1[1] then
local stack = ItemStack(oldmetadata.inventory.upgrade1[1])
if not stack:is_empty() then
minetest.item_drop(stack, "", pos)
minetest.add_item(pos, stack)
end
end
if oldmetadata.inventory.upgrade2 and oldmetadata.inventory.upgrade2[1] then
local stack = ItemStack(oldmetadata.inventory.upgrade2[1])
if not stack:is_empty() then
minetest.item_drop(stack, "", pos)
minetest.add_item(pos, stack)
end
end
end