Redstone mechanics

Redstone mechanics provide Minecraft with a loose analogue to electricity, which is useful for controlling and activating a variety of mechanisms. Redstone circuits and devices have many uses including automatic farms, controlling doorways, changeable or mobile buildings, transporting players and mobs, and more. Some relevant pages include:


 * Redstone Dust is the core of redstone mechanics. Mined from Redstone Ore, the dust can be placed to form "redstone wires" to carry signals, or crafted into other devices.
 * Components lists and describes the various blocks which interacts with or are affected by redstone power.
 * Redstone Circuits covers the basics of redstone circuitry, including summaries of the basic circuit types and the blocks (e.g., doors, pistons) which can be controlled by redstone.
 * Tutorials/Mechanisms lists and describes a variety of more complex projects that can be made with redstone.

Redstone tick
A redstone tick is a unit of time that is equal to two game ticks, 0.1 seconds. Most redstone components take a multiple of a redstone tick to change states. Redstone torches, redstone repeaters, and mechanism components require one or more ticks to change state, so it can take several ticks for a signal to propagate through a complicated circuit.

Redstone ticks differ from "game ticks" (20 per second) and "block ticks" (block updates that occur at each game tick). When discussing redstone circuits, a "tick" is always a redstone tick, unless otherwise specified.

Redstone components
A Redstone component is a block that provides some purpose to a Redstone circuit.


 * A power component provides power to other parts of a circuit—e.g., redstone torches, buttons, levers, redstone blocks, target blocks, etc. Some of these fall into one of three overlapping subgroups:
 * Switches provide power depending on request by the player. Buttons and levers are switches.
 * Sensors provide power or signals (see below) in response to some environmental condition. Pressure plate s and observers are sensors, and comparators can be used as sensors.  Note that some pressure plates can be triggered by a player standing on them, which also qualifies them as switches.
 * Logic components provide power conditionally, depending on their input conditions. Redstone torches, and comparators are classic logic components; redstone wire and ordinary opaque blocks can also be used to combine signals in various ways.
 * A transmission component passes power from one part of the circuit to another. Redstone dust (placed as redstone wire) is the most fundamental transmission component, but redstone repeaters and redstone comparators are also important.
 * A mechanism component affects the environment (by moving, producing light, etc.)—e.g., Doors, pistons, redstone lamps, dispensers, etc.

Power
Redstone components and blocks may be powered or not. A "powered block" can be thought of as a block that has electricity running through it. Some blocks will show their powered state visibly (for example, redstone dust lights up and a redstone lamp illuminates its surroundings), but other blocks may give no visual indication of their powered state other than their effect on other redstone components.

An opaque block (e.g., stone, sandstone, dirt or grass, etc.) powered by a power component, or by a repeater or comparator, is said to be strongly powered or hard-powered (a different concept from power level). A strongly powered block can power adjacent Redstone dust (including dust on top of the block or dust beneath it).

An opaque block powered only by redstone dust (and no other components) is said to be weakly powered or soft-powered because a block powered only by redstone dust will not power other redstone dust (but can still power other components or devices, such as repeaters and pistons).

No opaque block can directly power another opaque block—there must be dust or a device in between. A transparent block can't be powered by anything. "Strong"/"hard" vs. "weak"/"soft" power applies only to opaque blocks, not to dust or other redstone components.

A powered block (strong or weak) can affect adjacent redstone components. Different redstone components react differently to powered blocks—see their individual descriptions for details.

Signal strength
"Signal strength" can vary from 0 to 15. Most power components provide power level 15, but a few provide a variable amount of power. These include daylight sensors and redstone comparators.

Redstone dust transmits power to adjacent redstone dust and blocks, but its strength decreases by 1 for each block the redstone power travels. Redstone dust can thus transmit power up to 15 blocks before needing to be maintained with a redstone comparator or re-strengthened with a repeater. Power level only fades with the dust-to-dust transmission, not between dust and a device or block.

The power level can also be adjusted directly with a redstone comparator in comparison or subtraction mode.

Signals and pulses
Circuits with a stable output are said to produce a signal — an ON signal (also "high" or "1") if powered, or an OFF signal ("low", "0") if unpowered. When a signal changes from OFF to ON ("rising edge") and then back to OFF ("falling edge"), that is described as a pulse (or ON pulse), while the opposite is described as an OFF pulse. ON pulses are far more common, and in casual discussion, "a signal" often refers to an ON pulse.

Very short pulses (1 or 2 ticks) can cause problems for some components or circuits because they have different update sequences to change states. For example, a redstone torch or a comparator will not respond to a 1-tick pulse.

Activation
Mechanism blocks (pistons, doors, redstone lamps, etc.) can be activated by incoming power, which causes the mechanism component to do something (push a block, open the door, turn on, etc.).

Activation Behavior
There are two main variations for how things can respond to activation:


 * Many types only perform an action when initially activated by a rising edge (command blocks execute a command, droppers, and dispensers eject an item, note blocks play a sound) and won't do anything again until deactivated and then activated again
 * Other mechanism components change their state when activated, and then change back when the activation ends; Redstone lamps stay on while the power continues, while hoppers stay disabled.  Pistons will extend when powered, and retract when the power turns off.  Doors, fence gates, and trapdoors will open on a rising edge, and close on a falling edge; however, most of these (not iron doors or iron trapdoors) can also be opened or closed by players regardless of the redstone power.  If they were already open when power turns on, or closed when power ends, they will simply remain so until their input changes again.

Powered vs. activated
For opaque mechanism blocks (command blocks, dispensers, droppers, note blocks, and redstone lamps), it is important to make a distinction between a mechanism component being activated and being powered (and this is the reason why mechanism components are described as activated instead of just saying they are powered).


 * A mechanism component is powered if it could power adjacent redstone dust, repeaters, or comparators.
 * A mechanism component is activated if it is doing something (or has done something and is waiting to be activated again).

Any method of powering a mechanism component (such as a redstone torch underneath it) will also activate it, but some activation methods (such as a redstone torch next to or above a mechanism component) won't actually power the component (following the usual rules for power components).

Non-opaque mechanism components (doors, fence gates, hoppers, pistons, rails, trapdoors) can be activated (they can do things), but cannot be powered (i.e. they can not then power adjacent redstone dust, etc.).

Normal Activation Rules
In general mechanism components are activated by:


 * an adjacent active power component, including above or below.
 * Exception: A redstone torch will not activate a mechanism component it is attached to
 * Exception: A piston is not activated by a power component directly in front of it.)


 * an adjacent powered opaque block (either strongly-powered or weakly-powered), including above or below.
 * a powered redstone comparator or redstone repeater facing the mechanism component.
 * powered redstone dust configured to point at the mechanism component (or on top of it, for mechanical components that can support redstone dust, but not beneath it), or adjacent "directionless" redstone dust; a mechanism component is not activated by adjacent powered redstone dust that is not configured to point at it

Special Activation Rules
Some mechanism components have additional ways of being activated:


 * $$, Pistons, dispensers, droppers, and can also be activated if one of the methods above would activate a mechanism component in the block above the component, even if there is no mechanism component there (even if the block above the component is air or a transparent block). This rule is often simplified to saying that the components can be powered by blocks diagonally above or two blocks above, but other methods of such activation exist (see image to the right). This method of activation is known as quasi-connectivity because the mechanism component's activation is somewhat connected to the space above it.
 * Doors occupy two spaces, one above the other, and anything that activates either space also activates the other.

Redstone Block updates
The internal mechanics for how redstone circuits work are simpler than they initially appear:When a change occurs somewhere in a redstone circuit, it can produce other changes in surrounding blocks in what is called a block update. Each of these changes can then produce other changes in their surrounding blocks. The update will propagate following the redstone circuit rules within loaded chunks (block updates will not propagate into unloaded chunks), usually very quickly. Note: in Bedrock Edition, block updates and redstone are not connected.

A block update simply notifies other Redstone components and blocks that a change has occurred nearby and allows them to change their own state in response, but not all updates will necessarily require changes. For example, if a redstone torch activates and updates the dust below it, the dust may already be powered from something else, in which case the dust won't change state and the update propagation will stop there.

Block updates can also be generated by any immediate neighbor block being placed, moved, or destroyed.

Solid blocks don't "know" if they're powered or not. Block updates simply update enough blocks around a redstone component to update other redstone components around the solid block (for example, a pressure plate updates its neighbors and the neighbors of the block it's attached to, which includes the space under that block which might be redstone dust).

In addition to block updates, comparators can be updated by containers (including detector rails with container minecarts on them) and certain other blocks, up to two blocks away horizontally when their state changes (for example, when their inventory changes). This is known as a comparator update.

The following redstone components produce block updates up to two blocks away by taxicab distance, including up and down:

The following redstone components produce block updates in their immediate neighbors, including above and below, and in the immediate neighbors of the block they're attached to:
 * Slanted rails, activator rails, detector rails, and powered rails (but not flat rails, etc.)
 * Slanted rails, activator rails, detector rails, and powered rails (but not flat rails, etc.)
 * Slanted rails, activator rails, detector rails, and powered rails (but not flat rails, etc.)

The following redstone components update only their immediate neighbors when they change their state, including above and below:
 * (as if "attached" to the block it is facing)
 * (as if "attached" to the block it is facing)
 * (flat only; also produces comparator updates)
 * (as if "attached" to the block beneath; also produces comparator updates)
 * (as if "attached" to the block beneath; also produces comparator updates)
 * (as if "attached" to the block beneath; also produces comparator updates)
 * (as if "attached" to the block beneath; also produces comparator updates)


 * (flat only)


 * (the Inverted Daylight Detector is not obtainable as an item)




 * (can also activate tripwire hooks in valid tripwire circuit)


 * and Sticky Piston (from both the piston base and the piston head when extended)
 * (flat only)
 * (flat only)

The following redstone components do not produce block updates when they change their state (though any block will produce a block update in its immediate neighbors if moved or destroyed):


 * (also produces comparator updates)
 * (also produces comparator updates)
 * (also produces comparator updates)
 * (also produces comparator updates)
 * (also produces comparator updates)
 * (can be moved)
 * (also produces comparator updates)
 * (can be moved)
 * (can be moved)
 * (can be moved)

Videos
A touchscreen made using a combination of these redstone components by ncolyer and green_jab