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

Incorrect execution location of behavior package function during execution by only use execute positioned subcommand and tp command

XMLWordPrintable

    • Unconfirmed
    • Multiple

      If a function is called by other function, but only the /execute positioned subcommand is used to update the execution location, the execution location of the sub function will be set to the location of the command executor, rather than the original execution location of the header function.

       

      Steps of Reproduce

      1. Install the zip behavior package in the attachment ( math_pack_new_exe-1.zip{}
      2. Open the upcoming creator feature, enable the behavior package installed in the previous step, and create a new world
      3. Chat bar enter the following command to execute the function
        /execute as @a at @s run function ttt/test1

       

      Function file

             **       ttt/test1

      tp 0 9 0
      execute positioned ~ ~ ~ run function ttt/test2
      tp ~ ~ ~ 

             **       ttt/test2

      tp ~ ~ ~ 

       

      Analysis Command Feedback

      Command feedback picture

      The function ttt/test1 executor is player and the execution position is (-14.19, 6.11, 51.94) .

      When the function starts running, the first command in function ttt/test1 is executed, and the first command feedback is correct.

      Now the second command in function ttt/test1 is executed. To verify whether the positioned subcommand inherits the execution position of the function ttt/test1, executed  tp command in the function ttt/test2. The second command feedback is say, using the execute positioned subcommand, the execution position of the function will change to the position of the current executor. it isn‘t inherits the execution position (-14.19, 6.11, 51.94) of the function ttt/test1.

      the third command in function ttt/test1 is executed, and the third command feedback is correct. It is inherits the execution position (-14.19, 6.11, 51.94) of the function ttt/test1.

       

      Presumed cause

      The TP command changes the execution position in the positioned subcommand when inputting the determined coordinates instead of the ~ ^ substitution symbol.

       

      Expected results

      Only using the execute positioned subcommand, the called function execution position is same the previous function execution position.

        1. command feedback.png
          36 kB
          Missing244

            Missing244 Missing244
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: