mojira.dev
MC-95301

Boats can't be teleported by command blocks when ridden

How to replicate:

1. place a command block which is constantly executing "/tp @e[type=Boat,c=1] ~1 ~ ~"
2. summon any boat
3. get in
4. type "/tp @e[type=Boat,c=1] ~1 ~ ~" in chat

You'll notice the command block isn't allowed to interact with the boat when a player is riding it, however, the player inside the boat is allowed to manipulate the boat by using the chat (/tp @e[type=Boat,c=1] ~1 ~ ~) . Executing a command as the player inside the boat (/execute <player in the boat> ~ ~ ~ /tp @e[type=Boat,c=1] ~1 ~ ~) doesn't work either. The same effect applies to /entitydata @e[type=Boat,c=1] {Motion:[0:0.0d,1:0.0d,2:1.0d]}
Causing a bit of lag by taking a screenshot sometimes results in the boat being teleported as long as the game is lagging

Linked issues

Attachments

Comments

kumasasa

Does this work with ridden Minecarts and ridden Horses ?
edit: Thanks

Bluefire610

It doesn't work with horses nor does it work with minecarts

migrated

effects both riding and ridden entities, all entities are effected, stack one ontop of another, both won't be able to teleport, unless they are put off each other

Bluefire610

It does not affect all ridden entities. Command Blocks were able to teleport the minecart / the horse whilst I was riding the cart/the horse, however, Command Blocks can not teleport a boat ridden by a player - only the player riding the boat can.

kumasasa

Uhm, I think my question

Does this work with ridden Minecarts and ridden Horses ?

wasn't that clear enough, so that I read your answer

It doesn't work with horses nor does it work with minecarts

like "it's not possible to tp ridden horses & minecarts" and not like "no, this bug doesn't affect horses nor minecarts"

migrated

well, my witherBoss riding a Zombie is not capable of getting teleported without one of the two being killed

migrated

I've been messing with this for a bit, and the bug still exists.

Teleporting a minecart with a player in it works fine.
Teleporting a boat with a player in it doesn't work.
Teleporting an empty boat or a boat with a mob (I tested with a pig) in it DOES work.
Teleporting a boat with a player in it DOES work IF the boat is teleported more than 10 blocks away.

This is obvious strange behavior, since teleporting minecarts is fine. I believe this might be caused by the boat desync optimization done a while ago. This would really help a project I'm working on if fixed.

Tested in 1.9 pre2.

migrated

Also, if you summon a boat riding a boat, teleporting the boats when the player is in top(controllable) boat will do nothing, but sitting in the bottom(uncontrollable) boat results in both boats + the player being teleported correctly.

migrated

The problem still exists in 1.9 release, tested it on server and single player.
Teleporting a player - works
Teleporting a boat - works
Teleporting a boat with player - doesn't work

migrated

Another hopefully helpful information:
if the player within a boat will be teleported with /tp @e[type=Boat] ~ ~2 ~2 or similar commands, all other players on the same server will see the player teleported to the given location, but the player in the boat doesn't receive any update and is still driving towards the wall.
I also tried it plugin-side to give the player, boat or both a velocity, similar effect like with vanilla tp.

migrated

In MC 1.9 or 1.9.1pre3 it works, BUT only when boat is in water.
I setupped CB with /tp @e[type=Boat,r=3] ~5 ~5 ~ , it works as expected on water , however if player in boat aproaches sliding on ice, it just fails to trigger (repeating commandblock keeps spamming succesful command even though the boat stays on old coordinates. When player disembark, both player and boat seems to be on teleported coordinates.
Video: https://youtu.be/2zbcqL1fe8I

SunCat

Probably a dupe of MC-44589

migrated

Yup, good catch

migrated

This bug still exists in 16w20a.

Bluefire610

(Unassigned)

Community Consensus

Minecraft 15w51b, Minecraft 1.9, Minecraft 16w20a

Retrieved