Riding

Riding (aka. mounting) is the behavior that allows an entity to mount another entity.

Behaviors
Riding connects one entity to another. An entity riding another entity is called a passenger, and an entity being ridden is called a mount (aka. vehicle). An entity can be both a passenger and a mount at a time if it is riding another entity while being ridden by other entities, an entity can be both a passenger and a mount.

An entity can only ride at most one entity at a time. Most entities support only one passenger, but boat, bamboo raft and camel can support two passengers at a time. $$, by modifying entity NBT through commands, an entity may be ridden by any number of entities. $$, a baby hoglin can support 3 baby piglins, which looks like they are stacked one by one. However, $$, baby piglins ride each other and indeed stacked one by one, instead of all riding on the hoglin.

The collision and movement of a mount is not affected by its passengers, so the accessible position for the mount may put the passengers into danger, for example, making the passenger's head inside of a block and causing suffocation.

When a player leaving the world, all the entities that is ridden by it also disappear from the world, and will respawn with the player when the player rejoins the world, unless the affected entity has another player passenger.

$$, marker cannot be ridden.

$$, when a leashed mob starts riding, it drops the lead. $$, a leashed mob cannot start riding unless using command, and when staring riding, it doesn't drop the lead.

Passengers
Passengers have the following behaviors:


 * The position of a passenger is fixed on its mount, that is, the position and movement of a passenger cannot be affected by any other gameplay features.
 * Passengers have no collision with entities and blocks.
 * Passengers cannot be moved by knockback, explosion, fishing rod, and trident with riptide enchantment.
 * $$, passengers cannot be teleported by chorus fruit and end gateway.
 * $$, when a passenger goes into an end gateway, it is teleported with its mount.
 * When an enderman or a shulker is a passenger, it cannot teleport on its own.
 * $$, passengers cannot be teleported by . $$, passengers dismount when teleported by.
 * Passengers cannot be transported by nether portal, end portal.
 * Passengers do not calculate their falling height. When starting riding, the falling height is reset.
 * When a player is a passenger, it cannot interact with its mount.
 * When a player is a passenger, it cannot interact with other passengers on the same mount as its.
 * When a player is a passenger and the mount is a mob, the health bar of the mount is displayed on the player's HUD in the form of.

Mounts
Mounts have the following behaviors:


 * Mounts cannot be transported by Nether Portal, End Portal.
 * $$, mounts cannot be teleported by end gateway.
 * When a mount receives falling damage, all passengers also receive falling damage.
 * $$, if a mount is immune to falling damage, the damage is not passed to passengers.
 * $$, even if a mount is immune to falling damage, the damage is still passed to passengers.

Controlling
The movement of the following mounts are controlled by their passengers:


 * Saddled horse
 * Saddled donkey
 * Saddled mule
 * Saddled camel
 * All skeleton horse / saddled skeleton horse
 * Saddled zombie horse

For an entity that is riding by multiple passengers, only the first passenger has control over the mount.

The following mounts can be controlled by a player when holding a certain item:


 * Players can control it when holding carrot on a stick.
 * Players can control it when holding warped fungus on a stick.

Mobs cannot swim when they are controlled. They are submerged in the water instead.

The following mounts have the ability of "jumping charging". When players ride them, the experience bar on HUD will be replaced by jumping charging bar:

When a player ride the following entities, pressing opens the interaction interface of these creatures instead of the normal item bar interface:


 * Tamed horse
 * Tamed donkey
 * Tamed mule
 * Tamed llama
 * Tamed camel
 * Tamed Skeleton Horse
 * Tamed Zombie Horse
 * Tamed Zombie Horse

Posture
The following passengers have riding posture when riding: •

•

•

•

•

•

•

•

•

•

•

•

•

•

•

•

Dismounting
Mobs usually cannot leave their mounts on their own AI (there're some exception, e.g. baby piglins stop riding baby hoglins when being hurt), but there are many ways to make passengers leave their mounts:
 * When the passenger is a player, the player uses control.
 * When the passenger is a player, the player starts sleeping by using on a bed.
 * When the passenger is a player, the player starts riding another mount.
 * When the mount is dead or destroyed.
 * When the passenger is leashed with a lead.
 * When riding chicken, pig, ravager, spider, strider, horses, donkeys, mules, zombie horses, llamas, trader llamas and camels in/under water, being driven off by them. $$, this is controlled by entity tag.
 * Being driven off by the mount (e.g. untrained horses, donkeys and llamas, underwater boats, minecart passing a powered activator rail, etc.).
 * $$, When the passenger finishes eating a chorus fruit.
 * $$, when the passenger is pulled by fishing rod.
 * $$, when the passenger is teleported by.
 * $$, when the passenger is a piglin, and it converts to a zombified piglin.
 * Dismounting by command.

Riding by player
Players can ride the following entities by pressing on the entity:
 * saddled pig
 * saddled strider
 * adult horse
 * adult donkey
 * adult mule
 * adult skeleton horse
 * adult zombie horse
 * adult llama
 * adult trader llama
 * adult camel

Minecarts and boats
Mods automatically enter a minecart when collides with it, or a boat when standing on it.

The following mobs cannot enter minecarts and boats:

Spider Jockey
Spider jockeys are the rare appearance of a spider or cave spider‌ being ridden by a skeleton, stray, or wither skeleton.

Chicken Jockey
Chicken jockeys are the rare appearance of a baby zombie, baby zombified piglin, baby zombie villager, baby husk, or baby drowned riding a chicken.

Jockey of baby zombie
$$, 15% naturally spawned baby zombies, baby husks, and baby zombie villagers try to find a mount when it tries attacking a villager, player, or iron golem, which can ride: • Adult chickens

•  Untamed ocelots

•  Untamed cats

•  Untamed wolves

•  Adult zombies

•  Adult husks

•  Adult zombified villagers

•  Adult zombified piglins

•

•  Adult unsaddled pigs

•

•  Adult untamed horses

•  Adult untamed donkeys

•  Adult untamed mules

•  Adult skeleton horses

•  Adult zombie horses

•

•  Spiders that was not spawned as a jockey mount

•  Cave spiders that was not spawned as a jockey mount

•

Skeleton Horseman
Skeleton horseman is a jockey consisting of a skeleton riding a skeleton horse. Skeleton horsemen spawn only from a "skeleton trap horse".

Baby piglin riding baby hoglin
Baby puglins play with baby hoglins, running around and riding upon them. Up to 3 baby piglins may stack on top of each other while riding a baby hoglin.

Strider or zombified piglin riding strider
For every strider that spawns, there is a 1 in 10 chance of an additional baby strider to spawn riding on top of the previous strider. Zombified piglins have a 1 in 30 chance of spawning on top of a strider.

Illager riding ravager
A ravager generated in raids may generate with a pillager, evoker or vindicator riding on it.

Command
command is used to make entities ride or dismount an entity.