Minecraft Wiki

除另有声明,转载时均必须注明出处若簡繁轉換出錯,請以遊戲內為準请勇于扩充与修正内容有兴趣逛逛我们的微博沟通交流,欢迎到社区专页需要协助,请在告示板留言

了解更多

Minecraft Wiki
Advertisement

红石电路页面即将大面积改写,本页面用于临时存放数据,请其他管理员不要删除。改写完成后我会自己处理掉

Disambig gray  本文章介绍的是红石电路。关于其它红石相关篇目或基本知识,请见“红石(消歧义)”。

红石电路(Redstone circuits),台湾称?石迴路为你可以建造起来用于控制或激活其他机械的结构。

电路本身既可以被设计为用于响应玩家的手动激活,也可以让其独立工作——或是反复输出信号,或是响应非玩家引发的变化,例如生物移动、物品掉落、植物生长、日夜更替等等。Minecraft中能够被红石控制的机械类别几乎覆盖了你能够想象到的极限,小到最简单的机械(如自动门与光开关),大到占地巨大的自动农场、小游戏平台,甚至游戏内建的计算机。

如果您懂得红石电路的建造方法与电路能够控制机械的特性,那么你在Minecraft里将大有可为。红石电路本身也是Minecraft有别于其它游戏中最优秀与突出的元素之一。

1.5正式版红石更新)之前,红石电路全部是基于现实生活中的数字电路的。如果您熟悉高等教育中的数字电路的知识的话,本篇目对您来说将很容易理解。

基本概念

在描述能够建筑红石电路的方块以及可建的电路种类之前,您需要对一些基本概念有所认知。

电路组件
电路组件是在红石电路里具有一定使用目的的方块,大致分为三个大类:
  • 电源为整个电路或部分电路提供能量来源。
  • 传输线将电能从电路的一部分传递到另一部分。
  • 电动机械接受电能并作出反应(例如移动、发光等)。
充能
部分方块能够被充能或解除充能。如果说一个方块被“充能”了,则这个方块就可以作为电源,具有向毗邻的“电器”方块供电以使其工作的潜力。(“毗邻”是这样定义的:一个方块是正方体,正方体有6个面。也就是说与一个方块的任意一个面接触的方块最多可能有6个,称之为“与该方块毗邻的方块”)。
充能强度分为“强充能”与“弱充能”。弱充能仅指被红石线充能的情况。强弱的唯一区别是能否激活毗邻的红石线。
红石线一般被作为导线使用,电能最多能够在连续的导线上传到15格远。如果您希望延长这个传输距离,使用红石中继器即可。在1.5正式版中,红石线的强度将会成为模拟信号存在于红石电路中的标志。
红石(状态)更新
当电路的某一部分发生状态的改变,该改变会引起所有毗邻方块的“红石(状态)更新”(请不要与1.5正式版的代号“红石更新”混淆)。
红石刻
红石刻(Redstone tick)Minecraft计算红石机构状态的最小时间单位,等于0.1秒。红石火把,中继器以及激活的红石组件需要1刻或更多时间改变状态,这就引入了在大型电路中至关重要的延迟。
红石刻与“游戏刻”或“方块刻”不同。当讨论红石电路时,“刻”一词仅指“红石刻”。
信号与脉冲
具有稳定输出的电路能够产生信号——“激活/非激活”时称为“真/假”或“高电平/低电平”。当信号出现一个较为短暂的非激活-激活-非激活过程,该过程通常被称为脉冲(或正脉冲。相反的过程被称为负脉冲)。
非常短的脉冲(1-2刻的)可能会使一些电路组件由于来不及响应而发生问题。

电路组件

电路组件指用于建造红石电路的方块。电路组件包括电源(如红石火把、按钮等)、电能传输组件(如红石线)与电动机械(如活塞、门、红石灯等)。部分组件需要依附于其它方块上,如果依附主体被移除,这类组件会变成掉落的物品。

电源

电源能够使其自身与某个毗邻方块充能(详见下)。这类电源方块能够激活邻近的红石线、红石中继器与电动机械。

File:Redstone torch as power source (v1.4.2).png

作为电源使用的红石火把

