It came to my awareness recently that some, yea many of my readers may actually have less understanding of the mechanics of redstone than I do. There’s no shame in that. Redstone is one of the least intuitive parts of the vanilla game, but one of the most critical for automation, especially when you start adding mods to the game. There are various redstone tutorial sites and videos out there, some that are only useful if you have a degree in electrical engineering, but others that are very helpful to the general public (see especially http://www.minecraft101.net/redstone/tutorials.html).
So what do I have to offer that these sites don’t already give? Well, people learn in different ways. One of the things that these tutorial sites all usually share is an overall deductive or conceptual approach to teaching redstone, meaning they start with the elements of redstone circuitry and more or less expect the reader to be able to take that information and apply it. Not everyone’s brain works that way, though. Some people learn better with a more inductive or hands-on approach, which is to start with a project and work down to the constituent elements. In truth, some combination of the two approaches is usually best. This is more or less what I intend to do in this series of posts entitled “Simple Redstone Devices”. If you want a comprehensive introduction to redstone circuitry, this won’t be the place. But if you want to learn more about the basics of redstone circuitry through some simple applications whose principles you should then be able to apply more widely, read on.
Let’s start with a project that demonstrates the usefulness of the AND gate, one of a number of basic redstone structures that you can use to give precise directions to your automation. This project is an adaptation of a simple automatic pumpkin/melon farm that I presented in an earlier post. This design is not original to me. I got it from YouTuber Unbreaking Ingot ((https://www.youtube.com/watch?v=pSxYYhZK5eI).
This pumpkin/melon farm works great. It is truly 100% automatic and 100% efficient (meaning you don’t lose any pumpkins or melons). If you want it to work faster, you just build more copies of it.
But there’s one thing it doesn’t do: it doesn’t shut off automatically when you have enough. Example: what if you’ve let this thing go for a while and you have a completely full chest of pumpkins or melon slices? The farm will just keep on growing and harvesting, filling up the hoppers and, eventually, leaving items on top of the full hoppers as they wait to despawn. If you’re like me, you hate this kind of waste. What we would want is for this pumpkin farm to harvest ONLY if we don’t have a full chest of pumpkins already. This can be accomplished quite easily using a redstone comparator and an AND gate.
There’s actually quite a lot about redstone that we could talk about in the way this pumpkin farm works even before modification, but let’s focus on the AND gate. An AND gate has two or more inputs and one output. The output signal only comes on when all of the inputs are on (i.e. input 1 AND input 2, hence AND gate). A basic AND gate looks like this.
This kind of logic gate is useful when you have two or more conditions that need to be in place before you want something to happen (like having a piston extend or a door open or a hopper allow items through). For this project, our two inputs are: 1) the normal redstone signal that triggers the piston to harvest the pumpkin, and 2) a signal that is always on UNLESS the chest containing the harvested pumpkins is NOT full. When the chest is completely full, this second input will turn off and make the output stay off, meaning the piston will not extend to harvest any more pumpkins until you’ve taken something out of the chest (though a pumpkin will still be able to grow in its usual place).