The Exact Container Fullness & Ceiling Formula

Whenever a Redstone Comparator reads a standard inventory (directly behind the comparator or through a single solid conductive block that is not already powered to signal 15), AbstractContainerMenu.getRedstoneSignalFromContainer() sums the normalized stack fraction of every slot, divides by the container’s total slot count C, and maps non-empty inventories onto integers 1 through 15.

Exact Game Formula
S = floor(1 + (1 / C) × Σ(count_i / maxStack_i) × 14) | N_min(S) = ceil(((S - 1) × 64 × C) / 14)

When all slots are empty, S = 0. For any non-empty container (S ≥ 1), N_min(1) = 1 item, and for 2 ≤ S ≤ 15, N_min(S) gives the exact minimum count of 64-stackable items required to reach signal strength S. Each 16-stackable item counts as 4 sixty-four-stack equivalents; each unstackable (1-stack) item counts as 64 equivalents.

Because Minecraft weights every item by 1 / maxStackSize, mixing stack types lets redstone engineers dial in high comparator thresholds with minimal item counts:

  • Standard 64-Stackable Item (Cobblestone, Redstone Dust, Iron Ingot): Contributes 1 / 64 slot fullness (1 unit).
  • 16-Stackable Item (Ender Pearl, Snowball, Sign, Banner, Empty Bucket, Egg): Contributes 1 / 16 = 4 / 64 slot fullness (4 units).
  • Unstackable 1-Stack Item (Wooden Shovel, Boat, Minecart, Potion, Shulker Box): Contributes 1 / 1 = 64 / 64 slot fullness (64 units—an entire full slot from one item!).

Notice what happens when you drop a single Wooden Shovel into an empty 5-slot Hopper: fullness jumps immediately from 0.0 to 1 / 5 = 0.20, yielding floor(1 + 0.20 × 14) = floor(3.8) = 3! Using pure unstackable items in a Hopper can only produce signals 0, 3, 6, 9, 12, 15; hitting intermediate steps like 2 or 4 requires combining unstackables with 64-stack or 16-stack items.

Signal 1–15 Minimum Item Table (3, 5, 9, 27 & 54 Slots)

Every integer in the reference table below has been verified against 32-bit IEEE-754 floating-point arithmetic used by Mojang’s container code. For Single Chests (27 slots, Barrel, Shulker Box) and Double Chests (54 slots), counts are shown both as raw item totals and as survival-friendly Stacks + Remainder (st + i, where 1 st = 64).

Signal Furnace (3) Hopper (5) 64-Stack Hopper (5) 16-Stack Dropper (9) Single Chest / Barrel (27) Double Chest (54)
0 0 0 0 0 0 0
1 1 1 1 1 1 (0st + 1) 1 (0st + 1)
2 14 23 6 42 124 (1st + 60) 247 (3st + 55)
3 28 46 12 83 247 (3st + 55) 494 (7st + 46)
4 42 69 18 124 371 (5st + 51) 741 (11st + 37)
5 55 92 23 165 494 (7st + 46) 988 (15st + 28)
6 69 115 29 206 618 (9st + 42) 1,235 (19st + 19)
7 83 138 35 247 741 (11st + 37) 1,482 (23st + 10)
8 96 160 40 288 864 (13st + 32) 1,728 (27st + 0)
9 110 183 46 330 988 (15st + 28) 1,975 (30st + 55)
10 124 206 52 371 1,111 (17st + 23) 2,222 (34st + 46)
11 138 229 58 412 1,235 (19st + 19) 2,469 (38st + 37)
12 151 252 63 453 1,358 (21st + 14) 2,716 (42st + 28)
13 165 275 69 494 1,482 (23st + 10) 2,963 (46st + 19)
14 179 298 75 535 1,605 (25st + 5) 3,210 (50st + 10)
15 192 320 80 576 1,728 (27st + 0) 3,456 (54st + 0)
5-Slot Hopper Comparator Thresholds (ImpulseSV Overflow Proof) Idle Filter: [41][1][1][1][1] = 45 items 1 + (45/320)×14 = 2.968 ⇒ Signal 2 (Locked) Trigger +1 : [42][1][1][1][1] = 46 items 1 + (46/320)×14 = 3.012 ⇒ Signal 3 (Drains!) Max Backup : [64][1][1][1][1] = 68 items 1 + (68/320)×14 = 3.975 ⇒ STILL Signal 3! Signal 4 Bleed Line = 69 items (Safe by 1 item!)
Figure 4: Exact floating-point margins inside a 3-dust ImpulseSV item sorter. Even when Slot 1 backs up completely to 64 items (68 total), signal fullness stops at 3.975, never crossing the 69-item Signal 4 bleed threshold.

Deriving the ImpulseSV 41-Item Overflow-Proof Sorter

