Minecraft – 2×1 Piston Door (replaces top block)

minecraft-java-editionminecraft-redstone

I've been looking all over youtube, I know how to make a 2 by 1 vertical door at this point, but for this build I'd like to have 2 iron bars be the door but when it opens for the bottom block of the door be replaced to a stone block.

I feel like ive seen this technique of replacing the blocks using pistons before but i couldn't find anything online(maybe i just don't know what to look up honestly)

I'm gonna attach some images that will better explain what i'm trying to do.
Closed
Open
wiattd

Best Answer

You can make it using the following steps:

step zero

enter image description here

enter image description here

enter image description here

Note that it is literally impossible to make the bottom of the door (i.e. the block in front of the bottom bars) be another block than a slime block or a sticky piston. The steps are, I hope, clearly shown. I didn't connect the blocks to a redstone circuit as that is supposed to be the easy part. You can do the same for the upper bars if you want them to 'disappear' from sight too.