Zombified Piglin

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

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

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

All spawn with a golden sword, which has a small chance of being enchanted in Normal or Hard modes, up 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), zombified piglins 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
Zombified piglins spawn in groups of 4 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 probability 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 zombified piglin spawned in this way does not leave the portal it spawns on, there is a possibility of teleporting to the Nether.

Pigs
A zombified piglin spawns when lightning strikes within 4 blocks of a pig.

Piglins
A piglin that enters the Overworld or end transforms into a zombified piglin after 15 seconds. When baby piglin turn into zombies, they do not have weapons, unlike baby zombified piglin that naturally spawn.

A zombified piglin keeps any armor or weapons collected before being zombified.

Baby zombified piglins also have a 5% chance of becoming a chicken jockey.

Drops
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.
 * Common drops
 * 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.
 * Rare
 * 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.
 * Equipment
 * There is an 8.5% chance to drop their normal or enchanted 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, without changing the durability.
 * Experience points
 * for adults or for babies if killed by a player or tamed wolf.
 * Notes

Behavior
Zombified piglins move at 2.2843m/s and are immune to fire and lava. When provoked, their speed increases to 3.3845m/s or faster for babies.

Zombified piglins bang on wooden doors and on Hard these may be broken.

In Normal and Hard difficulties, up to 55% of zombified piglins pick up any armor pieces and swords better than their golden one, which they drop with the same chance as if killed with Looting I, 9.5%.

Zombified piglins try to destroy any turtle eggs they see within 23 blocks away horizontally and 3 blocks away vertically, not counting the block they are standing in. When a zombie pigman is first spawned, it always detects nearby turtle eggs after exactly 2 seconds. However, if the turtle egg is placed after the zombie pigman spawned, the zombie pigman takes some time to notice the turtle egg and try to break it.

Even though zombie pigmen are immune to magma blocks, they avoid walking over them. However, if they are spawned or pushed on to magma blocks, they would then path find normally above.

Mob type
Undead, they are:
 * Damaged by the status effect Instant Health and healed by the status effect Instant Damage.
 * Unaffected by the status effects Regeneration and Poison.
 * Ignored by the wither and affected by Smite.

Hostility
Zombified piglins are not initially hostile, but all zombified piglins within a 67×21×67 to 111×21×111 area centered on the attacked zombified piglin become aggressive and converge on the attacker (another mob or player, even if they have the Invisibility effect) when any individual is attacked (unless the zombie pigman attacked is killed in one hit).

In addition, some have the ability to spawn reinforcements when attacked (similar to zombies). This applies to any hit registered as coming from the player or other mobs, including deflected ghast fireballs, from sweep attacks, snowballs and eggs, or a skeleton arrow. This does not include fireworks shot from crossbows, or dispenser-shot arrows.

The hostility is from 20 to 39 seconds (or 27 minutes - limited by the Anger NBT tag type). Approaching within the player follow range (35 blocks +/- 5%) of an already hostile mob causes it to alarm and anger all zombified piglins in a 40-block radius. Having constant line of sight with a hostile zombified piglin causes it to alarm neutral zombified piglins (within a 40-block radius) every 100 game ticks, or 5 seconds only if it is outside of its player follow range. One remains hostile indefinitely if it is within entity processing areas and has direct line of sight with the player. Breaking direct line of sight causes a hostile zombified piglin to return neutral if their forgiveness timer expires. The forgiveness timer does not advance for zombie pigmen in unloaded chunks. Therefore, if the player enters a Nether portal and returns, any provoked zombified piglins in the area remain aggressive unless another player was nearby to keep the chunks loaded. Dying will cause they to become neutral toward the player if the gamerule  is true, as per default.

Neutral zombified piglins do not prevent a player from sleeping.

Hostile zombified piglins have slightly different path finding than when they are neutral. For example, they would fall off edges that would cause them fall damage in attempt to reach the attacker where most other mobs would otherwise not do.

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 is 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.