|Repeating Command Block|
|First Appearance||Java Edition: 1.9 15w34a|
Pocket Edition: 1.0.5 alpha 220.127.116.11
|Type of Block||Solid Block, Redstone|
The Repeating Command Block is a redstone-powered block that was made available in the 1.9 patch for Minecraft. The repeating command block will perform server commands over and over again when attached to a redstone circuit. This block cannot be crafted, and only server administrators are allowed to place them. Repeating command blocks can only be obtained when cheats are enabled, and can still only be used in creative mode, preventing survival players in a server from accessing "staff" abilities. Repeating command blocks are invincible outside of creative mode. With repeating command blocks, one can perform commands that other players can not perform.
To get a repeating command block, players must use the
/give command like so:
/give @p minecraft:repeating_command_block <amount>. Players can also change a normal command block into a repeating command block by selecting the option in the command block GUI.
Behavior[edit | edit source]
When attached to a redstone circuit, or set to "Always" instead of "Needs Redstone," the repeating command block can perform a variety of server commands, such as changing the difficulty or giving players items. It can also change the gamerules, which are unique commands, over and over again.
The table below includes a 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 one wants them to ex: eggs and 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.|
|doNaturalRegeneration||Enables/disables regenerating health when hunger is full or close to full.|
Gamerules are case sensitive.
One must type in
/gamerule before the name of the actual gamerule, and add true/false whether one wants to disable the gamerule (false) or enable it (true).
An example of this is:
/gamerule mobGriefing true.
The table below includes a list of commands that can be restricted to players on a server.
An example of a command is:
/give @p minecraft:cobblestone 64 which will give the nearest player a stack of cobblestone over and over again until the repeating command block is destroyed or is no longer powered.
One may also check for a specific quality of a player or entity; for example,
/tp @p[r=10] ~ ~10 ~ will teleport the nearest player, in a radius of 10 blocks, up 10 blocks.