Uploaded image for project: 'Minecraft (Bedrock codebase)'
  1. Minecraft (Bedrock codebase)
  2. MCPE-177934

/execute command doesn’t work in function files

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • None
    • 1.20.51 Hotfix
    • None
    • Unconfirmed
    • iOS

      Note that the “version” for this report may be a bit inaccurate, as far as I know this bug has been in the game ever since the new /execute command syntax was first added to the “Upcoming Creator Features” setting. Although I couldn’t figure out how to add multiple versions because the thing wasn’t working so i just selected the most recent version.

      Description

      The new syntax for the /execute command added in 1.19.50 does not work in Function files, for clarification the Function files I refer to are Functions in Behavior Packs for Add-ons.

      Whenever a function contains a /execute command, the function will not show up in game as a function that can be run, attempting to run the Function with the /function command or a command block will result in the game running the function but skipping all of the /execute commands and only running the other commands.

      Before the new /execute command syntax was added in the experimental setting “Upcoming Creator Features”, the /execute command worked in Functions like any other command and there were no issues.

      After the new syntax was added in experimental settings, the old, non-experimental syntax still worked if “Upcoming Creator Features” off, but if “Upcoming Creator Features” was on and the new syntax was active then the command would not work in functions.

      Now that the new /execute command syntax is no longer experimental and the default, the command still does not work in functions.

       

      Steps to Reproduce

      I have provided a behavior pack containing two functions, “no_execute” which only contains a /say and /give command, and “with_execute” which contains a /say, /give and /execute command. I provided both a zip file and a mcaddon file just in case because I wasn’t sure which file type was needed.

       

      1: Create a world and activate the Behavior Pack I have provided below, then enter the world

      2: Use /function or a command block to run the “no_execute” Function in the Behavior Pack

      3: Use /function or a command block to run the “with_execute” Function in the Behavior Pack.

       

      What Happens

      If the Function does not contain a /execute command, the Function should show up in game and run normally, and the command output should show an accurate number of commands executed (1 command, 1 command executed).
      If the Function contains a /execute command with the new syntax, the Function will not show up in the /function list, upon being run by /function or command blocks the /execute commands will be skipped and the output will show that only some of the commands were executed (2 commands, 1 /execute, 1 command executed).

       

      What I Expect to Happen

      A function containing a /execute command with the new syntax should be able to show up in game and be run normally just like any other command.{}

       

      The /execute command is a very useful and versatile command that is practically a requirement for functions that are meant to be run from a command block and not by a player, so it’s important that this bug is fixed because it makes creating functions for add-ons much more difficult or even impossible.

            Dragonfury Dragonfury
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: