Creating a basic cobblestone generator is pretty easy. Create a periodic redstone clock (there are tutorials all over the web on how to create a clock in Minecraft), make lava meet water, and piston to success.
This works great and all, but it requires timing the clock correctly so that the piston gives the streams enough time to generate a new cobblestone. While not altogether that complicated, I wondered if I could make it more intuitive and direct: have the cobblestone generated pass the signal that causes the piston to fire.
A “self-propelling” piston is pretty simple: pass a charge through the block to be pushed and connect it to the piston. That’s how this clock works:
I tried retaining the design of my original cobblestone generator, but it turns out that wasn’t going to work for some key reasons. See the following image:
Notice that all four cardinal directions are being used. This leaves nowhere for a charge to be passed through on the horizontal plane. My instant thought is to have the charge propagate vertically through the block. The main problem though: Any current method would require something to be placed on top of the block for charge to propagated vertically through it. Obviously since we just magically alchemy’d this cobblestone block into existence, nothing can be placed on top of it; it would have to have been there at the time of creation. So what if we moved one of the source blocks to fall from the vertical direction? Then this design would work, right?
Unfortunately, the water tends to flow down into the hole and wipe out that redstone torch before the cobblestone can be created.
So the last solution? Piston on the bottom, air on top, charge through one horizontal direction, and the lava and water through the other.
My first thought is that this would work:
Unfortunately, pistons have the unique property that they are considered “powered” if the block above them, even if there is none, is considered “powered”:
The solution, unfortunately, is a sticky piston that extends a regular piston that can push the block:
What happens if we insert a block? This…
The power source that provides the original charge also powers the top piston once the sticky piston extends. After the block is pushed away, the charge is no longer propagated through, and the sticky piston retracts. Sticky pistons cannot retract extended pistons, and so the piston remains pushed away and extended. So things need to happen in this order:
- Block created/placed
- Charge propagates through
- Sticky piston extends
- Top piston extends
- Top piston retracts
- Sticky piston retracts
The difficulty presented is getting this particular timing working, but let’s give it a go:
Here are the important components: The repeaters on the right serve the purpose of extending the length of the charge to the sticky piston. The locking repeater allows it to last an extra 2 ticks after the other repeater loses its charge. On the left we have an inverter that initially powers the stone being created. A repeater delays the change of the torch from on to off by 3 ticks, and gives us enough time to extend both pistons before it turns off, causing the top piston to retract. After it retracts, the sticky piston immediately retracts at the next tick.
As shown in the picture below, this is a working solution:
Let’s get some water and lava up in here.
It appears to be a working solution. I rearranged some of the wires from the previous picture to give myself a little more room in some cases, and compacted in others where it would affect my timings.
Can we make it better? Certainly. A couple more features would be nice:
- On-off switch
- Graceful failure when the piston can push no further.
- Redirection of the output horizontally.
I’ll do a follow up post implementing some of these features soon. Here’s the product of my original attempt: