Pig

Pigs are common passive mobs found in grassy biomes. They drop porkchops upon death and can be ridden with saddles.

Spawning
1-3 pigs spawn on grass blocks on the surface at a light level of 7 or more in any grassy biome except in snowy tundras and wooded badlands plateaus.

Individuals may spawn on grass after the world generation.

A pig spawns in animal pens, stables and in butcher houses' backyards in villages.

5% of them spawn as piglets.

Drops
When killed, an adult pig drops:
 * 1–3 ( if killed while on fire). The maximum amount is increased by 1 per level of Looting, for a maximum of 1-6 with Looting III.
 * 1 if saddled
 * if killed by a player or tamed wolf

Upon successful breeding,.

Like other baby animals, killing a baby pig yields no items, or experience.

Behavior
Pigs oink and typically appear while wandering.

Pigs avoid hazards and cliffs high enough to cause fall damage. If harmed, they flee for some seconds.

When a pig is struck by lightning, it transforms into a zombified piglin. If the pig was equipped with a saddle, the saddle is lost and the player dismounts.

Breeding
Pigs follow players within 6 blocks and breed using carrots, potatoes and beetroots.

It takes 5 minutes before the parents can be bred again. The piglets mature in 20 minutes and stay near their parents; feeding them reduces the remaining time for mature by 10%.

Riding


Saddled pigs are controllable with a carrot on a stick. They start slow but end up going 5.20 m/s. Pigs can be controlled through 1-block-high bodies of water with a carrot and stick, but deeper water causes the player to dismount. the carrot on a stick while riding a pig makes it run faster at the cost of 7 durability. Fall damage is taken by the pig, without causing any knockback or slower movement speed. The Frost Walker enchantment still works on water while riding a pig.

ID




Entity data
Pigs have entity data associated with them that contain various properties of the mob.

Pocket Edition
When killing a pig will Have a chance to kill You.

You can only feed it with wheat 1 time; Can be fed using
 * wheat:1
 * carrot:7
 * Hay bale:30

Trivia

 * Pigs are the oldest existing passive mobs in the game.
 * The player can travel through a space with a 1 block height by riding a pig.
 * When Notch was designing the pig, he accidentally mixed up some dimensions; this created what is now known as the creeper.