Filtering by Mod and Item with Variable Cards
Read the inventory
Attach a Part Inventory Reader to a Logic Cable touching a chest or machine. Program a Variable Card in the Logic Programmer to read the inventory contents. Insert the card into the part.
Build a filter
In the Logic Programmer, create a Variable Card that compares each item against a condition. You can match by item, by tag, or by mod. The card holds the comparison; the Part Inventory Reader supplies the list.
Apply the filter
Feed the filtered result into a Part Inventory Writer on another inventory. The writer moves only the items that pass the filter. Use a Part Connector Mono Directional to keep the flow one-way.
Filter by mod
To filter by mod, set the comparison on the item's mod id rather than its item id. Every item from that mod passes; everything else is ignored. This is the standard way to sort modded loot into dedicated chests.
Combine with other parts
- Part Block Reader for block state filters.
- Part Fluid Reader for tank contents.
- Part Entity Reader for entities in an area.
- Part Redstone Writer to emit a signal when the filter matches.
- Part Display Panel to show the current filtered count.
Test and adjust
Place a Variable Store to keep the filter card persistent, and use a Wrench to reposition parts without breaking the network.