mojira.dev
MC-102608

Player can't teleport its ridden entity sometimes

The bug

When the player teleports an entity they ride (boats, horses, or pigs with a carrot on a stick), it won't move unless it's teleported more than 0.25 horizontally.

How to reproduce

  1. Ride on of the affected entities (for example, a boat)

  2. Use /tp @e[type=boat] ~ ~5 ~0.25
    → ❌ This doesn't work

  3. Use /tp @e[type=boat] ~ ~5 ~0.26
    → ✔ This does work

Linked issues

Attachments

Comments 35

I also noticed that when a player is in a boat, a command block can not teleport the boat.

Command: /execute @e[ry=22,rym=-22,type=Player,tag=InBoat] ~ ~ ~ /tp @e[type=boat,c=1] ~ ~ ~1

Output: Teleported Boat to -1023.5002065873173, 56.0, 196.80990742076614

While the output says it teleported the boat, the boat did not move, nor did the player.

Changing the motion entity data tag does also not move the boat while the player is in the boat.

This is happening for me as well, on horses specifically. I'm in 1.13 pre-8 and using this command:

/execute at @a[x_rotation=42..,scores={ridetime=1..}] as @e[type=horse,distance=..3] run teleport @s ~ ~1 ~

The horse is teleported only sometimes while being ridden, usually not at all, even though it always says it teleported when the selectors are met.

Until this is fixed I'm going to be forced to do a messy work around

@unknown, ticket is yours now. Please update as needed.

@unknown, aye aye sir

As of MC 1.13, the teleport command does not work at all on ridden entities when riding Horses, Donkeys, or Mules. However it does work while riding pigs.

25 more comments

Confirmed 1.15 pre-4.

Can confirm in 21w05b.

Can confirm in 1.18.2. I was looking into making a boat racing thing, and encountered this. I can probably work around it, but this may be an issue for some cases.

Confirmed in 1.19.4.

Also note that this bug also occurs when following the procedure:

 - dismount the entity (eg, using `ride @s dismount`)

 - teleport the entity

 - re-mount the entity (eg, using `ride @s mount @e[tag=vehicle,limit=1]`)

 

within the same tick. That is to say: even if the vehicle is not mounted at the exact moment of teleportation

 

This issue was fixed in 24w40a.

[media]

Jeroen Ech

Makzevu

(Unassigned)

Confirmed

Platform

Normal

Commands

Minecraft 16w21b, Minecraft 1.10.2, Minecraft 16w42a, Minecraft 16w43a, Minecraft 1.11.2, ..., 1.18.2, 1.19 Pre-release 2, 1.19.4 Pre-release 3, 1.19.4, 1.20.1

Retrieved