Su5eD / IC2-Patcher

A tool to modify IndustrialCraft2 using binary patches
The Unlicense
8 stars 4 forks source link

Fix Fluid Transposer recipes not showing in JEI when IC2 is configured for Classic profile #26

Open nan0bug00 opened 1 month ago

nan0bug00 commented 1 month ago

Link to the bug IC2's issue tracker Could not find the bug on their issue tracker, though I would assume it's been reported? (see thread linked below)

Describe the bug When the Classic profile option is enabled within IC2 Experimental, fluid-related recipes from Thermal Expansion don't show in JEI (Just Enough Items). The thread this comment is in has further info. The recipes still exist, you can for instance fill an empty fluxduct in a fluid transposer if you know how, but JEI won't show you how.

There is an error in the log on startup, full error with surrounding context here.:

[21:20:05] [Client thread/ERROR] [thermalexpansion]: Bad/null recipe!
java.lang.NullPointerException: null
    at cofh.thermalexpansion.plugins.jei.machine.transposer.TransposerRecipeWrapperContainer.<init>(TransposerRecipeWrapperContainer.java:39) ~[TransposerRecipeWrapperContainer.class:?]
    at cofh.thermalexpansion.plugins.jei.machine.transposer.TransposerRecipeCategoryFill.getRecipes(TransposerRecipeCategoryFill.java:90) ~[TransposerRecipeCategoryFill.class:?]
    at cofh.thermalexpansion.plugins.jei.machine.transposer.TransposerRecipeCategoryFill.initialize(TransposerRecipeCategoryFill.java:44) ~[TransposerRecipeCategoryFill.class:?]
    at cofh.thermalexpansion.plugins.jei.machine.transposer.TransposerRecipeCategory.initialize(TransposerRecipeCategory.java:43) [TransposerRecipeCategory.class:?]
    at cofh.thermalexpansion.plugins.jei.JEIPluginTE.register(JEIPluginTE.java:112) [JEIPluginTE.class:?]
    at mezz.jei.startup.JeiStarter.registerPlugins(JeiStarter.java:213) [JeiStarter.class:?]
    at mezz.jei.startup.JeiStarter.start(JeiStarter.java:77) [JeiStarter.class:?]
    at mezz.jei.startup.ProxyCommonClient.loadComplete(ProxyCommonClient.java:136) [ProxyCommonClient.class:?]
    at mezz.jei.JustEnoughItems.loadComplete(JustEnoughItems.java:55) [JustEnoughItems.class:?]
...

To Reproduce Install IC2 Experimental (I'm using 2.8.22-ex112) + Thermal Foundation/Dynamics/Expansion/Redstone Flux/Cofh Core + JEI

  1. Configure IC2 to use Classic profile
  2. Start game, see error in log
  3. Cheat in an Empty Redstone Fluxduct, click on it and hit U
  4. See the lack of fluid transposer recipes telling you how to fill it

Expected behavior There should be fluid transposer recipes showing in JEI

Additional context

I did some investigating in a test instance and confirmed that it is in fact a bug with IC2 when the Classic profile is chosen. When Experimental profile is active, all fluid recipes register just fine, no error on startup.

Someone else in the Gregtech Experimental discord had the same issue, Su5ed had this to say about it: image

Also, even though I'm not a programmer, I did try to identify the problem with Google Gemini just on the off chance it was something super easy to fix. Figured if it generated a working fix you'd be able to use the conversation to make a patch easily. Unfortunately just getting to where I did in the convo took hours and Gemini began spiraling out as its context window got full, so I didn't get any further. Anyway this is probably a red herring but on the off chance any of this info is useful, here's a generated summary of the conversation,.

Kanzaji commented 1 month ago

Thanks for all additional context ❤️ Gonna get to this most likely this weekend 😄

PS: Gemini / ChatGPT won't really help in here, as IC2 is closed-source project and I'm working on decompilled code of it locally - which can't be found on the internet legally / in up-to-date form. So they don't even know how the IC2 might work.

nan0bug00 commented 1 month ago

Awesome, I really appreciate it.

I kinda figured I'd get nowhere with Gemini but figured it was at least worth a try before I came here asking you to look into it. If there was a chance I could get it to correctly identify the issue and save you some time, I wanted to try. I was working with JD-GUI to decompile the class files and just copy/pasting them into the chat for it to try and find the problem.