From 58cde1c9e91d8d51e4224f6c7dd48fead0a4ea86 Mon Sep 17 00:00:00 2001 From: Brandon Date: Thu, 18 Jun 2020 17:17:56 -0400 Subject: [PATCH] Correct super zombie. --- mods/ITEMS/mcl_potions/functions.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_potions/functions.lua b/mods/ITEMS/mcl_potions/functions.lua index 410717d086..56833faf7f 100644 --- a/mods/ITEMS/mcl_potions/functions.lua +++ b/mods/ITEMS/mcl_potions/functions.lua @@ -39,9 +39,13 @@ for i, zombie in ipairs({"husk","zombie","pigman"}) do end function mcl_potions.healing_func(player, hp) - + if is_zombie[player:get_entity_name()] then hp = -hp end - player:set_hp(player:get_hp() + hp) + if hp > 0 then + player:set_hp(math.min(player:get_hp() + hp, player:get_properties().hp_max)) + else + player:set_hp(player:get_hp() + hp) + end end