mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-19 01:21:05 +01:00
This commit is contained in:
parent
55177c03ec
commit
7e3dd715af
1 changed files with 1 additions and 1 deletions
|
@ -263,7 +263,7 @@ function mcl_experience.add_experience(player, experience)
|
||||||
local can = final_candidates[math.random(#final_candidates)]
|
local can = final_candidates[math.random(#final_candidates)]
|
||||||
local stack, list, index, wear = can.stack, can.list, can.index, can.wear
|
local stack, list, index, wear = can.stack, can.list, can.index, can.wear
|
||||||
local unbreaking_level = mcl_enchanting.get_enchantment(stack, "unbreaking")
|
local unbreaking_level = mcl_enchanting.get_enchantment(stack, "unbreaking")
|
||||||
local uses = mcl_util.calculate_durability(itemstack)
|
local uses = mcl_util.calculate_durability(stack)
|
||||||
local multiplier = 2 * 65535 / uses
|
local multiplier = 2 * 65535 / uses
|
||||||
local repair = experience * multiplier
|
local repair = experience * multiplier
|
||||||
local new_wear = wear - repair
|
local new_wear = wear - repair
|
||||||
|
|
Loading…
Reference in a new issue