![]() |
VOOZH | about |
| Rarity tier | |
|---|---|
| Renewable | No |
| Stackable | Yes (64) |
| Tool | None |
| Blast resistance | 3,600,000 |
| Hardness | -1 |
| Luminous | No |
| Transparent | No |
| Flammable | No |
| Catches fire from lava |
No |
| Map color |
|
| Note block instrument | Default (Harp) |
{
"title": "Command Block",
"rows": [
{
"field": "\n* Epic β<sup class=\" nowrap Inline-Template \" title=\"\">[<i><span title=\"This statement only applies to Java Edition\">(link to Java Edition article, displayed as JE) only</span></i>]</sup>\n* Common β<sup class=\" nowrap Inline-Template \" title=\"\">[<i><span title=\"This statement only applies to Bedrock Edition\">(link to Bedrock Edition article, displayed as BE) only</span></i>]</sup>",
"label": "(link to Rarity article, displayed as Rarity tier)"
},
{
"field": "No",
"label": "(link to Renewable resource article, displayed as Renewable)"
},
{
"field": "Yes (64)",
"label": "Stackable"
},
{
"field": "None",
"label": "Tool"
},
{
"field": "3,600,000",
"label": "(link to Explosion#Blast resistance article, displayed as Blast resistance)"
},
{
"field": "-1",
"label": "(link to Breaking#Blocks by hardness article, displayed as Hardness)"
},
{
"field": "No",
"label": "(link to Light article, displayed as Luminous)"
},
{
"field": "No",
"label": "(link to Opacity article, displayed as Transparent)"
},
{
"field": "No",
"label": "(link to Flammable article, displayed as Flammable)"
},
{
"field": "No",
"label": "Catches fire<br>from (link to lava article, displayed as lava)"
},
{
"field": "(values exceeds 1000 characters...)",
"label": "(link to Map color article, displayed as Map color)"
},
{
"field": "Default (Harp)",
"label": "(link to Note Block#Instruments article, displayed as Note block instrument)"
}
],
"invimages": [
"Command Block",
"Chain Command Block",
"Repeating Command Block"
],
"images": [
"Impulse Command Block.gif",
"Conditional Impulse Command Block.gif",
"Chain Command Block.gif",
"Conditional Chain Command Block.gif",
"Repeating Command Block.gif",
"Conditional Repeating Command Block.gif"
]
}
A command block is an indestructible block that can execute commands. Because it cannot be obtained, destroyed or used in Survival mode without cheats, it is primarily used in multiplayer servers, Creative worlds, and custom maps. There are 3 types of these blocks.
An impulse command block is the default block type; it executes only once when activated.
A chain command block executes every time when triggered.
A repeating command block executes every game tick as long as it is activated.
In Java Edition, command blocks are available in the Creative inventory under the "Operator Utilities" tab, if the "Operator Items Tab" setting in the "Controls" Options tab is set to "ON". Across both Java and Bedrock editions, they can either be obtained by using various commands, such as /give @s minecraft:command_block or /setblock ~ ~ ~ command_block, or by pressing the pick block control on an existing command block.
Just like other blocks that can store NBT data, using pick block + copies the command and options inside the command block. This allows it to be placed elsewhere without having to re-enter the data inside.
Command blocks are not flammable, and have the same blast resistance as bedrock. Command blocks, structure blocks, and jigsaw blocks cannot be mined in Survival.
A command block can execute commands when activated by redstone power. It always has permissions of level 2β[Java Edition only]/level 1β[Bedrock Edition only], so it can be used to allow a specific use of a command by players who can't use that command in general (for example, allowing anyone to obtain a specific item with /give without allowing everyone to /give themselves whatever they want).
A command block has an orientation that determines the chain command block to activate, and the blocks to be checked to see if a command block in "Conditional" mode executes.
To execute the command, in Java Edition the game rule command_blocks_work must be set to true; in Bedrock Edition "Command Blocks Enabled" in world options must be enabled.
Command blocks can only be placed or broken by an operator player in Creative mode.
To enter command or modify the command block, use the Use Item control on the command block to open the command block GUI (graphical user interface). The GUI opens only if the player is in Creative mode, and has the proper permissions. That means, in singleplayer, "Allow Cheats"β[JE only] or "Activate Cheats"β[BE only] in world options must be enabled. In multiplayer, GUI can be opened only by operators in Creative mode, and in Java Edition op-permission-level in the server.properties file must be set to 2 or above (default is 4).
In Java Edition to enter command or modify the command block, enable-command-block in the server.properties file must be set to true (default is false).
In Java Edition, opening the GUI in singleplayer pauses the game.
/) as they do in the chat window, but doing so still works. - "β[BE only] initially). Its text is not editable.Oβ[JE only]/enabledβ[BE only] when the output text should be stored and Xβ[JE only]/disabledβ[BE only] when the output text should not be stored. For worlds with many command blocks, especially command blocks running on fast clocks, not storing the output text can reduce memory and storage requirements.sendCommandFeedback is true (the default), default to Oβ[JE only]/enabledβ[BE only]. Otherwise defaults to Xβ[JE only]/disabledβ[BE only].!.Command blocks are redstone mechanisms and can be activated by:
A command block can also be activated by setting it to "Always Active" mode.
When activated, a command block executes its command, depending on the command block's type:
An impulse command block, when it is activated, checks whether the command block behind it has executed successfully (if in conditional mode). After the delay of 1 game tick (or moreβ[BE only]), if the condition is met before the delay (if in "Conditional" mode), it executes its command once and triggers the chain command block it is pointing to.
A repeat command block, when it is activated, after 1 game tick (always 1 no matter how many "Delay in Ticks" is), checks whether the command block behind it has executed successfully (if in conditional mode). If the condition is met, and if "Execute on First Tick" is enabled in Bedrock Edition, it executes its command once and triggers the chain command block it is pointing to. If it is still activated, it then checks, executes, and triggers the chain command block again after 1 game tick (or moreβ[BE only]).
When executing a command, it also updates its success count: If in "Conditional" mode, if the command block behind it didn't execute successfully, it sets its success count to 0. Otherwise, it sets it to the success count of the command.
Also:
If any command block having executed its command (whether successfully or unsuccessfully) faces a chain command block, it triggers the chain command block to also attempt execution.
When a chain command block is triggered,
Chained command blocks execute simultaneously in the same game tick in the order they are chained.
In Bedrock Edition, it can also delay before executing commands if "Delay in Ticks" is not 0:
In Java Edition, it can execute multiple times in the same game tick if "UpdateLastExecution" is set to false. In this case, it does not check whether it has already executed in this game tick.
If the chain command block has been activated when triggered, it also updates its success count: If in "Conditional" mode, if the command block behind it didn't execute successfully, it sets its success count to 0. Otherwise, it sets it to the success count of the command.
When activated, a command block can produce multiple types of output:
/function and /execute./gamerule commandBlockOutput false. Some commands may write additional text to the chat as their normal function, which won't be suppressed (for example, the /say command writes a message to the chat of all players), separate from the output message. Chat messages that would usually be prefaced by a player's name (such as from the /me, /say and /tell commands) use @ β[Java Edition only] / ! β[Bedrock Edition only] as the player name. If the command block had been named in an anvil before placement, that name is used instead. In Bedrock Edition, it can also modified in the GUI./gamerule logAdminCommands false.Command blocks execute commands with OP level 2. The following commands cannot be used in a command block: /ban, /banlist, /ban-ip, /debug, /deop, /kickβ[JE only], /op, /pardon, /pardon-ip, /publish, /reloadβ[BE only], /save-all, /save-off, /save-on, /stop, /tick, and /whitelist (i.e., /debug, /tick, /publish, and all of the multiplayer-only commands except /list).
Running "Searge" (case insensitive) as the command in the command block without a preceding "/" will set the previous output to "#itzlipofutzli". Its success count is 1.
Command blocks cannot be pushed by pistons. They also cannot be pushed or pulled by sticky pistons.
π BlockSprite block-of-gold.png: Sprite image for block-of-gold in Minecraftmetal sound type | ||||||||
|---|---|---|---|---|---|---|---|---|
| Sound | Closed captions | Source | Description | Identifier | Translation key | Volume | Pitch | Attenuation distance |
| βBlock broken | Blocks | Once the block has broken | block.metal.break | subtitles.block.generic.breakβ | 1.0 | 1.2 | 16 | |
| βBlock placed | Blocks | When the block is placed | block.metal.place | subtitles.block.generic.placeβ | 1.0 | 1.2 | 16 | |
| βBlock breaking | Blocks | While the block is in the process of being broken | block.metal.hit | subtitles.block.generic.hitβ | 0.25 | 0.75 | 16 | |
| βSomething falls on a block | Entity-Dependent | Falling on the block with fall damage | block.metal.fall | subtitles.block.generic.fallβ | 0.5 | 1.25 | 16 | |
| βFootsteps | Entity-Dependent | Walking on the block | block.metal.step | subtitles.block.generic.footstepsβ | 0.15 | 1.5 | 16 | |
π BlockSprite block-of-gold.png: Sprite image for block-of-gold in Minecraftmetal sound type | |||||||
|---|---|---|---|---|---|---|---|
| Sound | Closed captions | Source | Description | Identifier | Translation key | Volume | Pitch |
| βBlock broken | Blocks | Once the block has broken | dig.stone | subtitles.block.generic.breakβ | 1.0 | 1.1β1.2 | |
| βBlock placed | Blocks | When the block is placed | use.stone | subtitles.block.generic.placeβ | 1.0 | 1.2β1.25 | |
| βBlock breaking | Blocks | While the block is in the process of being broken | hit.stone | subtitles.block.generic.hitβ | 0.3 | 0.75 | |
| βFootsteps | Players | Falling on the block with fall damage | fall.stone | subtitles.block.generic.footstepsβ | 0.4 | 1.0 | |
| βFootsteps | Players | Walking on the block | step.stone | subtitles.block.generic.footstepsβ | 0.35 | 1.0 | |
| βFootsteps | Blocks | Jumping from the block | jump.stone | subtitles.block.generic.footstepsβ | 0.12 | 1.0 | |
| βFootsteps | Blocks | Falling on the block without fall damage | land.stone | subtitles.block.generic.footstepsβ | 0.22 | 1.0 | |
| Name | Identifier | Form | Block tags | Translation key |
|---|---|---|---|---|
| π BlockSprite command-block.png: Sprite image for command-block in Minecraft Command Block | command_block | Block & Item | dragon_immunewither_immune |
block.minecraft.command_block |
| π BlockSprite chain-command-block.png: Sprite image for chain-command-block in Minecraft Chain Command Block | chain_command_block | Block & Item | dragon_immunewither_immune |
block.minecraft.chain_command_block |
| π BlockSprite repeating-command-block.png: Sprite image for repeating-command-block in Minecraft Repeating Command Block | repeating_command_block | Block & Item | dragon_immunewither_immune |
block.minecraft.repeating_command_block |
| Name | Identifier |
|---|---|
| π BlockSprite command-blocks.png: Sprite image for command-blocks in Minecraft Block entity | command_block |
| Name | Identifier | Numeric ID | Form | Item ID[i 1] | Translation key |
|---|---|---|---|---|---|
| π BlockSprite command-block.png: Sprite image for command-block in Minecraft Command Block | command_block | 137 | Block & Giveable Item[i 2] | Identical[i 3] | tile.command_block.name |
| π BlockSprite chain-command-block.png: Sprite image for chain-command-block in Minecraft Chain Command Block | chain_command_block | 189 | Block & Giveable Item[i 2] | Identical[i 3] | tile.chain_command_block.name |
| π BlockSprite repeating-command-block.png: Sprite image for repeating-command-block in Minecraft Repeating Command Block | repeating_command_block | 188 | Block & Giveable Item[i 2] | Identical[i 3] | tile.repeating_command_block.name |
| Name | Savegame ID |
|---|---|
| π BlockSprite command-blocks.png: Sprite image for command-blocks in Minecraft Block entity | CommandBlock |
| Name | Default value | Allowed values | Description |
|---|---|---|---|
| conditional | false | falsetrue | True if the command block is in conditional mode. |
| facing | north | downeastnorthsouthupwest | The direction the command block is pointing. |
| Name | Metadata Bits | Default value | Allowed values | Values for Metadata Bits |
Description |
|---|---|---|---|---|---|
| conditional_bit | 0x8 | false | falsetrue | 01 | True if the command block is in conditional mode. |
| facing_direction | 0x10x20x4 | 0 | 012345 | 012345 | The direction the command block is pointing.
|
A command block has a block entity associated with it that holds additional data about the block.
commandBlockOutput is false. Appears in the GUI of the block when right-clicked, and includes a timestamp of when the output was produced.| July 27, 2012 | Jeb began tweeting of a new block he had created to start expanding Adventure mode. He began posting pictures, ideas and hints of what the block can do. | ||||||
|---|---|---|---|---|---|---|---|
| July 31, 2012 | During Notch's AMA on Reddit, he hinted the block may be in Java Edition 1.4. | ||||||
| Java Edition | |||||||
|---|---|---|---|---|---|---|---|
| 1.4.2 | 12w32a | π Image Added command blocks. | |||||
| 12w38a | Added the game rule commandBlockOutput. | ||||||
| 1.5 | 13w03a | Command block success can now power a redstone comparator. | |||||
| 13w04a | Command blocks renamed with an anvil now use their name instead of @ in the chat. | ||||||
| 13w10a | Pressing in a command block will exit its GUI. | ||||||
| 1.6.1 | 13w19a | Command blocks are no longer mineable in Survival. | |||||
| Command blocks are no longer damaged by explosions, except by blue wither skulls. | |||||||
| 1.7.2 | 13w37a | A bar that shows the previous output of command blocks has been added. | |||||
| The character limit when inserting a command in a command block has been increased from 256 to 16,369. Using a third-party editor allows the player to reach 32,767 characters. | |||||||
| 1.8 | 14w07a | Dispensers now place command blocks, instead of shooting them out. | |||||
| 14w20a | The in-game character limit of 16,369 has been removed, allowing access to the full 32,767 characters. | ||||||
| 14w27a | Added CommandStats NBT tag to command blocks. | ||||||
| 1.8.6 | Dispensers no longer place command blocks, due to security concerns.[1] | ||||||
| 1.9 | 15w33a | The character limit for command blocks is now 32,500 instead of 32,767. | |||||
| 15w34a | π Image π Image Added the chain command block and the repeating command block. | ||||||
| Added block facing for command blocks. | |||||||
| π Image The texture of command blocks has been changed. | |||||||
| 15w34b | Added Conditional mode within command blocks. | ||||||
| Added tab completion support within command blocks. | |||||||
| 15w35a | π Image π Image π Image The textures of all three command blocks have been changed. | ||||||
| π Image π Image π Image When command blocks are set to conditional, the back of the arrow texture is now curved. | |||||||
| Added Always active and needs redstone options for command blocks. | |||||||
Added auto NBT tag to control redstone options within command blocks. | |||||||
| 15w36a | Players are now unable to use commands, such as /give, within command blocks.
| ||||||
| Players, who are unable to use commands, can no longer place command blocks. | |||||||
| 15w36d | Each command block type now appears with different colors on maps. | ||||||
| 16w02a | Running /help in a command block now randomly uses one of various different humorous phrases as the previous output. | ||||||
| 16w04a | Running "Searge" as the command in the command block without a preceding "/" now sets the previous output to "#itzlipofutzli". | ||||||
| 1.12 | 17w16a | Chains of command blocks no longer schedule their commands to be run in the next tick. Instead, they now execute all in the same tick they are read. This allows later blocks in a chain to be modified via earlier blocks, allowing techniques like branching and looping, all in the same tick. | |||||
| 17w16b | Added the game rule maxCommandChainLength to control the max length of a command block chain. | ||||||
| 17w17a | Added UpdateLastExecution and LastExecution NBT tags, which control the tracking of which tick a chain command block was last executed in. | ||||||
| pre6 | Tab-completing command names in command blocks no longer add a / prefix. | ||||||
| 1.13 | 18w21a | The rarity of command blocks, chain command blocks and repeating command blocks has been changed from "Common" to "Epic". | |||||
| pre1 | The player can now tab-complete in command blocks again. | ||||||
| 1.14 | 18w43a | π Image π Image π Image The textures of command blocks have been changed. | |||||
| 18w47b | π Image π Image The textures of impulse and repeating command blocks have been changed. | ||||||
| 1.19.3 | 22w44a | Command blocks are now available in the creative inventory, but only if cheats are enabled. | |||||
| 22w45a | Moved command blocks behind the Operator Utilities tab in the creative inventory. The tab is only available if cheats are enabled and the "Operator Items Tab" option in the controls menu is turned on. | ||||||
| 1.20.2 | 23w31a | The text in command blocks now scrolls when selected using and arrow keys.[2] | |||||
| 1.21.9 | 25w35a | Added game rule enableCommandBlocks, which replaces enable-command-block in server.properties. | |||||
| 25w37a | Renamed game rule enableCommandBlocks to commandBlocksEnabled. | ||||||
| 1.21.11 | 25w44a | Renamed game rule commandBlocksEnabled to command_blocks_work. | |||||
| Pocket Edition | |||||||
|---|---|---|---|---|---|---|---|
| 1.0.5 | alpha 1.0.5.0 | π Image π Image π Image Added all types of command blocks. | |||||
| Bedrock Edition | |||||||
| 1.8.0 | beta 1.8.0.8 | Command blocks now have a default name of ! instead of @. | |||||
| 1.10.0 | beta 1.10.0.3 | π Image π Image π Image The textures of command blocks have been changed. | |||||
| 1.12.0 | beta 1.12.0.2 | Tab-complete has been added to command blocks. | |||||
| Added a delay option to command blocks, which allows a delay to be added to a redstone tick delay field. | |||||||
| 1.20.70 | Preview 1.20.70.22 | Command Block no longer drops itself when breaking. | |||||
| Legacy Console Edition | |||||||
|---|---|---|---|---|---|---|---|
| Xbox 360 | Xbox One | PS3 | PS4 | PS Vita | Wii U | Switch | |
| TU19 | CU7 | 1.12 | 1.12 | 1.12 | Patch 1 | 1.0.1 | π Image Added command blocks. |
| Command blocks do not have any functionality and can be obtained only with mods. | |||||||
| ? | ? | ? | ? | ? | ? | ? | Added chain and repeating command blocks. These are completely unobtainable without inventory editing with an external editor, but can be modded into the game. They do not have any functionality. |
| Java Edition | |||||||
|---|---|---|---|---|---|---|---|
| 1.11 | 16w32a | The block entity ID has been changed from Control to command_block. | |||||
| 1.13 | 17w47a | Prior to The Flattening, the numeral IDs for the command block, repeating command block, and chain command block were 137, 210, and 211, respectively. | |||||
Issues relating to "Command Block" are maintained on the bug tracker. Issues should be reported and viewed there.
| π Image Blocks | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||
| |||||||||||||||||||||||||||
| |||||||||||||||||||||||||||
| |||||||||||||||||||||||||||
| |||||||||||||||||||||||||||
| |||||||||||||||||||||||||||
| |||||||||||||||||||||||||||
| |||||||||||||||||||||||||||
| |||||||||||||||||||||||||||