Tutorials/Piston uses

Since pistons were introduced in Beta 1.7, players have been experimenting with their potential uses. Below are some demonstrations and guides. The interest in pistons is their ability to manipulate the position of other blocks.

Please however keep in mind that as of the "Better Together" update on console editions that "Quasi-connectivity" has been removed and its function replaced with the observer block. In doing so, many of the contraptions listed below might have been made non-functional.

Flush piston doors
A flush piston door door is a piston door that is indistinguishable from a flat wall when closed.

Pros:
 * Easy to build.
 * Simple.
 * Requires few materials compared to hidden piston stairs.
 * Easy to modify. For example, you can add a hidden input device that is impossible to find without you already knowing about it, or modify it to open with a self-destructing lever, or you can use mods like OpenComputers and use the computer to request a password to open the door.

Cons:
 * To blend in well into the environment, you need a stone or dirt wall. Stone walls can be found on the mountains biome (and its variants).
 * If you need to build it on a plains biome or other flat terrain, you need to somehow blend the door on the environment. If this is impossible for some reason, your only choice is the hidden piston stairs.
 * Players can accidentally mine the door, as no one knows there's a door on the wall.

Small double piston extender
Small double piston extender that is resource friendly and easy to make.

Piston escalator
Uses pistons and different repeater timings to create a wavy motion that can propel the player up a number of levels.

3×3 piston door
This 3x3 piston door is reasonably small and reasonable fast.

This 3x3 piston door is incredibly fast at .3s opening and instant closing, but is somewhat large at 663 blocks.

4×4 piston door
This 4x4 is quite small at 180 blocks while not being horribly slow.

5x5 piston door
This 5x5 is extremely compact at 540 blocks while still opening quickly at 1.55s.

This 5x5 is more focused on speed, opening in 1.05s while still being somewhat compact at 858 blocks.

6x6 piston door
This 6x6 is very compact at 850 blocks while being somewhat fast at 2.45s opening.

7x7 piston door
This 7x7 is both fast and small only taking up 1463 blocks and opening in 3.45s.

Simplest 1×2 piston door
Uses 2 pistons to pull out the top and bottom of the door. Put a redstone torch powering each piston and connect them both as inverters. Put a lever on one block with wire on it, build a wall on the front, and it's done!

Another version of a 1x2 piston door can be seen here:

(1.12+) scalable piston door (up to 15×15)
Uses observer blocks for a design that can be easily scaled to any size up to 15 wide and 7 tall. The design is resource efficient enough to allow for the creation of larger doors even in survival mode.

Hidden door
For a door that is completely hidden except the lever/pressure plate/button to power it, you can use a piston door. A very simple version is one that just moves 2 blocks to the side with 2 sticky pistons, which are hidden inside a wall and are powered by redstone. To make some more complicated and fancy ones, you can get the blocks to move first away from the player, and then sideways, allowing for 2 wide doors and it also allows you to build it so that the door appears at the middle of a wall, instead of it only being possible to make it either in a corner or in a tunnel of the desired width of the door, because now all the pistons are behind it. You have to do some redstone wiring, though, and if you want to make the door 2 wide it needs at least 12 sticky pistons, 4 to move the blocks into the wall, 4 to move them sideways, and 4 to move the four pistons that moved the blocks sideways sideways. You have to make the delay from the input to the first four pistons, the ones that move the blocks into the wall, 2 ticks. Then split the redstone wires that go to the other 8 pistons; one way has a delay of 1 tick, the other one a delay of 4 ticks. Then after the delays you can join the wires again and bring them to the pistons. To make it more hidden, replace the blocks with bookcases. An example of this can be found below.

If you really want it to be invisible, remove the button or lever, and instead carry a redstone torch. Place it where the button was when you are ready to enter. It stays open until you exit but hey, who carries those things around randomly anyway?

You can also completely hide your button or lever by putting it underground in a specific place only you know of and once your in it can't be open from the outside. An example of that is below.

Piston Draw Bridge
A redstone operated "Sticky Piston Draw Bridge" that can be used to cross a lava pit, it also acts as a moat as it can expand and contract to reveal or hide a secret path.

