Command with infinite coordnates?

Command with infinite coordnates? - Unrecognizable woman holding paw of dog

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?"

Command with infinite coordnates? - Side view of young woman in hoodie sitting on floor near sofa and playing with obedient brown Labrador while resting during free time
Command with infinite coordnates? - Crop hacker silhouette typing on computer keyboard while hacking system
Command with infinite coordnates? - Full body optimistic young female with curly hair smiling and teaching Beagle dog beg command on sunny summer day in countryside



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