Though a loop can encompass your entire Minecraft device, the simplest loops are small machines that oscillate between two states and can be connected to the rest of your contraption. Here are three basic loops that you can hook up to any input in order to make your machine flip back and forth between powered and unpowered.
The first two loops shown rely primarily on repeaters; repeaters are blocks that pass along redstone power after an adjustable delay. In the arrangement on the left, redstone power moves slowly around the ring — this forms a loop because the machine is constantly revolving and each part of it is repeatedly being turned on and off. The arrangement in the middle is similar, but much more rapid.
To set either of these loops in motion, follow these steps:
Place the blocks where you want them.
You get a currently unpowered loop.
Place a power source to charge the loop.
You can place the power source anywhere, as long as it charges part of the loop. Step 3 must come immediately after Step 2.
Destroy or deactivate the power source, leaving the redstone power isolated.
Perform Steps 2 and 3 in quick succession (that is, place a redstone torch or block and then immediately destroy it). If you wait too long, the entire loop ends up becoming powered, and you have to destroy and replace part of the loop to reset it.
Look at the arrangement on the right side of the example — it’s an easy-to-make loop. You may recall that a redstone comparator, if its third torch is active (which it is), subtracts from its input power the power entering its side. The arrangement oscillates between maximum power and low power, so a device that’s a sufficient distance away will rapidly switch between powered and unpowered.
The comparator loop works as long as the front and side of the comparator are connected. You can then hook up some repeaters in the way to slow it down.
The comparator loop is one of the most useful loops available because
It’s compact. You can easily fit this loop into your design.
It’s fast. The arrangement blinks quite rapidly.
It’s easily activated and deactivated. Note that the loop is powered by a lever. When the lever is turned on, the loop immediately starts cycling; when the lever is turned off, the loop shuts down. This means that a comparator loop is easy to start and stop.
You can build loops in a number of other ways. For example, you can connect two hoppers or set a command block to destroy and replace an adjacent redstone torch or block.
Here are a few general principles to remember when designing your own redstone loops:
The loop must have at least two different states, each of which invokes another. Almost every block-updating process takes a moment to work — loops must exploit this delay. Your arrangement should update in such a way that it always returns to its original state, thus cycling infinitely through different states.
The loop must always contain a catalyst. In other words, something must keep the loop in motion. As long as the loop is active, it should not include a state that has no reason to update or change.
Timing is everything. If a loop isn’t timed well, it may lock up and cease to function. Suppose that the loop shown in the middle of the example has one repeater at maximum delay and the other repeater at minimum delay.
In this arrangement, redstone current moves faster on one side of the loop than on the other, and the powered segment ends up catching up with itself, powering the entire loop and stopping its motion. To avoid this situation, make sure that the delays in your loop are distributed evenly, and test your design to look for places where the current might be moving too fast.
A long chain of redstone repeaters is a useful method for designing a very slow loop. It also can help you visualize the structure of a loop, because you can easily see the string of redstone current racing through the repeaters.