Fans of mechanical builds will appreciate this guide, as today we are going to create a storage facility with restricted access. We will be constructing the mechanism in Minecraft PE.
Let’s start with the fence. We’ll arrange wooden fences and nether fences in three rows like this (note that there was an error in my screenshot, which is corrected below):
Next, let’s set up the area for chests along with the chests themselves:
Now, we’ll place two pistons, one on top and one at the bottom:
We will surround the fence with blocks:
Next, we’ll connect redstone signal to the lower piston like this:
On the side, above the redstone, we will place a block of redstone and a sticky piston facing it, two blocks higher:
Then, we add a redstone torch and lever one block higher:
Continuing upwards, we install a piston facing up and an observer. (Note: to correctly place the observer, first put down the piston, then from the inside, attach the observer to it. Compare its position with the screenshot). Also, connect the observer to the upper piston with redstone:
What we have now looks like this:
At this point, some may wonder how the chests are locked? The reason is that the nether fence and wooden fence do not connect with each other, so when the middle row of fence blocks shifts, you gain access to the chests due to the gap created between the rows of fences.