6

For the most part, Minecraft Bedrock Edition has a very limited command supply, and no NBT access from commands. However, Bedrock Edition has gained a unique trick as of the 1.16.100 update: the /ride command. What is it used for? Let the Minecraft Wiki explain:

Used to make entities ride other entities, stop entities from riding, make rides evict their riders, or summon rides or riders.

In Java Edition, the /ride command doesn't exist, which makes it one of the only Bedrock Edition-exclusive commands. While it may be easy to summon stacked entities through commands like these, nothing has been documented yet to make two existing entities ride each other.

Let's show you a few /ride command samples, and the ones that you must find Java Edition workarounds for:

  1. ride <riders: target> start_riding <ride: target> [teleportRules: TeleportRules] [howToFill: FillType]
    

    This command is used to select two existing entities and make them ride on top of each other. rider rides on top of ride, and teleportRules shows whether to make the passenger move to the ride to begin riding, or vice versa. fillRules comes into effect if multiple riders are specified, but we won't need that much detail.
    Java Edition equivalent: Unknown. This question's task is for you to find or create a command contraption that will emulate the behaviour above!

  2. ride <riders: target> stop_riding
    ride <rides: target> evict_riders
    

    These commands are very similar, so I've grouped them as part of one example. They are used to end rides and make riders dismount from their rides. You either target some passengers or some rides, and use evict riders if you're targeting the rides, or use stop_riding if you're targeting the passengers. The selected entities will dismount from their rides, or evict the rider immediately on top of them.
    Java Edition equivalent: Unknown. This question's task is for you to find or create a command contraption that will emulate the behaviour above!

  3. ride <rides: target> summon_rider <entityType: EntityType> [spawnEvent: string] [nameTag: string]
    ride <riders: target> summon_ride <entityType: EntityType> [rideRules: RideRules] [spawnEvent: string] [nameTag: string]
    

    These two syntaxes are used if you have either the passenger or the ride, but not both, and want to summon the other and begin a ride.
    Java Edition equivalent: If you are working from scratch (no entities at all), you can summon a ride with a passenger on it with one command, like so:

    summon cow ~ ~ ~ {Passengers:[{id:"minecraft:pig"}]}
    

How can one achieve the effects of BE's /ride command using only Java Edition commands?

  1. When creating your JE alternative for syntax #1 above, don't cheat by killing the entity and summoning it as a rider or ride. I need a legitimate move, not a clone and delete.
  2. The official /ride command is restricted to ride combinations available in survival Minecraft. Please do not implement such restrictions on your workaround, because we are already able to summon entities with arbitrary passengers!
  3. If you've found a solution for one of the above, but not all three, please still post the answer to the one you've found! That way, we can all know sooner.
  4. From a post on Reddit on player NBT, modifying player data could potentially kick the player out of the game and force them to log back on. If possible, try to avoid this.
1
  • /data merge entity might help... but also you would summon a new mob tho... so idk.
    – Korogue
    Apr 30, 2021 at 0:53

3 Answers 3

1

1.19.3 and below

As other commenters have pointed out, something like this is unfortunately close to impossible to make a good solution for. Because passengers is one of those NBT attributes that cannot be modified with commands once the entity has been summoned, the only option is to re-summon the involved entities, for which you'd need to know all the data of said entities that can only be set at summon time (like Passengers or IsBaby) and then copy over the existing entity data to the newly summoned entities (for everything that can be modified like Attributes or Silent). This is likely unreasonable and unfeasible unless you're in a very controlled environment like a mob arena in a map with only very specific entities.

The only option you have for unmounting entities is to put them into water, as that forces an unmount.

1.19.4

As of 23w03a, a snapshot for 1.19.4, the /ride command exists on Java.

Though at the time of writing it is not as powerful as the bedrock command and can only make a target mount a vehicle (partially covers your usecase (1)) as well as makeing an entity unmounts its vehicle (partically covering your usecase (2)).

-1

You cannot ride a player or a mob without using any mods / plugins. But it's possible for normal mobs using a command.

I am not sure where did i see it or how can you do it. I only remember where someone made a video about salmon riding on salmon ridinmg on salmon riding on salmon and more.

-1

Currently in vanilla Java 1.19.2, the only way to do this through commands would be to summon a new entity or modify the data of an existing entity. There is an NBT tag called Passengers which can contain a list of entities riding on the original first entity, however they can be nested together to make large towers of entities if you wish. See https://minecraft.wiki/w/Entity_format#Entity_Format

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .