Use new player attribute API for mcl_hunger
This commit is contained in:
parent
d21eefbb78
commit
f1b99dc117
2 changed files with 23 additions and 54 deletions
|
@ -183,7 +183,7 @@ function mcl_hunger.item_eat(hunger_change, replace_with_item, poisontime, poiso
|
|||
if not _mcl_saturation then
|
||||
saturation = 0
|
||||
else
|
||||
saturation = math.floor(minetest.registered_items[itemname]._mcl_saturation * 10)
|
||||
saturation = minetest.registered_items[itemname]._mcl_saturation
|
||||
end
|
||||
mcl_hunger.saturate(name, saturation, false)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue