[Edit: I’ve since abandoned this approach in favour of something a little different.]
Ok, I’m on a roll it seems. Pistons are having me pretty much reconsider everything I’ve done to date in Minecraft. This post involves me retiring my very basic cobblestone factory with a variant that uses a piston to make it all buried and stuff. Here’s the obligatory video with a walkthrough of the redstone circuit employed to do it:
The basic principle is to allow lava to flow next to a water block, creating a cobblestone block (around the 40 second mark of the video), and to have the piston attempt to push the cobblestone out of the way to create another. The piston is attached to a basic pulse circuit, with redstone repeaters to slow the piston down to a point where it gives the somewhat random lava a chance to flow again after cobblestone removal.
Here’s a rough and ready schematic of the “essence” of the circuit courtesy of Minedraft.net:
Piston Driven Cobblestone Factory Schematic
Again, as Minedraft.net doesn’t seem to have the entire set of craftable items to choose from, I’ve substituted the piston above with a furnace, and the redstone repeaters with basic stone. The redstone repeaters are directional, facing southward. Three of them are set at their greatest delay, and the last is set at its second-fastest delay. This cumulative delay seems about right for ensuring that the piston doesn’t fire until the lava and water have created a new cobblestone block.
The dirt block beside the redstone torch is a vanilla NOT gate (so any old block will do, so long as the redstone torch is attached to the opposite side to where the block receives its input).
The water is just a single bucket-full, starting ar the far-right of the schematic. At the 8 block mark, it peters out just before flowing into what I’ll call the “cobblestone channel”.
I’ve also added a lever to allow me to temporarily stop the piston from firing for maintenance (not in the schematic). Also, I’ve added an obsidian block directly under the deployment area so I don’t dig up the block underneath the newly minted cobblestone, and as you can see from the video, the new block pops those I’ve just harvested right up into my inventory. Lazy cobblestone collection! Larry Wall would surely approve!
Finally, a word of warning. There seems to be a bug around redstone repeaters where time is reset to 0 (or, login for a single-user game), the redstone repeater that was active upon time reset is where the circuit gets stuck. You can get it moving again by finding the zone of the circuit that is currently active, and just ripping up a square of the circuit, and relaying it. As there are also a couple of other bugs I’ve not encountered yet, I’ve added a glass block over a block of the circuit to see whether the circuit is correctly toggling states. [Update, 2011-11-26: The single-player version of the bug was fixed with the 1.0 release of Minecraft]
That’s it! Happy cobblestone farming.