mojira.dev
MC-124152

Unbounded ranges not treated as valid

I am not sure if this is intended or not, but there is an inconsistency when it comes to command ranges.

1. Create a new world and create a new dummy scoreboard objective test
2. run:

/scoreboard players set @p test 0
/execute as @e[scores={test=-2147483648..2147483647}] run say hi
/scoreboard players set @p test 0
/execute as @e[scores={test=-2147483648..2147483647}] run say hi

In this case, the command will execute so long as the player has a score present, since the range starts at the minimum possible value and ends at the maximum possible value.

3. run:

/execute as @e[scores={test=-2147483648..}] run say hi
/execute as @e[scores={test=-2147483648..}] run say hi

In this case, the command will execute so long as the player has a score present, since the range starts at the minimum possible value and there is no maximum.

4. run:

/execute as @e[scores={test=..2147483647}] run say hi
/execute as @e[scores={test=..2147483647}] run say hi

In this case, the command will execute so long as the player has a score present, since the range ends at the maximum possible value and there is no minimum.

5. Now, run:

/execute as @e[scores={test=..}] run say hi
/execute as @e[scores={test=..}] run say hi

In this case, one would expect that the command will execute so long as the player has a score present, since the range has no minimum and no maximum. However, it is not considered a valid range.

Comments 1

You need to specify a valid, saying “..” is not specifying anything. This is a feature request, not a bug.

Ely G

(Unassigned)

Confirmed

score, selector, selector-value-range

Minecraft 18w02a

Retrieved