Zombified Piglin

Zombie pigmen or zombified piglins are undead neutral mobs that mainly inhabit the Nether.

Spawning
Zombie pigmen can spawn in the Nether, from nether portals, or from pigs struck by lightning. They have a 5% chance of spawning as a baby zombie pigmen.

A baby zombie pigman has a 5% chance of spawning as a chicken jockey.

All zombie pigmen spawn with a golden sword, which has a small chance of being enchanted in Normal or Hard modes: from 0 to 25%. This chance varies depending on the regional difficulty as the sword's enchantment is from 5 to 23 levels.

On Halloween (October 31), zombie pigmen have a 22.5% chance of spawning with a pumpkin or a 2.5% chance of spawning with a jack o'lantern equipped as headgear.

Nether
4 zombie pigmen spawn in the Nether at light level 11 or lower. They spawn commonly in nether wastes, uncommonly in crimson forests and one sometimes is found riding a strider in lava oceans.

Nether portals
When a nether portal block in the Overworld receives a block tick, there is a chance of $1/2000$ (0.05%) on Easy, $2/2000$ (0.1%) on Normal and $3/2000$ (0.15%) on Hard for it to spawn a mob.

$$, they appear inside one of the portal blocks on the bottom.

They spawn one block to the east or south of the portal (depending on which direction the portal is facing) in Bedrock and neither slabs nor lighting prevents this.

If a zombie pigman spawned in this way does not leave the portal it spawns on, there is a possibility of teleporting to the Nether.

Pigs
A zombie pigman spawns when lightning strikes within 4 blocks of a pig. If the player is riding the pig when lightning hits it, a zombie pigman appears on top of the player.

Even if the pig is a baby, the zombie pigman still spawns as an adult.

Piglins
A piglin that enters the Overworld or end transforms into a zombified piglin after 15 seconds.

It also has a 5% chance of becoming a chicken jockey.

Drops
When killed, zombie pigmen drop:
 * 0–1 . The maximum amount is increased by 1 per level of Looting, for a maximum of 0-4 with Looting III.
 * 0–1 s. The maximum amount is increased by 1 per level of Looting, for a maximum of 0-4 with Looting III.
 * There is a 2.5% chance to drop a if killed by a player or tamed wolf. The chance is increased by 1% per level of Looting, for a maximum of 5.5% with Looting III.
 * There is an 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.
 * All items zombie pigmen have picked up after spawning are dropped upon death.
 * for adults, for babies and  per naturally-spawned equipment, all if killed by a player or tamed wolf.

The golden swords that are dropped have one to full durability.

If a zombie pigman wearing a or  is killed using a tool enchanted with Looting, there is a chance equivalent to the level of Looting used to drop the pumpkin or jack o'lantern, up to a maximum of a 3% chance at Looting III.

Behavior
Zombie pigmen move slowly and are immune to fire damage. When provoked, their speed increases to the player's walking speed or faster for babies.

Like zombies, zombie pigmen bang on wooden doors and on Hard difficulty, they may break them.

In Normal and Hard difficulties in Java Edition, from 0 to 55% of zombie pigmen pick up swords better than their golden one, which they drop with the same chance as if killed with Looting I, 9.5%.

Zombie pigmen try to destroy any turtle eggs they see within 23 blocks away, not counting the block they are standing in.

Being undead, they are damaged by the status effect Instant Health and healed by the status effect Instant Damage. They are unaffected by the status effects Regeneration and Poison. They are ignored by the wither and affected by Smite.

Hostility
Zombie pigmen are not initially hostile, but all zombie pigmen within a 67×21×67 to 111×21×111 area centered on the attacked zombie pigman become aggressive and converge on the player (all of the players if the player is in multiplayer mode) if any individual is attacked, unless the zombie pigman attacked is killed in one hit. In addition, some zombie pigmen have the ability to spawn reinforcements when attacked (similar to zombies and which can rarely include actual zombies). This applies to any hit registered as coming from the player or other mobs, including deflected ghast fireballs, from sweep attacks, snowball and eggs, or a skeleton arrow. This does not include fireworks shot from crossbows, or dispenser-shot arrows.

Zombie pigmen remain hostile from 20 seconds to 27 minutes (limited by the Anger NBT tag type). Approaching within 35 blocks of an already hostile zombie pigman causes it to sound an alarm call, angering other zombie pigmen in a 40-block radius. The forgiveness timer does not advance for zombie pigmen in unloaded chunks. Therefore, if the player enters a Nether portal and returns, any provoked zombie pigmen in the area remain aggressive unless another player was nearby to keep the chunks loaded. Dying does not cause zombie pigmen to become neutral toward the player. They pursue players even if they have the Invisibility effect.

Neutral zombie pigmen do not prevent a player from sleeping.

If a mob attacks a zombie pigman, they all become aggressive toward that mob, and when the mob is killed they remain aggressive for several seconds and attack any nearby player without provocation.

Data values
Zombified piglins have entity data associated with them that contain various properties of the mob.

Trivia

 * The pre-Texture Update zombie pigman skin file has "THX XAPHOBIA" written on the unused section as a credit by Notch to the skin's original creator.
 * Deaths of hostile zombie pigmen always register as kills by the player they are targeting, regardless of whether that player ever touched that pigman.
 * The zombie pigman is the only mob to have a "baby" variant that's texture is significantly different than its adult counterpart, with baby zombie pigmen missing the outer layer of their head and showing their skull. It instead appears inside of its head, which is a bug.
 * This is actually the same case with baby zombies and their variants, which is visible only via Texture Packs.
 * The zombie pigman's angry sound is played twice the speed of the original sound file in the game.