mojira.dev
MCPE-158830

target selectors do not return correct for "y=0", "y=1" and "y=2" | commands

Any command including the attribute "y=0" "y=1" or "y=2" might not return correctly/detect players.

Steps to Reproduce:

  1. Go to y-level 1 in a world (picture 1)

  2. Type a command that includes the attribute "y=1" and for simplicity "dy=0", e.g.: /testfor @a[x=-5000,dx=10000,y=1,dy=0,z=-10000,dz=20000]
    (make sure you are not outside the specified x and z range!) (picture 2)

  3. Notice how the game outputs that no targets match the selector even though it should have listed you. (picture 3)

  4. You can repeat the same for y-level 2 and a command with "y=2"

Observed Results:

A command with "y=0" does detect you when you are standing on y-level 0 and 1.

 

A command with "y=1" does not detect you when you are standing on y-level 1.

A command with "y=1" does detect you when you are standing on y-level 2.

 

A command with "y=2" does not detect you when you are standing on y-level 2.

A command with "y=2" does detect you when you are flying close above y-level 2. (Position still displayed as 2)

 

 

Expected Results:

The commands should only detect the player when the attribute specifies the same y-value as the position of the player in the world. 
(examples with "dy=0" for simplicity reasons)

It works correctly for any other y-level than the mentioned. e.g.:
The command /testfor @a[x=-5000,dx=10000,y=3,dy=0,z=-10000,dz=20000] will only detect players on y-level 3 which is correct functionality.

Attachments

Comments 4

Still an issue in 27.0.20 beta and preview.

game_Screenshot_20261205-051946.jpg

This report is currently missing crucial information. Please take a look at the other comments to find out what we are looking for.
If you added the required information and a moderator sees your comment, they will reopen and update the report. However, if you think your update to this report has been overlooked or you want to make sure that this report is reopened, you can contact the Mojira staff on Discord or Reddit.
-- I am a bot. This action was performed automatically! If you think it was incorrect, please notify us on Discord or Reddit

migrated

(Unassigned)

868626

Confirmed

Multiple

Windows 10 Home 21H2, Android 11

attribute, command, y-coordinate

1.19.2 Hotfix, 1.19.10

Retrieved