Overview
The JK Trigger is a universal trigger, combining the behaviors of an SR Latch and a T Trigger. Unlike latches, triggers change their state only on a rising edge (the first tick of Redstone signal going from 0 to more than 0), whereas latches change their state while the corresponding pin stays true. The JK Trigger changes its state only after the Redstone signal at the Clock pin returns to 0 and another rising edge is detected.
The JK Trigger has a Clock pin (Pin Mark C) that changes the state of the JK Trigger on the rising edge. This Clock pin is essential because toggling the remaining two input pins simultaneously in Minecraft may lead to unexpected results.
The remaining two pins are J and K, marked by Pin Mark A and Pin Mark B, respectively:
- If both pins receive a Redstone signal of 0 on the Clock's rising edge, the JK Trigger does not change its output state.
- If powered individually, the J and K pins act like the Set and Reset pins of an SR Latch, setting the output to 15 or 0, respectively, on the Clock's rising edge.
- If both pins are powered, on the Clock's rising edge, the output toggles to its opposite state, behaving like a T Trigger.
To properly set the JK Trigger Output pin's state, you can change the signal in at least 2 Minecraft ticks:
- On the first tick, set the Redstone signal on the Clock pin to 0 and set the Redstone signal on the J and K pins according to your needs.
- On the second tick, set the Redstone signal on the Clock pin to at least 1.
Boolean Logic Table
The JK Trigger operates according to the following Boolean logic table:
J | K | Output |
---|---|---|
0 | 0 | Q |
1 | 0 | 1 |
0 | 1 | 0 |
1 | 1 | not Q |
The Q represents the last output state of the latch, and not Q is its opposite value. Remember, this Boolean logic table applies to the rising edge (first tick) of Redstone signal applied to the Clock pin. In all other cases, the output remains unchanged (Output = Q).
Configuration
The pins can be configured to face any side by right-clicking the block. This flexibility allows for easy integration into various circuit designs.
Pin Mark A | J pin |
Pin Mark B | K pin |
Pin Mark C | Clock pin |
Crafting
Ingredients | RedCu Crafter Recipe |
1 Smooth Stone Plate | |
1 Redstone Dust | |
1 Quartz |
Version Log
Version | Description |
0.0.0 | Introduced. On update from anywhere reads redstone signal only and updates neighbours when output changes. |
0.0.1 | Unlike in the previous version, block first reads the blockstate on the input, and if suitable, uses blockstate value, if not, reads redstone signal. |
0.1.1 | Changed registry name from jk_trigger to floor_jk_trigger . Replaced bottom texture from being that on the top to Smooth Stone Block. |
0.2.0 | Changed registry name from floor_jk_trigger to normal_jk_trigger . Can be placed on walls and ceiling. Updates the block on the output when output changes instead of updating all neighbours. Output data is stored on Block Entity. Lost `rotate` and `mirror` block methods.. |
0.2.1 | Reimplemented `rotate` block method. |