Minecraft Wiki

READ MORE

Minecraft Wiki
Advertisement
This page is part of the Hungarian translation project.
Mcredstonesim icon
Ez a cikk a MCRedstoneSim formátum diagramjait használja, a tömörség és az érthetőség eléréséhez.
Néhány terv több, mint két blokk magas, ezt a rétegeket sorban mutató animált gif képekkel, vagy külön, egymás mellé téve mutatja be.
Egy teljes jelmagyarázat található a Vöröskő tervrajzok oldalon.

A vöröskő-áramköröket az Alpha verzióban vezették be. A játékosok így bonyolult vöröskő-alapú szerkezeteket készíthetnek.

A vöröskő-áramkörök hasonlóak a "WireMod"-hoz a Garry's Modban, és a digitális elektronikához a valós életben (ami a logikai algebrán alapul).

Alapvető szerkezetek

Vöröskőhuzal

A vöröskőhuzal 15 blokknyira elviszi az elektromos töltéseket, a kábel sötétsége jelzi, milyen messze van egy áramforrástól. A vöröskőhuzal letevéséhez vegyél vöröskőport a kezedbe, és tedd le valahova.

Blokkok elektromos feltöltése

Minden blokk a Minecraft-ban lehet áram alá helyezett (avagy feltöltött, aktivált) vagy nem. Egy áram alá helyezett blokk olyan, mint egy kocka föld vagy egy üres hely (bár a levegőblokkokat nem igazán lehet áram alá helyezni), ami láthatatlanul fel van töltve, de biztonságosan hozzá lehet érni.

Áramot egy feltöltött blokk a hat közvetlenül szomszédos blokk egyikének vagy többnek tud átadni. Az áram továbbadásához egy blokknak vagy:

  • aktív áramforrásnak (egy vöröskőfáklya),
  • egy blokknak, amihez egy kapcsoló van erősítve (egy blokk egy nyomásérzékelő alatt, vagy egy blokkra erősített kar vagy gomb),
  • egy blokknak, amiben benne van a kapcsoló,
  • egy blokknak egy vöröskőfáklya alatt, vagy
  • egy aktív áramvezetőnek (vöröskőpor közvetlenül szomszédos egy áram alá helyett blokkal) kell lennie.

Jó tudni, hogy egy vöröskőfáklya egy földblokk oldalára helyezve a föld melletti blokk része, nem a földblokk része. Ekképpen, a blokkra helyezett vöröskőpor a blokk fölötti blokk része. Azonban, ha a blokk, amin a vöröskőpor van, áram alá kerül, a vöröskőpor is fel lesz töltve.

Minden aktívan feltöltött blokk számos irányba közvetíti az áramot, a blokk tartalmától függően:

  • Egy vöröskőfáklya magát és a fölötte lévő blokkot villanyozza fel, kivéve, ha az a blokk levegő. A vöröskőporok működése miatt ez a szomszédos vezetékeket is aktiválja.
  • Egy nyomólap azt a blokkot aktiválja, amiben gyakorlatilag benne van, és az alatta lévő blokkot is.
  • Egy kar, ha falon van, felvillanyozza azt a blokkot, amiben van, és azt a blokkot, amin rajta van, gyenge árammal látja el (lásd lejjebb). Egy földre helyezett kar azt a blokkot tölti fel, amiben van, de azt nem, amin rajta van.
  • Egy gomb azt a blokkot tölti fel, amin rajta van.
  • A vöröskőhuzal magát és az alatta lévő blokkot tölti fel, de csak gyengén tölti fel azokat a blokkokat, amik vízszintesen szomszédosak a huzal végeivel.

Vöröskőhuzal és a jel erőssége

Az, hogy egy blokk gyengén vagy erősen van-e feltöltve, meghatározza, hogyan hatnak a vöröskőhuzalokra. Ha egy huzal szomszédos akármilyen irányban egy blokkal, ami erősen van feltöltve, akkor aktív lesz. Nem lesz aktív, ha csak gyengén van feltöltve a blokk, kivétel a huzal alatti blokk, ami lehet gyengén és erősen feltöltött is. Ezért hatnak a huzalok különböző szintkülönbségen lévő dolgokra.

Egységek elektromos feltöltése

Egy egység, pl. egy ajtó, egy sín vagy egy blokk TNT aktiválódik, ha egy szomszédos blokk áram alatt van. Példaként, egy vöröskőfáklyát egy ajtó mellé helyezve változik az ajtó helyzete. Ekképpen, egy ajtóval közvetlenül szomszédos nyomólapra lépve az ajtó aktiválódik, mert a nyomólap magát is áram alá helyezi. Viszont, egy ajtótól két blokkra lévő nyomólapra állva az ajtó nem lesz aktiválva, mert az áram nem éri el az ajtó melletti vagy alatti blokkot.

Az egységek messziről történő áram alá helyezését vöröskőhuzallal szokták megoldani. Mint fent is írva van, a vöröskőhuzal annak a blokknak a része, amiben benne van, nem annak a blokknak, amihez csatlakozik. A vöröskőhuzalnak két állása van: be (világít) és ki (nem világít).

A vöröskőhuzal aktiválásának legegyszerűbb módja egy vöröskőfáklya vagy egy kapcsoló elhelyezése úgy, hogy szomszédos legyen a huzallal. A fáklya vagy kapcsoló huzal fölé, falra helyezése is működik. Az is működik, ha a huzal fölé blokkot helyezünk, és arra teszünk egy kapcsolót.

