diff --git a/mods/PLAYER/mcl_hunger/hunger.lua b/mods/PLAYER/mcl_hunger/hunger.lua index b7d76e4dd0..f1acb8d4ef 100644 --- a/mods/PLAYER/mcl_hunger/hunger.lua +++ b/mods/PLAYER/mcl_hunger/hunger.lua @@ -139,13 +139,6 @@ function mcl_hunger.item_eat(hunger_change, replace_with_item, poisen, heal, sou }) end - -- Food points - if h < 20 and hunger_change then - h = h + hunger_change - if h > 20 then h = 20 end - mcl_hunger.hunger[name] = h - mcl_hunger.set_hunger_raw(user) - end -- Add saturation (must be defined in item table) if hunger_change then local saturation = minetest.registered_items[itemname]._mcl_saturation @@ -155,6 +148,13 @@ function mcl_hunger.item_eat(hunger_change, replace_with_item, poisen, heal, sou end mcl_hunger.saturate(name, saturation) end + -- Food points + if h < 20 and hunger_change then + h = h + hunger_change + if h > 20 then h = 20 end + mcl_hunger.hunger[name] = h + mcl_hunger.set_hunger_raw(user) + end -- Poison if poisen then -- Set poison bar