Redstonery
RedstoneryCircuits › Container fullness
Detection circuit

Container fullness

Turn inventory contents into a small numeric signal.

5 × 1 footprint1 layer5 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 0, z 0comparator [facing=west, mode=compare] at x 1, z 0redstone dust at x 2, z 0redstone dust at x 3, z 0redstone dust at x 4, z 0
redstone dustrepeater or comparatorcontainerarrows point where a device sends its output; north is up

How it works

A comparator behind a chest outputs 0 to 15 by how full it is; two stacks in 27 slots read 2.

  1. The comparator converts container fullness into strength 0–15.
  2. Dust after it exposes the number by losing one strength level at each step.

Inputs and outputs

  • Inputput items in the chest (x 0, y 0, z 0)
  • Outputpower = fullness (x 2, y 0, z 0)

Blocks you need

3 × redstone dust, 1 × chest, 1 × comparator.

Build it in the game: 7 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:chest[facing=south,type=single]
item replace block ~0 ~0 ~0 container.0 with minecraft:stone 64
item replace block ~0 ~0 ~0 container.1 with minecraft:stone 64
setblock ~1 ~0 ~0 minecraft:comparator[facing=west,mode=compare]
setblock ~2 ~0 ~0 minecraft:redstone_wire
setblock ~3 ~0 ~0 minecraft:redstone_wire
setblock ~4 ~0 ~0 minecraft:redstone_wire