TheLMiffy1111 / JAOPCA

A mod that aims to add ore processing compatibilty to many mods. Inspired by AOBD.
MIT License
40 stars 36 forks source link

New Thermal Foundation version breaks fluid recipes #215

Closed dav20011 closed 2 years ago

dav20011 commented 2 years ago

The new version of Thermal Foundation contains a rework of the fluid ingredients (https://github.com/CoFH/ThermalFoundation/commit/eab4b1278b02b144253965c8eb4da3ce73de9f14). As a result loading a map with both mods results in this error:

java.lang.ClassCastException: net.minecraftforge.fluids.FluidStack cannot be cast to cofh.lib.fluid.FluidIngredient
    at cofh.thermal.core.util.managers.machine.ChillerRecipeManager.addRecipe(ChillerRecipeManager.java:56) ~[?:1.4.0.4]
    at cofh.thermal.core.util.managers.machine.ChillerRecipeManager.refresh(ChillerRecipeManager.java:175) ~[?:1.4.0.4]
    at cofh.thermal.lib.common.ThermalRecipeManagers.refreshServer(ThermalRecipeManagers.java:47) ~[?:1.4.0.4]
    at cofh.thermal.core.event.TCoreCommonSetupEvents.idRemap(TCoreCommonSetupEvents.java:66) ~[?:1.4.0.4]
    at net.minecraftforge.eventbus.ASMEventHandler_561_TCoreCommonSetupEvents_idRemap_FMLModIdMappingEvent.invoke(.dynamic) ~[?:?]
    at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85) ~[eventbus-4.0.0.jar:?]
...

I skimmed the commit and guess it is sufficient to wrap the ingredients using the new FluidIngredient.of() (https://github.com/CoFH/CoFHCore/blob/main/src/main/java/cofh/lib/fluid/FluidIngredient.java#L102) function from CoFHCore.

TheLMiffy1111 commented 2 years ago

Forgot to close this, fixed