diff --git a/mods/ITEMS/mcl_potions/functions.lua b/mods/ITEMS/mcl_potions/functions.lua index 048b5e52e8..0df06d15a6 100644 --- a/mods/ITEMS/mcl_potions/functions.lua +++ b/mods/ITEMS/mcl_potions/functions.lua @@ -638,10 +638,6 @@ function mcl_potions.poison_func(player, factor, duration) is_poisoned[player] = {step = factor, dur = duration, timer = 0} - if player:is_player() then - potions_set_hudbar(player) - end - else local victim = is_poisoned[player] @@ -651,6 +647,11 @@ function mcl_potions.poison_func(player, factor, duration) victim.timer = 0 end + + if player:is_player() then + potions_set_hudbar(player) + end + end @@ -660,10 +661,6 @@ function mcl_potions.regeneration_func(player, factor, duration) is_regenerating[player] = {step = factor, dur = duration, timer = 0} - if player:is_player() then - potions_set_hudbar(player) - end - else local victim = is_regenerating[player] @@ -673,6 +670,11 @@ function mcl_potions.regeneration_func(player, factor, duration) victim.timer = 0 end + + if player:is_player() then + potions_set_hudbar(player) + end + end