Tweak hud hunger

now it will replace items with stacks correctly
This commit is contained in:
Elkien3 2017-11-05 11:35:39 -06:00
parent 585042a4c2
commit 307fac7d87

View File

@ -47,7 +47,9 @@ function hud.item_eat(hunger_change, replace_with_item, poisen, heal)
end
--sound:eat
itemstack:add_item(replace_with_item)
--itemstack:add_item(replace_with_item)
local player_inv = user:get_inventory()
player_inv:add_item("main", replace_with_item)
end
return itemstack
end