Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-182677

dx dy dz target selector defines coordinates relative to a block

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.15.2, 20w18a
    • None
    • Unconfirmed
    • (Unassigned)

      When defining a dx dy dz target selector in a command, the command defines a volume from the selector's starting coordinate to one meter in the positive direction along each axis (x, y, z) with dx, dy, and dz expanding the volume of this cube.

       

      For example: "execute if entity @e[x=0.5,y=0,z=0,dx=0,dy=0,dz=0.5] run say hi"

      This command creates a volume ranging from [0.5, 0.0, 0.0] to [1.5, 1.0, 1.5]. Instead of selecting a line from  [0.5, 0.0, 0.0] to [0.5, 0.0, 0.5], as would be intuitive, the command uses the dx, dy, and dz variables to expand the cube it initially defined (which is also not centered on the origin of the specifier).

       

      Another example: "execute if entity @e[x=0,y=0,z=0,dx=0,dy=0,dz=-0.5] run say hi"

      This command creates a volume ranging from [0.0, 0.0, -0.5] to [1.0, 1.0, 1.0]. The negative dz value causes the opposite side of the initial cube to be expanded. This is my main gripe with this selector; the command can select arbitrarily specific volumes but cannot define a volume smaller than one meter cubed.

       

      Given that this selector succeeds when ANY part of an entity's hitbox is within the selected volume, the way it currently works prevents detecting whether an entity's hitbox intersects a point, line, or plane. I understand the way the selector currently works may be intentional, but it is unintuitive and limits precise hitbox detection.

      A proposed solution would be to make x, y, and z define one corner of a volume and dx, dy, and dz define the opposite corner positioned relative to the first corner. This would allow for selecting volumes of any size along any dimension, including a single point, line, or plane. Personally, I think this makes the selector much more versatile (and would certainly help out with my command block creations!) and am unaware of how it might introduce problems into how the game runs/plays.

      Thank you for your consideration!

            Unassigned Unassigned
            drummercar Chris Reeves
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: