mojira.dev
MC-114652

Boat orientation when stacked on another entity

The bug

If a boat is riding an entity the boat will no longer have an orientation to testfor.

For example If I turn the boat to face (-30.0 / ~ ) and testfor it with this command /testfor @e[tag=Boat,rym=-30,ry=-30] the results will be no entity found. Also another way to prove this I teleport my self to the boat facing (-30.0 / ~ ) and instead I face (0.0 / 0.0) normally I would face the same direction as the boat. I tested this with a boat not riding an entity and i faced the same way the boat faced. And the testfor command worked when it wasn't riding an entity.

Steps to reproduce

  1. Summon a boat riding an entity

    /summon armor_stand ~ ~ ~ {Passengers:[{id:"boat"}]}
  2. Get in the boat and turn it to a position

  3. Dismount the boat

  4. Teleport yourself to the boat

    /teleport @s @e[type=boat,limit=1]

    ❌ You will notice that you are not facing the direction you were facing while riding the boat
    Note: If the boat was not riding an entity you would be facing the correct direction after teleporting

Image proof

The first image is me facing the same direction as the boat, the second is me teleporting to the boat and instead of facing the same way as the boat I face (0.0 / 0.0).

Code analysis

Based on 1.11.2 decompiled using MCP 9.35 rc1

The problem is that the packet CPacketVehicleMove is only sent and accepted if the lowest ridden entity can be steered. Since in this case an armor stand cannot be steered no packet will be sent and the rotation is only updated client-side. If this is the intended behavior the respective steering methods should only allow steering and rotating an entity if it is not riding another entity.

Linked issues

Attachments

Comments 12

I don't think so. This bug is when a boat is stacked on an entity you cannot /testfor it's rotation with rym ry command. But if the boat isn't stacked you can testfor it's rotation. I'll make a video as proof later.

Confirmed in 18w05a. Does rotating the ridden entity then change the boat's rotation, or is it's rotation value fixed at the initial value of the ridden entity? I would test it myself but it's past 3am and I need to get to bed. It's possible that it is using the ridden entity's rotation overrides the boat's rotation when attempting to utilize it in commands.

Confirmed for 1.13.1.

I am unable to reproduce with the current tp command in 1.16.2 Pre-Release 1. Can you please provide an updated command

2 more comments

Can't reproduce either

Can still reproduce this and updated the commands.

Can confirm in 20w51a.

Can confirm in 21w06a.

Can confirm in 1.20.1.

Nyuha Pariu

(Unassigned)

Confirmed

(Unassigned)

boat, passengers, rotation, testfor

Minecraft 1.11.2, Minecraft 17w06a, Minecraft 1.12.2, Minecraft 18w05a, Minecraft 1.13.1, ..., 1.16.2 Pre-release 1, 1.16.4, 20w46a, 20w51a, 21w06a

Retrieved