Minecraft – way to make a piston push any block in front of it, when that block is placed

minecraft-java-editionminecraft-redstone

I'm having trouble setting up fish farms… I can kill the elder guardians without much trouble, but when it comes time to drain the ocean around the temple they always manage to kill me. My last attempt was the closest I've ever been, managed to create about one third of the sand wall (all of one side, half of another). A guardian slipped through the gap, zapped me and didn't give up the chase soon enough.

It occurred to me that swimming in the ocean is a poor way to build a sand wall. My first idea was to have a dispenser facing down one block above the water, and a block below it diagonally so the sand would place. But it turns out that it only drops the sand as an item, won't place it.

But what if I had a piston facing sideways (in the direction the wall is build) on top of the water? I'd need a block underneath it diagonally, and I could place sand on it. The piston would push it over, it would fall, and I could place another block there. But once that column was finished… I could continue to place blocks in that same place, they would push out across the newly formed column, and fall beside it, making column number two. And so on.

Since the piston can push up to 12 blocks, I could continue this for quite a while, and then carefully move the (hopefully simple) contraption 12 blocks to the end, and repeat the process. I'd very rarely be near the gap in the wall and I could even sandbag up my operating position as I go.

It won't help much if I have to push the button every time the piston fires though… this is where I think I need a block update detector. But many are bulky. What's the simplest one there is?

Alternatively, it might be ok if it just cycled on and off quickly without the bud. Would be slightly harder to use, maybe a little slower… but I don't have any idea what the best clock might be for this. Are there any good candidates for that?

Best Answer

Place a piston 1 block above the water, with a redstone torch diagonally 1 down and 1 in the direction the piston is facing. Place solid blocks to the same side of the piston and redstone torch, and then place a piece of redstone dust on the lower cobblestone:

Image showing mechanism

You should then place your sand on top of the redstone torch:

Sand pushing animation

You could build this 2 further down, but you'd have to deal with making sure the water doesn't wash away the torch or redstone dust.