-
Bug
-
Resolution: Unresolved
-
None
-
1.20.40.20 Preview, 1.20.15 Hotfix, 1.20.50.22 Preview, 1.20.50.21 Preview, 1.20.40, 1.20.73 Hotfix, 1.21.1 Hotfix
-
None
-
Confirmed
-
Multiple
-
1124689
The bug
The volume defined by target selector arguments dx, dy and dz is always larger than specified by 1 in all dimensions.
For example, @e[dx=0,dy=0,dz=0] would select entities in a 1x1x1 cube with the negative corner at the execution location, and @e[dx=1,dy=1,dz=1] would select entities in a 2x2x2 cube.
Negative values are allowed and work correctly in the negative directions; however the selection area is still extended 1 in all positive directions.
For example, If you have an armor stand besides you at each side, aligned to the x axis,
@e[dx=-1] would select you and both armor stands, rather than just the one on the negative side.
This is an edited copy of the Java Edition equivalent MC-123441, and relates to MCPE-171423.
Steps to reproduce
Setup some armor stands
- Run the following commands:
/execute align xyz run summon armor_stand ~0.5 ~ ~0.5 ~ ~ a Center /execute at @e[type=armor_stand,name=Center] run summon armor_stand ~1 ~ ~1 ~ ~ a Positive /execute at @e[type=armor_stand,name=Center] run summon armor_stand ~-1 ~ ~-1 ~ ~ a Negative
- Run the following command:
/execute at @e[type=armor_stand,name=Center] run say @e[dx=0,dy=0,dz=0,type=armor_stand]
→ It finds "Positive" even though an area with the size of 0x0x0 is provided.
- Use the following command:
/execute at @e[type=armor_stand,name=Center] run say @e[dx=-1,dy=-1,dz=-1,type=armor_stand]
→ It finds all armor stand even though it should not find "Positive" as a negative area is provided.
- is duplicated by
-
MCPE-180744 Command Selector Positive(+) Coordinates Bug
- Resolved
- relates to
-
MCPE-171423 dx, dy, and dz go out one block further when xyz are set to ~~~
- Open
-
MC-123441 Target selector volume arguments "dx", "dy" and "dz" select larger area than provided
- Reopened