Do not allow negative hunger
This commit is contained in:
parent
c328a9b1bc
commit
690e81c0fe
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user