From 3236dc0d8e573e1129075521faf8de9c17b04032 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 23 Oct 2020 23:30:40 +0200 Subject: [PATCH] Simplify XP bar --- mods/HUD/mcl_experience/init.lua | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/mods/HUD/mcl_experience/init.lua b/mods/HUD/mcl_experience/init.lua index c70bcee12..b984b6d19 100644 --- a/mods/HUD/mcl_experience/init.lua +++ b/mods/HUD/mcl_experience/init.lua @@ -69,7 +69,9 @@ hud_manager.add_hud = function(player,hud_name,def) hud_elem_type = def.hud_elem_type, position = def.position, text = def.text, + text2 = def.text2, number = def.number, + item = def.item, direction = def.direction, size = def.size, offset = def.offset, @@ -163,20 +165,14 @@ minetest.register_on_joinplayer(function(player) name = player:get_player_name() temp_pool = pool[name] - hud_manager.add_hud(player, "experience_bar_background", - { - hud_elem_type = "statbar", position = {x=0.5, y=1}, - name = "experience bar background", text = "experience_bar_background.png", - number = 36, direction = 0, - offset = {x = (-8 * 28) - 29, y = -(48 + 24 + 16)}, - size = { x=28, y=28 }, z_index = 10, - }) - hud_manager.add_hud(player,"experience_bar", { hud_elem_type = "statbar", position = {x=0.5, y=1}, - name = "experience bar", text = "experience_bar.png", - number = temp_pool.bar, direction = 0, + name = "experience bar", + text = "experience_bar.png", + text2 = "experience_bar_background.png", + number = temp_pool.bar, item = 36, + direction = 0, offset = {x = (-8 * 28) - 29, y = -(48 + 24 + 16)}, size = { x=28, y=28 }, z_index = 11, })