I want to summon a TNT block that will cause damage to mobs ,but will not damage or break blocks. Is there anyway that I can do this?
-
Have you made any attempt to solve this yourself? Arqade works better when askers show effort to solve their own problems; we see that you have a problem you've worked on, and answerers respond to that. You also get a more specific answer that's tailored exactly to the part you're stuck, and Arqade gets a very specific question. Everybody wins! – Frank May 25 '16 at 12:13
-
1This isn't possible with TNT, however, this is possible using creepers with a fuse time of 0. If you want to replace the functionality of TNT, then this can also be done by looking for a TNT entity with a fuse of x, then summoning a creeper there with fuse 0 and killing the TNT. This does require mobGriefing=false, though – Unionhawk♦ May 25 '16 at 12:17
Method #1:
On a fast Redstone clock / using Repeat Command blocks, put this command:
/execute @e[type=PrimedTnt] ~ ~ ~ summon Creeper ~ ~ ~ {powered:1}
Then, with a Comparator, execute this command to kill the TNT:
/kill @e[type=PrimedTnt]
Note: Before you do this, you would have to run this command:
/gamerule mobGriefing false
Method #2:
Repeatedly run these commands in Command blocks (repeat as fast as you can):
/execute @e[type=PrimedTnt] ~ ~ ~ summon ArmorStand ~ ~ ~ {CustomName:"RudolfJelinek"}
/execute @e[type=PrimedTnt] ~ ~ ~ setblock ~ ~ ~ minecraft:water
And when the Comaparator leading from one of the CMD blocks above does not output signal, execute these commands:
/execute @e[type=ArmorStand] ~ ~ ~ setblock ~ ~ ~ minecraft:air
/kill @e[name=RudolfJelinek]
-
This is what I want! But can I know why you need to summon ArmorStand? – Forcelydated May 26 '16 at 0:45
-
1The armour stand is there so you can execute commands at it even when all other entities are gone. If the armour stand wasn't there, there would be no way to clean up the water after the tnt exploded (unless you knew the exact cords everytime). – LethaIity May 26 '16 at 12:55
Similar to Unionhawk's comment:
you should run three commands one after the other:
Do gamerule mobGriefing = false**
1 tick delay
Summon Creeper fuse 0 at Tnt
3 ticks delay
Do gamerule mobgriering = true
There's an easier solution to this, relying on the rule that immerged TNT doesn't explode blocks but do damage to entities :
- Place a water block :
setblock X Y Z minecraft:water
- Summon an instant-exploding TNT at this location :
summon minecraft:tnt X Y Z {Fuse:0}
You can remove the water block afterwards, but after a little delay, otherwise TNT would explode and destroy blocks.