Sword

Swords are melee weapons.

Mobs
Some monsters can spawn with a sword, and have a 8.5% (9.5% with Looting I, 10.5% with Looting II and 11.5% with Looting III) chance of dropping them upon death by player: Zombies can drop iron swords, zombie pigmen can drop golden swords, and wither skeletons can drop stone swords. It will usually be badly damaged, and may be enchanted.

Trading
yg8jhgiuyjunvtgiljybjigvhnfd

Natural generation
Stronghold slab altars and village blacksmith chests may contain iron swords.

Attacking
Swords are used to damage both mobs and players. Upon damaging a mob or player, the sword's durability will decrease.

Attacking a boat or a minecart with a sword will instantly destroy it and will not decrease the sword's durability.

Blocking


Swords are able to block attacks by holding. This will reduce most damage by 50% and will reduce the player to a speed slower than sneaking.

Damage
The following table summarizes the damage that swords of different materials inflict. Enchantments can change these statistics.

Critical hits add a damage bonus of 50%, before sword enchantments.

The formula to find the minimum of the total lifetime damage is Durability × Damage per hit = Lifetime damage minimum. The formula to find the maximum is Durability × Critical Hits = Lifetime damage maximum.

Sword digging times
A sword can also be used to destroy certain blocks more quickly than with fists. Using a sword to destroy any block that doesn't break instantly decreases its durability by 2.

The following table shows the time it takes to break blocks on which swords have any effect. Colors indicate what will be dropped:
 * White: an original block.
 * Blue: block's normal drop (e.g. seeds, sapling, apple).
 * Red: nothing.

Enchantments
Swords can receive the following enchantments:


 * Looting
 * Unbreaking
 * Sharpness*
 * Smite*
 * Bane of Arthropods*
 * Knockback

Note: Sharpness, Smite and Bane of Arthropods are mutually exclusive.

Trivia

 * The sword's texture came from Notch's abandoned RPG, Legends of the Chambered. The iron sword's texture was created first, as it was from the game, and the other swords followed.
 * When blocking, the player's vertical movement speed does not decrease. This applies to flying, falling, swimming up or sinking, and climbing ladders.
 * A foam Iron Sword can be purchased on the merchandise page of minecraft.net.