execute command setblock
Ok so when you throw a snowball I have
/execute @e[type=Snowball] /setblock ~ ~-1 ~ minecraft:ice'
So this makes an ice path following under the snowball. I had some code something like this and it worked but I modified it and accidently broke it. So what is the correct code that I originally had that made this work? I also tried everything like /execute @e[type=Snowball] /setblock minecraft:ice ~ ~-1 ~ and
/execute ~ ~-1 ~ @e[type=Snowball] /setblock minecraft:ice
last one I tried was /execute @e[type=Snowball] ~ ~-1 ~ /setblock minecraft:ice
Best Answer
/execute @e[type=Snowball] ~ ~ ~ /setblock ~ ~-1 ~ ice
I tested that and it works perfectly fine. I think you do need that / in front of setblock for it to work.
Pictures about "execute command setblock"



How do I run Setblock?
How to Enter the CommandWhat is the execute command in Minecraft?
/execute executes another command but allows changing the executor, changing the position and angle it is executed at, adding preconditions, and storing its result.How do you execute a command in Minecraft block?
Type the command in the chat window and press the Enter key to run the command. Once the cheat has been entered, the flame particle will appear directly 1 block in front of the entity running the command.How to make blocks under the player command minecraft
More answers regarding execute command setblock
Answer 2
execute @e[type=Snowball] setblock ~ ~-1 ~ minecraft:ice
In a command block, the leading / is unnecessary.
In the /execute command, there can't be a / before setblock
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Pressmaster, Pressmaster, Ivan Babydov, Ivan Babydov
