Analog Differential

Analog Differential
Stackable
Yes(64)

Overview

The Analog Differential is an Analog Gate that calculates the absolute difference between two input Redstone signals and outputs the result. The equation for the Redstone signal at the Output (O) based on the two input Redstone signals (IA and IB) is:

O = |IA - IB|

The modulus operator (| |) ensures the result is always positive by removing any negative sign from the difference.

Configuration

The inputs are marked with Pin Mark A and can be configured to face any direction for normal Analog Differential by right-clicking the block.

Parallel Analog Differential

The Parallel Gate version of Analog Differential works slightly differently. It calculates the output based on the following steps:

  1. Determines the greatest Redstone signal value between the Left (L) and Right (R) inputs.
  2. Calculates the absolute difference between this value and the Redstone signal at the Back (B) input.

The equation for the Output (O) is:

O = |B - max(L, R)|
Parallel Analog Differential
Stackable
Yes(64)

Crafting

Normal Analog Differential

Parallel Analog Differential

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 analog_differential to floor_analog_differential and paralel_analog_differential to floor_parallel_analog_differential. Replaced bottom texture from being that on the top to Smooth Stone Block.
0.2.0Changed registry name from floor_analog_differential to normal_analog_differential and floor_parallel_analog_differential to parallel_analog_differential. 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.