Mojira Archive
MCPE-185887

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

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.

Unresolved

Dl

2024-08-21, 02:02 PM

2024-08-21, 03:10 PM

1

3

Community Consensus

1.21.30.23 Preview, 1.21.21 Hotfix

-