Redstonery
RedstoneryCircuits › Comparator threshold
Detection circuit

Comparator threshold

Pass a signal only when it meets a reference.

10 × 4 footprint1 layer13 blocksTested in 4 rotationsJava Edition 26.2
Open in the simulatorBuild it in the game

Layout

Layer 0 (on the floor)
lever [face=floor, facing=north, powered=true] at x 0, z 0redstone dust at x 1, z 0redstone dust at x 2, z 0redstone dust at x 3, z 0redstone dust at x 4, z 0redstone dust at x 5, z 0redstone dust at x 6, z 0comparator [facing=west, mode=compare] at x 7, z 0redstone dust at x 8, z 0redstone lamp at x 9, z 0lever [face=floor, facing=north, powered=false] at x 7, z 3redstone dust at x 7, z 2redstone dust at x 7, z 1
redstone dustrepeater or comparatorinputlamparrows point where a device sends its output; north is up

How it works

Compare mode passes the front signal only if it is at least the side signal. The front arrives at 10; the side lever brings 14 and shuts it.

  1. Compare mode keeps the main input strength when it is at least the side input.
  2. A stronger side input suppresses the output; equality still passes.

Inputs and outputs

  • Inputsignal, 10 at the comparator (x 0, y 0, z 0)
  • Inputside, 14 at the comparator (x 7, y 0, z 3)
  • Outputlit unless the side beats the front (x 9, y 0, z 0)

Blocks you need

9 × redstone dust, 2 × lever, 1 × comparator, 1 × redstone lamp.

Build it in the game: 13 commands

Relative to where you stand, with x running east and z running south. Paste one line at a time into chat, or into a chain of command blocks. The block art is the game's own; the layout is what the page above shows.

setblock ~0 ~0 ~0 minecraft:lever[face=floor,facing=north,powered=true]
setblock ~1 ~0 ~0 minecraft:redstone_wire
setblock ~2 ~0 ~0 minecraft:redstone_wire
setblock ~3 ~0 ~0 minecraft:redstone_wire
setblock ~4 ~0 ~0 minecraft:redstone_wire
setblock ~5 ~0 ~0 minecraft:redstone_wire
setblock ~6 ~0 ~0 minecraft:redstone_wire
setblock ~7 ~0 ~0 minecraft:comparator[facing=west,mode=compare]
setblock ~8 ~0 ~0 minecraft:redstone_wire
setblock ~9 ~0 ~0 minecraft:redstone_lamp
setblock ~7 ~0 ~3 minecraft:lever[face=floor,facing=north,powered=false]
setblock ~7 ~0 ~2 minecraft:redstone_wire
setblock ~7 ~0 ~1 minecraft:redstone_wire