NBT Ingredient Predicate: Soft NBT Matching for Recipes

Unlock Flexible Recipe Matching with the NBT Ingredient Predicate If you build custom recipes through datapacks, you have probably bumped into a frustrating wall: ingredients often need to match exactly, including every scrap of NBT data. That is fine when you want strict parity, but it is a head...

Download NBT Ingredient Predicate for Minecraft 1.17.1, 1.16.5

Original name: NBT Ingredient Predicate

Minecraft: 1.16.5, 1.17.1

Loaders: Forge

FileVersionLoaderSize
NBT-Ingredient-Predicate-1.3.jar1.16.5Forge5 КБDownload
NBT-Ingredient-Predicate-1.1.jar1.17.1Forge6 КБDownload

Unlock Flexible Recipe Matching with the NBT Ingredient Predicate

If you build custom recipes through datapacks, you have probably bumped into a frustrating wall: ingredients often need to match exactly, including every scrap of NBT data. That is fine when you want strict parity, but it is a headache when you only care about part of the tag—say, a shared enchantment line, a partial custom name, or a block that differs only by lore text. That is where the NBT Ingredient Predicate approach shines, because it lets you describe what “counts” as the ingredient without forcing byte-for-byte equality on the whole stack.

In many Forge-style setups, recipe ingredients that reference NBT have historically leaned on something like forge:nbt, which tends to behave like a hard match: if the item’s data is not the same shape and content, the recipe simply will not fire. For modpack authors who want softer logic—matching when certain keys are present, or when a subset of tags lines up—that rigidity makes pack tuning slow and player-unfriendly. Switching to nbt_ingredient_predicate:nbt_includes reframes the question: instead of demanding identical NBT, you can express inclusion rules so the ingredient satisfies the recipe when the relevant pieces are there, even if extra lore, display names, or unrelated tags also exist.

Why “Soft Including” Matters for Datapack Crafters

Think of a recipe that should accept any Block of Amethyst that shares a core identity, even if one version has extra lore attached for quest flavor. With hard equality, you might end up with two separate recipes—or worse, players discover only the “plain” block works. Soft-including NBT fixes that mismatch by treating the lore as optional noise unless you explicitly require it. That single change can reduce duplicate recipes, shrink datapack clutter, and make progression feel less brittle when mods add tooltip lines or when players rename items for organization.

Pack makers often juggle dozens of custom crafts across blocks, biomes, and progression gates. When ingredient predicates align with how players actually obtain items—slightly different NBT from world generation, loot tables, or mod interactions—your crafting loop stays coherent. You spend less time debugging “why did this not craft?” and more time tuning fun mechanics, server economies, and update compatibility across Minecraft versions.

How nbt_includes Changes the Ingredient Check

At a high level, nbt_ingredient_predicate:nbt_includes asks whether the item’s NBT includes the predicate you specified, rather than whether it is an exact mirror. Practically, that means you can craft a recipe that accepts multiple valid variants that only differ in secondary tags—exactly the scenario described with two named Blocks of Amethyst where one carries lore text. Instead of locking the output to the stack without lore, you can allow both inputs to satisfy the same ingredient line, as long as the important shared NBT conditions are met.

When you author the JSON for your recipe, pay attention to which keys you truly need to match. If your predicate only specifies the fields that define the item for your pack’s purposes, players keep flexibility for harmless differences—renames, extra mod metadata, or bonus lines from updates—while still preventing the wrong item class from slipping through. This is especially helpful on servers where item data can accumulate from plugins, command blocks, or cross-mod interactions.

Keeping recipes readable is half the battle. A good pattern is to document, in your pack notes, which tags are “required for identity” versus “cosmetic,” then encode only the required ones into the predicate. That discipline pays off when you port the pack forward to newer Minecraft releases or swap mods, because you are not accidentally coupling a recipe to a volatile tag you did not intend to depend on.

Tooling also matters when you iterate quickly. If you like experimenting with community mods and recipe tweaks without juggling manual installs for every build, you can streamline the workflow: this mod can be easily installed via the foxygame.net launcher—a convenient, flexible, and modern Minecraft launcher where you can download mods right from the menu—so you spend less time on setup and more time validating predicates in-game. Pair that with a test world, a few command-based item generators, and a small suite of sample stacks, and you can confirm inclusion behavior before you ship the datapack to a live server.

Tips for Modpackers and Server Admins

  • Start with minimal predicates: include only the NBT keys that define the ingredient for your design, then expand if you discover edge cases.
  • Test both extremes: stacks with no extra tags, stacks with heavy lore, and stacks touched by other mods, so you know your recipe behaves across biomes, loot, and mechanics.
  • Version your datapack: when Minecraft updates change tag layouts, revisit predicates rather than copying old JSON blindly.
  • Communicate in quest text: if players need a specific property, say so plainly so “soft match” does not feel like inconsistency.

Conclusion

The NBT Ingredient Predicate idea is a practical upgrade for datapack-driven crafting when you want partial NBT matching instead of hard equality. By favoring nbt_ingredient_predicate:nbt_includes over approaches that behave like strict forge:nbt checks, you can write recipes that respect real player inventories—where lore, names, and extra metadata vary—without sacrificing control. Whether you are balancing a modpack progression line or tuning a server’s economy around rare drops, softer ingredient logic keeps your crafting recipes fair, maintainable, and ready for the next Minecraft update.