Fox

Foxes are nocturnal passive mobs that spawn commonly in taiga, giant tree taiga, and snowy taiga biomes. They move to villages during the night.

Spawning
Foxes spawn in taiga, giant tree taiga, and snowy taiga biomes, in groups of 2–4.

5% of them spawn as babies.

When spawned in a snowy biome, foxes are white in color.

Holding items
Adult foxes have a 20% chance to spawn via spawn egg or naturally with one of the following items in their mouth:

Drops
Upon death, adult foxes drop / when killed by a player or tamed wolf.

Like other baby animals, killing a baby fox yields no experience.

Foxes always drop any items they pick up and are still holding (they cannot drop food that they have eaten, for example) and drop items they spawn with naturally with a chance of 8.5% or 100%, so:

If a fox is killed while holding a, then the fox consumes the totem and revives itself instead of dropping the totem.

Upon successful breeding, are dropped.

Behavior
Foxes move quickly like ocelots and flee from nearby players and wolves. However, they do not flee if the player approaches them while sneaking. They are unaffected by sweet berry bushes, taking no damage or speed reduction while moving in them. Breeding 2 adults with sweet berries produces a kit that trusts the player, but follows nearby adult foxes. Naturally spawned kids do not trust players.

Attacking
Foxes attack chickens, rabbits, cod, salmon, tropical fish, and baby turtles on land. However, foxes don't attack wolves, even if they are being attacked by them. Foxes also may attack mobs that hurt a player they trust. Foxes attack either by running up to the target or by pouncing. A fox prepares to pounce by tilting and lowering its head and lowering its body to become shorter. They leap into the air 2 to 5 blocks high. Foxes can jump over fences and walls. $$, foxes also shake side to side before pouncing and their legs can be seen waving while in midair.

Red foxes prefer to attack chickens, rabbits, and baby turtles, all of which are on land, over cod, salmon, and tropical fish; conversely, arctic foxes prefer to attack cod, salmon, and tropical fish over land-dwelling creatures.

A fox that pounces into a snow layer becomes momentarily stuck, remaining face-down, emitting particles, and returning to normal shortly after.

Foxes attempt to run toward the closest attackable mob, even if attached to a lead.

Foxes that trust the player attack zombies, drowned, husks, zombie pigmen, skeletons, wither skeletons, strays, phantoms, silverfish, endermites, spiders, cave spiders, vexes, vindicators, pillagers, ravagers, blazes, endermen and pandas, when they attack the player.

Foxes that trust the player run away from wolves and polar bears.

When attacking phantoms, foxes do not jump in order to attack.

Sleeping
During the day, if a thunderstorm is not occurring, foxes attempt to find a space with a sky light level of 14 or less and sleep. Block light has no effect on this. While it sleeps, it slowly moves its head up and down. A fox wakes if approached by a player or mob. Foxes do not flee if the player approaches while sneaking until the player gets on an adjacent block.

If the sky light at the fox's position becomes 15, either due to a block above being destroyed or the fox being moved, the fox wakes up.

Foxes can drop and pick up items in their sleep.

Trusting foxes can fall asleep even if attached to a lead.

Foxes do not sleep if they are within 12 blocks of an armor stand.

Sitting
A fox sits down sometimes during the day if the fox cannot find a shaded area to sleep. The fox sits for only a short moment, then hops back up. Foxes sit down even when attached to a lead or in a boat.

Holding items
If any item is on the ground near a fox, it travels to the item and picks it up, and the item appears in the fox's mouth. This behavior is not limited to food and animal products; a fox can pick up any item that the player can pick up. However, they prefer to pick up food items (except cake), and if they have already picked up non-food items, they drop the non-food items in favor of picking up food. A fox eventually eats any food item it picks up (besides cake) and the fox is affected by any side effects from the food, such as poison or teleportation. If there is a stage 3 or 4 sweet berry bush within a 16 block radius of a fox, it sprints toward the bush and eats the berries, dropping the item it was holding. If a fox picks up a weapon or an item with enchantments, these items affect the fox's attack as if the fox is wielding the weapon in its main hand, although the item retains its durability when used by the fox.

Night life
During the night, foxes sometimes go to villages. There, they can be seen attempting to attack villager-owned chickens. They can be heard screeching.

Breeding
When sweet berries are used on two foxes, the foxes breed, producing a baby fox. The baby fox trusts the player that bred it and does not flee from that player as it grows up; however, because baby foxes also follow nearby adult foxes, an adult running away from the player may cause the baby to do the same. A lead can be useful during this time to keep the baby fox from fleeing until it has finished maturing to an adult itself.

If a red fox is bred with a snowy fox, the baby has a 50% chance of being either red or snowy.

Predators
Wild wolves are aggressive toward foxes when within 18/16 blocks. $$, adult polar bears also sneak toward foxes to attack them; $$ adult polar bears attack foxes within 16 blocks. $$, baby polar bears, though normally passive, also attempt to attack foxes within 16 blocks.

Entity data
Foxes have entity data associated with them that contains various properties of the mob.

Trivia

 * Although foxes appear to hold items in their mouth, they are technically holding items in their main hand.
 * Foxes are one of the few mobs that can sleep in Minecraft. The other mobs include cats, villagers, and bats.
 * Foxes are the only overworld land mob that can jump more than one block high without status effects or player input.
 * In the real world, some species of fox jump high to catch their prey by surprise, an action reflected in their Minecraft counterpart.
 * The phenomenon of foxes going to villages is based on stories of foxes raiding farms and towns for food in the real world.
 * When foxes were being added into Minecraft, a glitch occurred where they looked like boxes.
 * There is a splash screen "In case it isn't obvious, foxes aren't players" in the game, which was added from description to bug.