If two items share an enchant but have different levels and they are combined in the anvil, the cost will be incorrect.
Steps to reproduce
In the first anvil slot, put a sharpness I book
In the second slot, put a sharpness V book
Expected results
The cost to combine the items is 5 levels
Observed results
The cost of to combine the items is 4 levels
Comments 4
The cost is based on the number of levels that you are adding to the original item. I always thought that was correct, because otherwise you would pay for the same enchantment levels multiple times when combining items to increase the levels. You are sure it does not work that way in Java?
Ah, that makes sense. But yes, I tested on Java and that’s how it was, it also doesn’t mention this on the wiki. In that case, it might be a parity issue
The wiki does mention the difference between Java and Bedrock on this issue, on the Anvil Mechanics page, under “Costs for Combining Enchantments.” https://minecraft.fandom.com/wiki/Anvil_mechanics
From testing, I have found that this cost is decreased in a predictable way. The price reduction seems to be
(e2-e1)*L
Where e1 is the enchant level of the first slot, e2 is the enchant level of the second slot, and L is the level multiplier of the enchant. (For example, the multiplier of fortune is 2, meaning the cost to add fortune to an item not including work penalties is the level of fortune *2)
Another example of this is by adding fortune 3 to fortune 2, the expected cost is 6 but the actual cost 2. This can be verified by testing on Java edition.