mojira.dev
MC-121673

Rotation selector arguments do not allow max to be lower than min

Due to the continuous nature of rotations being interrupted by the sudden switch from negative to positive, it was convenient that those arguments in selectors would be moduloed properly to wrap, so one could do something like this:

/testfor @a[rym=80,ry=-60]

In the current version, the equivalent (/execute if entity @a[y_rotation=80..-60]) fails to build because "the minimum is greater than the maximum." In reality, it is not, because -60 should wrap to what amounts to 300.

Linked issues

Comments 8

ScyllarusDactyl

Confirmed for 17w50a

Can confirm for 18w01a.
Interestingly, y_rotation=170..190 behaves the same and gives the error that min cannot be bigger than max. So the parser seems to know that 190 = -170 in that case, so it actually shouldn't be that hard to fix this...

This affects x_rotation as well

x rotation does not wrap, does it? and it's also logical it does not, as you cannot move your head over -90/90 degrees.

@a[rxm=45,rx=-45]

worked fine in 1.12.2, the new format

@a[x_rotation=45..-45]

doesn't in 18w01a.

Oh, "everything that has a x_rotation of -45 to 45 won't be considered; right.

ScyllarusDactyl

I think that using ! would be more intuitive... They should allow to use it to select outside a range (literally "not in this range").

That's a feature request, not a bug.

[Mod] tryashtar

No User

michael

Confirmed

command, rotation

Minecraft 17w45a, Minecraft 17w48a, Minecraft 17w50a, Minecraft 18w01a, Minecraft 18w02a, Minecraft 18w11a, Minecraft 18w19b

Minecraft 18w20c

Retrieved