Mojira Archive
MC-124140

Anchoring does not reset after use, and is implicitly applied in nonsensical cases by default

What I expected:
I expected that after I anchored the origin of the local coordinate system to my eyes, and set a position using local coordinates, that the anchoring would be reset (as it no longer makes sense, though the option always exists to re-anchor).

What actually happened:
After anchoring the origin of the local coordinate system to my eyes, and setting the position using local coordinates, the anchoring still applied, and I had to use anchored feet to fix it.

More details:
See the image attachment. A workaround for this issue is adding anchored feet directly after anything that makes use of a non-default anchor point, but this is much less obvious given that the main use of anchored will be with entities, and changing the position would retain a seemingly-arbitrary offset.

Here are commands to reproduce the issue:

execute as @a at @s anchored eyes positioned ^ ^ ^3 run particle end_rod ~ ~ ~
execute as @a at @s anchored eyes positioned ^ ^ ^3 positioned ^ ^ ^ run particle flame ~ ~ ~
execute as @a at @s anchored eyes positioned ^ ^ ^3 positioned ~ ~ ~2 run particle flame ~ ~ ~
execute as @a at @s anchored eyes positioned ^ ^ ^3 facing ~ ~ ~2 positioned ^ ^ ^5 run particle flame ~ ~ ~

The first 3 commands function as markers to visualize the steps taken in the final command. The end rod particle represents the sensible step, 5 blocks in front of the players' eyes. But the flames represent a line segment created by anchored eyes being implicitly applied a second time, the bottom left of which is an endpoint.

Here are commands to show what I expected the above 4 commands to look like if this issue did not exist:

execute as @a at @s anchored eyes positioned ^ ^ ^3 run particle end_rod ~ ~ ~
execute as @a at @s anchored eyes positioned ^ ^ ^3 anchored feet positioned ^ ^ ^ run particle flame ~ ~ ~
execute as @a at @s anchored eyes positioned ^ ^ ^3 positioned ~ ~ ~2 run particle flame ~ ~ ~
execute as @a at @s anchored eyes positioned ^ ^ ^3 anchored feet facing ~ ~ ~2 positioned ^ ^ ^5 run particle flame ~ ~ ~