Mending

Mending is an enchantment that restores durability of an item using Experience Orbs.

When an item with the enchantment is held (main hand, offhand, or armor slots), Experience Orbs collected will repair the item at a rate of 2 durability per XP instead of adding the XP to the player's total. If multiple items have the enchantment, one will be chosen at random for each XP orb collected, and if the chosen item does not need repair, the XP will be added to the player's total as normal, rather than choosing another item to repair.

For example, fishing with a fishing rod costs 1 point of durability but earns 1–6 experience points when reeling in a catch. A damaged fishing rod used this way will eventually restore itself to full durability and any excess experience points will apply to the player's experience.

Mending counts as a treasure enchantment: It can be obtained only from chest loot, fishing, or trading for enchanted books.

Mending and Infinity are mutually exclusive. However, if combined using commands, both enchantments function as normal.