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
Ride on of the affected entities (for example, a boat)
Use
/tp @e[type=boat] ~ ~5 ~0.25
→ ❌ This doesn't workUse
/tp @e[type=boat] ~ ~5 ~0.26
→ ✔ This does work
Linked issues
is duplicated by 3
relates to 3
Attachments
Comments 35
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
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.
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
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.