Piston table
By placing an upward-facing piston on top of a redstone torch, one can easily and effectively create a 1x1 table. An example of a piston table with chairs below!

Scrolling display
This makes a columns of blocks move in sync. Make two rows of a movable material (it can only be 13 blocks long because the piston can only move it that far, can be as tall as you want) and make your image or message built into it. Use pistons to move the blocks across, then back, the across the other way, back to the front/beginning.

Dry docks
A dry dock can be made by reversing a Floodgate: instead of controlling the liquid, the player is controlling a solid. Place a piston facing upward in a 1 block deep pool of water and wire this piston to a lever. When a boat comes over the piston, flip the lever to raise the boat out of the water. This prevents the boat from being influenced by currents or being bumped.

A dry dock with an water powered launcher feature:

As an upgrade, using soul sand for the parts that come in direct contact with the boat helps conserve its durability.

Variable enchantment room
This design has three settings - low-level, medium-level, high-level. You can choose a level range depending on how much levels you have.

Self-repairing structures
Self-repairing structures use a piston cobblestone generator to endlessly create blocks that get pushed into place by pistons. The following video shows how to create a cobblestone generator, a simple clock and connect it all together to push cobblestone.

The following video shows a bigger, self-generating floor. By removing some blocks the same machine can also generate a wall, as shown in the video.

Self-repairing structures are not limited to cobblestone, however, it is by far the easiest material to manipulate as its generation can be fully automated.

Pistons can only push 12 blocks which limits the scale of the structure. Pistons cannot push chests, note blocks, obsidian, bedrock, spawners, or furnaces, so these can be used to stop a line of blocks before the 12 block limit is reached.

Moving vehicles/machines
Moving vehicles are a result of Java Edition 1.8 adding the capability to slime blocks and pistons, allowing adjacent blocks to attach to the slime block. How to make moving vehicles. You need 2 sticky pistons, 1 regular piston, 4 slime blocks and a redstone block. Go four blocks above ground and place a sticky piston, then put a slime block in front of that, go two down (underneath the piston) and on the second block put a regular piston and finally, put a sticky piston in front of the regular piston as showed.

