Mojira Archive
MC-122434

Issues with y_rotation and x_rotation selector arguments

The game seems not to recognize the difference between the x_rotation and y_rotation arguments, and seems to treat both as though they were the player's vertical rotation up and down.
For example using @p[y_rotation=-10..10] would not work for when the player is facing south between -10 and 10 degrees, but would work for when the player is facing in any direction and looking straight forward between -10 and 10 degrees.

I expected y_rotation to be rotation of the y-axis or along a horizontal view to each side around the player, and x_rotation to be rotation of the x-axis or along a vertical view to above and below around the player, as ry and rx were used to denote in previous updates.

Steps to recreate:
Put the following command in a repeating command block set to always active:
execute if entity @p[y_rotation=-10..10] run say hi

Expected behavior:
The command will repeat hi when the player faces in a south direction between the range specified.

What really happens:
The command will repeat hi no matter where the player is facing, just if their upwards/downwards rotation is between the range specified.

Second scenario:
Change the y_rotation to x_rotation to get:
execute if entity @p[x_rotation=-10..10] run say hi

Expected behavior:
If y_rotation and x_rotation have "switched" meanings over the update, then if y_rotation means vertical up/down direction, x_rotation should mean horizontal left/right direction. In that case, the command should repeat hi if the player is facing south between the range specified.

What really happens:
The command continues to work in every direction and only if the player's vertical rotation is between the range specified. There is no difference in command output when changing y_rotation to x_rotation and vice versa.

Duplicate

OnePointZero

2017-11-24, 08:25 PM

2017-11-24, 09:58 PM

2017-11-24, 09:58 PM

0

0

Unconfirmed

Minecraft 17w47b

-