Command Block
Talk0this wiki
| Command Block | |
|---|---|
| |
| First Appearance | 1.4- |
| Type of Block | Solid Block |
| Stackable? | Yes (64) |
| Tool Used | None |
| Data Values | Hex: 89 Dec: 137 |
| Obeys Physics? | |
| Luminosity | |
| Transparency | |
The Command Block is a redstone-powered block that was made available in the 1.4 patch for Minecraft. The Command Block will perform server commands when attached to a redstone circuit. This block cannot be crafted and only server administrators are allowed to place them.
to get it type in this when cheats is ON
"give type in your name 137 amount
Behavior
Edit
When attached to a circuit, the Command Block can perform a variety of server commands, such as changing the difficulty or giving players items. There are also gamerules, which do unique commands.
This table shows the list of gamerules.
| Gamerule | What it does |
|---|
| commandBlockOutput | Enables/disables text output of command block commands to console |
|
doFireTick | Enables/disables fire spread. |
| doMobLoot | Enables/disables mob drops. |
| doMobSpawning | Enables/disables the spawning of mobs unless you want them to ex: eggs and mob spawners will still spawn mobs. |
| doTileDrops | Enables/disables blocks dropping items when broken (includes TNT destroying blocks). |
| keepInventory | Enables/disables keeping inventory on death. |
| mobGriefing | Enables/disables creepers, ghasts, and Wither blowing up blocks, endermen picking up blocks and zombies breaking doors. |
Gamerules are case sensitive.
An example of a gamerule is /gamerule mobGriefing true You must type in /gamerule before the name of the actual gamerule. true/false tells whether you want to disable the gamerule (false), or enable it (true).
This table shows that commands can be restricted to players on the server.
| Shorthand | Restriction |
|---|---|
| @p | Nearest player |
| @r | Random player |
| @a |
All players |
There is another shorthand: @f. Targets the player farthest away.
An example of a command is:
/give @p 4 64
This command will give the nearest player a stack of Cobblestone.