Look at rows Signal 3 (46 items) and Signal 4 (69 items) under the 5-slot Hopper column above. Those two integers explain why virtually every tileable storage hall in Minecraft uses the exact 3-dust ImpulseSV filter rather than a shorter 2-dust circuit:

  1. Idle Equilibrium (45 items ⇒ Signal 2): You place 41 target items in Slot 1 and 1 renamed 64-stackable filler item in each of Slots 2, 3, 4, and 5 (41 + 1 + 1 + 1 + 1 = 45 items). Evaluating the formula gives 1 + (45 / 320) × 14 = 2.96875, which floors to Signal 2. Redstone dust decays from 2 → 1 → 0 on the third dust block, keeping the repeater off and the bottom hopper locked by a redstone torch.
  2. Sorting Trigger (46 items ⇒ Signal 3): When 1 matching item enters Slot 1 (42 + 4 = 46), fullness hits 1 + (46 / 320) × 14 = 3.0125, flooring to Signal 3. Power reaches the repeater on the third dust block, inverting the torch so the bottom hopper pulls exactly 1 item from Slot 1, returning the filter to 41.
  3. Overflow Immunity Proof (68 < 69): What happens when your diamond or cobblestone chests fill completely and Slot 1 backs all the way up to a full stack of 64? Total items in the filter hopper reach 64 + 1 + 1 + 1 + 1 = 68. Evaluating 68 gives 1 + (68 / 320) × 14 = 3.975, which still floors to Signal 3! Because reaching Signal 4 requires 69 items (4.01875), power can never bleed 4 blocks sideways into adjacent 1-wide slices!

By contrast, players who try to save 40 target items by loading [1][11][11][11][11] = 45 items suffer catastrophic storage wipeouts the first time a chest fills: Slot 1 backs up to [64][11][11][11][11] = 108 items, outputting Signal 5 (floor(5.725)) and unlocking the four neighboring filter hoppers until every renamed blocker drains out! And to sort 16-stackable items (like Ender Pearls) with 100% overflow protection, load [10 Pearls][1][1][1][1] (64-stack fillers): idle weight = 10×4 + 4 = 44 (Signal 2), 11th Pearl = 48 ≥ 46 (Signal 3), and full 16-Pearl backup = 16×4 + 4 = 68 < 69 (still Signal 3!).

Crafters, Lecterns, Composters & Special Block Readouts

Several functional blocks bypass the floor(1 + fullness × 14) formula and emit direct integer signals tied to block states—making them far cleaner constant-signal sources than partially filled chests:

  • Crafter (1.21+): Outputs 0 through 9 equal to the number of slots that are either non-empty or clicked disabled! Toggling slots on an empty Crafter gives an instant, item-free dial for signals 0..9 that cannot spill items if broken.
  • Composter: Outputs 0–6 matching fill layers, briefly 7 for 20 gt before digesting, and a stable 8 once Bone Meal is ready—popular for zero-tile-entity constant signals 1–6 and 8.
  • Lectern: Empty = 0; 1-page book = 15. On Java Edition, a book with P pages on page p emits floor(1 + ((p - 1) / (P - 1)) × 14)—so a 15-page book maps pages 1..15 directly to Signals 1..15!
  • Decorated Pot: Acts as a single-slot (C = 1) 64-stack container: Signals 1..15 trigger at 1, 5, 10, 14, 19, 23, 28, 32, 37, 42, 46, 51, 55, 60, 64 items.
  • Cauldron / Beehive / Chiseled Bookshelf / Jukebox: Cauldrons emit 0–3 (lava always 3); Beehives emit 0–5 honey level; Chiseled Bookshelves emit 1–6 matching the last interacted slot (not book count!); Jukeboxes emit 1–15 by Music Disc ID.

Java 1.21.4 vs. Bedrock 1.21.50 Comparator Parity

Java Edition (1.21.4)

  • Lecterns display 1 page at a time: a 15-page Written Book gives exact 1–15 single-step selector control.
  • Comparators ignore short 1 gt input pulses (require at least a 2 gt = 1 rt change) and evaluate container updates cleanly on scheduled tile ticks.
  • Hoppers always insert into Slot 0 first, making 5-slot filter weights deterministic.

Bedrock Edition (1.21.50)

  • Lecterns display 2 pages side-by-side! Because Bedrock counts two-page spreads (ceil(P / 2)), a 15-page book only gives 8 distinct steps—you must write a 30-page book (15 spreads) to get every signal from 1 to 15!
  • In fast hopper-pipe item sorters, Bedrock’s randomized pending-tick order can briefly pass 2 items on one cycle unless fed by water streams or paced at 8 gt intervals; replacing the repeater’s solid target block with glass/target tweaks helps stabilize high-throughput lines.
In-Game Verification Test: Verified in Java 1.21.4 using F3 targeted-block power readouts on a redstone dust line across all 15 steps of a 5-slot Hopper, 27-slot Barrel, and 1.21 Crafter. Loading [64 Cobblestone][1][1][1][1] (68 items) into an ImpulseSV filter hopper held dust block #3 at power: 1 and dust block #4 at power: 0 indefinitely; adding a second item into Slot 2 (69 items) immediately flipped dust block #4 to power: 1, confirming the exact 68 / 69 overflow boundary.