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

/execute detects if distance to all entities who execute the command when using distance in selector in if entity

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Duplicate
    • Affects Version/s: Minecraft 17w45b
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      OS: Windows 10
      Java 8
    • Confirmation Status:
      Unconfirmed

      Description

      It's hard to explain so i'll create an example here:

      /execute as @e[type=!player] at @s if entity @p[distance=..1] run say Success

      The command at the end will only be executed if all entities (except the player) are 1 block or less away from the player. The following also didn't work, which quite confused me:

      /execute as @e[type=!player] at @s run execute if entity @p[distance=..1] run say Success

      Increasing the distance so that all entities were in range of me, allowed the command at the end to run

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              ZockerAxel ZockerAxel
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: