This Minecraft tutorial explains how to craft a command block with screenshots and step-by-step instructions.

In Minecraft, a command block is an item that you can not make with a crafting table or furnace and it is not available through the Creative Inventory menu. You can only add a command block to your inventory using a game command.

Let’s explore how to add a command block to your inventory.

Requirements

To run game commands in Minecraft, you have to turn cheats on in your world.

Give Command for Command Block

Give Command in Minecraft Java Edition (PC/Mac)

In Minecraft Java Edition (PC/Mac), the syntax to give a player a command block using the /give command is:

/give <targets> command_block [amount]

Definitions

  • targets is the name of the player (or a target selector) that you wish to give the command block to.
  • amount is the number of command blocks that you want to give. If you don’t specify an amount, the player will be given 1 command block.

Examples

Example in Java Edition (PC/Mac)

To give 1 command block to the player named 9minecraft:

/give 9minecraft command_block

To give 64 command blocks to the nearest player:

/give @p command_block 64

To give 3 command blocks to all players:

/give @a command_block 3

How to Enter the Command

1. Open the Chat Window

The easiest way to run a command in Minecraft is within the chat window. The game control to open the chat window depends on the version of Minecraft:

  • For Java Edition (PC/Mac), press the T key to open the chat window.
  • For Pocket Edition (PE), tap on the chat button  at the top of the screen.
  • For Xbox One, press the D-Pad (right)  on the controller.
  • For PS4, press the D-Pad (right)  on the controller.
  • For Nintendo Switch, press the right arrow button  on the controller.
  • For Windows 10 Edition, press the T key to open the chat window.
  • For Education Edition, press the T key to open the chat window.

2. Type the Command

In this example, we will give 1 command block to the player called 9Minecraft with the following command:

/give 9Minecraft command_block

Type the command in the chat window. As you are typing, you will see the command appear in the lower left corner of the game window. Press the Enter key to run the command.

Once the cheat has been entered, the command block will be added to the player’s inventory.

You will see the message “Given [Command Block] x 1 to 9Minecraft” appear in the lower left corner of the game window. You have now given 1 command block to the player called 9Minecraft.

Congratulations, you have learned how to craft a command block using the /give command in Minecraft.

Item ID and Name

Minecraft Java Edition (PC/Mac)

In Minecraft, a command block has the following Name, ID and DataValue:

Description
(Minecraft ID Name)
Data Value Stack Size Version
Command Block
(minecraft:command_block)
0 64 1.8 – 1.12
Command Block
(minecraft:command_block)
64 1.13 – 1.19.4
  • Description is what the item is called and (Minecraft ID Name) is the string value that is used in game commands.
  • Data Value (or damage value) identifies the variation of the block if more than one type exists for the Minecraft ID.
  • Stack Size is the maximum stack size for this item. While some items in Minecraft are stackable up to 64, other items can only be stacked up to 16 or 1. (NOTE: These stack sizes are for vanilla Minecraft only. If you are running a mod, some mods may change the stack size for an item.)
  • Platform is the platform that applies.
  • Version(s) is the Minecraft version numbers that the Minecraft ID and Name are valid for.

Block States for Command Block

Minecraft Java Edition (PC/Mac)

In Minecraft Java Edition (PC/Mac), the block states for Command Block are:

Block State Value Def Req
conditional false Yes No
conditional true No No
facing north Yes No
facing south No No
facing east No No
facing west No No
facing down No No
facing up No No
  • Block State is the internal name for the block state.
  • Value is the value for the block state.
  • Def indicates that it is the default, if omitted.
  • Req indicates that it must be included in command to properly identify this item/block.
  • Example shows how to format the block state to be used in the /fill, /setblock, /clone, or /testforblock command.

Other Command Blocks

You can make other command blocks in Minecraft such as:

How to make a Chain Command Block
How to make a Repeating Command Block
How to make a Minecart with Command Block

Things to Do with Command Blocks

Here are some activities that you can do with command blocks in Minecraft:

Build a House with One Command
Build a Castle with One Command
Give an Enchanted Diamond Pickaxe
Give an Enchanted Diamond Sword
Summon Giant with Golden Armor and Sword
Summon Iron Skeleton Riding Horse
 Summon a Killer Spider Jockey
Summon Villager with Customized Trade
Summon Zombie with Diamond Armor and Sword
Teleport Player
Teleport Player with Item
How to run Multiple Commands
How to Use a Command Block
Redstone Device that Teleports Player with Item

Command Generators

If you need help, you can use these tools to automatically generate commands in Minecraft:

Summon Mob Generator
Villager Trade Generator
Summon Llama with Chest Generator
Summon Donkey with Chest Generator
Summon Mule with Chest Generator
Prefilled Chest Generator
Monster Spawner Generator
Fireworks Rocket Generator
Give Armor Generator
Give Dye Generator
Give Food Generator
Give Lingering Potion Generator
Give Mechanism Generator
Give Ore Generator
Give Potion Generator
Give Splash Potion Generator
Give Tool Generator
Give Transportation Generator
Give Weapon Generator
Fill Command Generator

Click to rate this post!
[Total: 3 Average: 5]