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

Selector distance argument is position based while dx,dy,dz are hitbox based

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • None
    • 20w06a
    • None
    • Confirmed
    • Commands

      The bug

      It appears the following selector arguments do not behave consistently:

      • distance: Finds entities whose position (center of the hitbox) is within the area
      • dx, dy, dz: Finds entities whose hitbox intersects with the area

      This might be intended, but can also have unexpected side-effects and be unintuitive.

      How to reproduce

      1. Place a block at (0,0) in the floor so you know where it is
      2. Show hitboxes (F3 + B)
      3. Move around (0,0) and run the following command
        /say @s[x=0.5,z=0.5,distance=..0.5]
        

        It finds you as soon as the center of your hitbox is inside a circular area with center at (0.5,0.5) with radius 0.5

      4. Move around (0,0) and run the following command
        /say @s[x=0.0,z=0.0,dx=0,dz=0]
        

        It finds you as soon as your hitbox intersects with the block area of (0,0)

            Unassigned Unassigned
            marcono1234 Marcono1234
            Votes:
            5 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: