-
Bug
-
Resolution: Invalid
-
None
-
Minecraft 1.13.2
-
Was working with command blocks and the execute command and the parameters
-
Unconfirmed
I was working on a quick creation that used a diamond pickaxe to mine blocks under you that were grass in a 3x3 area. I tested it and it didn't work and was executing under the command block, so I added the "as" component to use the entity the command found with a if component:
execute if entity @a[nbt={SelectedItem:{id:"minecraft:diamond_pickaxe"}}] as @s if block ~ ~-1 ~ grass_block run say Test
if entity @a[nbt={SelectedItem:{id:"minecraft:diamond_pickaxe"}}] checks all the players in the world that has a diamond pickaxe in their main hand, I was hoping that adding as @s would also grab the entity that it found but then the code breaks