Make mending mend unbreaking items more (#4752)

Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4752
This commit is contained in:
the-real-herowl 2024-12-24 23:09:18 +01:00
parent e96bec0ad0
commit 52ccfa9365

View file

@ -474,6 +474,7 @@ mcl_experience.register_on_add_xp(function(player, xp)
local can = final_candidates[math.random(#final_candidates)]
local stack, list, index, wear = can.stack, can.list, can.index, can.wear
local uses = mcl_util.calculate_durability(stack)
/ (mcl_enchanting.get_enchantment(stack, "unbreaking") + 1)
local multiplier = 2 * 65535 / uses
local repair = xp * multiplier
local new_wear = wear - repair