Wiki 9Minecraft Wiki 9Minecraft

Using StackPredicates to Filter Items

Java EditionModGuides 4FAQ 10Related mods 48
DownloadMelonLib Mod

Get the files on 9Minecraft

Contents (4)
  1. What Are StackPredicates?
  2. Common Predicate Checks
  3. Where You'll Encounter Them
  4. For Pack Makers

What Are StackPredicates?

StackPredicates are utility tools that let mods (and modpack makers) test whether an item stack meets specific conditions. Instead of checking individual item properties manually, a predicate handles the logic automatically.

Common Predicate Checks

StackPredicates can verify:

  • Whether an item is in a specific dictionary category
  • If an item has certain NBT tags or data
  • Whether an item's durability is within a range
  • If an item belongs to a particular mod
  • Custom conditions defined by other mods

Where You'll Encounter Them

You won't directly use StackPredicates in survival gameplay. Instead, mod developers and pack creators use them to build machines, recipes, and filters. When a hopper, furnace, or custom machine asks "does this item fit here?" — that's a StackPredicate at work.

For Pack Makers

If you're creating a modpack, understanding StackPredicates helps you configure machines correctly. Check connected mods' documentation for which predicates they support, so you can set up filters and automation precisely.

More guides for this mod