Piglin

Piglins are hostile mobs that inhabit some Nether biomes. They are equiped with crossbows or golden swords.

Spawning
Piglins spawn in groups of 1–3 in crimson forest and nether wastes biomes. Each piglin has a 25% chance of being a baby. Sometimes a piglin can spawn wearing golden armor.

Behavior
Adult piglins are naturally hostile to the player, unless the player wears gold armor. They also always attack wither skeletons and sometimes adult hoglins. They will avoid nearby zombie pigmen and soul fire.

When attacking, an adult piglin with a crossbow will shoot arrows each 2 seconds, and walk backwards (stopping if at the edge of a drop) as soon as the enemy is close. Unlike bow-armed mobs, they will not strafe from left to right while doing this. Piglins with swords just rush at a player.

Baby piglins are not armed, but they may pick up some items instead.

Even if the player wears gold armor, piglins will become aggravated towards the player if they open any chest, trapped chest, barrel, shulker box or ender chest near the piglin, regardless of the contents.

Any piglin can pick up and equip any gold related item, regardless of their ability to pick up other items. Piglins that currently have crossbows can trade those out in order to hold any other gold related item instead (apart from ingots, which are consumed in bartering), even if it is not actually a weapon, and drop their crossbow on the floor. Piglins will even willingly downgrade to golden armour if they are wearing diamond or netherite armor.

When in the Overworld, piglins will transform into zombie pigmen after about 20 seconds. When they transform, they will lose all their armor and held items and will be given a golden sword. Upon transformation, the newly spawned zombie pigman will have the Nausea effect for about 10 seconds.

Bartering
To barter with a piglin, a player either throws a gold ingot near the piglin or the gold ingot on it, and the piglin will throw them an item in exchange and proceed to "eat" the gold ingot. The item the piglin throws may be one of the following:

Drops
When killed by a player or tamed wolf, piglins drop 5 orbs.

Trivia

 * Piglins receive damage from both fire and lava, as do hoglins.
 * Their attack strengh varies a lot in all difficulties.