mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-08-28 14:17:33 -04:00
Update furnace.lua
add above fallback pos
This commit is contained in:
parent
ed676d9ee0
commit
ada36b41fd
1 changed files with 2 additions and 1 deletions
|
@ -117,7 +117,8 @@ end
|
||||||
local function add_item(inv, pos, item)
|
local function add_item(inv, pos, item)
|
||||||
local leftover = inv:add_item("dst", item)
|
local leftover = inv:add_item("dst", item)
|
||||||
if not leftover:is_empty() then
|
if not leftover:is_empty() then
|
||||||
local drop_pos = minetest.find_node_near(pos, 1, {"air"})
|
local above = vector.new(pos.x, pos.y + 1, pos.z)
|
||||||
|
local drop_pos = minetest.find_node_near(pos, 1, {"air"}) or above
|
||||||
minetest.item_drop(item, nil, drop_pos)
|
minetest.item_drop(item, nil, drop_pos)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue