Pistons push blocks into a storage area that can contain a massive amount of blocks. Upon input, the storage area empties back into a piston fed stream, clearing the stored blocks.
As for the basics, I am thinking 1 piston feeds into a line of ~10 pistons, which feeds a wall of ~10x10 pistons, a typical block storage. The trick will be the triggered outlet, and feeding in clearing blocks in such a way as to empty the desired blocks. The clearing blocks will likely be gravel. It is not necessary for the clearing blocks to be removed themselves if the action of filling the storage removes them.
I'm going to be working on this, but I don't have a whole lot of time to put into it. Some of you geniuses will likely beat me to the punch, and I am ok with that.
I've started 2 projects that require this. I had the same idea as another inventor in dropping gravel/sand on trees to move their wood into a piston stream automatically. I got the automatically moving the wood part, and saw a video doing the same thing, but it is somewhat pointless unless the wood is stored, and then retrieved to be fed to a central harvesting location, otherwise you must manually move throughout the area the wood feeds to, which is as much work as chopping them down to begin with. A block buffer would do this job.
Also, I intend to bring Ice to my base. I have an ice factory going, feeding into 1 piston stream generating ice at a fair clip.... but my base is half a map away. I have reached the point where the chunks generating the ice and feeding the block stream unload, and the blocks stop coming at that point. I need a clearing mechanism to push it through. Even after I do that though, it will only be as many blocks as are in the stream at that time. Much more efficient to make a buffer at each end of the loaded chunks, and feed hundreds of blocks from one end to the other.
Is anyone up to the challenge? This buffer can be used for countless other things, storage for generated cobble to autorepair buildings quicker, and all kinds of things I haven't thought of. Who wants to make their mark on the inventing scene?
His tree farm is only storage, it does not push the blocks back out afterwards. That my friend is the real challenge. I have been working on a storage like this for a scanner project. So far I have a working model that stores about 150 blocks, but can be expanded larger, it is just tall. I dont have time to get a schematic right now but if there's interest I can show you guys.
I think I have this worked out conceptually, I just need to put it into practice.
Input is a single horizontal piston. A line of 10 vertical pistons pointing down above the input stream. 10 blocks leaves space for a sensor at the end to tell when the line is full. This becomes important later. A wall of 10 x 10 pistons on the other horizontal axis. A stream of single blocks gets pushed forward into a line, that line gets pushed down into a wall, the wall gets pushed left into a block. 10 forward x 10 down x 12 left = 1200 block storage.
Output is opposite the input corner (on all axis), bottom left back. There is a single piston pushing down from the top, so the output is pushed down. There is a vertical line of pistons on the forward face along the left edge, pushing forward into the output column. The other horizontal axis reuses the 10x10 wall. There is also a line of pistons along the bottom left edge, below and to the left, facing right, thier purpose is the extended piston supports gravity blocks, thier retraction allows a wall of gravel to fall.
Triggering output will feed gravel into the stream. Single pushes output down, Line pushes forward (only top moves), Wall pushes left (only closest moves). This action first fills the top forward edge, then top forward and top left edges, then back left edge, at which point a gravity filter has all the gravel drop out of the back left edge. The same action has the left edge advance toward the exit, then fills up front left edge. Front Top, Front Left, Top Left and Back left all fill with gravel, then gravel drops from back left again. Again front left advances, this time with 2 layres of gravel. Left wall of desired block is cleared and replaced with gravel in this fashion. At this point, one block of gravel goes in, one block of gravel falls through the gravity filter. A sensor detects this (not sequential gravel, which happens when a pillar of gravel falls, but gravel, new block pushed, gravel again) and retracts the piston line supporting the leftmost wall of gravel. The entire left wall falls, leaving space for the predifined action to push the remaining storage rectangle left. The rightmost wall fills with gravel, then this is repeated, until only gravel remains.
The action of filling, because it waits for the sensors to push the line down, and then the wall out, pushes the gravel left, the retracted pistons fail to support them and allow them to gravity feed into storage to restart the output cycle.
This should work with any blocks barring sand and gravel, even glass and ice. It may take me a couple days to complete a prototype though, this is a massive project. If anyone else wants to give it a go, by all means, let me know how it works out.