Piston

Pistons are blocks capable of pushing most blocks, depending on the direction they are facing. .

History
The original piston was a mod posted on the Minecraft Forums by Hippoplatimus. The code for that version was given to Jeb, who then worked on shortly implementing them into vanilla Minecraft. However, due to his work on the Pocket Edition, pistons were delayed, and were not released for the 1.5 update nor for the 1.6 update. Finally, when the Pocket Edition was good enough to show at E3, Jeb went back to work on the PC version of Minecraft and pistons were finally added in version 1.7, including Sticky Pistons.

Functionality and Usage
Piston functions include:
 * Pushing at least 1 block, and at most 12 blocks.
 * Moving entities: the Player, mobs, dropped items and blocks, primed TNTs, etc.
 * The ability to toggle fluids flows like a flood gate.
 * Pistons are redstone triggered, so that en masse automated block is possible (e.g. piston walls, retractable bridges and Automatic Doors).

Pistons cannot move blocks like obsidian and bedrock to avoid abuse, and any blocks with tile entities(like note blocks and chests), as moving blocks are stored as tile entities on the piston. If any such block is tried to be moved by a piston, then the piston will 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 retain their original orientations.

When toggled between on and off rapidly, with a gravity affected block (such as sand) above it, a piston will eventually break the block, which can be picked up again.

Pistons can be used to make self-repairing bridges by using cobblestone from a cobblestone generator.

Differences
Differences of the vanilla type in comparison to the mod version:

Up-sides:
 * Pistons now have a much lowered ingredient values, so building them is much, much cheaper.
 * "Upgrading" a piston into a sticky piston is possible with a piston and a slime ball on top of it in the crafting table.

Down-sides:
 * Can no longer thrust blocks and items upwards and send them flying.
 * Pistons must be removed and placed again to change their orientation, rather than just right clicking.
 * Slimes may be difficult to find, and even more difficult to deal with depending on their size.
 * Sticky pistons cannot be directly crafted. Instead, two separate crafting operations must be done (ingredients into piston, piston and slimeball into sticky piston).

Trivia

 * Pistons are slightly altered from the original mod. For example, the original Piston Mod could propel gravity-affected blocks, as well as entities and mobs several meters vertically or horizontally, while vanilla Pistons cannot do this. However, if a gravity-affected block is sitting on an upward-facing piston, and the piston retracts, the block will fall.
 * If a piston pushes a gravity-affected block over a hole, the block will fall, even if attached to a sticky piston.
 * Pistons cannot be used to 'crush' players or mobs against walls. A piston will simply pass through them if this is attempted. However, blocks being pushed by piston will crush players and mobs and suffocate them, making it useful for traps.
 * Pistons are destroyed faster using a sword, however, it counts as two uses towards the sword's durability.
 * 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. This also applies to lava springs.
 * Pistons can be placed near cacti so that when they are activated, and if the pushing end is adjacent to the base of a cactus, the cactus will break.
 * If a piston pushes a leaf block, it will break.
 * If you try to move a door with a piston, it will break. The piston can be used like a battering ram.
 * If you push a burning block, the block will be put out. If you push a row of burning blocks, they will all stay on fire but the last one.
 * Pistons cannot push any block above level 127.

Bugs

 * 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.
 * Any pushable block can be duplicated by using a technique similar to the above. Stick piston A pushes block and sticks to it. Then while you have Sticky Piston A pull back the block, have Piston B attempt to push that same block 1 tick later. The result is that the block is duplicated so that there is now 2 of the same block (one stuck to the retracted piston A, and the other pushed out by B).
 * 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 powered, both types of pistons cannot power surrounding blocks.
 * 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.)
 * 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 Pistons point down it is possible to glitch through the pistons,.
 * It is also possible to glitch through a retracting piston while walking against it.
 * When a sticky piston pulls a door, it becomes a half door attached to the piston.
 * A piston attached to a sticky piston may disappear when extended into flowing water.
 * Light passes through pistons, both normal and sticky, powered and unpowered of both types.
 * When placing a piston on top of another with both facing up and an active redstone power source next to the top most piston, the piston's texture will glitch and all sides of the top most piston will display the wooden part. This also works for the sticky piston.
 * If you break the piston arm, it will sometimes drop two pistons.
 * Placing a lever 1 block above and to the side of a piston and then activating the lever will cause the game to crash and will crash every time you try to join the world which has this bug.
 * 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..