Quite a lot of Minecraft farm automation depends on different mechanisms or exploits to detect changes in conditions or status. For example, automatic sugar cane farms rely on a block update detector to trigger a line of pistons once one of the sugar cane plants has reached a particular height. Auto pumpkin and melon farms often use the fact that pumpkin and melon blocks transmit a redstone signal to connect a broken line of redstone once the plant produces the pumpkin or melon on a specified block.
Up until Minecraft 1.11, however, it was impossible to automatically detect when a wheat plant had matured, because changes in the wheat plant’s development for some reason did not constitute a full block update. Instead, one had to rely on a long term timer to approximate when a field of wheat would likely be mostly mature. This method worked, but I never really felt it was ideal.
All of that has changed with the introduction of the Observer block in Minecraft 1.11. The Observer block is more sensitive than a block update detector because it detects not just full block updates but even changes in the basic block state, or the block’s metadata. This includes changes in the stage of maturation of a wheat plant.
In other words, an Observer that faces a wheat plant will emit a redstone pulse every time the wheat plant matures into a new stage. This makes it possible, using a redstone counter, to detect when a single wheat plant has matured. If we are using a standard 9×9 wheat field setup (with a water block in its center, covered by a stone slab), the wheat plants that will grow the slowest are those on the corners. So if we use an Observer to detect the growth of a corner plant, more than likely most of the wheat plants in the field will have reached maturity when the Observer emits its last redstone pulse.
Allow me to use pictures to explain.
Detecting When a Wheat Plant Reaches Maturity
Adjacent to my ugly vanilla house, I now have a basic 9×9 farm surrounded by Oak Leaves blocks (rather than fence posts so that auto-harvested wheat stays above the farmland blocks … and because it looks cool). The shed in the upper corner houses the Observer and some redstone magic.
Behind the Observer I have a redstone counter to count seven changes in the state of the wheat plant. Wheat plants have eight stages, with a newly planted plant being stage one, so the state changes seven times. I adapted this counter from a design by MumboJumbo. You can see his video here.
MumboJumbo’s counter begins with a basic monostable circuit, but we don’t need that here. A monostable circuit makes it work with any kind of redstone input, even solid ones like levers. But because our input is already going to be in the form of 1-tick pulses, we don’t need the monostable circuit.
All we need to do is place a Repeater on 2-ticks directly behind the Observer leading into a NOT gate (i.e., a redstone torch). The 2-ticks setting is necessary, because the 1 tick pulse of the Observer is not sufficient to depower a redstone torch. The redstone torch powers a line of redstone dust that sits on top of (the majority of) a loop of Hoppers. An item that has been placed in the first Hopper (after the wheat seed is planted the first time) cannot move to the next Hopper until the redstone signal is turned off by the Observer’s pulse. Every time the Observer detects a change in the state of the wheat plant, its pulse turns off this redstone signal, allowing the item to move to the next Hopper. In this way, we can count how many pulses (i.e., changes in state of the wheat plant) have occurred.
Not only does the change in the wheat’s growth stage trigger the Observer, so does the appearance of water (my method for harvesting), the disappearance of that water, and, obviously, the planting of a new seed.
Upon the seventh pulse from the Observer (meaning the wheat plant has reached maturity) the item goes into a hopper that has no piece of redstone on top and therefore no redstone signal disabling it. As it passes through this hopper, a Comparator detects the presence of the item and emits a new redstone signal. This signal will ultimately trigger two separate mechanisms: a harvest mechanism and a gathering system.
Auto-Harvesting With Water
I use a Dispenser with a water bucket placed above the center of my wheat farm to harvest the mature wheat. To make this work, we have to send the redstone signal generated by the maturing of the wheat up to the Dispenser and split it into two separate signals: one to pour the water and one to stop the water. There are different ways to do this. Here’s how I did it.
When the wheat plant reaches maturity and triggers the second redstone signal, this system effectively sends two separate pulses to the Dispenser, turning it on and then off again long enough to break all the wheat plants and send most of them to the sides of the wheat field. All that’s left is to harvest them. I use a Hopper Cart directly under the farmland to collect the wheat. Because Hopper Cart harvesting is a concept that really could be used in other projects (and because this post is already running a little long), I’ve posted about that separately here.
One last note: this exact setup can also be used for farming potatoes and carrots. Even though they appear to have only four growth stages, in fact they both have eight growth stages, but some of the stages use the same graphics. To farm beetroot would take a slight modification, because it only has four growth stages in actuality, so you can either use fewer Hoppers or simply remove the redstone from four of the Hoppers. The same goes for Nether Wart on Soul Sand. So the Observer block used with a redstone counter system (and there are others that are not so iron intensive) opens up a whole world of Minecraft automation that was unknown before 1.11.