mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2025-01-09 16:49:35 +01:00
Make mending mend unbreaking items more (#4752)
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4752
This commit is contained in:
parent
e96bec0ad0
commit
52ccfa9365
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue