Donkey

Donkeys are tameable mobs that can be ridden when tamed.

Spawning
Donkeys only spawn in plains and savannas in herds of 2–6. $$, donkeys can spawn in plains in herds of 2–6 at light level 7 or above. 10% of all herds will be donkeys, with the other 90% being horses. 20% of the individual donkeys will spawn as babies.

Appearance
Adult donkeys are 1.4 blocks wide and long, and 1.6 blocks high. Foals start at half the size of adults and get progressively bigger as they age. Unlike wolves, ocelots, and cats, the appearances of donkeys do not change once they have been tamed, though tamed donkeys may be differentiated by giving them equipment.

Donkeys are smaller all around than the normal horses and sport long, erect ears. Their manes do not protrude, but rather are drawn directly on the back of their heads and necks. All donkeys have gray-brown coats with darker ankles, ears, manes, and tails. Donkeys can be equipped with a simple saddle not the full covered armor and they can also be equipped with chests to store up to 15 stacks of items.

Unlike almost all other mobs, donkeys with equipped saddles or chests will not render these when under the effect of Invisibility. This was reported as a bug, but Mojang decided not to fix it.

Drops
Upon death, donkeys drop;

If chested, or saddled, they will drop anything equipped.
 * 1–3 experience, when killed by a player or tamed wolf.

Using a weapon enchanted with Looting increases the maximum amount of drops by 1 per level of Looting, up to a maximum of 5 at Looting III.

Usage
Tamed and saddled donkeys can be used as one of the fastest animal pack of transportation in the game, though they are unable to fit through single block-wide openings. They can also be used to climb hills and jump fences, which the player's can't (without a potion). They can be ridden in water up to 2 blocks deep. In deeper water donkeys will separate from the player and swim uncontrolled.

Donkeys can be equipped with chests and used as pack animals.

Donkeys can be pulled along and tied up using a lead, and can be towed, swimming behind a boat by using a lead.

Equipment


Tamed donkeys have the following slot available:


 * Saddle Slot: For equipping a saddle.

Donkeys can also be equipped with chests, however these do not have a dedicated inventory slot. Foals cannot be equipped with anything.

Equipment can be placed on a donkey by holding left shift and then right clicking on the donkey, or by accessing its inventory. A donkey's inventory can be accessed by mounting the donkey and opening the player inventory or by ing and then right-clicking on the donkey. A donkey will only have a saddle slot originally, but if it is given a chest, it will acquire 15 more inventory slots that can hold anything the player wishes.

Chests can only be given to a donkey by right-clicking on the donkey with the chest in hand, and afterwards the chest cannot be removed, except by killing the donkey. Upon death, the donkey will drop the attached chest and its contents.

Riding
Once a donkey is tamed and saddled, the player can control it with standard directional controls,, and the mouse. The player dismounts using the control.

When riding a donkey, the hunger bar is replaced by the donkey's health in survival or adventure mode. $$, the donkey's health bar will still be visible on creative. It uses a slightly different heart texture than the player's health bar. The experience bar is replaced by the horse jump bar.

A player can use any item while riding a donkey, including drinking or throwing potions; activating doors or redstone devices; using chests, crafting tables, and furnaces; breaking and placing blocks; and attacking with melee weapons or bows.

A ridden donkey will automatically run up any one block high slope. The donkey and rider can safely fit through a space as low as 2.75 blocks high. Lower clearance risks suffocating the rider if the rider's head enters a non-transparent block. The donkey itself can enter gaps as low as 1.625 blocks high, but may itself take suffocation damage when clearance is less than 1.75 blocks. They cannot fit through a 1-block-wide gap.

Unlike horses, all donkeys have same movement speed and jump strength, although speed potions can be used to donkey and travel via the Nether to make the donkey easily become animal pack with the fastest practical way to travel in Minecraft. Donkeys are very slow moving backwards, and about as fast as the player when moving sideways.

A ridden donkey can be made to, and holding the control charges for a higher leap. Donkeys are not affected by jump boost beacons or potions. The standard control dismounts from the donkey, as does going in water deeper than two blocks. Like the player, donkey take fall damage when falling from heights.

It is impossible for a player to use a Nether portal while on a donkey. It is possible however, to enter the portal on the donkey and then dismount, sending it through the portal on its own, or use a lead to position the donkey, then push it through the portal.

Behavior
Donkeys will roam around idly, occasionally stopping to rear, swish their tails, or lower their heads as though eating the grass. Unlike sheep, the eating animation does not actually cause any grass to be consumed. If a player comes near, the donkey may turn to look at them. Any donkey, even a wild one, will allow itself to be attached to a lead without protest. However, if the player attempts to saddle an untamed donkey, it will rear and flail its front hooves. Donkeys remain passive, even when hit.

Donkeys will occasionally emit an audible braying sound.

Donkeys, like most mobs, can ride in a minecart and boat. Unlike other passive mobs, donkeys will slowly regenerate health.

Taming
Adult donkeys can be tamed: with an empty hand mount it repeatedly; when it no longer bucks the player and shows hearts, it is tamed. It is necessary to tame a donkey in order to breed it, give it equipment, or ride it for any length of time.

Taming depends on the donkey's "temper". They begin with a temper of 0 out of 100. When a player is riding the horse, a random number between 0 and 99 is chosen. The donkey becomes tame if this number is less than the temper, otherwise the temper is increased by 5 and the player is bucked off. Temper can also be increased by feeding the donkey.

While riding an untamed donkeys, a galloping sound is audible, more or less rapid. This gives a general idea of the donkey's speed. It is unknown whether there is any indication of jump height before taming.

Breeding
Feeding tamed donkeys golden apples or golden carrots will activate love mode.

The offspring will be more spindly than their adult versions and will grow progressively larger with time until they reach their full size. The offspring will not automatically belong to the player who owns its parents. Rather, it will be born as an untamed donkey and will need to be tamed after it grows into an adult. The foal can be fed to make it mature faster.

Breeding two donkeys creates a donkey foal. Since all donkeys have the same texture, the offspring will look exactly like its parents when it is fully grown.

Food
Feeding a donkey food may alter its behavior, cause it to grow (if it is not yet an adult; foals normally take 20 minutes to fully mature if not fed), and restore its health. The table below lists the effects of the various foods donkeys can consume.

To feed a donkey, hold a valid food item and right click on a donkey. If the food is invalid, the player will simply mount it. Donkeys can only be fed when feeding would have an effect, similar to other animals.

Statistics
All donkeys have three "equine stats" which vary between donkeys: health, (maximum) movement speed, and jump strength. These stats are created once the donkey is born or spawned, and are not affected by food.

Spawned values
When spawned in any way except breeding – for instance, using commands, spawning naturally, spawning as part of a skeleton trap, or using spawn eggs – donkeys are assigned their stats within certain ranges, specific according to their horse type.

Health
Donkey's health ranges from 15–30, but tends towards the average 22–23. Displayed hearts are health, divided by two, rounded down. A donkey with an non-even number of health points (15, 17, 19, etc.) will not show the last half-heart. If the donkey has lost one fewer health point than the inflicted damage and did not regenerate, it has an odd number of health points, otherwise it has an even number of health points.

Movement speed
A donkey’s speed value is always 0.175, equivalent to 7.525 blocks/sec; the player's normal walking speed is 0.1. The speed listed does not include any status effect that affects the speed of a horse or a player.

Player speed (walking): 4.3 blocks/sec. Player speed (sprinting): 5.6 blocks/sec.

See transportation to compare the speeds of various transportation methods.

Jump strength
Donkey's jump strength is always 0.5, enough to clear $1 9/16$ blocks.

The following derived equation can be use to calculate a donkey jump height from its jump strength attribute (with an rss of 5.510e-19). This function was fit to the data found in the table below and is therefore most accurate around these values. Where x is JumpStrength

The exact jump strengths, to 15 digits, required to clear several block heights are listed below.

Bred values
When breeding two donkeys, the foal's stats are determined by averaging both parent's stats with a third set, randomly determined as above (i.e. add both parents' stats with the random value and divide by 3). Random values are used for the third set even when the value is not normally randomized for the type of donkey being bred.

Data values
Donkeys have entity data associated with them that contain various properties of the mob.

Trivia

 * If a player picks up leather dropped by an adult donkey, they will receive the “Cow Tipper" achievement. This is due to the achievement being given when a player picks up any piece of leather instead of being given when one kills a cow.
 * If a player pulling a donkey with a lead enters a boat, the donkey will swim after them at the same speed as the boat.
 * A player riding a donkey will be dragged along if their donkey is being pulled by a lead, and can even be lifted up in the air in the same way.
 * Using commands, it is possible to make a donkey with no armor slot, but also no way to equip a chest.
 * In the Bedrock Edition the donkey can be transported in a boat by riding the donkey and jumping into the boat then dismounting (leaving the donkey behind in the boat) and activating the boat from underneath / underwater. Attempting to activate the boat in order to pilot it from above will result in the player being mounted on the donkey again rather than being placed inside the boat to pilot it.