William Antonelli Oct. 8, 2021, 6:30 PM
In Minecraft, command blocks can’t be crafted or found. Mojang
You can use a special chat command to obtain a command line in your Minecraft world.
You’ll need to have both Cheats and Creative Mode enabled in your Minecraft world to get a command block.
You can customize the way your command block works once you have summoned it.
Visit Insider’s Tech Reference library for more stories.
Minecraft is a complex game. On the surface, it just looks like a big Lego simulator – but dig deep enough, and you can build sprawling rail systems, paint pictures, and even program in-game computers.
Command blocks are one example of such complex features. Command blocks are powered by redstone and allow you to automate your world, control players, and set server rules.
But unlike other items, you can’t find command blocks out in the world, or in the full list of items. Instead, you’ll need to spawn it into the game using cheats.
Here’s how to get a command block in Minecraft, using either Java or Bedrock edition.
How to get a Minecraft command block
TheThe method to get a command blocks is the same in Java and Bedrock.
1. Firstly, make sure that your world or Realms server has cheats turned on, and that you’re playing in Creative Mode.
Turn on both Creative Mode (and cheats) Mojang; William Antonelli/Insider
2. To open the chat box, press T on your keyboard or the right-hand d-pad button of a controller.
/give [your username] minecraft:command_block
In place of “[your username],”Enter your Minecraft username.
You can use their name to give the command block to another player. Mojang; William Antonelli/Insider
4. The command block will appear within your inventory. While it’s in your hand, you can place it down on any solid surface.
You’ll be given an infinite amount of command blocks. Mojang; William Antonelli/Insider
Use the command block
Once you’ve placed your command block, you can set the block up with codes so it performs automatic tasks. These tasks include giving players items and killing enemies as soon they spawn.
1. Select the command block you want to place.
2. In the menu that opens, you’ll have a few options. To choose how often the command blocks should be run, use the first option. ImpulseThe command will be run once and then stopped. Repeat/CurrentThe command will be run indefinitely. ChainAny connected command block will have to run before it can.
Quick tipRedstone circuits can be used to connect multiple command blocks together.
3. The second option is ConditionalOr Unconditional, determines whether a related command block must run successfully in order to allow this block to run.
4. The third option lets you choose whether the command block can run on its own – Always Active – or Redstone is neededIt will power it.
5. Finally, type your command in the text box. For example, if you want to kill every creeper in the area, you’ll type:
Here is a list of common codes.
Your command block should be set up with an action, and conditions. Mojang; William Antonelli/Insider
6. When you’re ready for the command block to start running, click Done.
How to install Minecraft Forge, and gain access thousands of new Minecraft modsHow can you get a Minecraft cape even without modsHow can you install OptiFine to greatly enhance your Minecraft experience ‘Minecraft’s’ graphics and add new featuresHow to make an End Portal in ‘Minecraft,’ and use it to find the game’s final boss