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

/execute subcommand context execution order differs from Java Edition

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.19.60.24 Preview, 1.19.51, 1.20.50.22 Preview
    • None
    • Confirmed
    • Windows
    • 949309

      The issue

      Bedrock captures context for every iteration of a branching execute command. This differs slightly from Java's behavior.

      How to reproduce

      Spawn 5 armor stands

      /execute as @e at @p run tp @p ~ ~1 ~
      

      Try this in both Java and Bedrock.

      In Java, the player is only teleported up one block. The context for the player's position is only captured once.

      In Bedrock, the player is teleported up 6 blocks. The context for the player's position was re-captured each iteration.

      Java's behavior was reported in MC-125067 and marked "won't fix." I think Bedrock's behavior is somewhat more intuitive, but may be less performant. Regardless, I think it's very important that one behavior is chosen for both platforms.

            tryashtar [Mod] tryashtar
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              CHK: