Tripwire Hook

Tripwire Hooks are a type of switch that can be placed across a gap for the player to activate. They are activated by the player stepping on them or destroying the wire while not holding shears. Tripwires are one of the five types of switches to be introduced into the game.

Usage
The player first attaches Hooks across from each other at most 19 blocks apart. Then, the player must place String across the gap between them. The string can "float" across this gap, not requiring blocks beneath it to be placed. Once connected, the hooks will lower. At this point, walking on, or destroying the string (without shears) will cause redstone current from both hooks. The string must lie in a straight line between the two hooks, or else it will not activate when someone steps on it.

A mob or player of a great enough height to be partly inside a block will trigger the wire in that block, therefore they can also trigger a tripwire while sat inside a minecart, with the tripwire being placed one block above the track. The string cannot be placed in the same block as the track. This can be utilised in conjunction with detector rails to detect if a passing cart has a player in it. (Assuming there are no mobs riding around, or course!) This much simplifies previous methods for doing this, and allows for easy cart-return mechanisms to prevent empty carts travelling around a minecart system.

The same can also be done with tripwires of varying heights and a pressure plate to detect something walking under them, thus allowing detection of the height of any mob (to the nearest block) walking through a doorway.

History
On May 28th, 2012, Dinnerbone began tweeting of a new idea he had. He began posting pictures and eventually released a video on Tripwires. Before this, the player could not place string on the ground. Dinnerbone credited the idea to his fiancee MissMarzenia.

Tripwire Hooks were added to the game in Snapshot 12w22a.

Trivia

 * Although placing String on the ground is mainly for creating Tripwires, String does not need to be used in this way and can be placed anywhere the player likes.
 * Tripwires can detect players in minecarts if they're placed over tracks.
 * Tripwires will only detect living entities, like a pressure plate.
 * As above, this allows for the formation of a 'stone' pressure plate for minecarts, which detects mobs but not the minecart. It also allows for automated boarding.
 * Tripwire can be "stacked" on itself when being placed, like stacking signs on signs, but it will still float after removing the tripwire/block under it.