Redstonery
RedstoneryCircuits › Item sorter
Storage circuit

Item sorter

Combine a content filter, a threshold, and controlled transfer.

5 × 4 footprint5 layers36 blocksTested in 4 rotationsJava Edition 26.2
Open in the simulatorBuild it in the game

Layout

Layer 0 (on the floor)
chest [facing=south, type=single] at x 2, z 0stone at x 4, z 2stone at x 4, z 1stone at x 4, z 0stone at x 3, z 0
Layer 1 (1 up)
hopper [facing=down] at x 2, z 0stone at x 1, z 0stone at x 0, z 0stone at x 0, z 1stone at x 1, z 1stone at x 1, z 2stone at x 1, z 3stone at x 2, z 3stone at x 3, z 3stone at x 4, z 3redstone dust at x 4, z 2redstone dust at x 4, z 1redstone dust at x 4, z 0redstone dust at x 3, z 0
Layer 2 (2 up)
hopper [facing=south] at x 2, z 0comparator [facing=east, mode=compare] at x 1, z 0redstone dust at x 0, z 0redstone dust at x 0, z 1redstone dust at x 1, z 1repeater [facing=north, delay=1] at x 1, z 2comparator [facing=west, mode=subtract] at x 1, z 3redstone block at x 0, z 3redstone dust at x 2, z 3redstone dust at x 3, z 3redstone dust at x 4, z 3
Layer 3 (3 up)
hopper [facing=east] at x 0, z 0hopper [facing=east] at x 1, z 0hopper [facing=east] at x 2, z 0hopper [facing=east] at x 3, z 0barrel at x 4, z 0
Layer 4 (4 up)
chest [facing=south, type=single] at x 0, z 0
redstone dustrepeater or comparatorcontainerhopper, dropper or dispenserredstone blocksolid blockarrows point where a device sends its output; north is up

How it works

The filter starts with 41 redstone and four reserved bedrock filler items. One extra redstone raises its comparator from 2 to 3. A repeater and subtract-comparator inverter unlock the extraction hopper without a rapidly cycling torch. Consecutive matching items and ordinary stone/stick streams are verified. Do not feed bedrock: item naming is not simulated, so these four fillers must be reserved. A final sorted item may wait in the extraction hopper.

  1. The filter reserves 41 redstone and four bedrock filler items, establishing a baseline comparator reading of 2.
  2. One extra redstone raises the reading to 3 and releases the extraction hopper. The filter should return to 41 redstone and four fillers.

Inputs and outputs

  • Inputfeed chest (x 0, y 4, z 0)
  • Partfilter: 41 redstone + 4 reserved bedrock (x 2, y 2, z 0)
  • Outputsorted redstone (x 2, y 0, z 0)
  • Outputwaiting sorted item (x 2, y 1, z 0)
  • Outputother items (x 4, y 3, z 0)

Blocks you need

13 × stone, 10 × redstone dust, 6 × hopper, 2 × chest, 2 × comparator, 1 × barrel, 1 × repeater, 1 × redstone block.

Build it in the game: 44 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 ~4 ~0 minecraft:chest[facing=south,type=single]
setblock ~0 ~3 ~0 minecraft:hopper[facing=east]
setblock ~1 ~3 ~0 minecraft:hopper[facing=east]
setblock ~2 ~3 ~0 minecraft:hopper[facing=east]
setblock ~3 ~3 ~0 minecraft:hopper[facing=east]
setblock ~4 ~3 ~0 minecraft:barrel
setblock ~2 ~2 ~0 minecraft:hopper[facing=south]
setblock ~2 ~1 ~0 minecraft:hopper[facing=down]
setblock ~2 ~0 ~0 minecraft:chest[facing=south,type=single]
setblock ~1 ~1 ~0 minecraft:stone
setblock ~1 ~2 ~0 minecraft:comparator[facing=east,mode=compare]
setblock ~0 ~1 ~0 minecraft:stone
setblock ~0 ~2 ~0 minecraft:redstone_wire
setblock ~0 ~1 ~1 minecraft:stone
setblock ~0 ~2 ~1 minecraft:redstone_wire
setblock ~1 ~1 ~1 minecraft:stone
setblock ~1 ~2 ~1 minecraft:redstone_wire
setblock ~1 ~1 ~2 minecraft:stone
setblock ~1 ~2 ~2 minecraft:repeater[facing=north,delay=1]
setblock ~1 ~1 ~3 minecraft:stone
setblock ~1 ~2 ~3 minecraft:comparator[facing=west,mode=subtract]
setblock ~0 ~2 ~3 minecraft:redstone_block
setblock ~2 ~1 ~3 minecraft:stone
setblock ~2 ~2 ~3 minecraft:redstone_wire
setblock ~3 ~1 ~3 minecraft:stone
setblock ~3 ~2 ~3 minecraft:redstone_wire
setblock ~4 ~1 ~3 minecraft:stone
setblock ~4 ~2 ~3 minecraft:redstone_wire
setblock ~4 ~0 ~2 minecraft:stone
setblock ~4 ~1 ~2 minecraft:redstone_wire
setblock ~4 ~0 ~1 minecraft:stone
setblock ~4 ~1 ~1 minecraft:redstone_wire
setblock ~4 ~0 ~0 minecraft:stone
setblock ~4 ~1 ~0 minecraft:redstone_wire
setblock ~3 ~0 ~0 minecraft:stone
setblock ~3 ~1 ~0 minecraft:redstone_wire
item replace block ~0 ~4 ~0 container.0 with minecraft:redstone 8
item replace block ~0 ~4 ~0 container.1 with minecraft:stone 5
item replace block ~0 ~4 ~0 container.2 with minecraft:stick 5
item replace block ~2 ~2 ~0 container.0 with minecraft:redstone 41
item replace block ~2 ~2 ~0 container.1 with minecraft:bedrock 1
item replace block ~2 ~2 ~0 container.2 with minecraft:bedrock 1
item replace block ~2 ~2 ~0 container.3 with minecraft:bedrock 1
item replace block ~2 ~2 ~0 container.4 with minecraft:bedrock 1