你可以帮助我们来翻译此条目,但请勿使用机器翻译。
活塞 允许了玩家设计更小的,拥有比常规速度更快的与/或 门的(只用红石的相应部分)的电路。对红石电路有着正确的理解会对你很有帮助,因为这个教程集中在电路设计而不是它的功能。
活塞式电路有着三个优势:
活塞电路的主要部件是粘性活塞,红石线,红石中继器和红石火把。
除非另有陈述,所有的活塞都应该是粘性活塞。
原理
能源与中继器
对活塞有用的能量可以以多种形式来传输。首先要注意的是,这里有两种不同类型的方块;透明的 和 固体的。透明方块通常指的是和玻璃,半台阶,或和空气一个类型的方块,同时固体方块指的是更常见的材料,例如泥土,石头或者羊毛。
红石信号的关键是能够穿过固体方块来传输信号,但是不能穿过透明方块来传输信号。然而,信号可以一次穿过一个固体方块,它不能从一个固体方块传输到另一个固体方块中去。一个固体方块只有在它是被"强力充能"(被一个红石火把,红石中继器,或者红石比较器,但是红石线不行。)的情况下才可以向从其延伸的电线充能。 红石粉可以被放置在某些透明方块上,但是这样放置的红石粉只会向上传输信号,而不会向下传输(这就是因为红石信号不能穿过透明方块的原因)。
红石火把只有在它们会在逻辑门使用之后改变状态之时才会被考虑成一个逻辑部件。(否则它们只是一个信号供应器。)如果它们很频繁的改变状态的话,它们极易烧毁。如果一个固体方块在一个红石火把之上的话,任何连接到那个方块的红石线都会被充能。然而,如果那个方块是一个透明方块的话,红石火把则不会帮红石线充能。在创造模式中,因为红石块的出现,把红石火把当做一个方块的信号供应器是很不适用的,因为红石块是被永久充能的。不过它们更加的昂贵。
当一个红石中继器对着一个固体方块时,它会用和红石火把一样的方式把信号传递进那个方块。一个中继器还可以从一个被充能的固体方块中获得信号,甚至是很弱的充能程度(这就是红石中继器可以把弱充能的信号转换成一个更强的信号的功能)。然而信号不会通过透明方块进行传递。
活塞会在被充能时伸缩,但是值得注意的是它们可以从在它们上面的方块处接受信号——即使那个方块是空气,如果它能够被充能,活塞也同样会被充能。活塞还可以通过它们伸缩出的活塞部分来接受信号,这就产生了几种广泛在电路中使用的混杂模式。一个活塞在它伸缩的时候能够给推动至多12个方块;然而,一个粘性活塞缩回的时候只能拉回一个方块。某些方块能够免疫被推动或拉动,尤其是黑曜石和任何带有图形用户界面(GUI)或者储存空间的方块(除了工作台)。其他的方块被活塞推动的时候会"蹦出来"然后掉落成为物品——这也包括了大部分"附加"在那个方块上的方块,例如任何种类的火把,或者门,但是也有一些其他的,例如南瓜灯。
活塞门设计
活塞可以衍生出能够代替许多传统的逻辑门的设计。活塞门也可以使用红石火把来提供一个持续的信号来源,或者为了其他目的。
非门/变频器
活塞非门
只用活塞的非门比常规的红石非门要稍稍大一些,所以它很少被单独使用。然而,它论证了使用在许多活塞机械中的一个重要的概念,即在固体方块之下的红石火把能够在任何周围的红石线中产生一道信号电流。当一个输入线路被触发的时候,活塞伸缩,不再遮挡住有着红石火把的坑,并且消除了从输出线路来的信号。输入线路可以为几乎任何方向的活塞进行充能。非此即彼,一个红石块可以用于缩小这个设计。
或门
活塞或门
这个有可比性的设计比起常规的红石或门稍稍快一些。它使用了一个从任意一条输入线路充能伸缩后能够覆盖一个红石火把的活塞。
与门
活塞与门
非常快速的与门。在停止充能的时候,粘性活塞会从坑上拉回方块,阻断整个电路。当充能后,它会伸缩,然后让红石电能流入/出那个坑。一条输入线路为活塞提供能量,另外一条为活塞阻断的电路部分提供能量,要释放一个信号,这两者都必须是开启的。
隐含门
Piston IMPLIES gate
Comparable size and speed to some of the basic redstone IMPLIES gate. This gate represents material implication. Returns false only if the implication A → B is false. That is, if the conditional A is true, but the consequent B is false. It is often read "if A then B." It is the logical equivalent of "B or NOT A". The torch under the mobile block is in a hole.
异或门
活塞异或门
一个只会在某一条输入线路被开启时才会激活的设备。读作"ex-or" (XOR),它是 "exclusive or" (异或)的简写。若是在尾端增加一个非门就会变为同或门,是一种会在输入线路互相相等时才会激活的逻辑门。异或门和同或门有着一个有用的特质:如果当一个异或门或同或门的输入线路变化时,它们的输出线路总是会跟着一起变化,这允许了混合两个开关来开关一个门,或激活另一个设备。这个设计比相同意义下只用红石的设计要小得多,而且还比其稍快一些。
同或门
活塞同或门
一个会在两个输入线路都相等的情况下激活的设备,所以它对做门来说很有用,这样的话,如果输入线路变化的话输出线路总是会跟着一起变化。就像异或门一样,这个设计比相同意义下只用红石的设计更小更快。
锁存器
锁存器是记忆电路。自然的来说,活塞能够在物理上移动方块到新位置的能力使得它们自然而然的能成为锁存器中的一个工具。
复位置位锁存器
活塞复位置位锁存器
The basic piston RS Latch is small and easy to make. The pistons used here are regular pistons, not sticky pistons, and push a block over one of two holes containing a Redstone Torch. One hole can be omitted if only one output is required. Using a Block of Redstone lets the circuit become even smaller, and adds the inverse output.
触发式双稳态多谐振荡器 (T-Flip Flops)
These T-flip flops use one input to switch between two states.
Sticky pistons behave strangely when they receive a 1-tick signal. If a block is directly next to the piston, the piston will push the block but will not pull it back when the signal ends. If the piston receives another 1-tick signal, the piston will extend and retract the block. This can be used to toggle the position of blocks.
活塞触发器A
Design A, 4x2x4. Uses regular pistons. Both of the pistons are regular pistons. This flip flop is quite fast and quite small. When the input goes from a 1 to a 0 it will toggle. Note that you can invert the input to increase the speed of the circuit.
活塞触发器B
Design B (5x3x2) is actually an RST latch, combining the functionality of both the Set/Reset (RS) and toggle (T) latches. Uses regular pistons. This flip flop doesn't use torches for logic so it can work with signals of any length. The dust on level 1 is there to redirect the redstone wire away from block X which powers the piston. However, this circuit does not have an inverse output.
环形记忆存储器
A simple ring of blocks, rotated by pistons. The reading head is on the right side of the ring. The rightmost circuit is a clock which drives the pistons
This is a ring of blocks attached to regular pistons at the corners so it can rotate. The blocks are usually a combination of solid and non-solid blocks. The pistons are often connected to a clock so that they will rotate the ring. Most (if not all) rings have a reading head which consists of a repeater pointing at the ring and a redstone torch powering the repeater. By using redstone on the other side of a ring, one can see which type of block is in front of the reading head (1 = Solid; 0 = Non-solid). This information now can be passed to a circuit.
频段控制
When you add several rings together in a row, you create a band. A band stores even more information and works similar to punched tape. Examples include music machines, combination locks, and memory.
钟
速射活塞钟
Rapidfire Piston Clock
This rapidfire clock is fairly simple to build. It is demonstrated in this video from May 18, 2012. You will need 2 non-sticky pistons, 2 repeaters, and 6 redstone. You will also use 5 solid blocks, but will probably be digging two out of the ground. The repeaters must be set to at least 2 ticks, and they must match. Place the mobile block last to start the clock, and take output from either end or any wire. Note that this clock is not switchable, and if it does stop for any reason, it's difficult to restart by a redstone signal. The player can restart it by breaking and replacing the mobile block, or by changing the repeater delays (both of them, the clock will restart when they match and are set to at least 2 ticks).
这种速射的时钟是相当简单的。证明在这个视频从5月18日,2012年。你需要2粘贴式活塞,2中继器,6红石。您还将使用5固体块,但可能会挖的地面。中继器必须设置为至少2蜱虫,而且他们必须匹配。去年开始移动块时钟,并采取输出两端或任何线。注意这个时钟不是切换,如果它停止任何理由,红石信号很难启动。玩家可以通过将重新启动它,并取代移动块,或通过改变中继器延迟(他们两人,时钟将重新开始比赛时,将至少2蜱虫)。
交替速射活塞钟
This piston clock is a very simple way of repeating a circuit that goes at high speed without burning out. It does not require repeaters or redstone torches. A tutorial is available here. You will need a single sticky piston, one lever, a small amount of redstone, and some solid blocks. From the lever, the redstone has to be placed so it goes up a block, before linking up to the piston. The piston has to be placed in a way that, when it is extended, it blocks the redstone from going up the side of the block without breaking the redstone. This breaks the circuit, removing power from the piston and thus retracting it, causing the circuit to open again. The signals are too fast to affect lighting sources such as lamps and redstone torches. Doors and dispensers both work well at this speed.
脉冲发生器
Piston Pulser
A small, stable pulser in a space of 2x3x2. The period can be adjusted with the repeater, and the clock can be turned off or on with the lever. (Turning the lever ON stops the clock, and vice versa.) The lever can be placed on any of the solid blocks.
边界检测器
A rising edge detector creates a brief signal when the input turns on. Conversely, a falling edge detector creates a brief signal when the input is turned off, and a dual-edge (aka "zero-crossing") detector responds to both.
Switchable Edge Detector (A)
Design A can be a rising- or falling-edge detector depending on the delays of the repeaters.
- For a rising edge, set both repeaters to 1 delay.
- For a falling edge, set the left repeater to four and the right repeater to one. This will create a 2-tick signal.
Double-Edge Detector (B)
Design B is a variant of the piston XOR gate, and a dual-edge detector. The right-hand repeater can be adjusted to output a longer or shorter pulse.
Inline Edge Detectors
Designs D, E, and F are straight-line versions, 1x2x2. Design D is a rising edge detector; design F, a falling edge detector; both with an output pulse of 2 ticks. Design E is a zero crossing detector, activating on both rising and falling edges. However, it only produces a single-tick pulse output. This can be moderated by adding a 2-tick repeater to the output, producing a 2-tick pulse, same as the other two.
双重扩充器
Basic Double Extender
This design will push and pull a block two spaces instead of one. The first and second repeaters must be set to delays of 2 and 4 respectively. The pistons are sticky and the device will correctly push and retract the block. The main trick is properly sequencing the retraction since the back piston will not pull back the forward piston when it is extended. Additionally, the back piston will only retract the forward piston, not the block. To handle these issues the forward piston must be retracted, pulled back, then extended and retracted again. Triple extenders and so forth are possible, but involve much more complex circuitry.
Piston-Safe Double Extender
A more advanced (and much larger) circuit can double-push pistons, without extending them (and stopping the system). This circuit can also can be powered with torches from below, to hide all the wiring. Either way, input to any of the green-marked squares, so the signal reaches all the way round without needing extra repeaters. The design can be mirrored to push a pair of pistons on the same switch.
Vertical Double Extender
Vertical double extenders are more difficult to make than horizontal extenders; the bottom piston will not retract unless the wire that extends the forward piston after it has been pulled back is not powered. This 5x5x5 design can push and retract a block two spaces vertically instead of one. The two repeaters closest to the pistons must be set to delay 2.
Longer vertical extenders require very complex circuitry, and are often used as elevators. To slightly simplify the required circuits, a gravity-affected block like gravel or sand can be used as the elevator platform. This avoids the need for the top piston to be sticky and for it to execute multiple extensions to pull down the top block at each stage of descent. If more than two pistons are used in total, multiple extensions of lower sticky pistons will still be required to pull down the pistons higher in the stack, which are not gravity-affected.
更多资源
Grizdale's Piston Logic Compendium
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||