Command with infinite coordnates?
I am making a command that is /execute @e[type=Snowball] -603 4 170 /summon PrimedTnt So whenever I throw a snowball at the specific coordnates, it will blow up. Is there a way to make it so there are infinite coords so no matter where the snowball lands it blows up no matter what?
Thanks
Best Answer
You're misunderstanding the purpose of the coordinates a little bit. The command as you have it will summon a primed TNT at -603 4 170 for every snowball. No matter where those snowballs are in the world, that is where the TNT will go.
What you'll want to do is use tilde notation to specify relative coordinates:
/execute @e[type=Snowball] ~ ~ ~ summon PrimedTnt
What this will do is summon primed TNT at the coordinates of every snowball entity. Be careful about putting this in a clock without some sort of /kill @e[type=Snowball] command, unless you want to have TNT summoned along the entire trajectory of the snowball.
Pictures about "Command with infinite coordnates?"



What is the command for coordinates in Minecraft?
Coordinates can be enabled from the world settings or the command /gamerule showCoordinates and appear in the top left corner of the screen.Minecraft Command Basics: /tp and Coordinates
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Ivan Babydov, Ivan Babydov, Anete Lusina, Blue Bird
