mojira.dev
MCPE-174949

Target selector volume arguments "dx", "dy" and "dz" select larger area than provided

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

  1. 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
  2. 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.

  3. 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.

Linked issues

Attachments

Comments 2

migrated
[media][media]
[Mod] OcelotOnesie

Thank you for your report!
After consideration, the issue is being closed as Won't Fix.

Please note that this is not the same as Working as Intended, as this bug report correctly describes behavior in the game that might not be the intended or desirable behavior, but it will not be fixed right now. Sometimes, this is because the issue reported is minor and/or impossible to change without large architectural changes to the code base.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

[Mod] turbo

(Unassigned)

1124689

Confirmed

Multiple

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

Retrieved