From a6136ad1584d3baa546acb2a829218699c094c7f Mon Sep 17 00:00:00 2001 From: William Goodspeed Date: Sun, 18 Aug 2024 10:48:37 +0000 Subject: [PATCH] Removing absorption bar on damage disabled servers The absorption effect won't work on damage disabled servers and the health bar and hunger bar is also hidden leaving the absorption bar alone which makes it look not good. So not initializing it on those servers might be a good idea. --- mods/ITEMS/mcl_potions/functions.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_potions/functions.lua b/mods/ITEMS/mcl_potions/functions.lua index a1c838814..b59749d2a 100644 --- a/mods/ITEMS/mcl_potions/functions.lua +++ b/mods/ITEMS/mcl_potions/functions.lua @@ -1260,7 +1260,11 @@ local function potions_init_icons(player) }) table.insert(icon_ids[name], id) end - hb.init_hudbar(player, "absorption") + + -- Absorption bar in damage disabled server is unneccessary + if minetest.settings:get_bool("enable_damage") == true then + hb.init_hudbar(player, "absorption") + end end local function potions_set_icons(player)