Minecraft wiki entry for Item_repair, associated text: Two items of the same type are put into the input slots; the first one is the item to be repaired and the second one is to be merged into the first. The second item's durability is added to the first, and if applicable, some or all enchantments from the second item are added.