Egy vöröskőfáklya magában áram alá van helyezve: az alapértelmezett állása a "be", azaz világít. Kikapcsolódik, ha egy hozzá kapcsolódó blokktól áramot kap. Ez a tulajdonság, és a távoli helyekre történő áramtovábbítás huzallal, a haladó vöröskőszerkezetek és áramkörök alapja.

Vigyázni kell, hogy pontosan kövessük az áram tulajdonságainak szabályait, vagy nem várt eredmények születhetnek. Például, van egy nyomólap. A nyomólapra lépve az a blokk, amiben a nyomólap van, és az alatta lévő blokk is aktiválódik. Ha egy vöröskőhuzal van e blokk alatt, az is áram alá lesz helyezve, mert szomszédos a feltöltött blokkal, ami felette van. De hogyha aktiváljuk a nyomólapot, az nem fog kikapcsolni egy vöröskőfáklyát a feltöltött blokk alatt -- sőt, egy vöröskőfáklya olyan blokk alá helyezése, amin egy nyomólap van, folyamatosan áramot továbbít a blokknak, így a nyomólap aktiválása és deaktiválása nem számít semmit.

Különleges elektromos egységek

Néhány egység különleges módon viselkedik, pl:

  • Ha egy blokk fel van töltve, egy hozzá erősített vöröskőfáklya kikapcsolódik.
  • Ha egy blokk fel van töltve, egy rajta vagy mellette lévő ajtó állást vált: ha nyitva volt, bezáródik, ha zárva volt, kinyílik.
  • Ha egy blokk fel van töltve, és ez egy hangblokk vagy elosztó, csak egyszer fog lejátszódni/kilőni.
  • Ha egy blokk fel van töltve, és fölötte sínek vannak, a sínek alakja átkapcsolódik. (Pl. ha van egy sín előtt még egy sín, és jobbra tőle is egy, akkor áramot vezetve a sínbe a sín átkanyarodik a jobb oldali sínbe.)

Elkerülendő hibák

A következő hibákat el kell kerülni:

  • Úgy próbálni feltölteni egy blokkot, hogy aktivált vöröskőhuzalt teszünk alá. A vöröskőhuzal csak vízszintesen tölt fel blokkokat a végeinél. Az alulról történő feltöltéshez tegyél oda egy vöröskőfáklyát.
  • Úgy próbálni áramot továbbítani egy blokkon át, hogy nincs rajta vöröskőhuzal. Bár egy alapvető blokk (föld, homok, sóder, stb.), ami szomszédos egy huzal végéhez át tud venni áramot, de továbbítani nem fogja a másik oldalra, mert nem áramtovábbító blokk. Ha van egy blokkod, amit nem tudsz elmozdítani, vedd körbe huzallal a blokkot, vagy tegyél rá egy huzalt.
  • A blokkokon lévő kapcsolók egy kicsit hibásak. Ha egy blokkra teszel egy kapcsolót, győződj meg róla, hogy rögtön működőképesek. ASttól függően, milyen sorrendben teszed le a vöröskövet és a kapcsolót, és milyen irányba nézel, és milyen irányba néz a kapcsoló, ezen lehetőségek néhány kombinációjánál a kapcsoló nem tölti fel az alatta lévő blokkot. Ha ez történik, rombold le a blokkot, válts irányt, és tedd le a blokkot és a kapcsolót még egyszer.

Logikai kapuk

Egy logikai kapu egy egyszerű egység, ami egy vagy több bemenetből egy kimenetet generál attól függően, milyen a kapu felépítése. Pl. hogyha mindkét bemenet egy ÉS kapuban 'igaz'/'be'/'áram alatt van', a kimenet 'igaz'/'be'/'áram alatt' lesz. A Wikipedián több információt találhatsz a logikai kapukról.

Lejjebb egy pár alapvető logikai kapuk vannak, képekkel példának és az MC Redstone Sim formátumú diagramokkal. Sokféle mód van ezek megépítésére, nem csak azok, amik itt vannak, szóval használd ezeket mérceként.

StandardLogicGates

Alapvető logikai kapu-diagramok

Az áramkörök jelmagyarázata

Mindegyik jel egy vagy két blokkot ábrázol (egy pedig három blokkot), felülről nézve.

A Redstone Simulator v2

Balról jobbra:

  1. Levegő: levegő levegő felett, azaz két üres blokk, egyik másik felett
  2. Blokk: levegő egy blokk felett
  3. Két blokk: blokk blokk felett, azaz két szilárd blokk egymáson
  4. Huzal: huzal (egy blokkal a huzal felett)
  5. Vöröskőfáklya: levegő vöröskőfáklya felett (minden fáklya vöröskőfáklya az áramkörökben)
  6. Huzal blokkon
  7. Fáklya blokkon
  8. Blokk huzal felett (azaz van egy levegőblokk, amiben van a huzal, mivel a blokkokat közvetlenül nem lehet huzalra tenni)
  9. Blokk fáklya felett
  10. Fáklya huzal felett (azaz van egy levegőblokk, amiben van a huzal, és efölött van a fáklya)
  11. Híd: két egymást keresztező huzal egy blokkon
  12. Kar (azaz kapcsoló): levegő kapcsoló felett
  13. Kőgomb: levegő gomb felett
  14. Nyomólap: levegő nyomólap felett
  15. Ajtó: 2 blokk magas
  16. Árnyék
  17. Jelismétlő: levegő egy akármilyen fokozatra állított jelismétlő,
  18. Jelismétlő blokkon
  19. Blokk jelismétlőn
  20. Elosztó
  21. Elosztó blokkon
  22. Blokk elosztón

