'''Redstone mechanics''' describe the general concepts of redstone power, and how redstone-related blocks interact with one another. This article describes basic ideas such as redstone power, powering blocks, and activating redstone mechanisms. Redstone is ''Minecraft's'' loose analog to electricity. There are a variety of blocks that are able to create a redstone signal or perform unique actions when provided with a redstone signal. Redstone-related blocks can be used in combination to create [[Redstone circuits|circuits]] and complicated [[Tutorials/Mechanisms|mechanisms]] that can be used to make automatic farms, item sorters, flying machines, and more. == Redstone concepts == ===Terminology=== :The ''Minecraft'' community has created a variety of terms to describe different aspects of redstone behavior, either for convenience or because there is no official term to describe the behavior. Terminology regarding redstone is not uniform throughout the community. A few of these terms and their variations are detailed below. ====Redstone tick==== A game tick is the basic unit of time in ''Minecraft'', and is equivalent to {{frac|1|20}} seconds (0.05 seconds). Every game tick, various aspects of the game are updated such as player movement, block updates, mob spawns, etc. Most (but not all) redstone-related events occur in multiples of 2 game ticks. A common convention is to measure times of redstone events in "redstone ticks", or just "ticks" for short, which are equivalent to 2 game ticks (0.1 seconds). Events that happen in 1 game tick are said to occur in 0.5 redstone ticks. "Redstone tick" is a community-created term, and not an official unit of time in ''Minecraft''. The ''Minecraft'' game code, and commands such as {{command|/tick}} use game ticks. Often, in redstone-related articles, the term "tick" is used to refer to redstone ticks unless otherwise specified. ====Opaque and transparent blocks==== [[Redstone mechanics#Conductivity|Conductivity]] is the idea that some blocks can be powered and some cannot. Conductive blocks are blocks that can be powered and non-conductive blocks are blocks that cannot be powered. Conductive blocks are often called "opaque" blocks, because many common blocks that can be powered are opaque; for example, stone, dirt, wood. Non-conductive blocks are often called "transparent" blocks, because the most common example is glass. However, whether or not you can see through the block does not determine whether a block can be powered. ====Strongly powered vs. weakly powered==== When some blocks receive a redstone signal, they can activate redstone mechanisms or provide a redstone signal to certain blocks. These blocks are said to be "[[Redstone mechanics#Powered blocks|powered]]". Strongly powered blocks can power redstone dust, and weakly powered blocks cannot. Strongly powered is sometimes called "hard powered", and weakly powered is sometimes called "soft powered". ===Redstone components=== {{main|Redstone components}} Redstone components are blocks that are used to create redstone circuits and advanced mechanisms. *A '''[[Redstone components#Power components|power component]]''' provides a redstone signal. Some power components can produce a pulsed or continuous signal on demand. For example, a [[button]] or [[lever]]. Others power components produce a pulsed or continuous signal when specific conditions have been met. For example, a [[pressure plate]], or an [[observer]]. *A '''[[Redstone components#Transmission component |transmission component]]''' carries a redstone signal from one part of a circuit to another. Redstone dust is the most basic transmission component; redstone repeaters, and redstone comparators are also transmission components. *A '''[[Redstone components#Mechanism components|mechanism component]]''' performs an action when it receives a redstone signal. For example, a [[piston]] extends and pushes a block, or a [[redstone lamp]] turns on and acts as a light source. ===Redstone signal=== A redstone signal is ''Minecraft's'' analog to electricity, and is generated by redstone power components. A redstone signal has a "signal strength", which is an integer between 1 and 15. The strength of a signal does not affect how redstone mechanism components operate. For example, a piston extends the same length and at the same speed regardless of whether it receives a redstone signal of 1 or 15. A redstone lamp produces the same amount of light, no matter the strength of the signal. ==== Signal generation ==== Only redstone power components can generate a redstone signal. Some components generate a continuous signal, while others generate a signal pulse. Some components generate a signal on demand, such as a lever or a button. Other components generate a signal when some condition has been met, such as a mob walking over a pressure plate, or an observer detecting a block change. :;Sculk sensors and "wireless" redstone :[[Sculk sensor]]s and their variant, [[calibrated sculk sensor]]s, can be used to generate a "wireless" redstone signal. Sculk sensors cannot actually transmit a redstone signal across distances, but can be used to generate a redstone signal remotely. :When a sculk sensor detects a vibration, an attached redstone comparator outputs a specific redstone signal that depends on the cause of the vibration. Sculk sensors can be set up to retransmit a detected vibration through the air to another sculk sensor. The player can create a specific vibration at their location, and have that vibration be retransmitted across a chain of sculk sensors over a long distance. The final sculk sensor in the chain provides the redstone signal through a redstone comparator. ==== Signal transmission ==== A redstone signal can be transmitted only by redstone transmission components such as redstone dust, redstone repeaters, and redstone comparators. :;Redstone dust :Redstone dust is used to transmit a redstone signal, and is analogous to a wire that can carry electricity. Redstone dust transmits power to adjacent redstone dust, but the signal strength decreases by 1 for every block of redstone dust that the signal travels. Redstone dust can thus transmit a signal up to 15 blocks by itself. The signal can be extended farther using other transmission components such as a redstone comparator, or a redstone repeater. :Signal strength does not decrease when transmitted from redstone dust to a block or a redstone component. For example, redstone dust carrying a signal of strength 1 and pointing into a piston causes the piston to extend. If redstone dust with a signal strength of 1 points into an opaque block, a redstone repeater or a redstone comparator facing away from the block is powered. :;Redstone repeater :When a redstone repeater receives a redstone signal of any strength, it outputs a signal of strength 15. :;Redstone comparator :When a redstone comparator receives a signal from its back input, it outputs the same signal. ===Activating mechanisms=== [[File:Activating a powered mechanism.png|thumb|'''Activation of Mechanism Components''' — Mechanism components can be activated by power components (for example, redstone torches), powered blocks, redstone dust, repeaters, and comparators (not shown), but only if configured correctly.|link=File:Activating_a_powered_mechanism.png]] Redstone mechanism components are activated when they receive a redstone signal. This signal can be supplied by an adjacent power component generating a signal, a powered block, powered redstone dust being configured to point into the mechanism or placed on top of the mechanism, or a powered redstone repeater or a redstone comparator pointing into the mechanism. A mechanism component performs some kind of action when activated, such as moving, producing light, or making a sound. ==== Activation behavior ==== Upon receiving a redstone signal, mechanism components may behave in different ways. Some mechanisms perform an action only once when they receive a signal, others continuously perform an action while receiving a redstone signal. ;Rising edge Some mechanism components perform an action only once upon receiving a redstone signal. These components do not perform another action until the signal stops, and they receive a new signal some time later. This type of behavior is referred to as rising edge because they occur when the signal goes from 0 then up to a positive value. The opposite is falling edge, where a signal goes from a positive value to 0. ;Rising and falling edge Some mechanism components change state when they receive a redstone signal (rising edge activation) and return to their original state when the redstone signal stops (falling edge deactivation). These blocks have an initial deactivated state, and an activated state. For example, a redstone lamp starts producing light when it receives a redstone signal, and does not stop until it stops receiving the signal. For blocks such as doors, fence gates, and trap doors, their deactivated state is closed, and their activated state is open. If one of these blocks is already open when it receives a redstone signal, it stays open, but closes when the signal stops. ;Mixed Behavior A copper bulb exhibits mixed behavior. A copper bulb has two block states associated with it: lit, describing if the copper bulb is emitting light, and powered, describing if the copper bulb is currently receiving a redstone signal. Upon receiving a redstone signal (rising edge), the bulb toggles its lit state, and starts or stops emitting light. The bulb's powered state remains true until it stops receiving a redstone signal (falling edge). ==== Quasi-connectivity ==== [[File:Activation by piston connectivity.png|thumb|'''Activation by [[Tutorials/Quasi-connectivity|Quasi-Connectivity]]''' — Pistons can also be activated by anything that activates the space ''above'' them. Note that the piston on the far left is ''not'' activated by quasi-connectivity because the redstone dust is running ''past'' the block above the piston, rather than directly into it, and thus would not power a mechanism there|link=File:Activation_by_piston_connectivity.png]] {{exclusive|java}} {{main|Tutorials/Quasi-connectivity}} Almost every mechanism component block needs a redstone signal to be supplied to the block itself in order to be activated. There are three exceptions {{in|Java}}: '''dispensers''', '''droppers''', and '''pistons'''. These three blocks can be activated by a redstone signal being supplied to them like other blocks, but can also be activated if a redstone signal is supplied to the block above them, even if that block is air. Another way to think of quasi-connectivity, is to imagine that dispensers, droppers, and pistons have an "activation hitbox" similar to that of a door. A door is two blocks tall, and if either the top or bottom part of a door receives a redstone signal, it opens. Dispensers, droppers, and pistons are one block tall, but they can be activated as if they were two blocks tall. A complication of quasi-connectivity is that there are scenarios in which, the dispenser, dropper, or piston should be activated by quasi-connectivity, but does not activate until there is a nearby block update. This occurs because redstone blocks can update their neighbors up to two blocks away, [[taxicab distance]]. Even though the dispensers, droppers, and pistons have a two block tall activation hit box, the actual block needs to be updated in order to activate, not the block above. Sometimes the source of the redstone signal is too far away to update the actual block. See main article for additional details. === Powered blocks === {{Redirect|Powered|the enchantment with a similar name|Power}} [[File:Powers.png|thumb|upright|The Redstone Lamps are all '''activated''', but are '''powered''' differently. From top to bottom: