P3pp3rF1y / SophisticatedBackpacks

Sophisticated backpacks is yet another minecraft backpack mod this time with backpack you can place in world, color in different color combinations, upgrade with more inventory and enhance with many functional upgrades.
https://www.curseforge.com/minecraft/mc-mods/sophisticated-backpacks
GNU General Public License v3.0
115 stars 76 forks source link

JEI not recognizing recipes if a backpack is customized #746

Open Twisted-Code opened 1 year ago

Twisted-Code commented 1 year ago

Describe the bug JEI does not recognize customize backpacks as having any recipes. If you press R (or whatever you set back JEI keybind to) while hovering over a backpack that you have applied dye to, it will not show the recipes for the underlying backpack tier. I guess it doesn't recognize the dyed backpacks as the same item?

To Reproduce Steps to reproduce the behavior:

  1. Craft a backpack
  2. Apply dye to it through crafting
  3. hover the cursor over the dyed backpack
  4. press the key you have bound to JEI's "Show Recipe" control.
  5. nothing happens, as if the item is not craftable

Expected behavior If possible (I know there was some discussion of your recipes being special in #532, and I really appreciate the data preservation feature FWIW), it should show the recipe corresponding to that tier of backpack.

Screenshots If applicable, add screenshots to help explain your problem.

Versions Mod version that you're using. Version of forge may also be helpful in some cases

MoePus commented 1 month ago

https://github.com/P3pp3rF1y/SophisticatedBackpacks/blob/852579edad36d3f9314644888e79d6e5a015d834/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/compat/jei/SBPPlugin.java#L47 If you remove this override method, the problem will be solved. But I don't know if that breaks anything.

P3pp3rF1y commented 1 month ago

https://github.com/P3pp3rF1y/SophisticatedBackpacks/blob/852579edad36d3f9314644888e79d6e5a015d834/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/compat/jei/SBPPlugin.java#L47

If you remove this override method, the problem will be solved. But I don't know if that breaks anything.

that would break it - would for example display all dye recipes if you only wanted to see how that one specific color is crafted

I am afraid this ticket can't be solved without changes to JEI because as it works currently this would require registration of recipes for items with every single color combination that can exist for backpacks and that is several quintillion (4.6e+18) of items. I can see if mezz would have ideas of how a support for something like this could be added, but doubt he would want to change one of the core JEI things just to support this.