Curious Minds

Clear answers to science and history questions

How to Spawn TNT with a Command Block

· 5 min read · Science

This guide shows you how to use a command block to spawn TNT in Minecraft, either as a single block or as a falling entity that explodes on impact. Command blocks are only available in Creative mode or on servers with cheats enabled, so you'll need to prepare your world accordingly.

What You'll Need

  • Minecraft Java Edition or Bedrock Edition (commands differ slightly, but the basics are the same)
  • A world with cheats enabled (or operator status on a server)
  • Access to Creative mode (to obtain and use command blocks)
  • Basic knowledge of opening the chat console (press T or /)

Step-by-Step

  1. Enable Cheats: If creating a new world, toggle "Allow Cheats" to ON. For an existing world, open the pause menu, click "Open to LAN," then set "Allow Cheats" to ON and start the LAN world.
  2. Switch to Creative Mode: Type /gamemode creative in the chat and press Enter.
  3. Get a Command Block: Open your inventory (press E) and search for "command block." Drag it to your hotbar. On Bedrock, you may need to use the command /give @s command_block.
  4. Place the Command Block: Right-click (or use the place button) to place it on the ground where you want the TNT to spawn.
  5. Open the Command Block UI: Right-click on the placed command block. A GUI will appear with a text field for the command.
  6. Enter the Spawn Command: Type one of the following commands into the text field:
    • To spawn a TNT block (non-ignited): setblock ~ ~1 ~ minecraft:tnt
    • To spawn a falling TNT entity (explodes on landing): summon tnt ~ ~1 ~
    • To spawn TNT with a specific fuse time (in ticks, 20 ticks = 1 second): summon tnt ~ ~1 ~ {Fuse:40} (Java only)
  7. Set the Command Block Type (Optional): In the command block UI, you can choose:
    • Impulse: Runs once when activated.
    • Repeat: Runs every tick while powered.
    • Chain: Runs when triggered by another command block.
    For a one-time spawn, leave it as Impulse.
  8. Power the Command Block: To activate it, you need to provide a redstone signal. Place a lever or button adjacent to the command block and activate it. Alternatively, place a redstone block next to it.
  9. Observe the Result: The TNT will appear one block above the command block (or at the specified coordinates). If you used summon, it will fall and explode after the fuse time.

Common Mistakes

  • Using the wrong command: setblock places a static block; summon creates a falling entity. Mixing them up leads to unexpected behavior.
  • Forgetting to power the command block: A command block does nothing until it receives a redstone signal (unless set to "Always Active" in the UI).
  • Typing the command incorrectly: Commands are case-sensitive and must be exact. A missing space or a typo will cause an error.
  • Spawning TNT inside a solid block: If the spawn location is occupied, the TNT may suffocate or fail to appear. Use coordinates that are clear.
  • On Bedrock, using Java-only NBT syntax: The {Fuse:40} syntax does not work on Bedrock. Use summon tnt ~ ~1 ~ and accept the default fuse.

Tips

  • Use relative coordinates ~ ~1 ~ to spawn TNT one block above the command block, so it doesn't overlap with the block itself.
  • To spawn TNT at a specific location, use absolute coordinates, e.g., summon tnt 100 64 -200.
  • For a chain reaction, set up multiple command blocks with repeat mode and a redstone clock.
  • To make TNT explode instantly, set the fuse to 0 (Java): summon tnt ~ ~1 ~ {Fuse:0}.
  • If you want TNT to be invulnerable to explosions, add {Invulnerable:1} (Java) or use the tnt_ignore_explosion tag on Bedrock.
  • Always test in a creative copy of your world before using commands in survival.

Troubleshooting

  • Command block says "Unknown command": Check that you have cheats enabled and that you're using the correct command syntax for your edition.
  • TNT doesn't appear: Verify that the command block is powered. Also check that the spawn location is not obstructed. Try using setblock ~ ~1 ~ minecraft:tnt first to confirm the block placement.
  • TNT appears but doesn't explode: If you used setblock, it's just a block; you need to ignite it. Use summon instead for a falling, exploding entity.
  • TNT explodes immediately: The default fuse for summoned TNT is 40 ticks (2 seconds). If it's exploding instantly, you may have set Fuse to 0. Increase the Fuse value.
  • On Bedrock, the NBT tag doesn't work: Bedrock doesn't support NBT in summon commands. Use the simple summon tnt and adjust the fuse using a separate command or redstone delay.
  • Command block won't place: Make sure you're in Creative mode and have permission to use commands.

Frequently Asked Questions

Can I spawn TNT without a command block?

Yes, you can use the /summon tnt command directly in the chat. This is simpler for one-time use, but a command block allows for automation and repeatability.

How do I make TNT explode after a delay?

Use the Fuse tag in Java Edition, e.g., summon tnt ~ ~1 ~ {Fuse:100} for a 5-second delay. On Bedrock, you can't set a custom fuse, but you can use a redstone repeater to delay the activation of a command block that summons TNT.

Can I spawn TNT in survival mode?

No, command blocks are only obtainable and usable in Creative mode or with operator permissions on servers. Survival players cannot use commands unless cheats are enabled.

Why does my TNT not damage blocks?

If you're in Creative mode, you are immune to explosions, but TNT should still destroy blocks. If it doesn't, check that the game rule mobGriefing is set to true. Use /gamerule mobGriefing true.

How do I spawn TNT in a specific direction?

Use the summon command with motion tags in Java: summon tnt ~ ~1 ~ {Motion:[0.5,0.0,0.0]} to push it horizontally. On Bedrock, this is not directly possible; you'd need to use pistons or other mechanics.

Can I make a command block that spawns TNT repeatedly?

Yes, set the command block to "Repeat" mode and provide a redstone clock (e.g., a repeating redstone circuit) to power it. It will spawn TNT every tick (20 times per second).

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions