Primed Tnt Explodes Instantly even with a fuse
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?
Short answer
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}
Longer answer
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.