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


    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • Minecraft 1.12 Pre-Release 2
    • None
    • Windows 10, Java 8 (build 1.8.0_101-b13)
    • Unconfirmed

      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.

            Unassigned Unassigned
            ChuckLincoln Chuck Lincoln
            0 Vote for this issue
            1 Start watching this issue