Pig

A pig is a passive mob found commonly in most grass biomes. Pigs are a source of porkchops and can be equipped with a saddle to be driven.

Spawning
$$, pigs spawn in groups of 4 above grass blocks at a light level of 9 or more in any grassy Overworld biome except in snowy plains, meadows and wooded badlands. Individual pigs rarely may spawn on grass after the world generation. $$, pigs spawn in groups of 1 to 3 above grass blocks at a light level of 7 or more in any grassy Overworld biome except in snowy plains, meadows and wooded badlands plateaus. Individuals regularly spawn on grass after the world generation.

Pigs spawn in animal pens, stables and in butcher house backyards in villages. 95% of pigs spawn as adults and 5% of pigs spawn as piglets. Pigs cannot spawn naturally with a saddle.

Drops
An adult pig drops upon death:
 * From 1 to 3 or  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.
 * A if saddled.
 * experience orbs if killed by a player or tamed wolf.
 * orbs upon breeding.

Killing a piglet yields no items nor experience.

Behavior
Pigs roam the Overworld avoiding hazards and harmful falls. A pig flees for a short time when harmed.

When a pig or piglet is struck by lightning, it transforms into a zombified piglin or baby zombified piglin, respectively. If the pig was equipped with a saddle, the saddle is lost and the player dismounts. If lightning strikes a pig in Peaceful difficulty, the pig does not transform but takes normal damage from the strike.

Riding
It is possible to ride an adult pig by using a saddle on it. When a saddle is used on a pig, the pig might stare at the player for a few seconds. Saddled pigs are controllable with a carrot on a stick. They start slow but accelerate to 5.20 blocks/s. Piglets cannot be saddled nor ridden.

Pig cannot float on water when being controlled. 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. If the pig and rider fall, then fall damage doesn't cause any knockback or slower movement speed.

A player can travel through a space 1 block high by riding a pig.

Breeding
Pigs follow players within six blocks using carrots, potatoes, beetroots or carrots on a stick. Pigs can be bred using carrots, potatoes or beetroots. After breeding, the parents have a cooldown of 5 minutes before they can breed again. Piglets mature in 20 minutes and stay near their parents. Feeding them reduces the remaining time to maturity by 10%.

Sounds
Pigs use the Friendly Creatures sound category for entity-dependent sound events.



ID




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






 * See Bedrock Edition level format/Entity format.

Trivia

 * A pig appears as a DLC costume for the Mii Brawler in the crossover fighting game Super Smash Bros. Ultimate.