From 690e81c0fea08aa19b8620db6ffc04c5fb78378a Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 20 May 2017 20:40:22 +0200 Subject: [PATCH] Do not allow negative hunger --- mods/PLAYER/mcl_hunger/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/PLAYER/mcl_hunger/init.lua b/mods/PLAYER/mcl_hunger/init.lua index 3956327298..c41c774b4c 100644 --- a/mods/PLAYER/mcl_hunger/init.lua +++ b/mods/PLAYER/mcl_hunger/init.lua @@ -152,7 +152,7 @@ function mcl_hunger.exhaust(playername, increase) satuchanged = true elseif mcl_hunger.saturation[playername] < 0.0001 then h = mcl_hunger.get_hunger_raw(player) - h = h-1 + h = math.max(h-1, 0) mcl_hunger.hunger[playername] = h mcl_hunger.set_hunger_raw(player) satuchanged = true