How to Make a Command Block in Minecraft: What You Need to Know

Command blocks are one of Minecraft's most powerful tools — but they're also one of the least understood. Unlike most items in the game, you can't craft a command block from materials or find one in a chest. Getting one requires a specific approach, and using one effectively requires understanding what it actually does.

What Is a Command Block?

A command block is a special in-game block that executes server commands automatically when triggered. It's primarily used in custom maps, mini-games, adventure mode worlds, and server automation. Think of it as a programmable trigger: you tell it what command to run, and when something activates it — like a redstone signal — it runs that command without any player having to type anything.

Because of how powerful command blocks are, Mojang deliberately keeps them out of normal survival gameplay. They can teleport players, summon mobs, change the weather, modify scoreboards, and much more. Handing that kind of power to every player in every world would cause obvious problems.

You Cannot Craft a Command Block 🎮

This is the most important thing to understand: there is no crafting recipe for a command block. It doesn't appear in the creative inventory by default in all versions, and it cannot be obtained through normal survival gameplay. The only way to get one is through a console command, and that command only works under specific conditions.

Requirements Before You Start

Before you can obtain a command block, two things must be true:

  • Cheats must be enabled in your world. In Java Edition, this is toggled when creating a world. In Bedrock Edition, it's listed as "Activate Cheats." If you didn't enable cheats when creating the world, you may be able to enable them through the LAN settings (Java) or world settings (Bedrock), though this permanently disables achievements for that world.
  • You must be in Creative Mode or have operator-level permissions. Command blocks cannot be placed or used in Survival Mode even if you obtain one somehow. On a multiplayer server, you typically need op status (operator permissions) granted by the server admin.

Without both of these conditions met, the give command simply won't work.

The Command to Get a Command Block

Once cheats are enabled and you're in Creative Mode (or have op permissions), open the chat window and type the following:

Java Edition:

/give @s minecraft:command_block 

Bedrock Edition:

/give @s command_block 

The @s selector targets yourself. After pressing Enter, a command block will appear in your inventory. You can also specify a quantity — for example, /give @s minecraft:command_block 10 gives you ten at once.

The Three Types of Command Blocks

Once you know how to get one, it's worth understanding that there are actually three variants, each with different behavior:

TypeNameBehavior
🟠 OrangeImpulseRuns the command once per activation
🟢 GreenChainRuns after another command block in sequence
🔵 BlueRepeatRuns the command every game tick while powered
  • Impulse is the default type when you first obtain a command block. It fires once when triggered by redstone.
  • Chain command blocks are used to execute multiple commands in a sequence. They only activate when the command block feeding into them has run successfully.
  • Repeat command blocks run continuously — every game tick (roughly 20 times per second) — as long as they're receiving a redstone signal or set to "Always Active."

You can get the chain and repeat variants using modified give commands:

/give @s minecraft:chain_command_block /give @s minecraft:repeating_command_block 

In Bedrock Edition, replace minecraft:chain_command_block with chain_command_block and minecraft:repeating_command_block with repeating_command_block.

How to Use a Command Block After Placing It

Right-clicking (or long-pressing on mobile/console) an placed command block opens its interface. From there:

  • Type your command in the console command field — without the leading /
  • Set the condition to either "Conditional" (only runs if the previous command succeeded) or "Unconditional"
  • Set the redstone setting to "Always Active" if you don't want to wire redstone, or "Needs Redstone" if you want manual or circuit-based control
  • Click Done to save

When triggered, the command runs and the block displays output in the game world unless you've turned that off.

What Shapes Your Experience With Command Blocks

How useful command blocks are to you depends heavily on a few personal variables:

  • Your familiarity with Minecraft commands — command syntax varies significantly between Java and Bedrock, and some commands available in one version don't exist in the other
  • Whether you're playing solo or on a server — server environments add permission layers and sometimes restrict command block usage entirely for security reasons
  • Your version of the game — command block behavior, available commands, and even how selectors work have changed across major updates
  • What you're trying to build — a simple teleporter needs one impulse block; a fully automated mini-game might require dozens of chained blocks with precise timing

Someone building a small adventure map for friends has very different needs than a server admin automating events for hundreds of players. The mechanics of obtaining and placing a command block are the same — but how far you take it from there depends entirely on what you're trying to accomplish and how comfortable you are with command syntax.