红石火把
用途:红石火把能够激活电路,反相信号与纵向传输电能。
放置:红石火把能够依附在任何非透明方块的顶部侧面,或者是玻璃栅栏地狱砖栅栏圆石墙、[[倒置的楼梯栏杆
激活:红石火把一直会保持激活,除非其附着的方块被充能。
效果:当激活时,红石火把能够将自己,以及其上方的非透明方块充能。
注意事项:若是红石火把亮灭过快(通过对其附着的方块的快速充能。“过快”的定义是小于0.4秒的脉冲),红石火把会“燃尽”。燃尽之后,如果红石火把得到一次红石更新,其会重新激活,或是在一段时间后随机激活。
造成燃尽的方法之一为“短路”——利用红石电路自身的信号使自己熄灭。一个新手常见的疏忽就是在一个方块侧面附着红石火把,上面放置红石线,同时在火把上还放一个方块,那么就满足了短路条件:红石火把使其上面的方块强充能-该方块激活红石线-红石线使火把依附的方块弱充能-火把熄灭-火把其上的方块失去充能-红石线反激活-火把依附的方块失去充能-火把又燃起。如此循环会产生多个宽度只有1刻的脉冲,最终使得火把燃尽。
Lever as power source (v1.4

作为电源的拉杆(按钮的特性是类似的)

拉杆
Usage: A lever is used to switch circuits on or off, or to permanently power a block.
Placement: A lever can be attached to the top, side, or bottom of most opaque blocks, or to the top of an upside-down stair or upside-down slab.
Activation: A player can turn a lever ON or OFF by right-clicking it.
Effect: While ON, a lever powers the block it is in, and the block it is attached to (unless attached to an upside-down stair or slab).
按钮
A button may be of two types: wooden or stone.
Usage: A button is used to generate a pulse.
Placement: A button can be attached to the side of most opaque blocks.
Activation: A player can turn a stone or wooden button ON by right-clicking it, and a wooden button can also be turned ON by a fired arrow. A stone button stays ON for 10 ticks (1 second), while a wooden button stays ON for 15 ticks (1.5 seconds) or, if turned ON by a fired arrow, until the arrow despawns after one minute or is picked up.
Effect: While ON, a button powers the block it is in, and the block it is attached to.
Pressure plate as power source (v1.4

Pressure plate as power source

压力板
A pressure plate may be of two types: wooden or stone.
Usage: A pressure plate is used to detect mobs, items, and other entities.
Placement: A pressure plate can be attached to the top of any opaque block, or to the top of a fence, nether brick fence, an upside-down stair or upside-down slab.
Activation: A pressure plate turns ON when an entity (mob, item, etc.) crosses or falls on it, and turns OFF when the entity leaves or is removed. A stone pressure plate is turned ON only by mobs (including players), while a wooden pressure plate is turned ON by mobs, items, and fired arrows. A wooden pressure plate turned ON by an item or fired arrow won't turn OFF until the item or arrow is picked up or despawns (after one minute for a fired arrow, or up to five minutes for an item).
Effect: While ON, a pressure plate powers the block it is in, and the block beneath it (unless placed on a fence, or an upside-down stair or slab).
Considerations: A pressure plate is not solid (it is not a barrier to entity movement). Usually a block under a pressure plate provides a solid barrier underneath it (for mobs to walk across, items to fall on, etc.), but when a pressure plate is placed on a block with a small collision mask, like a fence or nether brick fence, it is possible for entities to move through the pressure plate while still activating it. Thus, a pressure plate on a fence can be used to detect entities without stopping them (more compactly than a tripwire circuit).
Tripwire hook as power source (v1.4

Tripwire hook as power source

绊线钩
Usage: A tripwire hook is used to detect mobs, items, and other entities over a large area.
Placement: A tripwire hook can be attached to the side of most opaque blocks.
In order to function correctly, a tripwire hook must be part of a tripwire circuit: a straight line of blocks consisting of an opaque block with a tripwire hook attached to it, a tripwire line (one or more blocks of tripwire), and a second tripwire hook attached to another opaque block. A tripwire circuit is placed correctly when the tripwire hook is fully extended and the tripwire runs continuously between the tripwire hooks. Tripwire lines from separate tripwire circuits can be placed next to each other (in parallel), above each other, and can even intersect each other.
Activation: A tripwire hook turns ON when an entity (mob, item, etc.) crosses or falls on the hook's tripwire line (but not the tripwire hook), and turns OFF when the entity leaves or is removed from the tripwire line. A tripwire hook also turns ON for 5 ticks when any of its tripwires are destroyed, except when using shears to "cut" the tripwire (breaking the tripwire hook, or the block it is attached to, also does not generate a pulse).
Effect: While ON, a tripwire hook powers the block it is in, and the block it is attached to. Tripwire provides no power itself.
Considerations: To place tripwire, right-click on an adjacent block with a string. Tripwire does not need to be supported when placed (it can be placed "floating" in the air), but if an opaque block (or upside-down slab or stair) directly underneath it is placed or removed, the tripwire will "pop" (turn back into string).
Detector rail as power source (v1.4

Detector rail as power source

探测铁轨l
Usage: A detector rail is used to detect the passage of a minecart.
Placement: A detector rail can be attached to the top of any opaque block, or to the top of an upside-down stair or upside-down slab.
When placed, a detector rail will configure itself to line up with adjacent rails, powered rails, and detector rails, as well as such adjacent rails one block up. If there are two such adjacent rails on non-opposite sides, or three or more such adjacent rails, a detector rail will line up in the east-west direction. If there are no such adjacent rails, a detector rail will line up in the north-south direction. If a rail it would line up with is one block up, a detector rail will slant upwards towards it (with multiple options to slant upwards to, a detector rail "prefers", in order: west, east, south, and north). Other configurations can be created by placing and removing various rail.
Activation: A detector rail turns ON when a minecart passes over it, and turns OFF when it leaves.
Effect: While ON, a detector rail powers the block it is in, and the block beneath it (unless placed on an upside-down stair or slab).

电能传输

Power transmission components propagate signals and pulses from power sources to powered mechanisms. Complex effects can also be produced by allowing a signal to affect itself or its circuit.

Redstone wire as circuit component

Redstone wire as circuit component

红石线
Usage: Redstone wire is used to transmit power.
Placement: Redstone wire is placed by right-clicking with redstone dust (dust is the item, wire is the block). Redstone wire can be attached to the top of any opaque block, or to the top of glowstone, an upside-down stair or upside-down slab.
When placed, redstone wire will configure itself to point towards adjacent wire (at the same level or one level up or down) and adjacent power sources. If there is only one such neighbor, redstone wire will form a line pointing towards and away from that one neighbor. If there are multiple such neighbors, redstone wire fill form either a line, an "L", a "T", or a "+". If there are no such neighbors, redstone wire will form a large directionless dot.
When two redstone wires are placed vertically diagonally (one block over and one up, or one over and one down) and the higher wire is on an opaque block or glowstone, the lower wire will appear to "crawl" up the side of the higher block to join the other wire. This linking can be "cut" by an opaque block above the lower wire. While cut, the two wires won't connect visually or transmit power to each other.
Activation: Redstone wire can be turned ON by any adjacent power source, redstone repeater pointing at it, or strongly-powered opaque block. Redstone wire can also be turned ON by other adjacent powered redstone wire, but the power decreases with distance from a strongly-powered block. Redstone wire can transmit power up to 15 blocks.
Effect: Powered redstone wire turns ON any powered mechanism it is configured to point at. It will weakly-power an opaque block it is pointing at, or under it (supporting it).
Redstone repeater as circuit component

Redstone repeater as circuit component

红石中继器
Usage: A redstone repeater is used to transmit power, re-strengthen redstone wire signals weakened by distance, or delay a signal.
Placement: A redstone repeater can be attached to the top of any opaque block, or to the top of an upside-down stair or upside-down slab.
A redstone repeater has a front and a back -- the arrow points from the back to the front. It also has an adjustable delay that can be set from 1 to 4 ticks by right-clicking it.
Activation: A redstone repeater is turned ON by any powered component at its back.
Effect: A powered redstone repeater turns ON redstone wire or a powered mechanism in front of it, or strongly powers an opaque block in front of it. It has no effect on the block under it.
A redstone repeater not only "repeats" a signal (re-strengthens it for transmission), it also delays it by 1 to 4 ticks. A redstone repeater will also increase the duration of any pulse shorter than its delay to match the duration of its delay.
A redstone repeater can be "locked" by powering it from the side with another redstone repeater. A locked repeater will not change its output state until unlocked, even if its input changes.
非透明方块
Usage: Opaque blocks are used to support circuit components and to transmit power.
Activation: An opaque block is strongly powered by an active power source or an active redstone repeater, or weakly powered by active redstone wire above it or configured to point at it.
Effect: A powered opaque block turns OFF an attached redstone torch, turns ON an adjacent redstone repeater facing away from it, and turns ON an adjacent powered mechanism. A strongly-powered opaque block will turn ON adjacent redstone wire, including redstone wire beneath the opaque block (but a weakly-powered opaque block will not).
Considerations: To attach circuit components to blocks you interact with by right-clicking (e.g., crafting table, furnace, dispenser, note block, and a jukebox containing a record), sneak while right-clicking.
Transparent blocks as circuit components

Transparent blocks as circuit components

透明方块
Transparent blocks can not transmit power, but are only needed as "insulators" in very compact circuits because air works just as well. Some transparent blocks have special properties that make them useful in redstone circuits:
Glowstone: A redstone wire or fence gate can be attached or placed on the top of glowstone, and a trapdoor can be attached to the side of glowstone. A redstone wire on top of glowstone can transmit power to a redstone wire adjacent to it or diagonally upwards, but not diagonally downwards. Because glowstone is not opaque, it cannot power an adjacent block (including an attached trapdoor), but redstone wire on top of it can.
Slabs and stairs: A redstone torch, redstone wire, redstone repeater, lever, pressure plate (wooden or stone), rail (regular, powered, or detector), door (wooden or iron), and a fence gate can all be attached or placed on the top of an upside-down slab or upside-down stair, and a trapdoor can be attached to the side of an upside-down slab or stair (in single-player mode, a trapdoor cannot be placed on the "bottom" of an upside-down slab because there is no selection mask to interact with, but a slab moved to that position by a piston will not cause the trapdoor to pop). A redstone wire on top of an upside-down slab or upside-down stair can transmit power to a redstone wire adjacent to it or diagonally upwards, but not diagonally downwards. Because slabs and stairs are not opaque, they cannot be powered by power sources and cannot provide power to adjacent blocks.
Glass and fences: A redstone torch can be attached to the top of glass, and a redstone torch or a pressure plate can be attached to the top of a fence or nether brick fence.

电动机械

Powered mechanisms are blocks which react to redstone power by moving themselves or other entities, or by producing light, sound, or explosions.

Activating a powered mechanism

Activating a powered mechanism (in this case, a redstone lamp)

Activation: All powered mechanisms are turned ON by:

  • an adjacent active power source (Exception: a redstone torch will not turn ON a powered mechanism it is attached to)
  • an adjacent powered opaque block (strongly-powered or weakly-powered)
  • a powered redstone repeater facing directly into the powered component
  • powered redstone wire running directly into the powered component (or on top of it, for opaque powered mechanisms)

A powered mechanism is not turned ON by adjacent redstone wire which is not pointing at it.

红石灯
Usage: A redstone lamp is used to provide light.
Effect: While ON, a redstone lamp produces block light level 15.
Considerations: A redstone lamp is an opaque block, so powering it directly can cause adjacent powered mechanisms (including other redstone lamps) to activate as well.
活塞
A piston may be of two types: a regular piston only pushes blocks, while a sticky piston pushes and pulls blocks.
Usage: A piston is used to move blocks or entities. May be part of a circuit's output (such as a circuit built to control a piston door), or may be incorporated within the circuit to change a circuit's configuration (for example, by moving an opaque block over a redstone torch or away from it).
Placement: A piston has a stone "pushing" component and a wooden "arm", and can be placed so the arm faces in any direction (its "front").
Activation by piston connectivity

Activating a piston by piston-connectivity (note that the piston on the left is not powered by piston-connectivity because the redstone wire is running past the block above the piston, rather than directly into it, and thus would not power a mechanism there)

Activation: In addition to the methods above, a piston can also be turned ON if one of the methods above would activate a powered mechanism in the block above the piston, even if there is no powered mechanism there (even if the block above the piston is air or a transparent block), but only when the piston receives a block update. This is known as piston connectivity (the piston is "connected" to the block above for the purposes of activation).
Effect: When turned ON, a piston pushes the block in front of its arm, and up to 11 more in front of that (up to 12 blocks total). When turned off, a regular piston pulls its arm back (leaving an air block in front of the piston), while a sticky piston pulls back both its arm and one block (leaving an air block on the other side of the pulled block).
A moving piston or block can also push an entity such as a mob or item.
Some blocks (bedrock, obsidian, chests, etc.) cannot be moved by a piston. Other blocks (flowers, leaves, torches, etc.) will be destroyed but may drop items (as if destroyed by the player). For full details of how pistons interact with other blocks, see Pushing Blocks.
Considerations: When a sticky piston is activated by a 1-tick pulse, it will push a block in front of it, but will fail to pull back the pushed block on the same pulse. If a sticky piston is activated by a 1-tick pulse when there is no block in front of it, it can pull back a block. Thus, a sticky piston running on 1-tick pulses will push and pull a block every other pulse.
发射器
Usage: A dispenser is used to provide items, or to create or destroy water and lava.
Effect: When turned ON, or if any redstone update occurs within two blocks while it is ON, a dispenser will trigger. The effects of being triggered vary with the items in the dispenser -- see Dispensing.
Considerations: A dispenser is an opaque block, so powering it directly can cause adjacent powered mechanisms (including other dispensers) to activate as well.
Rails as powered mechanisms

Rails and powered rails as powered mechanisms

铁轨
Usage: A rail is used to switch the track of a minecart.
Placement: A rail can be attached to the top of any opaque block, or to the top of an upside-down stair or upside-down slab.
When placed, rail will configure itself to line up with adjacent rails, powered rails, and detector rails, as well as such adjacent rails one block up. If there are two such adjacent rails on non-opposite sides, the rail will curve from one to the other. If there are three or four such adjacent rails, the rail will curve between two of them (when choosing which directions to curve between, a rail "prefers" south over north, and east over west). If there are no such adjacent rails, the rail will line up in the north-south direction. If a rail it would line up with is one block up, a rail will slant upwards towards it without curving (with multiple options to slant upwards to, a rail "prefers", in order: west, east, south, and north). Other configurations can be created by placing and removing various rail.
Effect: While ON, a rail in a "T" junction flips to curve the other way (powering a rail in another configuration has no effect).
充能铁轨
Usage: A powered rail is used to propel a minecart.
Placement: A powered rail can be attached to the top of any opaque block, or to the top of an upside-down stair or upside-down slab.
When placed, a powered rail will configure itself to line up with adjacent rails, powered rails, and detector rails, as well as such adjacent rails one block up. If there are two such adjacent rails on non-opposite sides, or three or more such adjacent rails, a powered rail will line up in the east-west direction. If there are no such adjacent rails, a powered rail will line up in the north-south direction. If a rail it would line up with is one block up, a powered rail will slant upwards towards it (with multiple options to slant upwards to, a powered rail "prefers", in order: west, east, south, and north). Other configurations can be created by placing and removing various rail.
Activation: In addition to the methods above, a powered rail can also be turned ON by other adjacent active powered rail, but the power decreases with distance from a power source. Powered rail can transmit power up to 9 rails (the first originally-powered powered rail, and up to eight additional powered rails). Power transmitted in this way cannot power any circuit components except powered rail.
Effect: While ON, a powered rail boosts the speed of a minecart passing over it, or starts a minecart moving away from an adjacent solid block it is in contact with.
A door may be of two types: a wooden door can be opened and closed by redstone power or by a player right-clicking on it, while an iron door can only be opened and closed by redstone power.
Usage: A door is used to control or prevent the movement of mobs, items, boats, and other entities.
Placement: A door can be attached to the top of most opaque blocks, or to the top of an upside-down slab or upside-down stair.
A door is placed on the edge of the block facing the player. By default the door's hinge will be on the left side, but another door or block can force the hinge to the right side.
Effect: While ON, a door re-positions to the other side of its hinge, allowing movement through its former position and denying movement through its current position. When it turns ON, any entities on the door will fall.
A door doesn't actually "move" (the way a piston arm or a pushed block moves), it simply disappears from one side and re-appears on another, so it won't push entities as it "opens".
陷阱门
Usage: A trapdoor is used to control or prevent the movement of mobs, items, boats, and other entities.
Placement: A trapdoor can be attached to the top or the bottom of the side of most opaque blocks, as well as to glowstone, slabs, and stairs.
Slabs lack a full-side interaction mask -- to attach a top trapdoor to a bottom slab, or a bottom trapdoor to a top slab, attach the trapdoor to another block and then use a piston to move the trapdoor into position with the slab, or move the slab into position with the trapdoor.
Effect: While ON, a trapdoor re-positions itself in a vertical state, allowing vertical movement through it. When it turns ON, any entities on the trapdoor will fall.
A trapdoor doesn't actually "move" (the way a piston arm or a pushed block moves), it simply disappears from one state and re-appears in another, so it won't push entities as it "opens".
栅栏门
Usage: A fence gate is used to control or prevent the movement of mobs, items, boats, and other entities.
Placement: A fence gate can be placed on the top of most blocks. Once placed, the block beneath it may be removed without popping the fence gate.
Effect: While ON, a fence gate re-positions its two gates to either side, allowing movement through it. When it turns ON, any entities on the fence gate will fall.
A fence gate doesn't actually "move" (the way a piston arm or a pushed block moves), it simply disappears from one state and re-appears in another, so it won't push entities as it "opens".
Unlike a door or trapdoor, while ON, a fence gate is completely non-solid (lacks a collision mask) to all entities.
音符盒
Usage: A note block is used to produce sound.
Effect: When turned ON, a note block produces a sound.
Considerations: A note block is an opaque block, so powering it directly can cause adjacent powered mechanisms (including other note blocks) to activate as well.
TNT
Usage: TNT is used to create an explosion.
Activation: In addition to the methods above, TNT can also be activated by fire and explosions.
Effect: When turned ON, TNT ignites and becomes primed TNT, an entity which can fall like sand or be pushed by pistons (but isn't moved by water). Primed TNT explodes 40 ticks (4 seconds) after being ignited by redstone power (10-30 ticks for TNT ignited by an explosion).

基本电路

Basic circuits are the building blocks for larger circuits. Some of these basic circuits might be used by themselves for simple control of mechanisms, but frequently you will need to combine them into complex circuits to meet the needs of a mechanism.

The examples below are not intended to be exhaustive. See the main articles for complete lists of possible circuits.

Vertical transmission

Vertical transmission screenshot

Methods of vertical transmission

Although horizontal signal transmission is pretty straight-forward, vertical transmission involves options and trade-offs.

Wire staircases
The simplest way to transmit signals vertically is by placing redstone wire on blocks diagonally upwards, either in a straight staircase of blocks, in a 2×2 spiral of blocks, or in another similar variation. Wire staircases can transmit signals both upwards and downwards, but can take up a lot of space and will require repeaters every 15 blocks.
Wire ladders
Because glowstone, upside-down slabs and upside-down stairs can support redstone wire but don't cut redstone wire, signals can be transmitted vertically (upwards only) by alternating these blocks in a 2×1 "ladder". Wire ladders take up less space than wire staircases, but also require repeaters every 15 blocks.
Torch towers
A redstone torch can power a block above it, or redstone wire beneath it, allowing vertical transmission both upwards or downwards (different designs are required for each). Because it takes each torch a little time to change state, a torch tower can introduce some delay into a circuit, but no repeaters are necessary.

Other forms of vertical transmission are possible, using pistons, water, etc.

参见:Redstone Circuits/Other

One-way circuits

主条目:Redstone Circuits/Repeater

A one-way circuit (also known as a diode) allows a signal to travel only in one direction. It is used to protect another circuit from the chance of a signal trying to enter through the output, which could incorrectly change the circuit's state or interfere with its timing. It is also used in a compact circuit to keep one part of the circuit from interfering with another.

Redstone repeater
A repeater will only accept a signal from its input side and only produce a signal from its output side. It also adds a delay into a circuit.
Slab diode
An upside-down slab won't transmit a signal diagonally downwards, so you can ensure one-way transmission simply by jumping the wire up to a slab. A slab diode doesn't delay a signal the way a repeater will, but it also doesn't re-strengthen the signal.

Many circuits are already one-way simply because their output comes from a block which can't take input. For example, you can't push a signal back into a circuit through a redstone torch except through the block it's attached to.

See also: Diode

Combining signals

主条目:Redstone Circuits/Logic

It's sometimes necessary to check signals against each other and only output a signal when the inputs meet some criteria. A circuit which performs this function is known as a logic gate (a "gate" that only allows signals through if the "logic" is satisfied). Although there are many different possible "logics" that could be checked, the two most common ones are the OR Gate and the AND Gate (possibly with inputs or outputs inverted).

OR Gate
An OR Gate produces an ON output if any of its inputs is ON (i.e., its output is ON if input A is ON or input B is ON, or input C is ON, etc.).
AND Gate
An AND Gate only produces an ON output if all of its inputs are ON (i.e., its output is ON if input A is ON and input B is ON and input C is ON, etc.).
参见:Basic Logic Gates

进阶电路

These circuits require an understanding of (or willingness to experiment with) more advanced concepts, such as pulse duration and circuit timing. These circuits usually aren't needed for simple projects, but frequently find use in more complex projects.

Pulse circuits

主条目:Redstone Circuits/Pulse Components

Some circuits require specific pulses, other circuits use pulse duration as a way to convey information. Pulse circuits manage these requirements.

A circuit which is stable in one output state and unstable in the other is known as a monostable circuit. Many pulse circuits are monostable because their OFF state is stable, but their ON state will quickly revert back to OFF.

Pulse generator
A pulse generator produces a pulse of a specific duration.
Pulse limiter
A pulse limiter (a.k.a. pulse shortener) reduces the duration of pulses which are too long.
Pulse extender
A pulse extender (a.k.a. pulse sustainer, pulse lengthener) increases the duration of pulses which are too short.
Pulse delay
A pulse delay circuit delays a pulse by a specific duration.
Edge detector
An edge detector reacts to either a signal changing from OFF to ON (a "rising edge" detector) or from ON to OFF (a "falling edge" detector), or both (a "dual edge" detector).
Pulse duration tester
A pulse duration tester reacts only to pulses in a certain range of durations (often only to pulses of one specific duration).
Oscilloscope
An oscilloscope is a sequence of redstone repeaters all set to a 1-tick delay. By seeing how many repeaters light up, you can observe the duration of a pulse. By running multiple oscilloscopes in parallel, you can compare the duration and delay of pulses produced by different circuits.

Clock circuits

主条目:Redstone Circuits/Clocks

A clock circuit is a pulse generator that produces a loop of specific pulses over and over again. Some are designed to run forever, while others can be stopped and started.

A simple clock with only two states of equal duration is named for the duration of its ON state. For example, a clock which alternates between a 5-tick ON state and a 5-tick OFF state is called a 5-clock.

Repeater clocks
A repeater clock consists of a loop of repeaters (usually either redstone repeaters or redstone torches) with occasional wire or blocks to draw off the appropriate pulses.
Piston clocks
A piston clock produces a loop of pulses by passing a block back and forth (or around, with many pistons) and drawing off a pulse when the block is in a certain location.

Memory circuits

主条目:Redstone Circuits/Latches

Unlike a logic circuit whose state always reflects its current inputs, a memory circuit's output depends not on the current state of its inputs, but on the history of its inputs. This allows a memory circuit to "remember" what state it should be in, until told to remember something else.

In real-life electronics, a latch is a memory circuit that responds only to its inputs, while a flip-flop only responds to its inputs when a clock input is set.

T Flip-Flop
A T Flip-Flop is used to toggle a signal (like a lever). It has a primary input and a "clock" input, and its output changes state ("toggles") only when both the primary input and the clock input are ON at the same time. In practical redstone circuits, the clock input is often omitted from the circuit so that the output toggles whenever the primary input turns ON (turning it into a T Latch).
RS NOR Latch
An RS NOR Latch is used when you need greater control of the circuit's output state. It has two separate inputs, a SET input and a RESET input. Its output is set to ON when SET turns ON, and remains ON until RESET turns ON (no matter what SET does). When the output is OFF, it remains OFF until SET turns ON.

Many other memory circuits are possible.

See also: Flip-flop

Block update detectors

A block update detector (BUD, or BUD Switch) is a circuit which "reacts" to a block changing its state (for example, stone being mined, water changing to ice, a pumpkin growing next to a pumpkin stem, etc.). Some BUDs react by producing a pulse, while others react by toggling their output state.

Piston-connectivity BUDs
Circuits that put a piston into a meta-stable state by powering the piston by piston-connectivity without providing a block update to inform it that it is powered, causing the piston to finally react when a block updates next to it.
Stuck-piston BUDs
Circuits which put a piston into a meta-stable state by powering it when it is unable to extend (such as when another extended piston is blocking it), then removing the obstacle in a way that doesn't cause the powered piston to update, causing it to finally react when a block updates next to it.
Wire BUDs
Circuits that put a block of redstone wire into a meta-stable state where its power level depends on where the redstone update comes from, causing block updates next to it to produce a 1-tick pulse before it re-stabilizes. Unlike piston-based BUDs, wire BUDs are silent.

Other block update detectors are possible, using boats, minecarts, redstone lamps, etc.

参见:Tutorials/Block_update_detector

Other advanced circuits

主条目:Redstone Circuits/Other

These advanced circuits generally aren't needed for your typical project, but might find use in complex projects, proofs of concept, and thought experiments. Some examples:

Multiplexors
A multiplexor is an advanced form of logic gate which chooses which input to let through as output based on an additional input (for example, if input A is ON then output input B, otherwise output input C).
Randomizers
A randomizer produces output signals unpredictably. Randomizers can be designed to produce a pulse at random intervals, or to randomize which of multiple outputs are turned ON (such as random number generators, or RNGs). Some randomizers use the random nature of Minecraft (such as cactus growth or dispenser slot selection), while others produce pseudo-randomness algorithmically.
Multi-bit circuits
Multi-bit circuits treat their input lines as a single multi-bit value (something other than zero and one) and perform an operation on them all at once. With such circuits, possibly combined with arrays of memory circuits, it's possible to build calculators, digital clocks, and even basic computers inside Minecraft.

Many more complex circuits are possible.

参见:Tutorials/Advanced Redstone Circuits

Building circuits

Planning

The first step in building a redstone circuit is to decide what it will do.

  • How and where will it be controlled?
    • Will the circuit be controlled by the player, by mob movement, or something else?
  • What powered mechanisms will it control?
  • How will the signal be transmitted from the controls to the mechanisms?
    • Will signals need to be combined from multiple sources?

Construction

It can be helpful to choose a specific set of blocks you use to construct circuits. Then, when you run into these blocks when digging out new rooms in your base, you know you're about to damage a previously-built circuit. Common choices include stone brick, snow block, and wool. (Using different colors of wool is also a great way to keep track of different circuits)

Be careful when building circuits near water or lava. Many circuit components will "pop" (turn into items) when washed over by liquids, and lava will destroy any items it contacts.

Be careful when building circuits to activate TNT (traps, cannons, etc.). Circuits in mid-construction can sometimes briefly power up unexpectedly, which might activate TNT. For example, if you place a redstone torch on a powered block, it won't "figure out" that it should be turned off until the next tick, and can briefly power another part of the circuit until then. Placing your TNT after the rest of the circuit is complete will help to avoid such problems and the destruction of the device itself.

Problem-solving

When your circuit isn't working the way you think it should, take a look at it and try to find the problem.

  • Are you trying to draw power from a weakly-powered block? Maybe you need a redstone repeater to strongly-power the block, or to pull power out of the block.
  • Are you trying to transmit power through a non-opaque block? Replace it with an opaque block, or go around it.
  • Did you create a short-circuit and a redstone torch that should be powered is now burned out? Fix the short-circuit and update the torch to get things going again.
  • Are parts of your circuit activating when they shouldn't be? Maybe you've accidentally "crossed wires" allowing a signal from one part of the circuit to activate another part of the circuit.

Refining

Once your circuit is working, consider if it can be improved (without breaking it).

  • Can you make the circuit faster?
    • Reducing the number of components a signal has to travel through can speed up the circuit.
  • Can you make the circuit smaller?
    • Can you use fewer blocks?
    • Can you shorten the redstone wire lines?
  • Can you make the circuit more robust?
    • Will the circuit still work when activated by a very short pulse?
    • Will the circuit still work when activated and deactivated rapidly in succession?

另见

Advertisement