Item Sampler
Item Sampler is a unique functional block that can store only one item inside. Its main purpose is to determine the maximum stack size of any in-game item using a redstone comparator.
When a comparator is connected to the block, it outputs signals of varying strength depending on how many item copies can fit in one slot. For example:
- If an item cannot be stacked (such as tools or weapons), the comparator outputs maximum signal strength – 15
- For items with a maximum stack of 64 units (like most blocks and resources), the signal will be minimal – 1
- All other variants produce intermediate values between these extremes
The signal strength is calculated using the following formula:
round(17 - 2 * sqrt(MAX_STACK_SIZE))
This compact and smart mechanism is perfect for creating complex redstone circuits, automated sorting systems, and other technical constructions where it's important to distinguish item types by their characteristics.