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

Distance matching for marker armor stands in entity selectors is inconsistent

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.16.1, 1.16.2 Pre-release 1, 1.16.2 Pre-release 2, 1.16.2 Release Candidate 1, 1.16.2, 1.16.3
    • None
    • Unconfirmed
    • Commands

      When you summon armor_stand with the tag marker, you can't detect it in the negative direction with exact value using distance=x or with dx/dy/dz 

       

      How to reproduce:

      summon armor_stand ~ ~ ~ {CustomName:'"Center"',CustomNameVisible:1b,Marker:1b}

      execute at @e[type=armor_stand,name=Center] run summon armor_stand ~1 ~ ~ {CustomName:'"East"',CustomNameVisible:1b,Marker:1b}
      execute at @e[type=armor_stand,name=Center] run summon armor_stand ~-1 ~ ~ {CustomName:'"West"',CustomNameVisible:1b,Marker:1b}
      execute at @e[type=armor_stand,name=Center] run summon armor_stand ~ ~ ~1 {CustomName:'"South"',CustomNameVisible:1b,Marker:1b}
      execute at @e[type=armor_stand,name=Center] run summon armor_stand ~ ~ ~-1 {CustomName:'"North"',CustomNameVisible:1b,Marker:1b}

      After that, if you do :

      execute at @e[type=minecraft:armor_stand,name=Center] run say @e[distance=..1]
      or
      execute at @e[type=minecraft:armor_stand,name=Center] run say @e[distance=1]

      Only the South and East get detected but not West or North!
      however with:
      execute at @e[type=minecraft:armor_stand,name=Center] run say @e[distance=..1.0000001]
      Every armor_stand is detected!

      The same thing happens with dx/dy/dz:
      summon armor_stand ~ ~ ~ {CustomName:'"Marker"',CustomNameVisible:1b,Marker:1b}

      execute at @e[name=Marker] run say @s[dx=0,dy=0,dz=0]

      but no problems with:
      execute as @e[name=Marker] at @s positioned ~-0.000000001 ~-0.000000001 ~-0.000000001 run say @s[dx=0,dy=0,dz=0]

       

            Unassigned Unassigned
            _RedCoal_ RedCoal
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: