Piglin

Piglins are neutral mobs that inhabit some Nether biomes. They are equipped with crossbows or golden swords. They are hostile towards players not wearing golden armor, and neutral towards players wearing golden armor.

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. Piglins can occasionally 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, but only if with another piglin and sometimes adult hoglins. They will avoid nearby zombie pigmen and soul fire, including soul fire torches and soul fire lanterns.

When attacking, an adult piglin with a crossbow will shoot arrows every 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.

Piglins will willingly downgrade to golden armor if they are wearing higher tier armor, or armor that has higher durability than gold, such as iron, chainmail, diamond, and 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.

Piglins are capable of opening doors.

Piglins cannot swim in water, and will drown. However, the conversion to zombie pigmen always takes place before drowning can begin.

Picking up items
Any piglin can pick up and equip any gold related item, regardless of their ability to pick up other items. While doing so, Piglins will "contemplate" at the specific item by looking at it for a mere moment. 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 have eight hidden inventory slots. Baby piglins can pick up any item and will attemt to, often stealing from player. Adult piglins can pick up any golden item and porkchop. Golden apples, their enchanted variant, golden carrot and porkchop are the only items piglins will store in their inventories. Any picked item, be it equiped or in inventory will allways drop on piglin's death. Player can use the command to put an arbitrary item into a piglin's inventory.

Drops
When killed, piglins drop:
 * 8.5% chance to drop their if killed by a player or tamed wolf. The chance is increased by 1% per level of Looting, for a maximum of 11.5% with Looting III.
 * 8.5% chance to drop their if killed by a player or tamed wolf. The chance is increased by 1% per level of Looting, for a maximum of 11.5% with Looting III.
 * 5 if killed by a player or tamed wolf.

Trivia

 * Piglins receive damage from both fire and lava, as do hoglins.
 * Their attack strength varies a lot in all difficulties.
 * They are one of only three mobs in the game that can willingly give items to another player ( through bartering ), the others being villagers and wandering traders ( through trading ).
 * Despite unlocking the "Monsters Hunted" or "Monster Hunter" advancement when killing them, they do not despawn in Peaceful difficulty.
 * Piglins cannot ride on other entities.
 * Piglins are also one of only two mobs that can wield crossbows, the other being pillagers.