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

Any failure in a branch breaks/jumps out of the whole /execute command with /loot

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.21.30.23 Preview, 1.21.21 Hotfix
    • None
    • Community Consensus
    • Multiple

      Any failure in a branch breaks/jumps out of the whole /execute command with /loot.

      When executing /loot with multiple branches, it jumps out the whole /execute command when any branch fails.

      This bug happens only with loot command (/execute ... run loot ...). Other commands work correctly.

      Steps to reproduce:

      1. Summon some pigs in the world.
      2. Execute the following three commands in chat.
        • /execute as @e[type=pig] run loot give @a kill @s
          • Gives items to the player.
        • /execute as @e if entity @s[type=pig] run loot give @a kill @s
          • "@e" selects the player (the nearest entity) first, so the first branch is faild.(Message: Execute subcommand if entity test failed)
          • Then "@e" selects a pig, so the second branch should be successful. However, it fails.
          • The subsequent branches are ALL failed, as if /execute was jumped out by the first branch.
        • /execute as @e run loot give @a kill @s[type=pig]
          • "@e" selects the player (the nearest entity) first, so the first branch is faild.(Message: No targets matched selector)
          • Then "@e" selects a pig, so the second branch should be successful. However, it fails.
          • The subsequent branches are ALL failed, as if /execute was jumped out by the first branch.

      Expected behaviors:

      All of the three commands above should give items to the player, since there are pigs in the world.

            Chixvv Dl
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              CHK: