Redstonery › Circuits › Container empty alarm
Detection circuit
Container empty alarm
Turn an empty inventory into an explicit condition.
7 × 1 footprint1 layer7 blocksTested in 4 rotationsJava Edition 26.2
Layout
redstone dustredstone torchrepeater or comparatorlampcontainersolid blockarrows point where a device sends its output; north is up
How it works
The torch inverts the container comparator: the output is on only when the barrel is empty. A single item clears the alarm.
- A comparator reads zero when the measured inventory is empty.
- Logic interprets that zero reading as the condition used by the output.
Inputs and outputs
- Inputedit barrel contents (x 0, y 0, z 0)
- Outputalarm (x 5, y 0, z 0)
Blocks you need
2 × redstone dust, 1 × barrel, 1 × comparator, 1 × stone, 1 × redstone torch (on a wall), 1 × redstone lamp.
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:barrel setblock ~1 ~0 ~0 minecraft:comparator[facing=west,mode=compare] setblock ~2 ~0 ~0 minecraft:redstone_wire setblock ~3 ~0 ~0 minecraft:stone setblock ~4 ~0 ~0 minecraft:redstone_wall_torch[facing=east] setblock ~5 ~0 ~0 minecraft:redstone_wire setblock ~6 ~0 ~0 minecraft:redstone_lamp