Minecraft:Commands/ride: Difference between revisions
More actions
imported>Rogerio980Pizzaa |
Remove broken links to missing pages |
||
| Line 3: | Line 3: | ||
|name=ride | |name=ride | ||
|oplevel=2{{only|java|short=1}}<br>1{{only|bedrock|short=1}} | |oplevel=2{{only|java|short=1}}<br>1{{only|bedrock|short=1}} | ||
|others= | |others=Cheat only{{only|bedrock|short=1}} | ||
}} | }} | ||
Allows entities to mount or dismount other entities. | Allows entities to mount or dismount other entities. | ||
| Line 9: | Line 9: | ||
== Usage == | == Usage == | ||
{{main|Riding}} | {{main|Riding}} | ||
{{IN|java}}, all types of entities can ride another entity, and most can be ridden by one. The entities which cannot be ridden are | {{IN|java}}, 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}}, an entity cannot ride entities which are not normally rideable for it in vanilla game, which is mainly data driven, controlled by the {{cd|minecraft:rideable}} component in the entity files in behavior packs (see | {{IN|bedrock}}, an entity cannot ride entities which are not normally rideable for it in vanilla game, which is mainly data driven, controlled by the {{cd|minecraft:rideable}} component in the entity files in behavior packs (see Riding for details; see also the [https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_rideable official doc]). {{IN|bedrock}}, this command can also be used to summon passengers and mounts. | ||
==Syntax== | ==Syntax== | ||
| Line 90: | Line 90: | ||
{{Result table|<code><target></code> or <code><vehicle></code> fails to resolve to an entity (named players must be online).|fail|N/A}} | {{Result table|<code><target></code> or <code><vehicle></code> fails to resolve to an entity (named players must be online).|fail|N/A}} | ||
{{Result table|cmd=/ride ... mount ...|<code><target></code> is already riding on an entity.}} | {{Result table|cmd=/ride ... mount ...|<code><target></code> is already riding on an entity.}} | ||
{{Result table|<code><vehicle></code> is a | {{Result table|<code><vehicle></code> is a marker, player, fishing bobber, leash knot, or lightning bolt.}} | ||
{{Result table|A mounting loop is detected (<code><vehicle></code> is riding <code><target></code>, or its passengers, or passengers of its passengers, etc.).}} | {{Result table|A mounting loop is detected (<code><vehicle></code> is riding <code><target></code>, or its passengers, or passengers of its passengers, etc.).}} | ||
{{Result table|<code><target></code> and <code><vehicle></code> are in different dimensions.}} | {{Result table|<code><target></code> and <code><vehicle></code> are in different dimensions.}} | ||
| Line 124: | Line 124: | ||
==Example== | ==Example== | ||
{{IN|java}}, to ride and try to | {{IN|java}}, to ride and try to tame a skeleton horse in the same way as a regular [[Minecraft:horse]]: | ||
*<code>/ride @s mount @e[type=minecraft:skeleton_horse,limit=1]</code> | *<code>/ride @s mount @e[type=minecraft:skeleton_horse,limit=1]</code> | ||
| Line 141: | Line 141: | ||
|{{HistoryLine|java}} | |{{HistoryLine|java}} | ||
|{{HistoryLine||1.19.4|dev=23w03a|Added {{cmd|ride|link=none}}.}} | |{{HistoryLine||1.19.4|dev=23w03a|Added {{cmd|ride|link=none}}.}} | ||
|{{HistoryLine||1.21.2|dev=24w40a|No longer makes players ride | |{{HistoryLine||1.21.2|dev=24w40a|No longer makes players ride leash knots, lightning bolts and fishing bobbers.}} | ||
}} | }} | ||
| Line 157: | Line 157: | ||
{{Navbox commands}} | {{Navbox commands}} | ||
de:Befehl/ride | |||
ja:コマンド/ride | |||
pt:Comandos/ride | |||
ru:Команды консоли/ride | |||
zh:命令/ride | |||
Revision as of 15:45, 9 April 2026
Template:Redirect Template:Infobox command Allows entities to mount or dismount other entities.
Usage
Template:Main Template:IN, 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.
Template:IN, an entity cannot ride entities which are not normally rideable for it in vanilla game, which is mainly data driven, controlled by the Template:Cd component in the entity files in behavior packs (see Riding for details; see also the official doc). Template:IN, 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
Template:El: Template:Argument
- Specifies the passenger.
- Template:Arg desc
Template:El: Template:Argument
- Specifies the mount.
- Template:Arg desc
Template:El: Template:Argument
- Specifies the passengers.
- If in
start_ridingmode, should be only one entity ifteleportRules: TeleportRulesisteleport_ride. - Template:Arg desc
Template:El: Template:Argument
- Specifies a mount.
- Should be only one entity.
- Template:Arg desc
Template:El: Template:Argument
- Specifies the mounts.
- Template:Arg desc
Template:El: Template:Argument
- Must be one of
teleport_rideandteleport_rider. - Specified which entities are teleported. If unspecified, defaults to
teleport_rider.
Template:El: Template:Argument
- 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
Template:El: Template:Argument
- Specifies the entities to be summoned.
- Must be an ID of an entity type.
Template:El: Template:Argument
- Specifies the entity event for the to-be-summoned entities. Should be a Minecraft:spawn event (event name for entities in behavior pack).
- Template:Arg desc
Template:El: Template:Argument
- Specifies the name of the to-be-summoned entities.
- Template:Arg desc
Template:El: Template:Argument
- 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
Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table
Output
Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table
Example
Template:IN, to ride and try to tame a skeleton horse in the same way as a regular Minecraft:horse:
/ride @s mount @e[type=minecraft:skeleton_horse,limit=1]
Template:IN, make yourself ride on the nearest arrow:
/ride @s mount @n[type=arrow]
Template:IN, summon an arrow at the position of each player who have "A" tag:
/ride @a[tag=A] summon_ride arrow
Template:IN, 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
Bedrock Edition
External links
de:Befehl/ride ja:コマンド/ride pt:Comandos/ride ru:Команды консоли/ride zh:命令/ride