Commands/ride

Allows entities to mount or dismount other entities.
== Usage ==
, all types of entities (except marker and player) can ride and be ridden by other entities of any types. Marker and player cannot be ridden.
, an entity cannot ride entities which are not normally rideable for it in vanilla game, which is mainly data driven, controlled by the component in the entity files in behavior packs (see Riding#Valid riding combinations in vanilla for details; see also the official doc). , this command can also be used to summon passengers and mounts.
==Syntax==
* Java Edition
: ride <target> mount <vehicle>
:: Makes <target> ride on <vehicle>.
: ride <target> dismount
:: Dismounts target from any vehicle it is riding.
* Bedrock Edition
: ride <riders: target> start_riding <ride: target> [teleportRules: TeleportRules] [howToFill: FillType]
::Tries to make <riders: target> ride on <ride: target>.
: ride <riders: target> stop_riding
::Makes <riders: target> dismount.
: ride <rides: target> evict_riders
::Makes entities that are riding on <rides: target> dismount.
: ride <rides: target> summon_rider <entityType: EntityType> [spawnEvent: string] [nameTag: string]
::Summons an entity at the position of each of <rides: target> that are rideable and not full, and then tries to make them ride on <rides: target>.
: ride <riders: target> summon_ride <entityType: EntityType> [rideRules: RideRules] [spawnEvent: string] [nameTag: string]
::Summons an entity at the position of each of <riders: target>, and then tries to make <riders: target> ride on them.
==Arguments==
: 
: Specifies the passenger.
: 
: 
: Specifies the mount.
: 
: 
: Specifies the passengers.
: If in start_riding mode, should be only one entity if teleportRules: TeleportRules is teleport_ride.
: 
: 
: Specifies an mount.
: Should be only one entity.
: 
: 
: Specifies the mounts.
: 
: 
: Must be one of teleport_ride and teleport_rider.
: Specified which entities are teleported. If unspecified, defaults to teleport_rider.
: 
: Must be one of if_group_fits and until_full.
:* If if_group_fits, checks whether all riders: target can ride on ride: target at the same time, and makes them ride only if true.
:* If until_full or unspecified, makes them ride up one by one until it's full.
: 
: Specifies the entities to be summoned.
: 
: 
: Specifies the entity event for the to-be-summoned entities. Should be a spawn event (event name for entities in behavior pack).
: 
: 
: Specifies the name of the to-be-summoned entities.
: 
: 
: Must be one of no_ride_change, reassign_rides, and skip_riders.
:* If skip_riders, summons entities only for <riders: target> that are not riding on another entity.
:* If no_ride_change, summons entities only for <riders: target> that are not riding on and not ridden by other entity(s).
:* If reassign_rides or unspecified, makes <riders: target> dismount if they're riding, then summons entities for all of them.
==Result==
==Output==
==Example==
, make the nearest player ride on an nearest arrow:
*/ride @p mount @e[type=arrow,sort=nearest,limit=1]
, summon an arrow at the position of each player who have "A" tag:
*/ride @a[tag=A] summon_ride arrow
, summon a charged creeper at the position of each player who have "A" tag:
*/ride @a[tag=A] summon_ride creeper reassign_rides minecraft:become_charged
== History ==
de:Befehl/ride
ja:コマンド/ride
pt:Comandos/ride
zh:命令/ride