Thorns

Thorns is an armor enchantment that causes attackers to be damaged when they deal damage to the wearer.
Guardians and elder guardians have a Thorns-like effect which inflicts damage when their spikes are out. However, this only affects melee damage, whereas the enchantment applies to all direct attacks, including ranged.
== Usage ==
While wearing any piece of armor with the Thorns enchantment, the wearer has a Level × 15% chance of inflicting – damage on anyone who attacks them, regardless of whether they were hit by a melee attack, arrow, or other projectile. If the entity dies as a result of this damage, the death message, <player> was killed trying to hurt <entity> is displayed. The entity also gets knocked back when being attacked by the enchantment.
Multiple worn armor items with the Thorns enchantment do stack. Each piece confers an independent chance to deal damage to the attacker as described above. The total amount of damage that can be dealt this way is capped at . 
Probabilities of inflicting maximum damage and average damage dealt depending on the number of items with Thorns III worn are as follows: 
Items with Thorns III	Probability of max. damage	Average damage dealt
1 	11.25% 	
2 	28.83% 	
3 	46.33% 	
4 	61.18% 	
Thorns applies a durability penalty to the armor. It reduces durability by an additional 2 points when inflicting damage. If multiple armor pieces are enchanted with Thorns, the durability penalty is applied to one piece chosen at random, regardless of what level of Thorns that piece has. If the item is also enchanted with Unbreaking, the damage penalty has a chance of being ignored. 
If a projectile is launched toward an opponent equipped with Thorns, using a shield damages the shield instead of the player when the projectile hits the opponent.
Using commands, the enchantment level can be increased. The maximum possible chance of dealing damage is 100% (at level 7). If the level of Thorns exceeds 10, then it deals Level - 10 damage.
== Obtaining ==
In addition to normal enchanting, Thorns I and II can be obtained naturally from drops, fishing, trading with a villager or as loot from generated structures.
Thorns III cannot be directly obtained using an enchanting table, but can be obtained by using an anvil to combine two Thorns II enchantments. It is also possible to obtain Thorns III as a trade from a Librarian.
A Thorns III enchanted book can be found within the following structures:
Underground structures 
* Mineshaft 
* Stronghold 
Underwater structures
* Ocean Ruins
Aboveground structures
* Desert Pyramid
* Jungle Pyramid or Jungle Temple 
* Pillager Outpost
* Woodland Mansion
Miscellaneous structures
* Dungeon 
Pieces of armor enchanted with Thorns III can be found within the following structures: 
Underwater structures 
* Shipwreck 
Small structures 
* Ruined Portal 
The Nether 
* Bastion Remnant 
* Ruined Portal 
The End
* End City
==Unaffected mobs==
Evoker fangs, llamas, goats and wardens with sonic boom attacks are not affected by this enchantment.
== Sounds ==
:
:
== Data values ==
=== ID ===
:
:
== Video ==
== History ==
== Issues ==
== References ==
de:Dornen
es:Espinas
ja:棘の鎧
pt:Espinhos
th:สะท้อน
zh:荆棘