D Latch

D Latch
Stackable
Yes(64)

Overview

The D Latch is essentially a modification of the SR Latch. It has a Data pin and an Enable pin. When the Redstone signal at the Enable pin is greater than 0, the D Latch reads the Data pin and remembers its state. Based on whether the Redstone Signal at the Data pin is greater than 0 or equal to 0, the Output pin will output 15 or 0 accordingly.

When the Redstone Signal at the Enable pin is 0, the Output remains in the same state it was when the Enable pin was last powered. If the Enable pin is powered, the D Latch changes its state immediately as the Data pin changes.

To properly set the D Latch Output pin's state, you must configure it in at least three Minecraft ticks:

  1. On the first tick, set the Data pin's state according to your needs.
  2. On the second tick, set the Redstone signal at the Enable pin to at least 1.
  3. On the third tick, set the Redstone signal at the Enable pin back to 0.

Boolean Logic Table

The D Latch operates according to the following Boolean logic table:

DataEnableOutput
00Q
10Q
010
111

The Q state represents the stored state of the latch, that being the last set Output.

Configuration

The Normal D Latch has three connections: Data (Pin Mark A), Enable (Pin Mark B), and Output. Inputs are configurable by right-clicking to face the desired sides.

Parallel D Latch
Stackable
Yes(64)

Parallel D Latch

The Parallel Gate version of D Latch behaves similarly to the Normal D Latch but allows for parallel signals. It has a configurable input setup that determines whether the Data or Enable pin faces the Back of the block.

When configured for Set pin to face the Back (BS):

LeftBackRightOutput
000Q
1000
010Q
1101
0010
1010
0111
1111

When configured for Reset pin to face the Back (SB):

LeftBackRightOutput
000Q
100Q
0100
1101
001Q
101Q
0111
1111

Crafting

Normal SR Latch

Parallel SR Latch

Version Log

VersionDescription
0.0.0Introduced. On update from anywhere reads redstone signal only and updates neighbours when output changes.
0.0.1Unlike 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.1Changed registry name from d_trigger to floor_d_latch and paralel_d_latch to floor_parallel_d_latch. Replaced bottom texture from being that on the top to Smooth Stone Block.
0.2.0Changed registry name from floor_d_latch to normal_d_latch and floor_parallel_d_latch to parallel_d_latch. 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.1Reimplemented `rotate` block method.