NEM kapu (¬)

NOT

NEM kapu (inverter)

Egy olyan egység, ami a bemenetet invertálja, azaz megfordítja; ezért is hívják inverternek.

A NEM A
1 0
0 1
Elrendezés A B
Méret 1x1x2 1x2x1
Fáklyák 1 1
Vöröskő 0 0
Elszigetelt bemenet? Igen Igen
Elszigetelet kimenet? Igen Igen

VAGY kapu (∨)

OR gate

Három bemenetes VAGY kapu

Egy egység, ahol a kimenet "be", ha legalább egy bemenet is "be".

Az A elrendezés egy egyszerűbb verzió; kb. egy huzal, ami minden bemenetet és kimenetet összeköt. Azonban ebben a bemenetek "kompromisszumosak", azaz csak ebben a VAGY kapuban használhatóak. Ha máshol is használnod kell a bemeneteket, használd a B elrendezést.


Érdemes tudni, hogy a B elrendezés a NEMVAGY kapu egyszerű megfordítása.

A B A VAGY B
1 1 1
1 0 1
0 1 1
0 0 0
Elrendezés A B
Méret 1x1x1 1x3x2
Fáklyák 0 2
Vöröskő 1 1
Elszigetelt bemenet? Nem Igen
Elszigetelt kimenet? Nem Igen
Legtöbb kimenet 3 4

ÉS kapu (∧)

AND gate

ÉS kapuelrendezések.

Egy egység, ahol a kimenet "be", hogyha mindkét bemenet "be".

Egy példa használatára egy ajtó bezárószerkezete, aminél mind az aktiváló gombnak és a zárnak "be" állásban kell lennie.


A B A ÉS B
1 1 1
1 0 0
0 1 0
0 0 0
Elrendezés A B C
Méret 3x2x2 2x3x2 1x6x5
Fáklya 3 3 3
Vöröskő 1 2 3

NEMVAGY kapu (⊽)

NOR gate

NEMVAGY kapuelrendezések.

Egy olyan egység, ahol a kimenet "ki", amikor legalább egy bemenet "be". Minden logikai kapu vagy ebből, vagy a NEMÉS kapuból elkészíthető. A Minecraft-ban, ez az alapvető logikai kapu. Egy fáklyának 4 kölcsönösen elszigetelt bemenete lehet (B elrendezés), de 3 kényelmesen el tud férni (A elrendezés), és mindegyik csak választható. Egy fáklya 1 bemenettel a NEM kapu, és bemenet nélkül az IGAZ kapu (azaz egy áramforrás). Ha több, mint 4 bemenet kell, egy nem elszigetelt VAGY kapu kell egy NEM kapuval a végén (az elszigetelés terhére), vagy több NEMVAGY kapu, a ABC = A ⊽ ¬(BC) képlet szerint (a gyorsaság terhére, a beágyazott kapuk miatt).

A B A NEMVAGY B
1 1 0
1 0 0
0 1 0
0 0 1
Elrendezés A B
Méret 1x1x2 3x3x3
Fáklya 1 1
Vöröskő 0 5
Bemenetek 3 4
Elszigetelt bemenetek? Igen Igen

NEMÉS kapu (⊼)

NAND gate

NEMÉS kapuelrendezések.

Egy egység, ahol a kimenet "ki", amikor mindkét bemenet "be".


A B A NEMÉS B
1 1 0
1 0 1
0 1 1
0 0 1
Elrendezés A B
Méret 3x1x2 2x2x1
Fáklyák 2 2
Vöröskő 1 1

KIZÁRÓ VAGY (XOR) kapu (⊻)

XOR gate

KIZÁRÓ VAGY kapuelrendezések.

XOR

H: KIZÁRÓ VAGY kapu jelismétlőket használva.

Egy egység, aminél a kimenet akkor "be", amikor a bemenetek nem egyenlőek egymással. Egy NEM kaput a végére tenni egy AZONOSSÁG kaput hoz létre, aminél a kimenet akkor "be", ha a bemenetek egyenlőek egymással. Egy hasznos tulajdonságuk, hogy egy KIZÁRÓ VAGY vagy egy AZONOSSÁG kapu mindig kimenetet vált, amikor változik a bemenet, így 2 kapcsolót lehet úgy kombinálni, hogy kinyissanak és becsukjanak egy ajtót, vagy másik egységet aktiváljanak.

A B A KIZÁRÓ VAGY B
1 1 0
1 0 1
0 1 1
0 0 0
Elrendezés A B C D E F G H
Méret 3x5x2 3x3x3 5x5x1 3x3x2 5x4x2 3x3x3 5x2x2 4x3x3
Fáklyák 5 5 3 3 3 5 8 3
Vöröskő 6 5 14 3 12 4 4 8
Jelismétlők 0 0 0 0 0 0 0 2
Sebesség 3 3 2 2 2 3 3 3
Kimenet iránya előre vissza előre előre előre előre előre előre
Kellenek karok? Nem Nem Nem Igen Nem Nem Nem Nem

AZONOSSÁG kapu (≡)

XNOR gate

AZONOSSÁG kapuelrendezések.

A logikában, erre a kapura az "akkor és csak akkor" vagy röviden "csakkor" kifejezéssel vonatkoznak. Ez az egység kimenete akkor "be", ha a bemenetek egyenlőek. Ezt a KIZÁRÓ VAGY kapunál a kimenet invertálása vagy egy bemenet megváltoztatásával elérhető.


