Shield

Shields are tools used for protecting the player against attacks.

Repairing
Shields may also be repaired on an anvil by using planks. Shields repaired on anvils will retain their pattern.

Trading
Journeyman-level Armorer villagers have $1/3$ chance of selling a shield for 5 emeralds as their sixth trade.

Journeyman-level Armorer villagers have a 40% chance to sell a shield for 5 emeralds.

Usage
Despite using iron in its crafting recipe, it cannot be smelted into iron nuggets.

Defense
Shields are used for blocking incoming attacks. one causes the player to slow to a sneaking pace, and after 5 ticks, blockable attacks coming from in front of the player will be negated, dealing no damage. When the shield blocks an attack which is or stronger, it takes damage equal to the strength of the attack rounded down plus 1.

All non-damage effects of ranged attacks, (such as being set on fire or poisoned by a poisonous arrow) are prevented. Knockback from melee attacks and projectiles is nullified, while knockback from explosions is reduced to one block distance.

The shield blocks any directional attacks coming from up to, but not including, 90° away from the horizontal direction the player is facing, that is covers almost a full hemisphere in front of the player. The player's vertical rotation normally makes no difference to the direction of blocked attacks, however, a player facing straight up or straight down might be unable to block attacks from any direction. Similarly, an attack coming from directly above or directly below cannot be blocked as it has no horizontal direction.

Blockable attacks include:
 * Melee attacks
 * Arrows
 * Flaming arrows
 * Tridents
 * Snowballs and eggs
 * Lasers from guardians or elder guardians
 * Thorns from pufferfish
 * Bullets from shulkers
 * Fireballs
 * Creeper and ghast's fireball explosions
 * TNT ignited by other players

They cannot block:
 * Arrows from a crossbow enchanted with Piercing; this will not reduce the shield's durability
 * TNT ignited by a player or a redstone mechanism
 * Effects from throwable potions and magical flames from the ender dragon
 * Teleport and fall damage
 * Axe attacks from vindicators or sprinting players will disable the shield for 5 seconds
 * A player who is not sprinting also have 25% chance to disable

When hit by an arrow or trident, the projectile will ricochet off the shield and may hit other entities.

$$, shields are activated by sneaking. Shields stay activated when riding mobs since sneaking would normally make the player dismount.

Applying patterns


Unlike with banners, shields cannot be repainted or washed in a cauldron. Shields have only half the resolution of banners, making patterns look slightly different. In the game files, the pattern textures can be found in a separate directory called entity/shield.

Shields with patterns can also be obtained using the same commands as banners, except  has to be replaced with.

Enchantments
A shield can receive the following enchantments, but only through an anvil: