Redstone Repeaters and Comparators
These two blocks look similar but perform quite different functions in redstone circuits.
Redstone repeaters are important components of any Minecraft redstone system. They perform several functions.
- They only allow current to pass one way.
The repeater has an arrow on top; redstone current can only pass through in this direction: in through the back and out at the front. There is no sideways, upwards or downwards transmission, which is very useful when you're trying to place wires in tight spaces.
- They amplify a current so as to extend its range.
No matter what strength the current that goes in the back is, the signal that comes out the front is strong enough to travel 15 blocks. Therefore you can extend a wire as far as you like, as long as every 16th block is a repeater.
This amplification means that placing a repeater at the end of a redstone wire where it meets its target delivers full power, not weak power.
- They introduce a delay.
Right-clicking on the repeater moves one of the little torches and adjusts the length of the delay caused when a signal passes through the repeater: there are 4 positions, corresponding to 0.1, 0.2, 0.4 and 0.4 seconds. These delays can be useful in setting the timing of all sorts of inventions.
- Two repeaters placed together can act as a latch.
If a repeater has another, powered repeater pointing at it from the side, then its output status is locked in place, and does not respond to changes in the input. It's not as complicated as it sounds: look at the pictures!
Comparators look similar to repeaters, but they have some quite different functions.
The crafting recipe is also similar, except you'll need a piece of Nether Quartz.
Here's a rundown of what you can do with a comparator:
Like a repeater, a comparator only allows current to pass through it in one direction: in at the back, out at the front, marked by an arrow on the top.
Unlike a repeater, the signal is neither delayed nor amplified.
Comparing current strengths
As its name suggests, a comparator can compare the strength of two currents. It compares the main signal that it receives through the back (base of the arrow) with a signal that it gets through the side, and sends it output through the front.
The signal that comes in at the back will be passed out through the front if it is greater than the signal coming in through the side. If the repeater is getting a signal in through both sides, it just uses whichever is the strongest and ignores the other one.
The main signal will not be altered in strength.
If you right-click the comparator, this will put it into subtraction mode. This is marked by the front one of the three redstone torches (the little one) lighting up.
In subtraction mode, the comparator works the same as described above, except the current output at the front is equal to the main input minus the side input. That is to say, the strength of the main current that passes through will be reduced by the strength of the side current (to zero if the side current is greater than the main current.)
Reporting the fullness of containers
If the base of a comparator is placed against a container (chest, furnace, hopper, dropper, dispenser, brewing stand or juke box) then it will output a current with a strength that depends on how full the container is. This can be used to test whether a container is empty, or to compare how full two different containers are.
Comparators can also work in either normal mode or subtraction mode in this role, allowing all sorts of complicated calculations to set thresholds for comparison.
How does signal strength relate to how full the container is?
This is quite complicated, since each type of container has a different number of slots, and different items can be stacked differently. The output current is 0 for a completely empty container, and 15 for a full one.
A brewing stand has 3 slots for bottles, and the bottles do not stack, so each bottle is worth one third of the maximum signal strength, ie. 5 each.
A large chest can hold 3456 of any block that can stack to 64 items per slot, so each item is worth much less than the bottles in a brewing stand! Items that do not stack, such as tools or boats, count for a whole stack each, and a full stack of 16 eggs is worth the same as a full stack of 64 of something.