Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-123314

if/unless in execute does not work properly


    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • Minecraft 17w50a
    • None
    • Unconfirmed

      /execute as @a at @s if block ~ ~-1 ~ stone run /say hi
      This is supposed to make all players that are standing on stone say "hi" but instead it will target all players, even ones that are not on stone, as long as there is at least one player that is standing on stone.

      I discovered this when i summoned some armor stands, i added some code to them to make it so that armor stands that go into a block would get deleted:

      /execute as @e[type=armor_stand] at @s unless block ~ ~ ~ minecraft:air run /kill @s

      but what happened is that if there was at least 1 armor stand in the air then none of them would get killed, even the ones that are inside blocks.

            Unassigned Unassigned
            Bluenade Cody Wilson
            0 Vote for this issue
            0 Start watching this issue