1

I would like to create a PrimedTnt with a fuse longer than the maximum (max fuse = 127 ticks). The fuse must be about 10 seconds. Thanks for your help.

I have tried putting 2 command blocks on a 20hZ clock, that summons a PrimedTnt at the old one and then kills the old PrimedTnt. It happens a few times, but then it stops automatically.

The commands is:

To summon a PrimedTnt at the old one:

/execute @e[type=PrimedTnt] ~ ~ ~ /summon PrimedTnt ~ ~ ~

And then to kill the old PrimedTnt:

/kill @e[type=PrimedTnt]
  • 1
    Have you made an attempt to create this yourself? Arqade works much better when you show what you've tried; that way, answerers don't have to re-do your work, you get a much more specific answer, and everybody wins. If you haven't, I'd recommend giving it a shot and editing it into your answer. – Frank Jul 1 '15 at 12:20
  • This should be relatively straight forward to do. It's just going to take me a bit to put it all together. – MBraedley Jul 1 '15 at 13:26
1

This is actually really easy to do, but there's a caveat, which I'll get to. All you need is a scoreboard objective and three commands running off a 20Hz clock.

The scoreboard objective is a timer that allows you to extend the fuse time beyond 127 ticks:

/scoreboard objectives add TNTTimer dummy

The commands running off the 20Hz clock are to increment the score of every PrimedTnt, keep the Fuse from counting down to 0, and finally, once the desired time is reached, blow up the TNT:

scoreboard players add @e[type=PrimedTnt] TNTTimer 1
entitydata @e[score_TNTTimer=200] {Fuse:127b}
entitydata @e[score_TNTTimer_min=200] {Fuse:0b}

If you want different fuse time, simply adjust the value in the second and third command blocks to be 20 times the time in seconds that you want for the fuse.

Now the caveat. The animation for PrimedTnt is such that it can only match up for TNT with the default fuse value of 80 before disappearing. This means that after the animation is finished, but before the TNT actually explodes, the TNT disappears. I don't know of an easy way around this, though there are definitely complicated ways around it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.