From 41a1a3167db27f20a8e1456c8a1cc0b2e5a3348d Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Thu, 12 Nov 2020 12:30:00 +0100 Subject: [PATCH] Fix wielded item text overlapping with HUD --- mods/HUD/show_wielded_item/init.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mods/HUD/show_wielded_item/init.lua b/mods/HUD/show_wielded_item/init.lua index 46a7e0c0..bc06bee4 100644 --- a/mods/HUD/show_wielded_item/init.lua +++ b/mods/HUD/show_wielded_item/init.lua @@ -7,6 +7,7 @@ local dtimes = {} local dlimit = 3 -- HUD element will be hidden after this many seconds local hudbars_mod = minetest.get_modpath("hudbars") +local xp_mod = minetest.get_modpath("mcl_experience") local function set_hud(player) if not player:is_player() then return end @@ -28,6 +29,9 @@ local function set_hud(player) local vmargin = tonumber(minetest.settings:get("hudbars_vmargin")) or 28 off.y = -76 - vmargin*rows end + if xp_mod then + off.y = off.y - 25 + end -- Dirty trick to avoid collision with Minetest's status text (e.g. “Volume changed to 0%”) if off.y >= -167 and off.y <= -156 then