You cannot get a command block in Minecraft without using commands, cheats, or external tools — there is no crafting recipe, no villager trade, and no chest loot table that contains one. Command blocks are creative-mode-only items that are hidden from the creative inventory and can only be obtained by running a give command (for example, /give @p command_block) while cheats are enabled, or by using the /setblock command to place one directly. The only legitimate alternatives are using a structure block or a saved structure that already contains a command block, or using third-party map-editing tools outside the game. Everything below explains the practical routes, why each one works, and what to do when it does not.
What You'll Need
- A Java Edition or Bedrock Edition world where you can enable cheats (or a world where you already have operator status).
- Creative mode, or the ability to switch to it — command blocks cannot be placed in Survival mode even if you are holding one.
- For the structure route: a saved structure file or a template that already contains a command block, plus a structure block.
- For the external-tool route: a copy of the world save and a map editor that supports command block data (this is an advanced, offline option and can corrupt a world if used carelessly).
Step-by-Step
- Understand the constraint first. Command blocks are not survival items. They are not in the creative inventory, they have no recipe, and no mob drops them. Any method that claims otherwise is either a mod, a datapack, or a misunderstanding. Decide which legitimate route fits your situation before you start.
- Enable cheats in the world. In Java Edition, open the world creation screen and turn on "Allow Cheats," or pause an existing world, click "Open to LAN," and enable cheats for the session. In Bedrock Edition, turn on "Activate Cheats" in world settings. Without cheats you cannot type the command that produces the block.
- Switch to Creative mode. Type
/gamemode creative(or/gamemode c). Command blocks can be placed only in Creative. If you are in Survival, the block will refuse to be placed even when you are holding it. - Give yourself the block. Type
/give @p command_blockto receive one in your inventory. For a chain command block use/give @p chain_command_block, and for a repeating one use/give @p repeating_command_block. You can add a count, for example/give @p command_block 8, to get a stack. - Place it and open it. Put the block down, then right-click (or use the interact button) to open its interface. Type a command into the console field and set the block type and condition toggles as needed. Press Done. The block now runs that command when powered, depending on its type.
- Power it correctly. An impulse command block runs once when it receives a redstone pulse. A repeating block runs every tick while powered. A chain block runs after the block behind it executes. Use a button, lever, pressure plate, or redstone block to trigger impulse blocks.
- Alternative: place one directly with setblock. If you do not want the item in your inventory, stand where you want the block and run
/setblock ~ ~ ~ command_block. This places it instantly and skips the give step entirely. - Alternative: use a structure that already contains one. If you have a saved structure (a
.nbtfile in Java Edition) that includes a command block, place a structure block, load that structure, and it will appear with the command block intact. This is the closest thing to "getting one without typing a give command," but the structure still had to be created with commands at some point. - Alternative: edit the world file offline. Advanced users can open a copy of the world in a third-party map editor and insert a command block into a chest or directly into the world. This works, but it is easy to corrupt chunk data, so always back up the world first and never edit the only copy.
Common Mistakes
The most frequent problem is trying to obtain a command block in Survival mode — it will not work, and no amount of crafting or trading will produce one. Another common error is forgetting that cheats must be enabled before the command will run; the game will simply reject the command with a permissions message. Players also confuse the three command block types: putting a repeating command in an impulse block means it fires only once, which looks like the block is broken. Finally, many people try to power a command block with a redstone torch placed on top of it — that does not activate it. Use a button, lever, or redstone block instead.
Tips
Keep a backup of any world before you start placing command blocks, because a repeating block running a destructive command every tick can change a world very quickly. Name your command blocks with a sign or a tag so you remember what each one does. Use chain command blocks for sequences instead of stacking many impulse blocks, since chains run in order and are easier to debug. If you are building for other players, put command blocks in a hidden room or behind barriers so they are not triggered by accident. On Bedrock Edition, remember that command block output can be toggled in settings, which helps when you are testing.
Troubleshooting
If the give command says you do not have permission, cheats are off — enable them through Open to LAN or world settings. If the block will not place, check that you are in Creative mode. If the block places but does nothing, confirm it is powered and that its type matches how you are triggering it. If a repeating block causes lag, lower its tick delay or switch it to needs-redstone. If a chain block does not run, make sure it is facing the correct direction and that the block behind it is actually executing. If the world will not load after an external edit, restore your backup — this is why the backup step matters.
Frequently Asked Questions
Can you craft a command block?
No. There is no crafting recipe for any command block in either Java or Bedrock Edition.
Can you get a command block in Survival mode?
Not legitimately. Command blocks can only be placed in Creative mode, and obtaining one requires a command or an external tool.
Do command blocks work without cheats enabled?
No. Commands, including the give and setblock commands used to obtain them, require cheats or operator permissions.
What is the difference between impulse, chain, and repeating command blocks?
Impulse runs once per redstone pulse, repeating runs continuously while powered, and chain runs after the block behind it executes.
Can you get command blocks on Bedrock Edition?
Yes, with cheats enabled and in Creative mode, using the same give or setblock commands as Java Edition.
Will using an external editor break my world?
It can. Map editors that write command block data can corrupt chunks, so always work on a copy and keep a backup.