The bug
World-binding selector arguments x y z dx dy dz distance
will restrict selector results to entities in the dimension the command context is executing from. However @s
is not restricted, and it will be found regardless of the presence of world-binding arguments if the sender dimension differs from the context dimension.
How to reproduce
Enter the overworld.
/execute in the_nether unless entity @a[x=0]
→ ✔ Test passed/execute in the_nether unless entity @s[x=0]
→ ❌ Test failed, count: 1
Linked issues
is duplicated by 1
Comments 14
1.16.1
This also applies to @a
So if you use some kind of coordinate restriction the dimension context is applied but if you dont then it will select players from any dimension.
tellraw @a "hello" tells everyone in all dimensions as you would expect
but so does this even though you would expect it to just apply to the named dimension:
execute in pw:spleef run tellraw @a "hello"
whereas this next one correctly restricts the dimension:
execute in pw:spleef run tellraw @a[x=0,y=50,z=0,distance=..500] "hello" - just tells players in the spleef dimension
this feels incorrect and means you have to test nbt data unnecessarily
You need to include worldbinding parameters to restrict most selectors to the target dimension. That is intended. The problem is that worldbinding parameters do not restrict @s
Confirmed in 1.16 Pre-release 5.