Adventures in Redstone

It is always something relatively simple that sets me down a path towards madness. In this case I was annoyed by just how much time it took to harvest a full field of produce in my Minecraft world. This lead me to research ways of making this work better, namely ways of harvesting an entire field at once. Essentially far as I could tell you have two different methods.

  • The Water Method – this involves setting up a switch system that floods your field and pushes all of the produce towards a single collection point, and then allows you to reset the circuit and dam up the river once again. The positive is this collects all of the things that were just harvested but the negative is it requires you to build an incline since water blocks will only spread 7 blocks before needing to switch elevation. To do this most optimally this ends up creating a field that is awkward to plant.
  • The Piston Method – one of the interesting characteristics of pushing a block with a piston is that it detaches anything that is on the surface. So say you had a torch on a block and you pushed that block, it would end up knocking the torch off of the surface. The same goes with tilled blocks and crops. The idea is that you push the blocks which causes all of the crops to be harvested allowing for you to collect them.

Redstone circuitry has always frightened me more than a little bit in Minecraft. I could get extremely simple automations to work, like opening a door from a switch but always seemed to struggle when it came to anything more complicated. So I now had before me the task of trying to figure out how to trigger six banks of four pistons all from the flip of a single switch. Pistons can move 12 blocks and if you attempt to move anything more than that they just fail completely. My field is laid out with a row of water every 5th block, though in truth I could have gotten by with significantly less water were I planning a bit better. Four blocks at once however is pretty much the upper bound of what I was willing to attempt to fire as a single mechanism.

I fired up a super flat demo world for the purpose of allowing me to sort out the mechanics in creative mode before attempting to apply the same logic in my single player world. I’ve not reached a point where I have unlimited supplies so I needed to be fairly judicious in the application of my resources. Even then I still built it wrong, but we will get into that later. Essentially my idea was to use sticky pistons and push the blocks to one side and in theory retract everything when I turned off the switch. The above image shows the final circuit design that I landed upon. Essentially a matrix of blocks connected by redstone with a single repeater to help boost the signal strength since redstone will only conduct for 15 spaces.

From there I decided to go ahead and create a larger scale mock up of the final machine, this time doing four iterations of the same modular design instead of the final six. It was around this point that I realized things were not going to work as I had originally envisioned them. This came from a simple misunderstanding of how sticky pistons actually work. In my mind they pushed a column of blocks and then retracted that same column of blocks as I had seen this behavior over and over in builds that relied on them in a vertical stack. When used horizontally they exhibit a completely different behavior of just pushing all 12 blocks and then retracting only the block directly making contact with the piston.

This lead me down the rabbit hole of not only needing six banks of four pistons all firing at once… but at the same time requiring a second series of six banks of four pistons firing in reaction to the first bank firing. Essentially I needed to shift all the blocks to one side and then trigger a counter event that pushed all of the blocks back to the other side. It is through the process of building something that you often learn how you SHOULD have built it. Where I thinking more clearly I would have simply set the circuit up so one side is always on and the other side is always off and the switch just toggles between those two states. However that is not the path I actually went down.

Meet the fearless observer block. The side with the cute little face sets towards a block of some sort that has the ability to change states. When this state changes the observer sends out a pulse of Redstone energy triggered out the backside of the block that can be connected up to some mechanism of your choice. The pulse is similar to that of a button push and I decided I was going to try and harness this mechanism to create my back process of triggering the opposite banks of pistons to fire resetting the playfield back to its normal position.

This ended up being significantly more challenging than I would have expected. In my mind how this should have worked was that I set the observer facing the empty block that I had on one side and as soon as a block was pushed into that spot it would trigger the back loop of the process and push everything back. This did not work in practice I believe because I was using a lever to trigger the entire process. This is the sort of revelation that happens long after you have built the damned thing and not necessarily in the heat of problem solving. So instead I switched to watching the state of the piston on the first bank. In practice what happens is each time I extend a piston or retract a piston it sends a pulse. You can slow this process down a bit by adding an additional observer which I ended up doing to fine tune the order of operations a bit.

The above image is the end result built in my single player world. Now is where I talk about how I did this wrong. Firstly I should have used a button to fire the event, and I think had I done so my original idea of monitoring the empty block state would have made things work perfectly. The second critical flaw that I did was use sticky pistons. This is all due to my earlier fallacy that using a sticky piston would pull the entire column back into place, but instead only pulls a single block. What ends up happening in practice is that on the back leg of the journey… a single block stays attached to the piston when it retracts creating a less than optimal situation.

However since I crafted 48 sticky pistons and lack the materials to craft another 48 regular pistons… I am pretty much stuck with this design decision for the moment. What I did in order to counteract this is dive even further down the rabbit hole and farm up copious amounts of clay and dye and create a rows worth of glazed terracotta. This block has the unique property of not being able to adhere to a sticky piston and as a result gets pushed neatly back into the original position by the second set of pistons. The unfortunate part however is that I have now lost a full row worth of plant-able space due to this design flaw.

At some point I want to replace the pistons at least on the backhaul side in so I can reclaim that row of planting space. I ended up building a way down into the mechanism of the machine that way I could debug any problems that might come up. Additionally there is the off chance that some of the produce will pop off and then get pushed down into the lower machine cavity and this gives me a way to drop down and double check that this did not happen. There are a lot of things that I would change if I ever did this again, namely I would just stick to normal pistons on both sides given that the “sticky” nature only serves to complicate the process. If I find another cache of Iron I will potentially swap them out and then switch the entire mechanism to work off a button.

The problem with redstone is the same problem with most of my development projects. You have to sort of force yourself to walk away from them otherwise you will continue fiddling and “optimizing” them for eternity. I set out to build a machine that would harvest my field of crops in with the single push of a button and I accomplished that. If it weren’t for the water… I would consider building a Minecart hopper system that cycled around the field collecting anything that dropped but that really is a path of madness. As it stands now… I just need to go find some more Iron before I do much of anything else.