1
0
Fork 0

Don't decrease hunger if saturation down from < 1

objects
Wuzzy 2017-05-20 19:59:47 +02:00
parent 5252409326
commit 22b8ba6440
1 changed files with 1 additions and 2 deletions

View File

@ -150,8 +150,7 @@ function mcl_hunger.exhaust(playername, increase)
if mcl_hunger.saturation[playername] > 0.0 then if mcl_hunger.saturation[playername] > 0.0 then
mcl_hunger.saturation[playername] = math.max(mcl_hunger.saturation[playername] - 1.0, 0.0) mcl_hunger.saturation[playername] = math.max(mcl_hunger.saturation[playername] - 1.0, 0.0)
satuchanged = true satuchanged = true
end elseif mcl_hunger.saturation[playername] < 0.0001 then
if mcl_hunger.saturation[playername] < 0.0001 then
h = mcl_hunger.get_hunger_raw(player) h = mcl_hunger.get_hunger_raw(player)
h = h-1 h = h-1
mcl_hunger.hunger[playername] = h mcl_hunger.hunger[playername] = h