promotional bannermobile promotional banner

Packaged Exact Inputs

Autocrafting that uses your items' real NBT

Packaged Exact Inputs

An addon for PackagedAuto and PackagedExCrafting (Forge 1.20.1) that lets autocrafting use the items you actually have, even when their NBT is not exactly the one stored in the pattern.

The problem

AE2 and PackagedAuto match pattern inputs by exact NBT. A pattern encoded from JEI keeps whatever data the example item had, while the items in your network often have a little more, or a little less:

  • a jetpack with Hover switched on or off
  • a Mekanism factory with upgrades installed
  • enchanted or anvil-repaired armor
  • an Iron Jetpacks jetpack without the Throttle tag that JEI shows

The crafting plan then says Missing, even though the item is sitting in your storage. And when a craft does go through, the crafter gets copies of the pattern's items instead of yours, so their NBT is lost.

What this mod does

Crafting plans accept your items when one of these is true:

  1. The stored item carries at least the pattern's NBT. Extra tags are fine ("weak NBT"). An empty {} asks for nothing, and Damage:0 / RepairCost:0 only ask for an undamaged, unrepaired piece.
  2. The pattern's recipe accepts it anyway. For an NBT-aware ingredient (for example Iron Jetpacks' tier ingredient, or a forge:partial_nbt ingredient) the recipe itself is asked.

Items that differ in a value the pattern asks for are still turned down. A wood jetpack never stands in for a creative one, a damaged piece never stands in where the pattern asks for Damage:0, and a half-charged cell never stands in for a full one.

The real items reach the crafter. This works through the ME Packager, the ME Packaging Provider and the PackagedExCrafting crafters (Basic, Advanced, Elite, Ultimate, Ender, Flux, Combination, and the Expanded crafters when installed), so your items keep their NBT.

This also covers AE2's own patterns in a Pattern Provider:

  • Processing patterns use the same weak-NBT rule.
  • Crafting and smithing patterns accept a stored item of the same kind when the recipe still matches and makes exactly the pattern's output. The Molecular Assembler checks the same thing, so a craft never jams.

Per-pattern switch

The PackagedAuto Encoder gets an NBT button:

  • Green (default): the crafter gets your real items.
  • Red: the crafter gets the pattern's copies (the old behaviour).

Crafting plans accept matching items either way.

Requirements

  • Minecraft 1.20.1, Forge 47+
  • PackagedAuto 3.4.11+
  • PackagedExCrafting
  • Optional: Applied Energistics 2 (for the AE2 parts) and AE All Pattern (its planner is covered too)

MixinExtras is bundled.

Packaged Exact Inputs Team

profile avatar
Owner
  • 3
    Projects
  • 80.2K
    Downloads

More from Knozyy