Piston

Pistons are blocks capable of pushing or pulling adjacent blocks, depending on the direction they face. The original version of this feature was a mod posted on the Minecraft Forums by Hippoplatimus. Pistons were added in version 1.7, along with Sticky Pistons.

Functionality
Piston functions include:
 * Pushing (and pulling if sticky) at least 1 block, and at most 12. Pulling will always only pull 1 block, while pushing will push between 1 and 12 blocks.
 * Moving the player and other mobs, as well as entities.
 * The ability to toggle fluid flows like a flood gate.
 * Redstone triggered, so that en masse automated block is possible (e.g. piston walls and retractable bridges).
 * Pistons can be moved by other pistons, but only when the piston is not extended.

Pistons cannot move blocks like obsidian and bedrock to avoid abuse, and any blocks with tile entities, as moving blocks are stored as tile entities on the piston. If any such block would be moved by the piston, then the piston does not extend.

If pistons push most "attached to a block” blocks such as levers, torches, redstone, etc., then they will be detached and drop as an item; however, rails can be moved by pistons, but will not maintain their orientations.

Trivia

 * Pistons are slightly altered from the original mod. For example, while the original Piston Mod could propel gravity-affected blocks, as well as entities and mobs several meters vertically or horizontally, vanilla Pistons do not. However, if a gravity-affected block is sitting on an upward-facing piston, and the piston retracts, the block will fall.
 * Pistons cannot be used to 'crush' players or mobs against walls. A piston will simply pass through them if attempted.
 * Pistons appear to be destroyed at the same rate, regardless of the tool used.
 * If attached from up above, pistons may be able to push blocks downwards and suffocate the player or mobs. This can be very useful for mob traps.
 * If a water spring is placed on top of a piston, it will disappear if the piston is extended.
 * Pistons can push dropped items as well, which can be useful to collect mob grinder items on command.
 * Pistons can't move chests, note blocks, furnaces, or any other block that has a tile entitiy.

Bugs

 * When a piston is placed facing upwards, and a block with a pressure plate on top of it is placed on the piston, activating the pressure will make the "Saving Chunks..." screen appear. In singleplayer this will, as you might understand, always make your game load to the "Saving Chunks..." screen, unless you change your spawn position in a Minecraft-editor.
 * When gravity-affected blocks are pushed over a hole in the ground and quickly pulled back again (or pushed away with another piston), a duplicate block appears in the hole.
 * At first during the 1.7 update some pistons appeared purple.
 * When attempting to push ice blocks, they will turn into water in their original position, and the piston head will disappear. The piston will return to normal once retracted.
 * When Pistons point down it is possible to glitch through the pistons, demonstrated here:


 * When a piston or a sticky piston is placed upwards (with the redstone input being located 1 block bellow) and a rapid pulse signal is applied to the redstone, if the player tries to break the piston or sticky piston with any item, block, tool, or hand, the piston or sticky piston will break, dropping an item, but leaving a breakable piston head in mid-air. This is demonstrated in the following video:


 * Beds can be pushed lengthwise with a piston, but if pulled back with a sticky piston the bed will split in half, dropping a bed item (although the bed can still be used.) Bed_piston.jpg
 * Powering pistons with a redstone torch in some cases seems to always consider the torch as "on", even if powered off.
 * When a torch or redstone torch is placed on a piston and the piston is removed, the torch will float in mid-air.
 * When a piston attempts to push a redstone wire, the game crashes with a "Saving Chunks..." screen, corrupting the world as well.


 * When powered, both types of pistons cannot power surrounding blocks.
 * Sticky pistons that are being given power will not be "pulled" by other sticky pistons.