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刻的)可能会使一些电路组件由于来不及响应而发生问题。
电路与机械
这两个术语通常都用于指包含电路组件的结构,但两者一般还是有明显区别的:
  • 电路(circuit)为处理信号的结构(生成,修改,组合等)。
  • 机械(mechanism)会对环境产生影响(移动方块,开门,改变光照强度,播放声音等)。
所有机械均包含电路组件,但电路是不会对环境产生影响的(除了红石火把或中继器在激活时产生的光,或活塞仅用于完成电路功能)。

电路组件

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

电源

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

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

作为电源使用的红石火把

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

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

拉杆
用途:拉杆用于开启或关闭电路,或完全充能一个方块。
放置:拉杆能够附着在大多数非透明方块的顶部侧面底部,或是倒置的台阶或倒置的楼梯顶部
激活:玩家可以右键点击拉杆以开启和关闭。
效果:当激活时,拉杆会充能其附着的方块(除非方块是倒置的楼梯或台阶)与其本身。
按钮
按钮有两种类型:木质与石质。
用途:按钮用于产生脉冲。
放置:按钮可以附着在大多数非透明方块的侧面
激活:玩家可以右键点击木质或石质按钮以激活,木质按钮也可被发射的激活。石质按钮一旦被按下,会保持其状态达10刻(1秒);木质则为15刻(1.5秒),但如果是被发射的激活的话,木质按钮会保持激活,直到箭被捡起或在1分钟之后自然消失。
效果:当激活时,按钮会充能其附着的方块与其本身。
Pressure plate as power source (v1.4

作为电源的压力板

压力板
压力板有两种类型:木质与石质。
用途:压力板可以探测生物,物品与其他实体
放置:压力板能够附着任何非透明方块的顶部,或是栅栏地狱砖栅栏、倒置的台阶或倒置的楼梯顶部
激活:实体经过或落在压力板上,压力板会被激活,一旦实体离开或被移除,压力板恢复非激活状态。石质压力板只会被生物激活,而木质压力板则会被生物、掉落的物品与发射的激活。如果是被发射的或掉落的物品激活的话,木质按钮会保持激活,直到箭被捡起或在1分钟之后自然消失,或是掉落的物品在5分钟后自然消失。
效果:当激活时,压力板会充能其附着的方块与其下方的方块(除非方块是栅栏地狱砖栅栏、倒置的楼梯或台阶)。
注意事项:压力板为非固体方块(即其不会阻碍经过的实体的运动),所以当其放置在栅栏上时,可以在不阻碍实体经过的同时保持激活。在绊线加入游戏之前,这是常用的一种感应生物的方法。
测重压力板
1.5特性。待完善。
Tripwire hook as power source (v1.4

作为电源的绊线钩

绊线钩
用途:绊线钩可以在较大的区域里探测生物,物品与其他实体
放置:绊线钩可以附着在大多数非透明方块的侧面
为了让绊线钩正常运作,必须将其与绊线结合。详见绊线钩页面。
激活:实体经过或落在与绊线钩相连的绊线上,绊线钩会被激活,一旦实体离开或被移除,绊线钩恢复非激活状态。绊线被破坏时,绊线钩会被激活5刻,除非是被剪刀破坏绊线(破坏绊线钩或绊线钩附着的方块也不会激活)。
效果: 当激活时,绊线钩会充能其附着的方块与其本身。绊线并不会产生电能。
注意事项:详见绊线钩页面。
Detector rail as power source (v1.4

作为电源的探测铁轨

探测铁轨
用途:探测铁轨能够感知经过的矿车
放置:探测铁轨能够附着任何非透明方块的顶部,或是倒置的台阶或倒置的楼梯顶部
放置后,探测铁轨会自动与邻近的铁轨、探测铁轨与充能铁轨匹配。详见铁轨页面。
激活:探测铁轨会在矿车经过时激活,离开后恢复非激活状态。
效果:当激活时,探测铁轨会充能其附着的方块与其下方的方块(除非方块是倒置的楼梯或台阶)。
阳光传感器
1.5特性。待完善。
陷阱箱
1.5特性。待完善。
红石块
1.5特性。待完善。

传输元件

传输元件把信号和脉冲从电源传输到充能的机械元件。通过允许一个信号影响它自身或它的电路也可以产生复杂的效果。

Redstone wire as circuit component

作为电路元件的红石线

红石线
用途: 红石线用来传输能量。
放置: 红石线通过手持红石粉右键放置(红石粉物品,红石线是方块)。红石线可以附着在任何不透明方块的顶部,或者是萤石,倒置的台阶楼梯顶部
当放置时,红石线会根据毗邻的红石线(在同高度或一层上或一层下),中继器和电源配置自身。如果只有一个这样的邻居,红石会形成一条线指向和远离那一个邻居(这样可以引起它指向一个它正常情况下不会指向的方块)。如果有许多个这样的邻居,红石线会形成一条线,“L”字形或“+”字形。如果没有这样的邻居,红石线会形成一个大的无方向的点。红石线不会自动配置去指向毗邻的机械元件,它必须被安排成这样做。
当两个红石线被放在垂直方向的对角线上(一个方块越过一个上,或一个方块越过下),较低的线会表现出“爬”上较高方块的侧面去加入另一条线。这种连接可被一个放置在较低方块上方的不透明方块“切断”,阻止了两条线视觉上的连接和相互传输能量。如果较高的线在一个倒置的楼梯或倒置的台阶上,较高的线会配置自身指向较低的线(和其他毗邻的线),但较低的线不会配置自身去指向较高的线(包括不会表现出“爬”上台阶和楼梯的侧面)。
红石线配置自身所指向的方向会影响它是否为毗邻的不透明方块和机械元件充能。
激活:红石线会被任何毗邻的电源,指向它的中继器,或强充能的不透明方块激活,红石线也会被其他毗邻它的红石线激活,但是能量从强充能方块开始随着距离下降。红石线可以传输能量到至多15个方块。
红石线能传输能量到对角线上方放在倒置台阶或倒置楼梯上的红石线,但不能到对角线下方的倒置台阶或倒置楼梯。
效果:充能的红石线激活任何它已配置指向的充能机械元件。它会弱充能它所指向的和它下方的不透明方块(支持它)。
Redstone repeater as circuit component

作为电路元件的红石中继器

红石中继器
用途:红石中继器用来传输能量,重新加强因距离而减弱的红石信号,延迟信号,和给予红石信号传输方向。
放置:红石中继器可发附着在任何不透明方块顶部,或在倒置楼梯和倒置台阶顶部
一个红石中继器有前面和背面——箭头从背面指向前面。中继器只对背面的方块作出反应和对前面的方块传输信号(在箭头的方向)。它也有一个可调节的延迟,通过右键它可设置成1至4刻。
激活:红石中继器被任何在它背面充能的元件激活,而且不被任何在它侧面,上面,下面,前面的方块的充能情况所影响。(但是见下文中“锁定”中继器)
影响:一个充能的红石中继器激活在它前面的红石线和机械,或者强充能一个不透明方块。它对在它下面,上面,侧面,背面的方块无影响。
红石中继器不仅“中继”一个信号(为了传输重新加强),它也会产生1至4刻的延迟。红石中继器也会把任何持续时间短于它的延迟的脉冲增长到与它的延迟相符合。
红石中继器能通过在它的侧面用另一个红石中继器充能来“锁定”。一个锁定的中继器不会对它的输出充能直到解锁,即使它的输入充能了。
不透明方块
用途:不透明方块用来支持电路元件和传输能量。
激活:不透明方块被激活的电源或激活的红石中继器强充能,或被在它上方或指向它的激活的红石线弱充能。
效果:充能的不透明方块会非激活附着的红石火把,激活毗邻的背对它的红石中继器,激活毗邻的充能机械。强充能的不透明方块会激活毗邻的红石线,包括在不透明方块下方的红石线(但是弱充能的不透明方块不会)。
注意事项:要在本来用右键会与之互动的方块(比如合成台熔炉发射器,和有唱片唱片机)上附着电路元件,在潜行时右键。
Transparent blocks as circuit components

作为电路元件的透明方块

透明方块
透明方块不能传输能量,只在很紧密的电路中被当作绝缘体因为空气也能做到这一点。一些不透明方块有特殊的特性使它们在红石电路中有用。
萤石红石线栅栏门能附着或放置在萤石的顶部活板门能附着在萤石的侧面,在萤石顶部的红石线可以向毗邻或对角线向上的红石线传输能量,但能向对角线向下传输。因为萤石不是不透明的,它不能为毗邻方块充能(包括附着的活板门),但在它顶部的红石线可以。
台阶楼梯红石火把红石线红石中继器拉杆压力板(木制或石制),铁轨(普通,充能,或探测),(木制或铁制),和栅栏门都能附着或放置在倒置的台阶和倒置的楼梯的顶部活板门能附着在倒置的台阶或楼梯的侧面(在单人模式,活板门不能放在倒置台阶的“底部”因为没有选择面与之互动,但由活塞推到那个位置的台阶不会引起活板门爆开)。在倒置台阶或倒置楼梯顶部的红石线可以向毗邻或对角线向上的红石线传输能量,但能向对角线向下传输。因为台阶和楼梯不是不透明的,它们不能被电源充能,也不能提供能量给毗邻方块。
玻璃栅栏红石火把能附着在玻璃的顶部,红石火把或压力板能附着在栅栏和地狱砖栅栏顶部

机械元件

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.

Redstone lamp
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.
Piston
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.
Dispenser
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

Rail
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).
Powered rail
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.
Door
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".
Trapdoor
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".
Fence gate
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.
Note block
Usage: A note block is used to produce a player-chosen sound.
Placement: After being placed, a note block's pitch can be adjusted over a two-octave range by right-clicking the note block, and it's "instrument" can be adjusted by placing different blocks beneath it.
Effect: When turned ON, a note block produces a sound. A note block must have air above it to activate.
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).
Command Block
Usage: A command block is used to execute a server command.
Placement: After being placed, the player can set the command to be executed by right-clicking on the command block.
Effect: When turned ON, a command block executes a specific player-defined command once.

电路设计

虽然建造电路的方法无穷无尽,但特定的电路建造样式是比较固定的。下面的章节对Minecraft社区中流行的电路进行了分类,每个章节有独立的主条目用于描述具体的电路设计方案。

某些电路可能只能完成最简单的控制,但你逐渐将能用此类简单电路的组合成复杂的、能够满足机械需要的大型电路。

传输电路

有两种特殊的电路传输机制:纵向传输与单向传输。

Vertical transmission screenshot

纵向传输方案

虽然横向传输较为直接,但纵向传输有时具有出人意料的适应性与集成性。

导线楼梯
最简单的纵向传输就是在斜向上的方块上铺设红石线,或是2×2的螺旋结构,或是其它类似结构。导线楼梯既能够向上也能向下传输信号,无延迟,但占地庞大,每15个就需要中继。
导线梯
因为萤石块、倒置楼梯阶梯能够承载红石线的同时不切断红石线,信号就能够在2×1的“梯子”上纵向传输(仅能向上传输!)。导线梯占地小,无延迟,但每15个就需要中继。
火把高塔
红石火把能够充能其上方的方块与相邻的(包括下方的)红石线,这样,纵向传输便成为可能(向上与向下的设计不同)。本方案无需中继,占地小,但会引入不小的延迟。

您也可以用活塞、水等方块建造其他形式的纵向传输方案。

参见:红石电路/其它§纵向传输

单向电路(即“二极管”)只允许信号沿着一个方向传输,主要用于防止输出端信号对输入端电路产生负面影响(例如信号串扰等)。单向电路也可用于电路压缩时用于防止电路不同部分相互干扰。

红石中继器
中继器只能从输入端输入信号,从输出端输出信号。它也会对信号加入一定延迟。
台阶二极管
倒置台阶无法向斜下方传输信号,因此将红石线铺上台阶就是一种简单的二极管建造方法。台阶二极管不会引入延迟,但也不会把信号加强。

很多电路已经具有单向性,因为它们的输出端不会接受输入信号,例如以附着在方块侧面的红石火把作为输出的电路。

逻辑电路

有时,你需要判断输入信号,经过一定的算法产生一个输出。这类电路即为人们耳熟能详的逻辑门(“门”只让满足“逻辑”的信号输出)。虽然有很多种类的逻辑门,最基本的只有三种:与门,或门、非门。

或门
或门的任意一个输入为1时,输出就会是1。
与门
与门只有所有输入均为1时,输出才会为1。
非门(反相器)
使得输入信号反相(例如输入为0,输出为1;输入为1,输出为0)。

脉冲电路

某些电路需要特定长度的脉冲,其他电路用脉冲长度传达特定信息。脉冲电路派上了用场。

在一个状态稳定,另一个状态不稳定的电路通常称为单稳态电路(monostable circuit)。大多数脉冲电路属于单稳态电路电路,因为它们的激活态(非稳态)只能持续较短时间就回到稳定态。

脉冲发生器
脉冲发生器产生特定长度的脉冲。
脉冲限制器
脉冲限制器(又称脉冲缩短器)可以缩短过长的脉冲。
脉冲稳定器
脉冲稳定器(又称脉冲延长器)可以延长过短的脉冲。
脉冲延迟
脉冲延迟电路能够为脉冲提供延迟。
边沿感应器
边沿感应器在信号变化时:从0到1(“上升沿”感应器)或从1到0(“下降沿”感应器),或两者均感应(“双边沿”感应器)。
脉冲长度识别器
脉冲长度识别器能够在输入脉冲长度在某个范围内时输出信号。
示波器
示波器为依次连接的、延迟为1刻的红石中继器链,据此能够通过点亮的中继器数量直观地测量脉冲长度。

时钟电路

时钟电路为持续、重复提供特定长度脉冲的脉冲发生器。一些时钟电路可以永久工作,另一些则可控。

简单的时钟电路只有两个等长的状态(0与1长度相同)。例如5刻激活与5刻非激活的时钟被称为5刻时钟。

中继器时钟
利用中继器(链)获得时钟电路中必要的延迟的电路。通常需要红石火把以获得反相功能。
活塞时钟
利用活塞对方块的推拉完成电路的反相功能。

时钟电路也可以基于矿车、掉落物品的自然消失等。

记忆电路

与逻辑电路永远反映输入信号不同,记忆电路的输出不单与输入相关,还与“过去的输入”相关。这样能够完成对电路过去状态的“记忆”。

在现实生活中的电子学中,锁存器指对输入信号的某个状态产生反应的电路;触发器指对输入信号的变化产生反应的电路。

T触发器
T触发器用于信号切换(类似拉杆)。T触发器具有“时钟”输入端,输入端满足特定条件时,输出端会切换一次。
RS或非锁存器
RS或非锁存器有2个输入,用于对电路有大规模控制需求时。输入端为S(Set)端与R(Reset)端:S端输入一旦变成1,输入就为1并保持;R端输入一旦变成1,输入就为0并保持。

还有很多记忆电路可供选择。

方块更新感应器

方块更新感应器(Block Update Detector,缩写为BUD)为能够对方块状态改变产生反应的电路(例如石头被开采,水变成冰,南瓜长出等一切涉及方块的数据更改的行为)。

活塞连接BUD
基于活塞的特性,即不使用方块更新的方式激活活塞,使得活塞保持伸出。这样当临近方块更新时,活塞会产生反应,激活事先设计的电路。
活塞卡顿BUD
基于活塞的特性,即在活塞无法再伸出时继续激活活塞,当不使用方块更新的方式使得活塞重新伸出后,活塞会卡在输出态。这样当临近方块更新时,活塞会产生反应,激活事先设计的电路。
导线BUD
导线强度基于红石更新而设计的BUD电路,当红石更新后会产生1刻脉冲。其优点是静音。

还有其他的方块更新感应器,例如使用船、矿车或红石灯的。

杂项电路

主条目:红石电路/其它

此类电路一般不常见,但却是大型复杂工程的重要组成部分。

数据分配器
数据分配器为逻辑门的高级形式之一,选择端能够使得输出端与输入端之一相同。
随机信号发生器
随机信号发生器能够产生无法预测的信号。一些随机信号发生器利用了Minecraft的随机特性(例如仙人掌生长或发射器对发射槽的选择);另一些则采用数学上的的伪随机算法。
多输入电路
多输入电路能够同时处理多个输入并得出综合输出。此类电路是建造计算器、数字钟与基本计算机的基石。

爱好者们还有很多更复杂的电路方案。

建造电路

计划

建造红石电路的第一步是确定电路能做些什么。

  • 应该在哪里控制整个电路?如何控制?
    • 电路是由玩家控制,生物移动控制或是其它控制方式?
  • 电路能够控制什么样的机械?
  • 信号如何从控制端传向机械?
    • 需要将多个来源产生的信号组合到一起吗?

建造

建造电路时使用特定的方块组合是个不错的习惯,这样你当修建其他的工程时,看到这些方块你就能意识到不能再继续挖了。常见的选择有石砖雪块羊毛(不同颜色的羊毛有利于你自己区分电路的不同部分)。

当在岩浆边上建造电路时要特别小心。很多电路组件会在液体流过时被破坏。

建造电路以引爆TNT(陷阱或大炮)时要格外小心。建造中的电路可能会意外触发TNT,因此强烈建议最后再放置TNT等破坏性装受控装置。

解决问题

当电路出问题时,仔细检查,尝试寻找出问题的来源。

  • 你是否想从一个弱充能方块引出电能?也许你需要红石中继器使其强充能,或者用红石中继器引出电能。
  • 你是否想让电能穿过一个透明方块?用非透明方块代替它,或者绕道而行。
  • 你是否无意中建造了一个短路电路,使得本来应当激活的红石火把燃尽了?修正短路电路,并更新红石火把的状态。
  • 本不该激活的电路部分是否错误激活了?也许你不小心把不同部分的线路之间连了起来。

精炼

电路正常工作后,考虑一下是否能够提高电路的性能。

  • 你能让电路反应更快吗?
    • 减少信号传输中不必要的元件数量
  • 你能让电路更小吗?
    • 你能使用更少的方块吗?
    • 你能缩短红石线的长度吗?
  • 你能让电路更强壮(提高鲁棒性)吗?
    • 电路在极短的脉冲下依然能正常工作吗?
    • 电路在频繁地激活/非激活交替下依然能正常工作吗?

另见

游戏内容

Advertisement