Taking Inventory: Redstone Comparator
Measure by measure
Lots of players are scared of redstone. Well, maybe not scared exactly, but they find it complicated and so don’t bother to use it much.
The truth is that redstone can be complex, but there are plenty of simple things you can use it for that don’t require hours of study or copying a design from someone else. Today, I’m going to teach you all about the redstone comparator.
The comparator was added to Minecraft in version 1.5, alongside hoppers, nether bricks and cobwebs. To make one, you’ll need three stone, three redstone torches and a Nether quartz – meaning that you won’t be making one until you’ve ventured into the Nether at least once.
Made one? Great. Plop it down on the ground with the use key and take a look at it for a moment. You see the big arrow? It points towards the front of the comparator (away from you when you place it). There’s a single redstone torch on that front side, and there are two torches on the back side. The front is the output, while the back and the two sides are inputs.
Take a moment to read that last paragraph again if you need to, because you’ll need to understand it to understand the rest of this article. Once you’re happy, then hit the “use” key on the comparator again, and you’ll see the single front torch turn on and off – toggling it between two different modes. When it’s unlit, the comparator is in “comparison mode”. When it’s lit, the comparator is in “subtraction mode”. Let’s talk about how those work.
First, comparison mode. When in this mode, a comparator will compare different signal strengths. If the signal coming into the back input is stronger than a signal coming into either of the sides then the back signal will pass straight through and come out of the front at the same strength. If, however, one of the side inputs is stronger than the back one, then nothing comes out of the front at all.
What about subtraction mode? Well, this just subtracts the signal strength of the side input from the back input. If signal strength at the back is 8, and the side is 3, then the front will output a strength of 5. If you’ve got inputs coming into both side inputs of the comparator, then it’ll use the highest of the two.
That’s it! That’s all you need to understand about how the comparator works. But there’s one magic feature that I haven’t mentioned yet which takes this item from handy to invaluable – some blocks, when placed next to a comparator, will emit a signal strength depending on the state of that block.
Let’s take a few examples so you know what I mean. The most important is probably a container. We’ll use a chest, but this category includes dispensers, hoppers, furnaces and more. A comparator placed next to a chest will output a signal strength in proportion to how full it is –15 for full, 0 for empty, and all the levels in between. That could be useful for triggering a light, perhaps when your chests are getting full and need emptying.
It works for other blocks too. Make a cake, and plop a comparator down next to it. You’ll see that it’s outputting a strength of 14 from the front. Eat a slice and that goes down 2. Eat another and it goes down two more. You could build a system that sets off an alarm when someone else is eating it.
Or try putting a comparator next to a composter – it’ll output a signal strength depending on how full of compost it is. Pair with a hopper above it filled with organic materials, and you’ll be able to automatically fill up your composter when it empties.
A jukebox will output a signal strength indicating which music disc is playing. A beehive outputs a signal depending on how much honey is inside. A lectern will output a signal depending on which page the player is on in the book inside it, and an item frame outputs a signal depending on the rotation of the item inside.
There are many, many more combinations, and maybe you have ideas for a few? Experiment and send your best redstone comparator builds to firstname.lastname@example.org with the subject line REDSTONE! We'd love to see some crazy inventions!
- Escrito por
- Duncan Geere