mojira.dev
MC-237540

Y Position selector isn't working

The selector selects entities although they are not in the currect Y position.

 

Tested it in a void world:

  1. /kill @e[type=!player]

  2. /tp 0 80 0

  3. /execute if entity @e[y=70]

Step 3 returns: "{color:#FF0000}Test passed, count: 1{color}"

 

Also:

  1. /kill @e[type=!player]

  2. /summon minecraft:marker 0 70 0

  3. /execute as @e[y=69,dy=2] run say hi

Step 3 ignores the marker entity.

Comments 1

the x, y and z arguments only sets the selector origin; and if you set dx, dy or dz, the others will default to 0.
You're summoning at 0 70 0, but looking for the marker at ~ 69-71 ~
Using only x, y and z in selectors without sort, or dx/dy/dz or distance does nothing by design.

Adrienne Bowen

(Unassigned)

Unconfirmed

(Unassigned)

1.17.1

Retrieved