Pig

Pigs are passive mobs that are the source of porkchops, a renewable source of food; they are also a mode of transportation, provided the right materials are on-hand. They are 0.875 blocks tall, 0.650 blocks wide and 1.3 blocks long.

Appearance
A pig has pink skin, ears, and a nose. Their eyes consist of one black and one white pixel which creates a wall-eyed effect. They have a short, stubbed tail and their snouts protrude from their face.

Usage
Each pig will drop 1 - 3 raw porkchops upon death. Pigs that die while on fire will drop 1 - 3 cooked porkchops instead. Pigs can also be used as a method of controlled transportation with a Carrot on a Stick.

Behavior
Pigs typically roam the Overworld in groups of 3 - 4, but much larger groups can sometimes be found if multiple groups come together. When they encounter obstacles, pigs will often answer them by hopping up and down, apparently attempting to jump over them regardless of whether this is actually possible. They make no attempt to stay out of water, bobbing up and down to stay afloat. Pigs' pathfinding is similar to other passive mobs; they avoid harmful falls and attempt to go around obstructions. When led with carrots, pigs seem to "forget" their pathfinding skills: they will often become stuck on the opposite side of a block rather than walking around it, and will blindly walk off of ledges or into fire.

By right-clicking on a pig while holding a saddle, a player can ride it. The carrot on a stick provides control, causing the pig to travel in the direction indicated. (This significantly simplifies the "When pigs fly" achievement, formerly one of the more challenging.)

Pigs tend to move more often, but in smaller strides, towards the North-East, without any other variables coming into play. Pigs can be pushed into minecarts to be transported across long distances. Pigs cannot be placed/pushed into boats.

When struck by lightning, pigs turn into zombie pigmen. This is a very rare event as there are not many thunderstorms and pigs are a small target for lightning to strike. Baby pigs that get hit by lightning also turn into zombie pigmen. Ridden pigs also turn into zombie pigmen upon being struck by lightning. The player will receive 2 and a half hearts damage and be knocked off the mob.

When spawning pigs in creative mode, you can spawn baby pigs by right clicking on an pig with a pig Spawn Egg.

Breeding
Pigs can be bred using carrots. It takes about 5 minutes before the parents can be bred once more, which applies to all farm animals. It takes one full Minecraft 'day' (20 minutes) for baby piglets to become adult pigs. The appearance of a piglet is roughly similar to an adult pig, having the same sized heads but noticeably smaller bodies. Piglets mostly stay around their parents until they mature, although the parents cannot protect the piglet(s) from harm.

Riding pigs
Saddled pigs are controllable with a carrot on a stick (starting from 12w36a). They start slow but end up going up to 5 blocks per second (5m/sec). Pigs jump when moving, and can climb stairs, slabs, and ladders if moving into/onto them. Pigs also do not respond to carrots after entering a body of water. Pigs "eat" the carrot in a span of time which is shown by a durability bar on the carrot on a stick. Right clicking the carrot on a stick will cause them to have a burst of speed but take the durability off it by a one quarter of the health. It is not necessary to hold the carrot on a stick while the pig is having the burst of speed, allowing for e.g a mounted combat against other mobs or players. Damage taken while riding is dealt entirely to the player, unless the rider accidentaly hits the pig mortally. However, it does not cause any knockback nor any decrease of movement speed.

History
Creepers were originally a failed attempt to make a quadrupedal model for pigs, which Notch found amusing enough to make into a unique mob.

Bugs

 * While riding a pig, the characters' legs come out of his armor in the inventory view.
 * If a pig is in a minecart and gets stuck in a block, it will slowly take damage and die. And sometimes with a pig in minecart, it will randomly take damage and die at certain points for no reason (if the pig has a saddle and a player is riding it, it will not take damage. This was noticed on a superflat creative world in 1.3.2)
 * If you ride a pig in a minecart, the cart will act like a car as if inverted mousing is on. Notch soon noticed this and decided to let this stay for a while.
 * On the newest version, pigs may glitch through a pen, turning black, until you approach them (as other mobs do).
 * Saddled pigs being controlled by carrots may glitch into the ground or other blocks (turning/flashing black) as they move.
 * When riding a pig in first person and pressing shift you will not sneak, however in third person you will be able to press shift and sneak.
 * In SSP saddled pigs will not be able to breed.
 * A pig will attempt to jump on Primed TNT, but will always fail due to Primed TNT being an entity and entities cannot be jumped on, resulting in a pig consecutively trying to jump on a Primed TNT and will commit suicide once the Primed TNT explodes killing the pig to drop raw porkchop.  (Confirmed in Minecraft 1.3)

Trivia



 * By default, any spawner placed by the player will be a pig spawner.
 * Pigs have a separate "armor" file (for use with the saddle).
 * Saddled pigs in minecarts behave strangely:
 * If the player rides the pig, the speed of the minecart will be boosted.
 * The minecart, ridden or not, will not come to a stop unless it hits a block. Other entities and unpowered gold rails will only slow it to a minimum speed.
 * Although the player's eye level is not changed, the player can still sneak while riding a pig.
 * One of the splashes which shows up on the title screen reads "Ride the pig!".
 * It is possible to control a saddled pig by throwing snowballs or eggs at them, they will run the opposite direction the snowball/egg hit them. However, this method is very hard because the pig is likely to run around in circles.
 * If a saddled pig with a player on it goes through a 1x1x1 hole, the player will start suffocating.
 * A pig at second to full speed (5 blocks a second) is barely enough to avoid the skulls of the Wither.
 * With carrots being the new breeding item, pigs are even less efficient than cows as livestock, because porkchops give less food than steak, cows also drop leather, and you now need carrots to breed them- Thus, making pigs less efficient.
 * Pigs in Minecraft Pocket Edition sometimes drop no porkchop at all.