Anvil mechanics
This page explains the mechanics of the anvil. The anvil is primarily used in its inventory to combine tools, weapons, and armor with other items of the same type or with an enchanted book at the cost of experience without the stripping of enchantments, or to rename any item. The item on the left side of an anvil operation is known as the target, and any item on the right is known as the sacrifice. The result (in the third slot) is a modification of the target item, consuming the sacrifice if it is part of the operation.
As a gravity-affected block, an anvil can also be placed to drop on living entities to damage them.
The five basic functions of the anvil are:
Complete article available
This cached Wiki page is unusually large, so it is loaded on demand to keep the initial page fast.