37
This is a blog that teaches you how to make tnt that will hurt players without damaging the terrain.
So before we do anything type in /gamerule mobGriefing false then also do /gamerule commandBlockOutput false after that get a command block by doing /give @p command_block.
Then put this command in it. Then it needs to be on easy to work
/execute @e[type=PrimedTnt] ~ ~ ~ /summon Creeper ~ ~ ~ {ExplosionRadius:4,Fuse:30,ignited:1,ActiveEffects:[{Id:14,Amplifier:1,Duration:999999}],Invulnerable:1}
What this does execute does the command where the entity, player or whatever is so where there is an @e (entity) which is a type PrimedTnt it will summon a creeper at the tnt's coordnates. The explosion radius is 4 like normal tnt, it's fuse is 30 the same as tnt, ignited means it already blows up so it doesn't just walk around, then The effects are invisibility so you don't see the creeper, and it is invlnerable so you can't kill it. So activate the 1st command with a fill clock, then have a comparator from the /execute command activate our final command block then in the command block that gets activated by the comparator put in /kill @e[type=PrimedTnt] that just gets rid of the tnt so it only spawns one creeper so the final result should look something like this.
So before we do anything type in /gamerule mobGriefing false then also do /gamerule commandBlockOutput false after that get a command block by doing /give @p command_block.
Then put this command in it. Then it needs to be on easy to work
/execute @e[type=PrimedTnt] ~ ~ ~ /summon Creeper ~ ~ ~ {ExplosionRadius:4,Fuse:30,ignited:1,ActiveEffects:[{Id:14,Amplifier:1,Duration:999999}],Invulnerable:1}
What this does execute does the command where the entity, player or whatever is so where there is an @e (entity) which is a type PrimedTnt it will summon a creeper at the tnt's coordnates. The explosion radius is 4 like normal tnt, it's fuse is 30 the same as tnt, ignited means it already blows up so it doesn't just walk around, then The effects are invisibility so you don't see the creeper, and it is invlnerable so you can't kill it. So activate the 1st command with a fill clock, then have a comparator from the /execute command activate our final command block then in the command block that gets activated by the comparator put in /kill @e[type=PrimedTnt] that just gets rid of the tnt so it only spawns one creeper so the final result should look something like this.
Image
Tags |
tools/tracking
3262120
6
how-to-make-tnt-damage-players-but-not-terrain-with-only-two-command-block
Create an account or sign in to comment.