Is it possible to move a boat with commands with a player in it?
I want to move a boat up/down while a player is in it with commands. I tried to teleport the boat and change the Motion NBT, both worked... while there was no player in it... Somehow, there being a player inside the boats makes it unmovable with these two methods at least.
Edit: Forgot to mention I tried to use another entity below it and teleport it upwards/change its motion upwards to try to push the boat up, which also didn't work.
Edit 2: Just to clarify, I'm trying to move the boat and the player together.
I was able to make it work with this command:
/data merge entity @e[type=boat,limit=1] {Pos:[-6d,60d,22d]}
Just place the x y z
insted of my numbers.
This worked for me in 1.16.5 for every 2nd or 3rd try. It was quite unconsistent, but it worked sometimes. It seeams to work better when the player has moved a bit with the boat.
In 1.17.1 however, it worked alot better. It worked almost every time, but only if the player had moved a bit in the boat, like 0.2 blocks.
It also didn't work when I tried to move it horisontally, but this was fixed by just moving it 1 block upwards aswell. Still the player need to move a bit for it to work.
You can't use relative coordinates for this, but it works atleast somewhat.
I think
/data merge entity @e[type=boat,limit=1] {Pos:[-6d,60d,22d]}
will randomly choose a boat in the world.
So, it should be
/data merge entity @e[type=boat,sort=nearest,limit=1] {Pos:[-6d,60d,22d]}
It will choose the nearest boat to teleport with you.