Zombified Piglin

A Zombie Pigman is an irregular mob that spawns naturally in the Nether and appears in the Overworld when a pig is struck by lightning. Like wild wolves, zombie pigmen are not initially hostile, but they will converge on the mob or player as a group to attack them if a single member is attacked.

Behavior
Zombie pigmen roam the Nether in packs of 4 - 10 and make grunting and squealing noises, avoiding cliffs and Ghasts. Attacking one zombie pigman will cause the entire group to turn hostile and swarm the player. Pushing a Zombie Pigman off a cliff will not cause response. An aggravated group of pigmen is a force to be reckoned with, as each member will deal of damage to the player per sword hit, though a player cannot outrun zombie pigmen without sprinting.

If the player distances themselves from the hostile group, waits in a safe location, or enters a portal and returns, the zombie pigmen will eventually "forgive" the player and become neutral again. Switching the difficulty to Peaceful will cause them to de-spawn completely and reset their neutrality in other difficulties.

Zombie pigmen are effectively capable of drowning if under water for an extended period of time. When swimming in lava, they collect theoretical vertical momentum, and upon contact with a solid floor, sustain fall damage. This has often lead to the misconception that they can drown in lava. When walking in the Overworld, Zombie Pigmen will spontaneously combust at random times; Fire will engulf them for a split second, but then disappear without appearing to cause them any harm. The brief flicker of flames will also occur if it is struck by lightning a second time.

Before 1.0, Zombie Pigmen occasionally dropped 0-1 Cooked Porkchop, but now it drops 0-1 Rotten Flesh and 0-1 Gold Nugget.

Combat
To an unprepared or careless player, a charging group of zombie pigmen can mean a swift death. However, fighting zombie pigmen becomes feasible when you can manage which of them become hostile and which remain neutral. Zombie pigmen attack on the basis of 'seeing is believing', meaning that they only become hostile when they see one of their own being attacked by the player. Once this happens, all zombie pigmen within a certain radius (about a dozen blocks) become hostile, and will charge the player IF he is within range. Zombie pigmen will also notice attacks from behind walls. The hostility radius is centered around the zombie pigmen that is attacked, not the player, meaning that you can attack a far-away zombie pigman with a bow without nearby zombie pigmen becoming hostile (although this is not advisable).

By keeping these rules in mind, it is possible to safely pick off groups of zombie pigmen with a bow, or to kill isolated zombie pigmen, provided that the other members of the group are outside their aggressive range, which is rather short.

Despite the visual effect of their gold sword they deal no greater damage than a zombie.

A way to kill them without great difficulty is to create a "booth"--a structure with four walls each three blocks tall, two of them (that must meet at a corner) having gaps at the second block up. A player can mine one block out of the bottom of one of the partial walls and attack a Zombie Pigman, then quickly go back inside and close the way in, then use strike-and-run tactics, running up to the walls with the gaps in them, hitting a Zombie Pigman, then running to the closed corner before it can retaliate, continuing until they are all dead. A bow or stone/iron/diamond sword speeds this process up significantly, the first by allowing the player just to sit in the closed corner and shoot, and the second by reducing the number of hits required. If possible, the booth should be made out of Cobblestone as this will make it invunerable to Ghasts.

An easier tactic is to build a column three blocks high. From here, you can either hit the Zombie Pigmen or shoot arrows. They will swarm you, as well as push you around, but you will not receive any damage as long as you remain on the column.

As of Beta 1.9 Pre-release 5 Zombie Pigmen, Skeletons and Zombies can be damaged by Splash Potions of healing and/or regeneration, and will be healed by Splash Potions of Poison and/or Instant Harm. In addition, a sword enchanted with Smite will do extra damage to Zombie Pigmen.

Another great way to deal with a pack of charging zombie pigmen is to either have a sword inchanded with the knockback ability, or to backpedal while attacking them, as they can outrun you if you don't sprint.

History
Zombie pigmen, the first completely neutral, non-passive mob, was introduced in Alpha as a part of the Nether update along with ghasts. The green liquid in the zombie pigman skin was originally blood red, but this was changed because players expressed a preference for the lack of conventional blood and gore in Minecraft. The skin file has "thx xaphobia" written on it as a credit by Notch to the skin's original creator, XaPhobia, also known as X__x.

Zombie pigmen were originally presented as unarmed passive creatures in a preview before the Halloween update. After Alpha 1.2, their temperament was changed to neutral and they wielded gold swords. Pigmen would never forgive the player for attacking them, but after the Nov. 10, 2010 update, they would revert to a neutral state  after a certain amount of time (if left alone).

After the Beta 1.5 update, pigs struck by lightning in the Overworld would transform into zombie pigmen.

After the 1.0 update, Zombie Pigmen no longer drop cooked porkchops upon death, but instead drop rotten flesh. Also, they have a chance to drop Gold Nuggets, which can be crafted into Gold Ingots or Glistering Melons.

Trivia

 * Zombie pigmen are mostly immune to lava and fire, but they can take damage from lava because it does not prevent falling damage like water does. Therefore, if they float in place long enough, they can accumulate enough falling damage that they simply die the moment they touch any surface, including land and the bottom of the lake or stream.
 * A direct hit by a Ghast's fireball will cause a Zombie Pigman to run directly towards the Ghast and attempt to attack it. This behavior has only been observed if the Ghast is touching the ground, usually occurring when the Ghast spawns under a low ceiling. This is likely because Zombie Pigmen cannot find a path to an airborne Ghast. However, only the Zombie Pigman which was hit by the fireball will attack the Ghast, nearby Zombie Pigmen will not change their behavior.
 * In the Java coding, zombie pigmen are usually titled "pigzombie" or "zombiepig".
 * Despite holding golden swords, zombie pigmen don't drop them when they die, nor do they break although they do occasionally drop gold nuggets (as of 1.9), which can be crafted into ingots to make a sword. Zombie Pigmen are also capable of dealing more damage on Hard difficulty than the player can with a golden sword.
 * Zombie Pigmen can climb up ladders and attack the player while doing so; however, they will not use this to their advantage, and only use a ladder if it is right in front of them.
 * The Zombie Pigman's head's texture is the zombie-like texture with the pigman part laid on top.
 * Prior to Beta 1.8, Zombie pigmen dropped 0-2 Cooked Porkchops.
 * When knocking back a ghast fireball, it is easy to accidentally hit a zombie pigman.
 * As of 1.9 pre 5, a zombie pigman hit by a splash potion of harming will GAIN health, however, when it is hit by a splash potion of healing it will lose health. This likely happens because they are undead.

Bugs

 * If a player attacks a zombie pigman in multiplayer, they turn hostile to ALL players. If the player who attacked them dies or goes away, the zombie pigmen attack the next player who is closest to them.
 * In multiplayer, if the server has monsters and a pig is struck by lightning, it may result in a glitched zombie pigman object that behaves similar to the client-side TNT glitch, it can be passed through, does not move or obey physics and cannot be hit.
 * In the Beta 1.9 pre-releases, upon looking straight at the Zombie Pigmen with fast graphics turned on, the hotbar seems to change colors.