Disappearing floor trap
When triggered, the section of the floor is withdrawn from below the target. This design is best used inside to hide the pistons and circuitry. This can easily be added to a tunnel. Under the floor, dig out a 2-block deep pit for each of the trap blocks you want to move. Mine out two blocks horizontally from each space where the trap floor goes and put a sticky piston at the back of each hole. In front of the sticky piston, replace the floor blocks (make sure that the trap block is the same as the regular floor blocks so as not to cause suspicion. In the space beneath the floor can be a long drop, lava, dispensers filled with arrows. For simplicity, we chose lava.



Triggering this is best done with a pressure plate, however, this can be difficult to hide from other players. You need to wire the pressure plate to the input of a NOT-gate and the pistons to the output. A delay can be helpful to ensure the player is over the right blocks when the trap triggers, which can be accomplished by putting in redstone repeaters. Stone pressure plates triggers only when players or mobs walk over, whereas wooden pressure plates trigger also for dropped items. Metal pressure plates act differently still. This trap is reset once the signal from the pressure plates is disabled.

Alternatively, the pistons could be connected to a lever. This requires input from the player, but can be activated when the target is above the trap, which removes the need for a delay.

You could also use sand or gravel to make a refillable trap, as well. Make sure to hide the refilling station for secrecy!

If you think this is bad, feel free to revert to the previous "version". Simple Floor Trap Tutorial!!

Hidden bridges
Like disappearing floors, but in reverse, hidden bridges show an impassible obstacle (usually lava or a long fall) to hinder other players or kill mobs. These bridges can be activated by lever to allow a player to cross, then deactivated on the other side or by a set delay, done by placing redstone repeaters and setting the second redstone torch to any four positions (Right clicking it). Adding multiple repeaters can make a longer delay if necessary.

Suffocation trap
When a piston moves a block into the same space, as the head of a mob or the player, the entity takes damage from suffocation. Tunnels work well for this type of trap because the area is small and can hide the components.

In a tunnel, mine out the ceiling an additional two blocks high. At the top of every part of the tunnel, place a sticky piston, then replace the ceiling with the same material used in the tunnel. This trap can be triggered in a number of ways, the simplest being a pressure plate or lever. If you choose to use a lever, this trap can also act as a door, since aggressive non-baby mobs won't be able to enter. For this example, we'll use a pressure plate.

Since players are pushed into the nearest air pocket to avoid suffocation, the trigger should be in the middle of a series. To ensure the trap doesn't reset too early, add an RS-NOR latch that is either reset manually or by an automatic delay.

You can also make a piston door, mine two blocks down and place a slab on the bottom block(s), so the thief or griefer who activates it can't escape, but can still be suffocated.

Floodgate
One of the piston's most important uses is its ability to stop fluids. A floodgate is a device that does just that. Fluids don't destroy pressure plates, which makes them ideal for triggering this trap. In a tunnel, have a pressure plate activate an RS-NOR latch that blocks the player into that tunnel, which also minimizes other damage caused by the fluid. From the same output, have the floodgates open, dropping lava on the target.

Hidden chest/store room
A redstone operated "Sticky Piston Hidden Room" that is ideally big enough to hold a large chest, furnace and a crafting table, easily hidden, but very bulky, remove lever to leave just a bare wall! Easy To Follow Tutorial

Farming
To see the uses of pistons in farming, see the respective farming tutorial.

Light switches
Pistons can be used to cover and uncover holes with light sources. This can be triggered by a lever or a button on a T flip-flop.

Players tend to use glowstone for lighting, however, lava is another viable method. A lava light uses an opaque block to hold the source block of lava from the area it flows into (generally a glass tube). Since lava can flow, it can be a very space efficient light source. However, lava takes a long time to dissipate. If you need to flip a switch for immediate darkness, flowing lava lamps are not recommended. However, you may want to consider using a redstone lamp, as it tends to be more resource friendly.

Since light levels affect mob spawning, light switches can activate and deactivate a mob farm.

Caution: ''This video uses the piston mod, which was released before it was implemented in the game. They function identically though.''

Mining
Pistons can be used to locate caves through solid rock. In order to do so, one places the piston on the ground facing the ground, on the ceiling facing the ceiling, or facing straight into any wall. The piston is then powered. If the piston extends, it indicates an opening within 12 blocks. If it does not extend, then there are at least 12 blocks in that direction. This allows a player to find caves from nothing more than a 2x2 tunnel.

The effectiveness of this technique is limited. Close caves have sounds (either mobs or ambient sounds) to indicate whether or not a cave is nearby. The limit of 12 blocks can also hinder this method.

A variation can be used in a 1x2 passage, is a video of it in action. The basic idea is the same except the torches are placed on the wall above the pistons, and you use a piston facing to each side not just one. There are only 2 positions you place torches in, above the side-facing piston which is touching the sticky piston, and above the forward facing piston. As they are wall mounted, placing the torch above the side-facing piston powers both side-facing pistons as well as the sticky piston, saving time.

Minecart direction shifter
This small device is a shifter for minecart tracks. Using this device, you can choose to ride your minecart AFK or switch tracks as desired.

Showcase: Track Switcher

Locking chests
A chest with an opaque block above it cannot be opened. A sticky piston can be used to replace or remove that block, effectively locking the chest and its contents. Note that chests themselves cannot be moved by pistons. This can be combined with a combination lock for added security.

There is a disadvantage, though, griefers or theifs may just break the block protecting the chest or the chest itself.

Tutorial for a locking chest below!

Free standing self-refilling anvil system flush with floor
This video showcases an anvil setup for easy access. It is huge, but flush with the floor and easily usable. Anvil system

Modular button speedlock using pistons
This video showcases a Modular Button speedlock, in which you have to press the buttons in a limited time and a very weird way, in order to open the door. Button speedlock

Upgrade system for minigames
In this video, the creator shows an easy design for an upgrade system with various uses in minigames or adventure maps.

Tileable upward 1 wide double extender
This video showcases a small tileable horizontal double extender in this design everything but the input is flush as well.

Tileable ceiling double extender
Here we have a tileable ceiling double extender.

1 wide double extender (downward)
This is a Double extender. This time its directed downward.

1 wide horizontal double piston extender
Here we have a very small Double extender, which is horizontal and directed upward.