Coloured command blocks

Duskreaper

8 Nov 2015

Redstone

Map Making in 1.9: Coloured Command Blocks!?

LET’S MAKE MY REDSTONE PRETTY

Contrary to not-so-popular belief, the new commands blocks added in 1.9 actually have new features other than adding some much needed colour to your redstone!

Directionality

Directionality

Command blocks now have a directional component to them, just like repeaters. When a command block is placed, it will be pointing toward you. These new concept will prove integral for using the new command blocks and will be explained further shortly! In the image above you can see all of the directions that a command block can face.

[From left to right; upwards, left, right, downwards, backwards, forwards]

The circular side indicates where the block is facing towards, the front side, and the square side indicates the back of the command block.

Types

Orange – The regular command block we all know and love. This command block is now called an IMPULSE command block, as after it is powered it performs its command as an impulse (once, and immediately).

Green – This new type of command block is called a CHAIN command block. This type of command block will perform its action when the block behind it (note arrow directions) performs its command.

Purple – This is the second new type of command block, called the REPEAT command block. This block does exactly what it says on the tin. When powered by a redstone current, the command will be run up to 20 times a second. This can be very useful if you wish to spam chat out or, more commonly, to constantly test to see if a condition is met.

Modes

In addition to directionality, all command blocks have internal settings that you can select, or modes. There are three different toggles that effect the mode of the command block.

modes1

The first, on the left, toggles the type of the command block. This impacts the way the command block behaves toggling through Impulse to Chain and to Repeat – see above.

The central grey button toggles if the command block is set to unconditional or conditional mode. This only changes the behaviour of the Chain command blocks and does not affect the other two types

modes2 Unconditional (left) and Conditional (right)

Unconditional Chain Command blocks will activate their command, like normal, when the block behind them, indicated by the square shape on that side of the command block, runs its command. [NOTE: the block behind them must also be pointed into the chain command block.]

When set to conditional mode, which can be seen externally by the arrow forming a chevron (^) shape, the chain command block will ONLY run its command if the command block behind it runs its command SUCCESSFULLY.

modes3

In the example above, if the Impulse command block is a testfor command and it is pointing into the back of the conditional Chain command block, the Chain command block will only activate its command when the testfor tests positive for a result. This replaces comparators as true/false detectors for command blocks.

The final mode toggles whether or not the block requires redstone to activate, toggling from Needs Redstone to Always Active. It is important to note that Impulse command blocks will only ever function if they are set to Needs Redstone, as they power when a redstone current is applied. Both the Chain and Repeat command blocks can be set to either mode. The Always Active mode means that the command block does not require redstone to activate, which is very useful for Chain command blocks as it allows them to function as a chain without needing to power every command block in the chain. The Repeat command blocks can also benefit from this if you wish for the repeat to always function. This may be useful in one example if it is attached to a testfor command as it will continually testfor the result throughout the game.

modes4

This concludes the introduction to the new command blocks. For a tutorial on how to write commands inside these commands blocks, check out my tutorial here. Keep up to date with our blogs as we highlight some of the changes we have made in 1.9 with the help of these!

Until then,

Happy adventuring