Mojira Archive
MC-123314

if/unless in execute does not work properly

/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.

Duplicate

Cody Wilson

2017-12-17, 01:03 AM

2017-12-17, 08:00 PM

2017-12-17, 04:01 AM

0

0

Unconfirmed

Minecraft 17w50a

-