/ride
/ride| Permission level required |
2 |
|---|---|
| Restrictions |
Cheat only |
{
"title": "<code>/ride</code>",
"rows": [
{
"field": "2<sup class=\"noprint nowrap Inline-Template \" title=\"\">[<i><span title=\"This statement only applies to Java Edition\">(link to Java Edition article, displayed as JE) only</span></i>]</sup><br>1<sup class=\"noprint nowrap Inline-Template \" title=\"\">[<i><span title=\"This statement only applies to Bedrock Edition\">(link to Bedrock Edition article, displayed as BE) only</span></i>]</sup>",
"label": "(link to Permission level article, displayed as Permission level<br>required)"
},
{
"field": "(link to Options article, displayed as Cheat) only<sup class=\"noprint nowrap Inline-Template \" title=\"\">[<i><span title=\"This statement only applies to Bedrock Edition\">(link to Bedrock Edition article, displayed as BE) only</span></i>]</sup>",
"label": "(link to Commands#Restrictions article, displayed as Restrictions)"
}
],
"invimages": [],
"images": []
}
Allows entities to mount or dismount other entities.
Usage
In Java Edition, all types of entities can ride another entity, and most can be ridden by one. The entities which cannot be ridden are markers, players, fishing bobbers, leash knots, and lightning bolts. When riding, the entity is known as a passenger. When ridden, the entity is known as the vehicle.
In Bedrock Edition, an entity cannot ride entities which are not normally rideable for it in vanilla game, which is mainly data driven, controlled by the minecraft:rideable component in the entity files in behavior packs (see Riding#Valid riding combinations in vanilla for details; see also the official doc). In Bedrock Edition, this command can also be used to summon passengers and mounts.
Syntax
- Java Edition
ride <target> mount <vehicle>- Makes
<target>ride on<vehicle>.
- Makes
ride <target> dismount- Dismounts
<target>from any vehicle it is riding.
- Dismounts
- Bedrock Edition
ride <riders: target> start_riding <ride: target> [teleportRules: TeleportRules] [howToFill: FillType]- Tries to make
<riders: target>ride on<ride: target>.
- Tries to make
ride <riders: target> stop_riding- Makes
<riders: target>dismount.
- Makes
ride <rides: target> evict_riders- Makes entities that are riding on
<rides: target>dismount.
- Makes entities that are riding on
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>.
- Summons an entity at the position of each of
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.
- Summons an entity at the position of each of
Arguments
- Specifies the passenger.
- Must be a player name, a target selector or a UUID. And the target selector must be in single type.
- Specifies the mount.
- Must be a player name, a target selector or a UUID. And the target selector must be in single type.
BE: riders: target: CommandSelector<Actor>
- Specifies the passengers.
- If in
start_ridingmode, should be only one entity ifteleportRules: TeleportRulesisteleport_ride. - Must be a player name or a target selector.
BE: ride: target: CommandSelector<Actor>
- Specifies a mount.
- Should be only one entity.
- Must be a player name or a target selector.
BE: rides: target: CommandSelector<Actor>
- Specifies the mounts.
- Must be a player name or a target selector.
BE: teleportRules: TeleportRules: enum
- Must be one of
teleport_rideandteleport_rider. - Specified which entities are teleported. If unspecified, defaults to
teleport_rider.
- Must be one of
if_group_fitsanduntil_full.- If
if_group_fits, checks whether all the riders can ride on the mount at the same time, and makes all of them ride the mount only if true. - If
until_fullor unspecified, makes them ride up one by one until the mount is full.
- If
BE: entityType: EntityType: enum
- Specifies the entities to be summoned.
- Must be an ID of an entity type.
BE: spawnEvent: string: basic_string
- Specifies the entity event for the to-be-summoned entities. Should be a spawn event (event name for entities in behavior pack).
- Must be a string. And it must be a single word that has no space or a double-quoted string (When quoted,
\can be used to escape characters).
BE: nameTag: string: basic_string
- Specifies the name of the to-be-summoned entities.
- Must be a string. And it must be a single word that has no space or a double-quoted string (When quoted,
\can be used to escape characters).
BE: rideRules: RideRules: enum
- Must be one of
no_ride_change,reassign_rides, andskip_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_ridesor unspecified, makes<riders: target>dismount if they're riding, then summons entities for all of them.
- If
Result
| Command | Trigger | Java Edition | Bedrock Edition |
|---|---|---|---|
| Any | The command is incomplete, or any argument is not specified correctly. | Unparseable | Unparseable |
<target> or <vehicle> fails to resolve to an entity (named players must be online). | Failed | N/A | |
/ride ... mount ... | <target> is already riding on an entity. | ||
<vehicle> is a marker, player, fishing bobber, leash knot, or lightning bolt. | |||
A mounting loop is detected (<vehicle> is riding <target>, or its passengers, or passengers of its passengers, etc.). | |||
<target> and <vehicle> are in different dimensions. | |||
/ride ... dismount | <target> is not riding on an entity. | ||
| Any | riders: target, rides: target, or ride: target fails to resolve to one or more entities (named players must be online). | N/A | Failed |
/... start_riding ... | More than one entity is targeted by ride: target. | ||
The entity targeted by ride: target is already full. | |||
teleportRules: TeleportRules is teleport_ride and more than one entity is targeted by riders: target. | |||
howToFill: FillType is not specified or until_full, and the ride: target is not rideable for all of riders: target. | |||
howToFill: FillType is if_group_fits, and too many entities are targeted by riders: target to ride up at the same time. | |||
howToFill: FillType is if_group_fits, and the ride: target is not rideable for at least one of riders: target. | |||
/... stop_riding | None of riders: target is riding on other entity. | ||
/... evict_riders | None of rides: target is ridden by other entities. | ||
/... summon_rider ... | All rides: target are already full or not rideable for the riders. | ||
| Trying to summon hostiles in peaceful difficulty. | |||
/... summon_ride ... | All summoned entities are not rideable for riders: target. | ||
| Trying to summon hostiles in peaceful difficulty. | |||
| Any | Otherwise | Successful | |
Output
| Command | Edition | Situation | Success Count | /execute store success ... | /execute store result ... |
|---|---|---|---|---|---|
| Any | Java Edition | On fail | 0 | 0 | 0 |
| On success | 1 | 1 | 1 | ||
| Any | Bedrock Edition | On fail | 0 | N/A | N/A |
/... start_riding ... | On success | the number of entities that get riding on the targeted ride | N/A | N/A | |
/... stop_riding ... | On success | the number of entities that get dismounted | N/A | N/A | |
/... evict_riders ... | On success | the number of entities that successfully evict their riders | N/A | N/A | |
/... summon_rider ... | On success | the number of summoned entities that successfully ride on their linked rides | N/A | N/A | |
/... summon_ride ... | On success | the number of summoned entities that are successfully ridden by their linked riders | N/A | N/A |
Example
In Java Edition, to ride and try to tame a skeleton horse or zombie horse:
/ride @s mount @e[type=minecraft:skeleton_horse,limit=1]or/ride @s mount @e[type=minecraft:zombie_horse,limit=1]
In Java Edition, make yourself ride on the nearest arrow:
/ride @s mount @n[type=arrow]
In Bedrock Edition, summon an arrow at the position of each player who have "A" tag:
/ride @a[tag=A] summon_ride arrow
In Bedrock Edition, 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
| Java Edition | |||||||
|---|---|---|---|---|---|---|---|
| 1.19.4 | 23w03a | Added /ride. | |||||
| 1.21.2 | 24w40a | No longer makes players ride leash knots, lightning bolts and fishing bobbers. | |||||
| Bedrock Edition | |||||||
| 1.16.100 | beta 1.16.100.52 | Added /ride. | |||||