A B A AZONOSSÁG B
1 1 1
1 0 0
0 1 0
0 0 1
Elrendezés A B C D E F
Méret 4x3x2 4x3x2 2x5x4 3x5x3 4x5x2 4x5x2
Fáklyák 6 4 4 4 4 4
Vöröskő 5 5 7 7 10 9
Sebesség 3 2 2 2 2 2
Kimenet iránya előre előre előre előre előre vissza
Kellenek karok? Nem Igen Nem Nem Nem Nem

KÖVETKEZIK kapu (→)

IMPLIES

KÖVETKEZIK kapu.

Egy egység, ahol a kimenet csak akkor hamis, azaz "ki", amikor igazról hamisra következtetünk. Gyakran olvassák így: ha A, akkor B.

A B A → B
1 1 1
1 0 0
0 1 1
0 0 1
Elrendezés A B C D
Méret 2x2x1 2x1x2 2x3x2 1x3x2
Fákylák 1 1 3 1
Vöröskő 1 1 2 2
Sebesség 1 1 2 1
Elszigetelt bemenetek? Csak A Csak A Igen Csak A
Elszigetelt kimenetek? Nem Nem Igen Nem

Reteszek és kétállású kapcsolók

A reteszek és a kétállású kapcsolók ([[1]] egybites memóriacellák. Ezek használatával az áramkörökben el lehet tárolni az adatokat, és később felhasználni, nem csak akkor, amikor van bemenet. Az ezeket a komponenseket alkalmazó funkciókat meg lehet úgy is építeni, hogy különböző kimenetük legyen egymást követő parancsokra, még ha nem is váltpznak a bemenetekm, és így az ezeket használó áramkörökre a "szekvenciális (egymást követő) logika" kifejezés vonatkozik. Így lehet számlálókat, órákat és bonyolult memóriarendszereket létrehozni, amiket nem lehet csak logikai kapukkal elkészíteni.

Minden vöröskőretesz vagy flip-flop alapja az RS NOR retesz, két NEMVAGY kapuból építve, aminek a bemenete és kimenete össze van kötve. A NEMVAGY kapu szimmetriája miatt választható, melyik állás a 'beállítás', amíg nem teszünk bele még logikai kapukat, így még bonyolultabb egységeket létrehozva. A reteszeknek általában két bemenete van, egy 'beállítás' és egy 'törlés', amit a tárolt érték átállítására használnak, a flip-flopok viszont még bonyolultabb logikába burkolt reteszek.

RS NOR retesz

RS NOR latch

RS NOR reteszelrendezések

RS NOR Latch E

RS NOR retesz, E elrendezés.

Vertical RS-NOR

H elrendezés oldalról nézve (Source)

Egy egység, ahol Q örökké "be" lesz, miután S-től bemenetet kapott. A Q-t ki lehet kapcsolni egy R-ből jövő jellel.

This is probably the smallest memory device that is possible to make in Minecraft. Note that Q means the opposite of Q, e.g. when Q is on, Q is off and vice-versa. This means that in certain cases, you can get rid of a NOT gate by simply picking the Q output instead of putting a NOT gate after the Q output.

A very basic example of use would be making an alarm system in which a warning light would stay turned on after a pressure plate is pressed, until you hit a reset button.

In the truth table, S=1, R=1 is often referred to as forbidden, because it breaks the inverse relationship between Q and Q. Also, some designs where the input is not isolated from the output, such as B and D, will actually result in Q and Q both apparently being 1 in this case. As soon as either S or R becomes 0, the output will be correct again. However, if S and R both become 0 on exactly the same tick, the resulting state could be either Q or Q, depending on quirks of game mechanics. In practice, this input state should be avoided because its output is undefined. In design E, S=1 and R=1 results in both Q=0 and Q=0.


S R Q Q
1 1 Undefined Undefined
1 0 1 0
0 1 0 1
0 0 Keep state Keep state
Design A B C D E F G H
Size 3x3x1 2x3x2 3x3x3 4x2x2 7x3x3 4x2x1 3x2x2 1x3x3
Torches 2 2 2 2 2 2 2 2
Redstone wire 4 4 8 6 18 4 3 3
Inputs isolated? Yes No Yes No Yes Yes Yes No
Outputs isolated? Yes Yes No No Yes Yes Yes No
Input orientation opposite opposite adjacent either adjacent opposite adjacent opposite

RS NAND latch

RS NAND latch

RS NAND latch designs.

Since NOR and NAND are the universal logic gates, a design for an RS NAND latch is just an RS NOR with inverters applied to the inputs and outputs. The RS NAND is logically equivalent to the RS NOR as the same inputs for R and S give the same outputs.

When S and R are both off, Q and Q are on. When S is on, but R is off, Q will be on. When R is on, but S is off, Q will be on. When S and R are both on, it does not change Q and Q. They will be the same as they were before S and R were both turned on.

S R Q Q
1 1 Keep state Keep state
1 0 0 1
0 1 1 0
0 0 Undefined Undefined
Design A B
Size 6x3x3 6x3x2
Torches 6 6
Redstone 10 8
Input orientation adjacent opposite

D Flip-Flop

D flip-flop

D flip-flop designs.

Vertical D-latch

Side view of a vertical D flip-flop, design C (Source)

D-latch 2

Design D (Source)

Compact D Flip Flop

Design E is a more compact version of design A.

ClockMemory-2

Design F

A D flip-flop, or "data" flip-flop, sets the output to D only on certain conditions. The basic level-triggering D flip-flop (design A), also known as a gated D latch, sets the output to D as long as the clock is set to OFF, and ignores changes in D as long as the clock is ON. Design B includes an edge-trigger, and will set the output to D only at the moment the clock goes from OFF to ON.

In these designs, the output is not isolated; this allows for asynchronous R and S inputs (which override the clock and force a certain output state). To get an isolated output, instead of using Q simply connect an inverter to Q.

Design C is a one block wide version of A, except for using a non-inverted clock. It sets the output to D as long as the clock is ON (turning the torch off). This design can be repeated in parallel every other block, giving it a much smaller footprint, equal to the minimum spacing of parallel data lines (when not using a "cable"). A clock signal can be distributed to all of them with a wire running perpendicularly under the data lines, allowing multiple flip-flops to share a single edge-trigger if desired. The output Q is most easily accessed in the reverse direction, toward the source of input. Q can be inverted or repeated to isolate the latch's Set line (the unisolated Q and Q wires can do double duty as R and S inputs, as in design A).

Design E provides a more compact version of A, while still affording the same ceiling requirement. The design to the right in the image however requires 1 more block ceiling allowance, but allows the edge trigger to act on a high input. This additional ceiling requirement can be circumvented by simply moving the vertical NOT gate, to a lateral position 2 blocks downward. There is also the option of simply providing a NOT gate on the clock for your data bank, thus preventing the requirement of a gate for each flip flop.

Design F holds its state while the clock is high, and switches to D when the clock falls low. Note the presence of blocks above the top wire, to cut connections. They are indicated by yellow hashing on the image. The repeater serves to synchronise the signals that switch out the loop and switch in D. It must be set to 1, to match the effect of the torch.

Design A B C D E f
Size 7x3x2 7x7x2 1x5x5 2x4x5 3x2x7 3x2x6
Torches 4 8 5 8 5 4
Redstone wire 11 18 5 5 13 8
Repeaters 1
Trigger Level Edge Level Level Level Level
Output isolated? No No No No No Yes
Input isolated? Yes Yes C Only Yes Yes No

JK Flip-Flop

JK flip-flop

JK flip-flop designs.

A JK flip-flop is another memory element which, like the D flip-flop, will only change its output state only when the clock signal C changes from 0 to 1 xor 1 to 0 (edge-triggered, design A and B), or while it holds a certain value (level-triggered, design C). When the flip-flop is triggered, if the input J = 1 and the input K = 0, the output Q = 1. When J = 0 and K = 1, the output Q = 0. If both J and K are 0, then the JK flip-flop maintains its previous state. If both are 1, the output will complement itself — i.e., if Q = 1 before the clock trigger, Q = 1 afterwards. The below table summarizes these states — note that Q(t) is the new state after the trigger, while Q(t-1) represents the state before the trigger.

The JK flip-flop's complement function (when J and K are 1) is only meaningful with edge-triggered JK flip-flops, as it's an instantaneous trigger condition. With level-triggered flip-flops (e.g. design C), maintaining the clock signal at 1 for too long causes a race condition on the output. Although this race condition is not fast enough to cause the torches to burn out, it makes the complement function unreliable for level-triggered flip-flops.

J K Q(t)
0 0 Q(t-1)
0 1 0
1 0 1
1 1 Q(t-1)
Design A B C
Size 11x9x2 9x8x2 5x7x4
Torches 12 12 11
Redstone 34 35 22
Accessible Q? No No Yes
Trigger Edge Edge Level

T Flip-Flop

T flip-flop

T flip-flop designs.

Narrow T Flip-Flop

Side view of vertical T flip-flop designs.

TflipflopH-2

T flip-flop designs H and J.

T Flip-Flops are also known as "toggles". Whenever T changes from 0 (off) to 1 (on), the output will toggle its state.

A useful way to use T Flip-Flops in Minecraft could for example be a button connected to the input. When you press the button the output toggles (a door opens or closes), and does not toggle back when the button pops out. (Designs C and D do not have an incorporated edge trigger and will toggle multiple times unless the input is passed through one first.)

It is also the core of all binary counters and clocks, as it functions as a "period doubler", turning two input pulses into one output pulse.


Design A has a large footprint, but is easy to build. It (and B, which is a slightly compacted version of A) is essentially a JK flip-flop with the inputs for J and K removed so that it relies on the edge trigger (right side of the diagram) to keep it in the stable state and only allow a single operation per input.


Design C has a smaller footprint and an easily accessible inverse output, but lacks an edge trigger. If the input is kept high, it will repeatedly toggle on and off, cycling quickly enough to burn out its torches. For example, if the button mentioned above is wired directly to its input, the device can toggle several times before the button shuts off. Even a 4-clock is too slow to reliably result in only one toggle. Adding an edge trigger by routing input through a separate pulse generator (design B' seems to work best) will prevent this problem, as will any other means of sending it a short (2-3 tick) pulse of power.


Designs D and E are much taller than the others, but only a single block wide, making them good for situations where floorspace is limited. D is level-triggered like design C, which can save space when distributing one input pulse to multiple flip-flops. E has a single block wide edge trigger added on, making it easy to daisy-chain multiple units to create a binary counter or period-doublers for a slow clock. These designs are based on the vertical gated D latch (design C) with the inverse output looped back to the input.


Design F makes use of repeaters to make the circuit more compact, however, it does require the repeaters to be set to the levels specified in order to function correctly.


Design G is a T Flip-Flop design.
Repeaters need to be set to the levels specified to work correctly. (Otherwise it will blink or it won't work)
Layout of the G T Flip-Flop.


Design H uses timing - the repeaters exactly match the torches. It must be held high driven low with an edge - a suitable circuit is simply a torch and a repeater set on 4 in parallel. Without this, it will oscillate. In addition to being small, the design is fast - the output flips almost as soon as the input goes low. It seems to be the smallest now, if we do not include an edge detector on the input (the suggested edge detector is 3x4x1). Note that three blocks are needed above the redstone to stop cross-connections. In the diagram, these are shown with yellow hashes. You can put a fourth one in over the repeater for symmetry if you wish. These blocks do not add to the height of the unit - they are at the same layer as the two upright torches.


Design I is, a T Flip-Flop design, it do not uses repeaters, The input is the Down block, the ouput can be the top left corner torch.
The Output blinks when toggled. Layout of the I T Flip-Flop.


Design J is the smallest design of T Flip-Flop on this page. It is a compact version of the H design and has an edge trigger. (At least for Beta 1.6.6 SMP the picture of design J has an error: If you only consider the Redstone Repeater - counts, from left to rigth in the image, they read 1-1-4. They should be 2-1-4.)


NOTE: Some of the illustrated T Flip-Flops to the right don't include the typical inverse Q outputs. If you want to use the inverse Q then just add an inverter to Q.

NOTE: Using design E you may require a delay in the connection between the edge trigger and flip-flop in order to maintain a high input long enough to toggle the flip-flop


Design A B C D E F G H I J
Size 7x9x2 7x8x2 5x6x3 1x7x6 1x12x7 6x8x2 6x5x2 3x7x2 6x5x2 3x7x2
Torches 10 10 8 7 12 5 5 4 5 5
Redstone 28 29 22 9 15 26 14 12 18 10
Repeaters 0 0 0 0 0 3 2 2 0 3
Accessible Q? No No Yes No No Yes No Yes No Yes
Trigger Edge Edge Level Level Edge Edge Edge Edge Edge

Other Redstone Components

Repeater/Diode in Beta 1.3

See the Redstone Repeater article for full details.

As of Minecraft Beta version 1.3 you can craft a Redstone Repeater block from 3 stone, two redstone torches and one redstone dust. It can be used to compactly extend the running length of a wire beyond 15 blocks, or apply a configurable delay.

Traditional Repeater/Diode

RedstoneInverter

Example of a Traditional Repeater

Using two Redstone torches in series can effectively extend your running wire length past the 15-block limitation. As of 1.0.2 (the July 6th update), there must be a strip of wire between the two Redstone torches. Repeaters makes it possible to send long-distance signals around the map, but in the process, slows down the speed of transfer. To reduce delays, you can stretch out the repeater so that some areas of the wire are consistently in the opposite state, but as long as the amount of Redstone torches, or, effectively, NOT Gates is even, the signal will be correct. In more advanced circuits, repeaters can be used as a semi-conductors; to isolate in- or outputs.

Note that since 1.3 there is a one block Redstone Repeater built into the game that can be crafted from 3 stone, two redstone torches and one redstone dust, and which can be set to different delay times(The second setting is equal to one Traditional Repeater.The fourth setting is equal to two Traditional Repeaters).

Two-Way Repeater

A while back, I created a new type of redstone circuit (as far as I can tell) which acts as a two-way repeater, essentially serving as an elongated strip of redstone. Unlike normal repeaters, which only work in one direction, this circuit allows a signal to be sent through it from either side. It does not have a traditional input or output, but rather two spots which serve as both input and output, depending on what is attached to them. Whenever either one of them is receiving power, the other one is also receiving power. Whenever one of them is off, both are off.

Also, this circuit even tells you the direction the signal is flowing. Of the two torches which appear unlit in the diagram, whenever the circuit is powered, one will be lit. It will be the only lit torch in the circuit, and it will face the direction the power is moving. Thus, if there is an input from A, the bottom-right torch will be lit.

Two way repeater

Two Way Repeater

In short, the primary purpose of this circuit is to simulate the function of redstone wire without restricting signal direction like a repeater, but it also happens to indicate which direction the signal is flowing.

The North/South Quirk

North South Quirk

Fig. 1 - The two possible orientations.

NSQ Inverse Outputs

Fig. 2 - Equal-delay inverse outputs.

A specific arrangement of torches which would normally be expected to behave identically to a traditional 2-torch repeater, causing a 2-tick delay in signal transmission, instead causes only a 1-tick delay. (See figure 1.) When constructed with the torches facing east and west, this arrangement causes the expected 2-tick delay, but when facing north and south, the second (top) torch changes state at the same time as the first, after only a single tick.

The quirk can cause unexpected bugs in complicated circuit designs when not accounted for, but it does have several practical uses. For example, double doors require opposite power states, but inverting one signal delays that door's response by 1 tick. Prior to Beta 1.3 and the introduction of the Redstone Repeater, the only known way to perfectly synchronize them was with this 1-tick repeater. Another application is in creating a clock circuit (see below) with an even pulse width and period.

Finally, as a generalization of the double-door use, the North/South Quirk can be used to obtain two signals which are always inversely related without the additional 1-tick delay a NOT gate normally causes in the second signal. (See figure 2.) This can be especially useful in circuits where precise timing is important, such as signal processing that relies on the transition of an input from high to low and low to high (on to off and back), for example by sending each of the inverse signals through separate edge detectors (see pulse generators below) and then ORing their outputs.

Delay Circuit

Delay Circuits

Compact delay circuits used to increase signal travel time.

Sometimes it is desirable to induce a delay in your redstone circuitry. Delay circuits are the traditional way to achieve this goal a compact manner. However, in Beta 1.3 the single-block Redstone Repeater was introduced, which can be set to a 1, 2, 3 or 4 torch delay, effectively rendering these delay circuits obsolete. The historical circuits are shown here for completeness, and will still work should you choose to build one.

These two delay circuits utilize torches heavily in favor of compactness, but in doing so the builder must be aware of the North/South Quirk. For maximum signal delay, construct these designs so that the stacked torches face east and west. For a fine-tuned delay, adjust the design to rotate one of the alternating-torch stacks to face north and south, or add an additional stack in that orientation.

Design A gives a 4 tick delay, while design B gives a 3 tick delay.

Clock generators

Clock generators and pulsars

Clock generators and pulsars.

Variable clock

Variable clock generator using redstone repeaters. The delay can be increased almost infinitely with more repeaters.

Clock generators are devices where the output is toggling on/off constantly. The simplest stable clock generator is the 5-clock (designs B and C). Using this method, 1-clocks and 3-clocks are possible to make but they will "burn out" because of their speed, which makes them unstable. Redundancy can be used to maintain a 1-clock, even as the torches burn out; the result is the so-called "Rapid Pulsar" (designs A and F). Slower clocks are made by making the chain of inverters longer (designs B' and C' show how such an extension process can be achieved).

Using a different method, a 4-clock can be made (design D). A 4-clock is the fastest clock which will not overload the torches.

A 4-clock with a regular on/off pulse width is also possible as seen in design E. This design uses five torches, but can be constructed so that it has a pulse width of 4 ticks by employing the North/South Quirk. It is important that the orientation of this design (or at least the portion containing the stacked torches) be along the north/south axis.

The customary name x-clock is derived from half of the period length, which is also usually the pulse width. For example, design B (a 5-clock) will produce the sequence ...11111000001111100000... on the output.

Designs F and G are examples of possible vertical configurations.

Repeater Clocks

With the addition of Redstone Repeaters in the Beta 1.3 update, clock generators can be simplified to at most one block, one redstone torch and from one to any number of repeaters chained together.

Very rapid clocks with even pulsewidth can be designed out of only Redstone Repeaters. By increasing the delay on each repeater or by increasing the number of repeaters in the loop, the clock can be slowed. These clocks act as variable clocks, but have higher maximum speeds, but these can't be used as it soon burns out the torch, you have to set the repeater on it's third setting to stop it burning out.

Controllable Clocks

Are a combination of a 5 Clock and a AND or a NAND gate. Add a AND/NAND Gate. The output ends in the first inventor of the clock, one of the AND inputs is the output of the 5th inventor of the clock

Pulse Generators

Pulse gen

Pulse generator designs.

A device that creates a pulsed output when the input changes. A pulse generator is required to clock flip-flops without a built-in edge trigger if the clock signal will be active for more than a moment (i.e., excluding Stone Buttons).

Design A will create a short pulse when the input turns off. By inverting the input as shown in B, the output will pulse when the input turns on. The length of the pulse can be increased with extra inverters, shown in B'. This is an integral part of a T flip-flop, as it prevents the flip-flop changing more than once in a single operation. Designs A and B can be put together to represent both the increase of A and the decrease of A as separate outputs, these can then be ORed to show when The input changes, regardless of its state. Redstone Repeaters can be used to change the length of the pulse, by placing one or more in series in the delay circuit between the two redstone torches (referring to design A). NOTE: This design no longer works with the 1.6 update. In order for any pulse to be sent through a there must be at least one more torch of delay between the first off state and the second. Adding a repeater on the first setting will add the minimum one additional torch of delay without breaking the pulse generator.

A pulse generator which causes a short pulse of low power instead of high can be made by removing the final inverter in design B' and replacing it with a wire connection. This is the type used in designs A and B of the T and JK flip-flops (when J=1 and K=1) to briefly place these devices in the 'toggle' state, long enough for a single operation to take place.

  • These circuits seem to burn themselves out, at least in SMP, with the 1.6 update. (confirm?)


Pulse Limiter

Pulse Limiter

Pulse Limiter

A pulse limiter limits the length of a pulse. It is useful in sequential bit activation to prevent multiple bits from being activated by the same pulse. The construction expects a default "on" input (left) and by default gives an "on" output (right).

The pulse limiter is built in a 2x3x1 rectangle with a block in the bottom left, a torch attached to that block on it's right side, two repeaters facing upwards, one taking its input from the torch and the other from the block itself. Both repeaters then combine into the output line at the top.

When the limiter receives an off input, it generates a pulse with a length equal to the delay of the right repeater plus the delay of the torch minus the left repeater (make sure that this yields a positive value) or the length of the initial pulse, whichever is shorter. For example: in the picture, the pulse is calculated as .1 + .1 - .1 = .1 or one tick, assuming the activation pulse is >= 1 tick. Be aware of the North/South quirk, as this can affect the delay of the torch. When the input is turned back on, the limiter will not emit a second pulse.

Monostable Circuit

Monostable

Monostable Circuit (large)

A device that turns itself off a short time after it has been activated. Basically, it consists of a RSNOR-latch and delay hooked up to its reset. The trigger input activates the latch's SET input, and after a delay set by the repeaters, the RESET activates, turning the output off again. The delay (e.g. the length that the output is high) can be set to any value by adding repeaters into the chain.

As a pulse will often have a shorter duration as it passes through complex circuitry, monostable circuits are useful for relengthening the duration, as the output always lasts the same amount of time, regardless of input duration.

It can also be used to delay a signal by using its reset signal as output.


A compact version of the circuit fits neatly into a small space (3x5x2).

Monostable small

Monostable Circuit (compact)


Alternatively, a (1x8x3) vertical device can be built to fit neatly against/into a wall. As in the other cases, the length of time that the output is high can be adjusted by adding or removing repeaters. (N.B. the repeaters should be flat on the floor, in the positions shown). This design lacks the RSNOR-latch of other designs and will only be useful in constant-input circuits. For momentary circuits, this design will not lengthen an input signal like the other designs, it will only cut the signal early.

Monostable vertical

Monostable Circuit (vertical)


A compact yet simple 2-X-1 device can also be built if you're constricted to long hallways with little room for width. However, due to the design, this only works with pulsed inputs and not with constant-input circuits. Unlike the previous designs, however, it can deal with 1-tick pulses. Design A shows the a basic device that lengthens the incoming pulse by 1. Design B shows how you can expand this to lengthen the pulse by 3. Design C, which lengthens incoming pulses by 6, shows how you can make the device more compact by lengthening the delay of the repeaters; unfortunately this particular design only works properly if the incoming pulse is at least two ticks long. Design D shows how you can skirt around this problem without terribly affecting the compact nature of the device; it lengthens pulses by 7 and works with any length pulse. Note that the number of ticks the device lengthens the pulse by is equal to the sum of the delays on the repeaters in the design, not including the first one.

PulseLengthener

Monostable Circuit/Pulse Lengthener (long)


Vertical transmission

Sometimes it's necessary or desirable to transmit a redstone state vertically, for example to have a central control or status for several circuits from a single observation point. To transmit a state vertically, a 2×2 spiral of blocks with redstone can be used to transmit power in either direction, and the spiral is internally navigable (i.e. one can climb or descend within the tower).

If repeaters are necessary, there is a 1×1 design for transmitting a state upward, and a 1×2 design for transmitting a state downward. For this to be effective you MUST NOT finish the top torch ON only OFF will switch the current when needed. Internal navigability of these designs inside a 2×2 tower interior can be maintained using ladders.

Redstone1x1up

A 1×1 tower of upward repeaters

Redstone1x2down

A 1×2 tower of downward repeaters


Blink device

Flash device

Blink device

Flash device2

Blink device on inside

Randomshort

Random short generator

This device creates energy in an irregular sequence. It is a variant of the "Rapid Pulsar" design shown in the Clock Generators section above.

You can build this device by placing a block with one redstone torch on every side. Place some redstone on top of the block, and place a new block on top of each torch. Then wire it up to different circuits.

It is also possible to make a double blink device if you put redstone torches on top of the blocks the other torches are under but it may take a little bit of time for the top ones to work.

This device will stop working after the server restarts (multiplayer)

By connecting all the torches together, this device will keep going, because although the torches burn out, they are all connected. Giving you a 1 tick timer.

Mechanical to Electrical Conversion

Mechanical Electral Converter

A Mechanical-Electrical Converter

Making use of a quirk involving the update function on blocks near a water or lava source, it is possible to convert the "mechanical" energy of updating a nearby block into a redstone signal. To do this, create a water or lava rig that will shift when the desired block updates (for more info, read this thread). Then position a redstone torch or powder trail so that the water/lava will wash/burn the torch or powder. Do this in such a way that the missing redstone component will change the input to your circuit.

Once this setup has been rigged, the next time an update function is called in an adjacent block to the water/lava source, it will trigger your mechanism. Update functions include: an adjacent block is placed by a user, gravel or sand falls into an adjacent block, grass grows, wheat grows, an adjacent block receives power, an item resting on an adjacent block changes state (such as a door being opened).

This setup can only trigger once before needing to be manually reset.

Electrical to Liquid Kinetic Conversion

Electrical Kinetic Liquid Converter

An Electrical-Liquid Kinetic Converter

It is possible to use the same quirk described in the Mechanical to Electrical Conversion section to make water or lava flow as desired. In order to do this, simply follow the instructions in this thread and run a redstone wire to the block adjacent to the water/lava source. Whenever the redstone wire toggles state, the water/lava source will update. If arranged properly, this can be used to redirect water or lava whenever the desired input is given via redstone circuit.

Detecting Short or Long Signals

Signal Length Detector

A signal length detector

Some times it is useful to be able to detect the length of a impulse generated by a Monostable Circuit. To do this we use an AND gate with redstone repeaters attached. These will only allow the signal to pass through if it has a signal length longer than the delay of the repeaters. This has many uses, such as special combination locks, which require you to hold down the button. It can also be used to detect Morse code. This uses the fact that a dot will not make it through the gate but a dash will.

Related pages

  • Redstone
  • Redstone (wire)
  • Redstone (ore)
  • Redstone (dust)
  • Diode/Repeater/Delayer
  • Redstone Torch
  • Advanced Electronic Mechanisms
  • Mechanisms
  • Traps
  • CraftBook (mod) adds integrated circuits and programmable logic chips to SMP

External links

Advertisement