Minecraft wiki entry for Item_repair, associated text: An anvil can also repair items in two different ways. This costs experience levels, but unlike the grindstone, the anvil preserves or can even enhance the target's enchantments. The anvil can combine the enchantments on two similar items, or rename any item (not just the ones it can repair). The costs are complex, so a summary is given here.