From 3d7e89811da7c3797fb00bf828a8feb97e758ec5 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Wed, 20 Jan 2021 16:14:23 +0100 Subject: [PATCH] Fix #990 --- mods/HUD/mcl_experience/init.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mods/HUD/mcl_experience/init.lua b/mods/HUD/mcl_experience/init.lua index 505731eb2b..3437240a05 100644 --- a/mods/HUD/mcl_experience/init.lua +++ b/mods/HUD/mcl_experience/init.lua @@ -384,10 +384,11 @@ local function xp_step(self, dtime) end end uses = uses or 0 - local repair = (65536 / uses) * xp * 2 + local multiplier = 2 * 65535 / uses + local repair = xp * multiplier local new_wear = wear - repair if new_wear < 0 then - xp = math.floor(-new_wear / 2) + xp = math.floor(-new_wear / multiplier + 0.5) new_wear = 0 else xp = 0