Refined Storage

Refined Storage

77M Downloads

Unable to craft Fortune 3 upgrade

zlainsama opened this issue · 6 comments

commented

Issue description:

Unable to craft Fortune 3 upgrade

What happens:

With all required materials, no results are given for the recipe

What you expected to happen:

A Fortune 3 upgrade appear on the craft result slot

Steps to reproduce:

  1. Place required materials on a crafting table
  2. Watch
    ...

Version (make sure you are on the latest version before reporting):

  • Minecraft: 1.12.2
  • Forge: 14.23.4.2757
  • Refined Storage: 1.6.3

Does this issue occur on a server? [yes/no] I don't know, It was happening in singleplayer.

If a (crash)log is relevant for this issue, link it here:

No crash log, but a screenshot.

Additional information

  1. The book was crafted from an Arcane Ensorcellator in Thermal Expansion, and combined to Fortune 3 in a vanilla anvil.
  2. I tried to craft the upgrade in a Crafting Grid, then vanilla crafting table, last Tinker's Construct Crafting Station. No result.
  3. I didn't try to craft other related upgrade.
  4. No crafting tweaker or such mods. No configs in Refined Storage are changed from default.
commented

If you create the fortune book via other means (creative cheat in, vanilla table, enderio enchanter, etc) does it work?

Also, just making sure those are quartz enriched iron. Can’t tell from screenshot.

commented

Suspect it has something to do with NBT or Meta data, at least we’ve identified the issue.

Possibly a change to this line?
https://github.com/raoulvdberge/refinedstorage/blob/12e0daed944de7cd84faab657bc981568c243c7a/src/main/java/com/raoulvdberge/refinedstorage/recipe/RecipeUpgradeWithEnchantedBook.java#L25

commented

It's a vanilla mechanic, when you work something in an anvil, the repair cost will increase.
The repair cost is stored in NBT, see ItemStack.setRepairCost().
In this case, the crafted book has additional NBT data about repair cost, so it's different from a book obtained through creative menu which is never worked in an anvil.
The recipe ingredient is like the one in creative menu, doesn't have additional information about repair cost stored in NBT.

commented

Using a book from creative menu, the recipe works.
But a book crafted from an Arcane Ensorcellator in Thermal Expansion, and combined to Fortune 3 in a vanilla anvil doesn't.
Screenshots
It seems RefinedStorage is looking for a exact copy of Fortune 3 book? I might be wrong, i haven't looked into the code.
In these screeshots, one of the books is from creative menu, the other one is crafted through TE.

commented

Ah, then in that case I think the issue is actually with this line, specifically the call to 'isEqualNoQuantity'.
https://github.com/raoulvdberge/refinedstorage/blob/58d6daedb4bb9cef2a6dd7d8d35da189a678f2bf/src/main/java/com/raoulvdberge/refinedstorage/recipe/RecipeUpgradeWithEnchantedBook.java#L40

That ends up included NBT data, as per the line below:
https://github.com/raoulvdberge/refinedstorage/blob/8ded43774fe05869b9c135f873593b809ecc0030/src/main/java/com/raoulvdberge/refinedstorage/api/util/IComparer.java#L45

Didn't see a separate function to ignore NBT data, so probably just a call to 'isEqual' with the relevant flags instead.

commented

NBT needs to be compared so we have the correct book.