Piglin

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

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 have an adult and baby variant, as zombie pigmen and hoglins; they avoid nearby zombie pigmen and soul fire.

About its hostility, an adult piglin with 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, etc.

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

Even if the player wears gold armor, piglins will become aggravated towards the player if they open a any chest near the piglin, regardless of the contents. The player will be able to "barter" (similar to trading) with the player. To barter with piglins, players have to throw them a gold ingot and piglins will throw them an item in exchange.

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's not actually a weapon, and drop their crossbow on the floor. Their love for gold is so extreme that one could be in full netherite armour and they will willingly downgrade to golden armour if presented the opportunity.

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 as with regular Zombie Pigmen. Upon transformation, the newly spawned Zombie Pigman will have the Nausea effect for about 10 seconds.

Sometimes a Piglin can spawn wearing golden armour.

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

Bartering
By right clicking the piglin with gold ingot in hand or dropping an ingot nearby a piglin you can get one of these:

Trivia

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