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

Entity running subsequent functions cannot be changed inside function files

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 1.8.0.14 Beta
    • Fix Version/s: 1.10.0
    • Labels:
      None
    • Confirmation Status:
      Confirmed
    • Platform:
      Windows 10 - PC
    • ADO:
      160260

      Description

      Verification builds: 1.8.0.14 (Beta)

      Summary: Inside a function file, using execute @e ~ ~ ~ function <> runs the new function off of the original entity instead of the referenced @e entity.

      Use Case: Changing which entity runs a function allows the @s selector to be used, which is significantly more efficient than an @e selector.

      Repro Steps:

      1. Download the attached behavior pack and equip it on a new world.

      2. From the chat line, run the command:

      /function test

      Observed Results: Both the "test" function and the "test_handoff" function print the player's name (both files use say @s)

      Expected Results: The "test" function should say the player's name and the "test_handoff" function should say the armor stand's name, as "test_handoff" is called using the command:

      /execute @e[type=armor_stand] ~ ~ ~ function test_handoff

       Screenshots/Videos attached: Yes

      Notes: Running the following command from the in-game chat line produces the expected result (i.e., returns the armor stand's name):

      /execute @e[type=armor_stand] ~ ~ ~ function test_handoff

        Attachments

          Issue Links

            Activity

              People

              • Reporter:
                MrSquishy MrSquishy
              • Votes:
                3 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  CHK: