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 (aka. rider), 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 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 are indeed stacked one by one, instead of all riding on the hoglin. , a player can support 2 parrots. However, , parrots become not entities and are stored into the player's NBT data when sitting on the shoulders of a player.
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. However, , a passenger riding on a passenger of an entity collides with the entity, resulting bugs like .
When a player leaving the world, all the entities that is ridden by or riding 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.
, with command, all entities are rideable by any entity, except marker and player, which never can be ridden. , only some riding combinations are valid for command, see #Valid riding combinations in vanilla
, 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.
A passenger cannot set its mount as its target for attack, a mount cannot set its passenger as the target for attack either, unless using command. , they cannot attack each other at all even when they target each other through command.
=== 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 a shulker is a passenger, it cannot teleport on its own. , an enderman cannot teleport on its own either.
** , passengers cannot be teleported by . , passengers dismount when teleported by .
*Passengers cannot be transported by nether portals or end portals.
*Passengers do not calculate the 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 or an armor stand, the health bar of the mount is displayed on the player's HUD in the form of . , the hunger bar is replaced by it in Survival or Adventure mode.
=== Mounts ===
Mounts have the following behaviors:
*Mounts cannot be transported by nether portals or end portals.
** , 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 ===
==== By players====
The movement of the following mounts are controlled by the player when being ridden by it:
* Saddled horses
* Saddled donkeys
* Saddled mules
* Saddled camels
* Pigs can be controlled by players holding a carrot on a stick.
* Striders can be controlled by players holding a warped fungus on a stick.
* Saddled skeleton horses / Adult skeleton horses 
* Saddled zombie horses 
*
*
* , ravagers are controlled by players when being ridden, but never move
, though on rails receive the input from its player passenger, they are not regarded as being controlled in game. Though do not receive the input from its player passenger, they are regarded as being controlled in game.
, mobs (except untamed horse, untamed mule, untamed donkey, untamed skeleton horse, untamed zombie horse, and unsaddled camel) being ridden by a player never move unless being controlled. , mobs can wander around freely when ridden by a player not controlling it.
, camels, boats, boats with chest, and ravagers are regarded as being controlled by a armor stand when being ridden by it, but never move.
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:
* Saddled horses
* Saddled donkeys
* Saddled mules
* Saddled skeleton horses / Adult skeleton horses 
* Saddled zombie horses 
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 trader llama
* Camel
* Tamed Skeleton Horse 
* Tamed Zombie Horse 
*
==== By mobs ====
, the movement of a mount is controlled by its passenger, if both the mount and the passenger are mobs (not players). However, there are some exceptions:
* Pigs cannot be controlled
* Striders cannot be controlled
* Unsaddled camels cannot be controlled
* Llamas cannot be controlled
* Trader llamas cannot be controlled
, for most of rideable mobs, when its mob passenger tries to chase and attack player or mobs, the passenger takes control, otherwise the mount controls movement. The following mobs are exceptions:
* : cannot be controlled by mob passengers.
* : cannot be controlled by mob passengers.
, some AI goals are disabled if the entities is ridden by or riding an entity. For example , when a zombie rides a pig, the pig controls the movement when they are idle; but the pig cannot follow players holding a carrot even when the zombie is idle; the pig controls the movement when it is breeding and the zombie is idle; the zombie controls the movement when it targets a player even when the pig is breeding. 
When being controlled by its passenger, the mount uses its own walk speed. However, , speed modifier of its passenger's AI is applied. For example, spiders ridden by a chicken, a sheep, or a llama have different speed when they follows a player holding seeds, wheat, or hay block, respectively. Because the AIs of chicken, sheep, and llama have different speed modifiers. While , the speed modifier (speed multiplier) for being controlled is defined for each entity type (by minecraft:behavior.mount_pathing component).
==== Behavior ====
For an entity that is riding by multiple passengers, only the front passenger has control over the mount. If a player and other entities ride it at a time, the player becomes the front passenger.
, the passenger controlling its mount can be targeted with .
, mobs cannot float on water when they are controlled. They are submerged in the water instead. , they can float on water when being controlled, however, because they float up and down more fiercely than in , their heads are often submerged so that the passenger is evicted， while tall mobs can float on water without their heads being submerged an the passenger is not evicted.
===Dismounting===
Mobs usually cannot leave their mounts on their own AI (there're some exceptions, 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 starts being leashed with a lead.
*When riding chicken, pig, ravager, spider, strider, horses, donkeys, mules, zombie horses, llamas, trader llamas and camels under water, being driven off by them. , this is controlled by entity tag.
*Being driven off by the mount (e.g. untamed horses, donkeys and llamas, underwater boats, minecarts on a powered activator rail, etc.).
*, When the passenger finishes eating a chorus fruit.
*, when the passenger is pulled by a 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 in vanilla game ==
=== Riding by player ===
Players can ride the following entities by pressing on the entity:
* Saddled pig
* Saddled strider
* Adult horse
* Adult donkey
* Adult mule
* Tamed skeleton horse / Adult skeleton horse 
* Tamed zombie horse 
* Adult llama
* Adult trader llama
* Adult camel
* 
* 
* 
=== Minecart ===
A mob can ride a minecart when pushing by a moving minecart on rails or when colliding with a minecart . , armor stand can also be picked up.
Ender dragons, wardens, and withers cannot be picked up by a minecart. , sniffers and iron golems cannot be picked up either.
, unlike wardens, ender dragons can ride a minecart via command; withers cannot ride a minecart via though a success message is returned.
=== Boat ===
Mobs can be picked up into a boat or a boat with chest when they collide with the side of the boat or boat with chest. , a boat being ridden by a player cannot pick up a mob. , mobs can be picked up by a boat being ridden by a player.
Mobs wider than the width of a boat cannot be picked up. Wardens and withers cannot be picked up. , baby sniffers cannot be picked up either.
, mobs wider than the width of a boat can ride a boat via command. Unlike wardens, ender dragons can ride a boat via command; withers cannot ride a boat via though a success message is returned.
=== Jockey ===
==== 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 ====
, 10% 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:
==== Skeleton Horseman ====
Skeleton horseman is a jockey consisting of a skeleton (or and ) riding a skeleton horse. Skeleton horsemen spawn only from a "skeleton trap horse".
=== Baby piglin riding baby hoglin ===
Baby piglins 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. , a baby hoglin can support 3 baby piglins, which looks like they are stacked one by one. However, , baby piglins ride each other and are indeed stacked one by one, instead of all riding on the 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.
=== Parrot riding player ===
A tamed parrot on the ground can be made to perch on its player's shoulder by moving through the parrot. , technically the parrot is riding the player. , technically the parrot on the shoulder is not an entity.
== Valid riding combinations in vanilla ==
, whether an entity is rideable is mainly defined with minecraft:rideable component and entity familliers in vanilla behavior packs. Besides, some entities have hardcoded riding behaviors, for, example, wardens being not able to riding a boat, boat doing not pick up adult horses although they can ride boats via command.
In the following table, none means that the entity is rideable by these families no matter what component groups it has. Multiple components separated by | symbols means that the entity must have at least one of them to be rideable by these families.
rideable entity	valid families for specific component_groups
Boat 	minecraft:can_ride_bamboo: all
Boat with Chest	minecraft:can_ride_bamboo: all
Camel 	minecraft:camel_adult: player
Cat 	minecraft:cat_wild: zombie
Cave Spider 	minecraft:spider_stray_jockey | minecraft:spider_wither_jockey: skeleton; Otherwise: zombie
Chicken 	minecraft:chicken_adult: zombie
Cow 	none: zombie
Donkey 	minecraft:donkey_wild: player, zombie; minecraft:donkey_tamed: player
Hoglin 	minecraft:hoglin_baby: piglin
Horse 	minecraft:horse_wild: player, zombie; minecraft:horse_tamed: player
Husk 	minecraft:zombie_husk_adult: zombie
Llama 	minecraft:llama_tamed: player
Minecart 	none: all
Mooshroom 	none: zombie
Mule 	minecraft:mule_wild: player, zombie; minecraft:mule_tamed: player
Ocelot 	minecraft:ocelot_wild: zombie
Panda 	none: zombie
Pig 	minecraft:pig_unsaddled: zombie; minecraft:pig_saddled: player
Player 	none: parrot_tame
Ravager 	none: pillager, vindicator, evocation_illager
Sheep 	minecraft:rideable_wooly: zombie
Skeleton Horse 	minecraft:skeleton_horse_adult: player, skeleton, zombie
Spider 	minecraft:spider_stray_jockey | minecraft:spider_wither_jockey: skeleton; Otherwise: zombie
Strider 	minecraft:strider_saddled: player; minecraft:strider_piglin_jockey: player, zombie_pigman; minecraft:strider_parent_jockey: strider
Trader Llama 	minecraft:llama_tamed: player
Wolf 	minecraft:wolf_wild: zombie
Zombie 	minecraft:zombie_adult: zombie
Zombie Horse 	minecraft:horse_adult: zombie
Zombie Piglin 	minecraft:pig_zombie_adult: zombie
Zombie Villager	adult: zombie
==Posture==
The following passengers have riding posture when riding:
Witches, villagers, iron golems, and wandering traders do not have a riding posture although similar mobs do.
=== Gallery ===
====Player====
Sitting Alex.png|Alex
Sitting Ari.png|Ari
Sitting Efe (slim).png|Efe
Sitting Kai.png|Kai
Sitting Makena (slim).png|Makena
Sitting Noor.png|Noor
Sitting Steve (slim).png|Steve
Sitting Sunny.png|Sunny
Sitting Zuri (slim).png|Zuri
====Illagers====
Sitting Vindicator.png|Vindicator
Sitting Pillager.png|Pillager
Sitting Evoker.png|Evoker
Sitting Illusioner.png|Illusioner
====Monsters====
Sitting Zombie.png|Zombie
Sitting Husk.png|Husk
Sitting Drowned.png|Drowned
Sitting Skeleton.png|Skeleton
Sitting Stray.png|Stray
Sitting Wither Skeleton.png|Wither Skeleton
Sitting Piglin.png|Piglin
Sitting Piglin Brute.png|Piglin Brute
Sitting Zombified Piglin.png|Zombified Piglin
Sitting Enderman.png|Enderman
====Zombie Villagers====
Sitting Plains Zombie Villager Base.png|Zombie Villager
Sitting Plains Zombie Librarian.png|Librarian
Sitting Plains Zombie Mason.png|Mason
Sitting Plains Zombie Nitwit.png|Nitwit
Sitting Plains Zombie Shepherd.png|Shepherd
Sitting Plains Zombie Toolsmith.png|Toolsmith
Sitting Plains Zombie Weaponsmith.png|Weaponsmith
Sitting Plains Zombie Armorer.png|Armorer
Sitting Plains Zombie Butcher.png|Butcher
Sitting Plains Zombie Cartographer.png|Cartographer
Sitting Plains Zombie Cleric.png|Cleric
Sitting Plains Zombie Farmer.png|Farmer
Sitting Plains Zombie Fisherman.png|Fisherman
Sitting Plains Zombie Fletcher.png|Fletcher
Sitting Plains Zombie Leatherworker.png|Leatherworker
== Achievements ==
== Advancements ==
== History ==
== References ==
zh:骑乘