3

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?

4
  • It's possible the fuse is too long? the default is 80 (4 seconds)
    – Ben
    Jul 12, 2015 at 10:52
  • @Ben I tried at 50 and it worked the same Jul 12, 2015 at 10:54
  • Ah yes, 128 and higher causes issues (sets the fuse to 0), so anything below that should be fine...
    – Ben
    Jul 12, 2015 at 11:00
  • @Ben the problem is that anything I do it explodes instantly. 50, 100, 10, nothing works. Jul 12, 2015 at 11:18

3 Answers 3

5

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.

0

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.

-2

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .