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 most entities colliding with them(dropped items, some fired arrows, xp points, most mobs, player, etc.) however thrown potions, some arrows, thrown ender pearls, and thrown eyes of ender will not, also, destroying the wire while not holding shears will trigger a small pulse. 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 40 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. This can be changed by putting a Block Update Detector (BUD) switch adjacent to the tripwire hook. Shearing a string changes the hook's state, in the form of a block update, and the BUD switch sends out a pulse. With this setup a trap will be set off and there's nothing you can do about it. The string must lie in a straight line between the two hooks, or else it will not activate when someone steps on it.

The tripwire will send a pulse of powered redstone, similar to how you press a button or stand on a pressure pad.

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 sitting 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 utilized in conjunction with detector rails to detect if a passing cart has a player in it. (Assuming there are no mobs riding around, of course!) This greatly 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.
 * 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.
 * Tripwire hooks, as well as the tripwire, can be "washed away" by water. If the tripwire is washed away first, the trap will act as if it was broken normally, without shears, and sends a charge before becoming inactive.