Please check for xpjuice in Init instead of postInit
mezz opened this issue ยท 3 comments
I crash when trying to find what fluid is contained in FluidHandlerHeroMedallion
during postInit. Normally items, blocks, and fluids are all done setting up by then, but this is an exception because xpjuice is not set until your postInit.
It's safe for you to check earlier, in Init, because everything registers fluids in preInit.
OpenBlocks has not updated in a long time and it isn't on 1.10.
EnderIO registers xpjuice in preInit,
https://github.com/SleepyTrousers/EnderIO/blob/1.10/src/main/java/crazypants/enderio/EnderIO.java#L203
Here's the stack trace, from an experimental JEI version that is registering plugins in postInit:
java.lang.IllegalArgumentException: Cannot create a fluidstack from a null fluid
at net.minecraftforge.fluids.FluidStack.<init>(FluidStack.java:47) ~[FluidStack.class:?]
at xreliquary.items.util.fluid.FluidHandlerHeroMedallion.drain(FluidHandlerHeroMedallion.java:74) ~[FluidHandlerHeroMedallion.class:?]
at crazypants.enderio.integration.jei.TankRecipeCategory.register(TankRecipeCategory.java:95) ~[TankRecipeCategory.class:?]
at crazypants.enderio.integration.jei.JeiPlugin.register(JeiPlugin.java:47) ~[JeiPlugin.class:?]
at mezz.jei.JeiStarter.registerPlugins(JeiStarter.java:123) [JeiStarter.class:?]
at mezz.jei.JeiStarter.postInit(JeiStarter.java:40) [JeiStarter.class:?]
at mezz.jei.ProxyCommonClient.postInit(ProxyCommonClient.java:111) [ProxyCommonClient.class:?]
at mezz.jei.JustEnoughItems.postInit(JustEnoughItems.java:71) [JustEnoughItems.class:?]
This is the only issue I've found so far, so I assume using postInit like this is pretty rare.
Made the change. You can get an unstable build for testing at https://bintray.com/p3pp3rf1y/maven/download_file?file_path=Reliquary-1.10.2-1.3.3.575unstable.jar.
I will release this once i am back at my regular PC and able to test this and some other changes in proper server environment.