Here's my command:
/execute @e[type=Snowball] ~ ~ ~ /summon PrimedTnt {Fuse:100}
When ever I throw it the tnt explodes instantly, instead of falling then exploding.
I looked it up but no one else had the same problem.
Any help?
Arqade is a question and answer site for passionate videogamers on all platforms. It only takes a minute to sign up.
Sign up to join this communityHere's my command:
/execute @e[type=Snowball] ~ ~ ~ /summon PrimedTnt {Fuse:100}
When ever I throw it the tnt explodes instantly, instead of falling then exploding.
I looked it up but no one else had the same problem.
Any help?
You are missing some optional positional arguments in your summon command. The syntax for /summon
is:
summon <EntityName> [x] [y] [z] [dataTag]
The dataTag
you use to set the Fuse
to anything that is not 0 is the fourth optional argument.
So to fix your command, you'll have to provide coordinates:
/execute @e[type=Snowball] ~ ~ ~ /summon PrimedTnt ~ ~ ~ {Fuse:100}
Minecraft commands are "dumb" in how they parse arguments. What I mean by that is that for every optional argument, it checks if that makes sense. In your case, the game expects a set of three coordinates after EntityName
. For it even begin parsing the coordinates, it requires there to be three arguments. Try running
summon PrimedTnt banana
summon PrimedTnt banana phone
summon PrimedTnt banana phone ring
and you'll see that the first two commands work, using the default values of ~ ~ ~ {Fuse:0}
. The third, however, fails, because the game sees three arguments and starts parsing them as coordinates, which for obvious reasons doesn't really work.
Your case is like the first command here. The games sees a single argument, which is not three arguments, and ignores them completely. It is not smart enough to recognize it as a valid data tag.
Based on this, the actual command syntax is more like
summon <EntityName> [<x> <y> <z> [dataTag]]
meaning the set of coordinates is optional, but if you provide it, you must provide all three. The dataTag
is also optional, but it requires you to provide the coordinates first.
I have a really simple solution to make instant tnt using just one command. Simply just name any spawn egg "InstantTnt" and paste this command into a repeating command block:
/execute @e[name=InstantTnt] ~ ~ ~ summon Creeper ~ ~ ~ {Fuse:0}
You can change the fuse to whatever you want.
An answer for the problem is just put two repeaters after the comparator. I only tested this with a repeating command block before a impulse command for exploding snowball (repeating command block)
/testfor @e[Type=Snowball] a comparator
Then for a delay, add how many repeaters you want.
The next command block is:
/execute @e[type=Snowball] ~ ~ ~ summon PrimedTnt {Fuse:100}
Hope this was helpful.