Why isn't my sorting system picking up eggs?

I've made an automatic sorting system from this design:

...and it works for everything, except eggs.

When I try to place an egg in as the template item, it slips through the system instead of locking in place like in the video.

Why is this happening, and how do I fix it?


Short answer: If you are trying to filter an item that has a stack size of 16 instead of 64, (like eggs, snowballs, signed books, etc.), then at 10:28 of the video, use 38 redstone dusts instead of 41. This is because eggs emit more signal strength than normal items.

Why?

The template hopper is programmed to unlock when its signal strength is 3 or greater. This will happen when the hopper has 46/64ths of its slots full, or when the hopper has 0.71875 slots full.

The way these item filters work is that they occupy all slots so that in all, the total number of items in the hopper evaluates to just below 48/64 slots. This is accomplished the way you see in the video. The 44 redstone dusts plus the 1 comparator evaluate the hopper's fullness to 45/64ths, just below the amount.

Non-matching items just pass by without entering the hopper. However, if an item passes by that matches any of the items in the hopper, it will enter, raising the amount filled to 46/64ths, enough to trigger the redstone and send it through.

An egg stacks to 16 instead of 64. Using math, we can figure out that 1/16th is equal to 4/64ths. That means that our template item is worth four units instead of just one. To compensate, we remove at least four redstone dusts.