This wikiHow teaches you how to create a command block, a block that executes certain commands in Minecraft, both computer and Pocket Edition. In order to create usable command blocks, you must enter creative mode and activate cheats. You cannot create command blocks in the console edition/version of Minecraft.
Step
Method 1 of 2: On the Computer Version of Minecraft
Step 1. Run Minecraft
Double-click the Minecraft icon to launch Minecraft, then select “ Play ” in the launcher window if prompted.
Step 2. Click Singleplayer
It's at the top of the Minecraft main page.
You can also choose " Multiplayer ”, but you need to set up multiplayer play through your own server before proceeding.
Step 3. Click Create New World
It's in the lower-right corner of the window.
If you already have a creative world with active cheats, click on the world, then select “ Play Selected World ” and move on to the "Press the / button" step (the ninth step).
Step 4. Enter the world name
Type a name into the "World Name" field.
Step 5. Double-click Game Mode Survival
The options will change to “ Game Mode: Hardcore "first, then" Game Mode: Creative " Since you can only use command blocks in creative mode, this step is important to follow.
While you can display command blocks in “Survival” mode, you cannot place or use blocks in any way
Step 6. Click More World Options…
It's at the bottom of the window.
Step 7. Click Allow Cheats OFF
The option label will change to “ Allow Cheats: ON ” which indicates that the cheat code will be activated in the game.
If the option is labeled “ Allow Cheats: ON “From the very beginning, cheat codes were activated in the world to be created.
Step 8. Click Create New World
It's in the lower-left corner of the screen.
Step 9. Press the / button
The slash or slash key is located on the computer keyboard. Press the button to bring up the command console at the bottom of the Minecraft window.
Step 10. Type give player command_block into the console
Make sure you replace the word "player" in the command with the name of your character in the game.
For example, if your character's name is "potatoSkin", enter the code give potatoSkin command_block in the console
Step 11. Press Enter
The command will be executed and the command block will be added to the character's hand.
Step 12. Place the command block on the ground
Right-click the ground once your character has the command bar.
Step 13. Right-click the command bar
The beam window will load afterwards.
Step 14. Enter the command
Type the command the block needs to execute into the text field at the top of the window.
Step 15. Edit the command bar conditions
Click the following options to change the command block conditions:
- ” Impulse ” – The block will execute the command once per right click. Click " Impulse ” to switch to option “ Chain ” so that the block is executed after the block behind it is functioning. Click " Chain ” to switch to option “ Repeat ” so that the block is “forced” to execute the command 20 times per second.
- “ Unconditional – The beam has no operating conditions. Click " Unconditional ” to switch to option “ Conditional ” so that the block cannot be run until the block behind it is functioning.
- ” Needs Redstone ” – The beam must be filled with redstone and cannot execute orders without the stone. Click " Needs Redstone ” to switch to option “ Always Active ” if you wish to bypass or disable the redstone requirement requirement.
Step 16. Click Done
The command block has finished setting up.
If the command block is set to work when filled with redstone, you will need to sprinkle some redstone powder on the block so that the block can be used
Method 2 of 2: On Cross-Platform Minecraft (Cross-Platform)
Step 1. Open Minecraft
Select the Minecraft icon that looks like a patch of dirt with grass on it.
The game may be named Minecraft, Minecraft Pocket Edition, or Minecraft for Windows 10, depending on the platform you are using
Step 2. Select Play
It's in the center of the screen.
Step 3. Select Create New
It's at the top of the screen.
If you already have a creative mode Minecraft world with active cheats, select the world, then move on to step ten (adding a command block command)
Step 4. Select Generate Random
It's at the top of the screen.
Step 5. Enter the world name
Select the " World Name " field, then type in the name you want to use for the created world.
Step 6. Select "Creative" as game mode
Select the drop-down box " Survival, then select " Creative ” from the drop-down menu.
Step 7. Select Continue when prompted
Creative mode and cheats for the currently created world will be activated.
Step 8. Select Play
It's at the far left of the page. After that, the world will be created.
Step 9. Select the “Chat” icon
It's the speech bubble icon at the top of the screen, right next to the Pause icon.
- On the Windows 10 version of Minecraft, select the / or T key.
- On the console version of Minecraft, select the left button on the D-pad.
Step 10. Enter the command bar command
Type /give player command_block and make sure you replace the word “player” in the command with the name of the character being played.
Step 11. Select the right arrow
This icon is to the right of the console column. Once clicked, the command will be executed and the command bar will be added to the character inventory list.
Step 12. Use the command block
Open the inventory list, select the crates tab on the left side of the screen, and click the command block icon.
Step 13. Place the command block on the ground
Touch the ground to place blocks. You can also press the left trigger button or right click on the ground to place a command block.
Step 14. Touch the command bar
After that, the block will be opened.
- On the Windows 10 version of Minecraft, left-click the command bar.
- On the console version of Minecraft, press the left trigger button on the command bar.
Step 15. Edit the command bar conditions
Change the following options on the left side of the screen if you wish:
- ” Block Type ” – Leave option “ Impulse ” remains selected so that the block executes the command when touched. You can also touch" Impulse " and choose " Chain ” so that the block is run while the block behind it is working. Touch " Impulse " and select " Repeat ” so that the block is executed 20 times per second.
- ” Condition " - Let " Unconditional ” remains selected for the block to run only when the block behind it has finished executing.
- ” redstone " - Let " Needs Redstone “remains selected so blocks can only be executed when hit by redstone, or touch” Needs Redstone " and select " Always Active ” so that the blocks can still be used even without redstone.
Step 16. Enter the command
Select button + ” in the upper right corner of the window, type a command, and press the “ - ” in the upper right corner of the screen.
Step 17. Exit the block page
Select button x ” in the upper right corner of the screen. Now, the command bar is done setting up.