2
So, I was trying to find a way to disable TNT explosions so I could make TNT Run! I was unable to find a way to stop it. I noticed a lot of people were using the /execute command, so I went to /execute help, found the usage, and tried to create my own command to do it. On the first try, I got it. Here was how I did it.
Step 1:
Make sure cheats are enabled. Type /give @s command-block in the chat.
Step 2:
Place down the command block, enter the command
/execute @e[type=tnt] ~ ~ ~ /kill @e[type=tnt]
Step 3:
Set the command block to repeat
Step 4:
Set the command block to always active
And that's it!
I hope this will help you.
Step 1:
Make sure cheats are enabled. Type /give @s command-block in the chat.
Step 2:
Place down the command block, enter the command
/execute @e[type=tnt] ~ ~ ~ /kill @e[type=tnt]
Step 3:
Set the command block to repeat
Step 4:
Set the command block to always active
And that's it!
I hope this will help you.
Create an account or sign in to comment.
3
1
the /execute part is not needed all you have to type it /kill @e[type=tnt] =)
1
Just wanted to point out that the execute part of the command is unnecessary. Execute is used to run a command at a specific location. In this case, you are killing the tnt at the tnt entity, when it wouldn't make a difference if you killed it from a command block.
1
Sorry, I just wanted to say, in the chat to get a command block say /give @s command_block not command-block. Srry!