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

Entities without hitboxes cannot properly be tested for with target argument "distance=0" or "dy=0"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reopened
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 1.8.8, Minecraft 15w36d, Minecraft 15w37a, Minecraft 15w42a, Minecraft 15w51b, Minecraft 16w05b, Minecraft 1.9 Pre-Release 4, Minecraft 1.9, Minecraft 1.9.1 Pre-Release 3, Minecraft 1.9.4, Minecraft 16w21b, Minecraft 1.10.2, Minecraft 1.11 Pre-Release 1, Minecraft 1.11, Minecraft 1.12 Pre-Release 5, Minecraft 1.12 Pre-Release 7, Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 17w50a, Minecraft 18w05a, Minecraft 18w10d, Minecraft 18w16a, Minecraft 1.13-pre3, Minecraft 1.13-pre4, Minecraft 1.13-pre5, Minecraft 1.13-pre6, Minecraft 1.13-pre7, Minecraft 1.13-pre8, Minecraft 1.13-pre9, Minecraft 1.13, Minecraft 18w30a, Minecraft 18w30b, Minecraft 18w31a, Minecraft 18w32a, Minecraft 18w33a, Minecraft 1.13.1-pre1, Minecraft 1.13.1-pre2, Minecraft 1.13.1, Minecraft 1.13.2-pre1, Minecraft 1.13.2-pre2, Minecraft 1.13.2, Minecraft 18w43a, Minecraft 18w43b, Minecraft 18w43c, Minecraft 18w44a, Minecraft 18w45a, Minecraft 18w46a, Minecraft 18w47a, Minecraft 18w47b, Minecraft 18w48a, Minecraft 18w48b, Minecraft 18w49a, Minecraft 18w50a, Minecraft 19w02a, Minecraft 19w03a, Minecraft 19w03b, Minecraft 19w03c, Minecraft 19w04b, Minecraft 19w05a, Minecraft 19w06a, Minecraft 19w07a, Minecraft 19w08a, Minecraft 19w08b, Minecraft 19w09a, Minecraft 19w11a, Minecraft 19w11b, Minecraft 19w12a, Minecraft 19w12b, Minecraft 19w13a, Minecraft 19w13b, Minecraft 19w14a, Minecraft 19w14b, Minecraft 1.14 Pre-Release 1, Minecraft 1.14 Pre-Release 2, Minecraft 1.14 Pre-Release 3, Minecraft 1.14 Pre-Release 4, Minecraft 1.14 Pre-Release 5, Minecraft 1.14, Minecraft 1.14.1 Pre-Release 1, Minecraft 1.14.1 Pre-Release 2, Minecraft 1.14.1, Minecraft 1.14.2 Pre-Release 1, Minecraft 1.14.2 Pre-Release 2, Minecraft 1.14.2 Pre-Release 3, Minecraft 1.14.2 Pre-Release 4, Minecraft 1.14.2, Minecraft 1.14.3 Pre-Release 2, Minecraft 1.14.3 Pre-Release 3, Minecraft 1.14.3 Pre-Release 4, Minecraft 1.14.3, Minecraft 1.14.4 Pre-Release 1, Minecraft 1.14.4 Pre-Release 2, Minecraft 1.14.4 Pre-Release 3, Minecraft 1.14.4 Pre-Release 4, Minecraft 1.14.4 Pre-Release 5, Minecraft 1.14.4 Pre-Release 6, 1.14.4 Pre-Release 7, 1.14.4
    • Fix Version/s: Minecraft 16w38a
    • Confirmation Status:
      Confirmed
    • Category:
      (Unassigned)

      Description

      These experiments involve marker armorstands – it also affects area effect clouds with zero radius. Most likely the bug occurs due to these armorstands lacking a hitbox.

      Setup experiment
      In this scenerio the armorstands involved in the testing were obtained as follows:

      /summon armor_stand ~ ~ ~ {CustomName:"\"A\"",Marker:X}
      /execute at @e[name=A] run summon armor_stand ~ ~ ~ {CustomName:"\"B\"",Marker:X}
      

      Note that the X is either a 0 or 1 depending on the following cases.

      Results experiment
      We distinguish the following 3 cases

      • Case 1: ArmorStand A is not a marker, ArmorStand B is not a marker.
        execute at @e[name=A] run kill @e[name=B,distance=0]

        Kills B, works as expected

        execute at @e[name=B] run kill @e[name=A,distance=0]

        Kills A, works as expected

      • Case 2: ArmorStand A is a marker, ArmorStand B is not a marker.
        execute at @e[name=A] run kill @e[name=B,distance=0]

        Kills B, works as expected

        execute at @e[name=B] run kill @e[name=A,distance=0]

        Does not kill A, does not work as expected

      • Case 3: ArmorStand A is a marker, ArmorStand B is a marker.
        execute at @e[name=A] run kill @e[name=B,distance=0]

        Does not kill B, does not work as expected

        execute at @e[name=B] run kill @e[name=A,distance=0]

        Does not kill A, does not work as expected

      Further research
      I've had a talk about these seemingly bugs with SkylinerW who in the MC community is a well respected modder/'expert' on Minecraft. This talk can be found back in this reddit topic:
      https://www.reddit.com/r/Minecraft/comments/3cgck7/the_nbt_tag_marker1b_made_a_position_glitch_of/

      Here are some extracts from our conversation that might help you guys further, credit to SkylinerW:

      "That one definitely seems to be a bug. It's not just armor stands, but any entity that is in the ground; I can't get the command to work even if there's a villager with its feet stuck in a block directly underneath the armor stand without increasing the radius to 2 (r=1 still presents the problem, so it's not restricted to r=0). It's specific to the Y coordinate, so it seems like their interpreted location is being skewed for being within a block. I imagine the eye height for marker stands being at the exact Y value causes it to be seen as being within a block.


      Code analysis by [Mod] Marcono1234 can be found in this comment.


      Also this can be more easily tested with this being run in chat while you don't move:

      summon armor_stand ~ ~ ~ {NoGravity:1b,Marker:1b,CustomName:"\"c\""}
      say @e[distance=0]
      

      this'll only show your name and not the armor stand's, unless you change it to Marker:0b

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                AlexMCool Alex³
              • Votes:
                58 Vote for this issue
                Watchers:
                28 Start watching this issue

                Dates

                • Created:
                  Updated:
                  CHK: