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

/execute uses the relative coordinates of the origin of the /execute command instead of the target's

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Duplicate
    • Affects Version/s: Minecraft 1.12 Pre-Release 2
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      Windows 10, Java 8 (build 1.8.0_101-b13)

    • Confirmation Status:
      Unconfirmed

      Description

      When /execute is used to execute commands that require coordinates, the command uses the coordinates of the player or the command block that entered the /execute command instead of the target's coordinates.

      For example, say a command block contains the following command:

      /execute @e[type=chicken] ~ ~ ~ /setblock ~ ~1 ~ minecraft:stone
      

      When powered, the command block will create the stone block above itself instead of creating it above the chicken. The same happens when the player enters the same command (ie the block is created in the player's head).

      The same problem arises when the command executed by /execute targets another entity like this one:

      /execute @e[type=chicken] ~ ~ ~ /scoreboard players tag @e[type=armor_stand,r=2] add test
      

      The /scoreboard command tags armor stands within two blocks of the command block or the player that entered the /execute command, and not the chicken targeted by /execute.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                ChuckLincoln Chuck Lincoln
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: