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

Function position refers to executor instead of command origin.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 1.13.0.1 Beta, 1.8.0, 1.10.0, 1.11.0
    • Fix Version/s: None
    • Labels:
      None
    • Confirmation Status:
      Confirmed
    • Platform:
      Windows 10 - PC
    • ADO:
      166539

      Description

      Summary:
      Functions don't store the original position of their execution. They use the position of executor instead.


      Example 1: Fixed by 1.10
      (test.mcfunction)

      execute @p ~ ~5 ~ function test2
      

      (test2.mcfunction)

      setblock ~ ~ ~ stone
      

      Run /function test
      Expected behavior:
      Block is placed 5 blocks upward.
      Actual behavior:
      Block is placed at player's position. Relative coordinates are relative to the sender, when they should be relative to the execution position.


      Example 2:
      (test3.mcfunction)

      tp @p ~ ~ ~5
      setblock ~ ~ ~ stone
      

      Run /function test3
      Expected behavior:
      Block is placed at original location function was called.
      Actual behavior:
      Block is placed at player's position after teleporting. The execution position was not updated using /execute, so it should have stayed put when the player was teleported.


      How to reproduce:
      1. Create functions described in the example above or apply the behaviorpack attached to this issue.
      2. Call the functions with /function command to see the results.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  CHK: