Applied Energistics 2

Applied Energistics 2

137M Downloads

CraftingManager fallback log spam with IE hand tools and OreDict substitution

codewarrior0 opened this issue ยท 3 comments

commented

Describe the bug
Repeated log entries similar to this:

[21:21:33] [AE Crafting Calculator/WARN] [AE2:S]: Using CraftingManager fallback: Recipe <immersiveengineering:material/plate_electrum> for output <1xitem.immersiveengineering.metal@37> rejected inputs [1xitem.thermalfoundation.material@161, 1xitem.immersiveengineering.tool@1]. NOT FOUND, please report.

Server TPS drops accordingly.

To Reproduce
With AE2 and ImmersiveEngineering installed, create crafting patterns for the Engineer's Hammer, the Engineer's Wirecutter, Copper Plates, and Copper Wires - ensure OreDict Substitution is allowed. Insert several stacks of Copper, Iron, Sticks, and String into the system. Request several stacks of Copper Wires.

Expected behavior
No log spam or TPS drop.

Additional context
With OreDict Substitution disallowed, there is no log spam or TPS drop; however, the system will craft one brand new Hammer or Wirecutter for each plate or wire crafted, since it is unwilling to use a damaged tool in this case.

I attached a debugger and stepped through the code at the point where the log message is emitted, and discovered that the reason the recipe match fails is because the OD Substitution is allowing the system to substitute a hammer for a wirecutter. IE's hammer and wirecutter are the same item, with damage value 0 being a hammer and 1 being a wirecutter, and the tool's actual durability stored in the stack's NBT Tag.

Environment

  • Minecraft Version: 1.12.2
  • AE2 Version: appliedenergistics2-rv6-stable-6.jar
  • Forge Version: 14.23.5.2806

I believe this issue is distinct from #3822 due to the specific detail of the IE hand tool's varying damage value affording an inappropriate OD substitution.

commented

That is simply how minecraft items work.

It might be an idea to report it to IE, at least with 1.13 they might be able to fix it. But there is also the option to make it way worse in 1.13.

commented

Neither the hammer nor wirecutter have any OreDict tags assigned. OD Substitution shouldn't consider them interchangeable.

commented

I took a closer look and it isn't just how MC items work - the "canSubstitute" flag on a crafting pattern turns out to allow both OreDict substitutions, fuzzy damage matches, and ignore-NBT matches.

For comparison, installing the Fuzzy upgrade in a Logistics Pipes autocrafter allows you to enable OD, fuzzy damage, and ignore-NBT separately - on a per-item basis, in fact! (Back in 1.7.10, this OD substitution was rather buggy due to inferring which OD key to use from the actual item ghosted into the grid rather than the ingredient in the recipe's inputs list.... I don't know if it has been fixed since then.)