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

Executing a function as an entity doesn't use new sender

    Details

    • Confirmation Status:
      Confirmed

      Description

      Add a function with a command such as setblock ~ ~2 ~ stone or say @s.

      In the world place a command block and run the function as a player (or other entity):
      /execute @p ~ ~ ~ function foo:bar

      The expected behaviour is that a stone block is placed above the nearest player, however, it is placed at the command block instead. As well, using @s in the function does nothing, as the command block is the sender.

      Affects similar commands in other contexts as well.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dinnerbone [Mojang] Dinnerbone (Nathan Adams)
                Reporter:
                Misterx7772 Misterx7772
              • Votes:
                27 Vote for this issue
                Watchers:
                18 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  CHK: