Welcome to my semi-automatic Observer-based wheat farm.

Welcome to my semi-automatic Observer-based wheat farm.

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.

Adjacent to my ugly vanilla house, I now have a basic 9x9 farm, surrounded by Oak Leaves blocks (I'll explain the reason below). The shed in the upper corner houses the observer and some redstone magic.

A basic 9×9 wheat farm, with a few upgrades.

This is the observing side of the Observer block, facing the corner of the wheat field that is most likely to grow the slowest.

This is the observing side of the Observer block, facing the corner of the wheat field that is most likely to grow the slowest.

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.

The Repeater must be on 2-ticks, otherwise the redstone torch will not depower.

The Repeater must be on 2-ticks, otherwise the redstone torch will not depower.

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.

The Hopper loop that counts the stages of wheat growth. The Observer is down and right from the edge of this pic. The redstone torch in the background is something different.

The Hopper loop that counts the stages of wheat growth. The Observer is down and right from the edge of this pic. The redstone torch in the background is something different. A single item is placed in the Hopper in the bottom left of this pic after the initial planting of wheat.

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.

This graphic explains the direction of the Hoppers and how the single item moves through them.

This graphic explains the direction of the Hoppers and how the single item moves through them.

A single item (it doesn't matter what) is placed in the first hopper after the wheat has been planted. This can be done manually or through a reset button.

A single item (it doesn’t matter what) is placed in the first hopper after the wheat has been planted. This can be done manually or through a reset button or system. My design resets automatically.

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.

There are different ways to do this, but I have placed my Comparator next to the second of the Hoppers that have no redstone dust on them.

There are different ways to do this, but I have placed my Comparator next to the second of the Hoppers that have no redstone dust on them.

This latest redstone signal splits in two. One direction (going off to the right in the picture) triggers my collection system. The other connected to the redstone torch on the left) triggers my water harvesting system,

This latest redstone signal splits in two. One direction (going off to the right in the picture) triggers my collection system. The other connected to the redstone torch on the left) triggers my water harvesting 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.

The harvesting system starts here. The second redstone signal is sent upward.

The harvesting system starts here. The second redstone signal is sent upward via a redstone torch column.

The second redstone torch powers two parallel lines of redstone. Using Repeaters, one line gets to the Dispenser faster than the other.

The second redstone torch (which is depowered by default) powers two parallel lines of redstone. Using Repeaters, the line on the left gets to the Dispenser faster than the one on the right.

I use three Repeaters on 4 ticks each on the right line to get it sufficiently delayed.

I use three Repeaters on 4 ticks each on the right line to get it sufficiently delayed.

Both lines join up and head out to a Dispenser that faces downward directly over the center of my wheat farm.

Both lines join up and head out to a Dispenser that faces downward directly over the center of my wheat farm.

A water bucket is placed in the Dispenser.

A water bucket is placed in the Dispenser.

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.

Advertisements