Fishing Made Better

Fishing Made Better

8M Downloads

Crash with Thermal Expansion

SanAndreaP opened this issue · 2 comments

commented

Forge: 1.12.2-14.23.5.2855
Fishing Made Better: 2.0.1
Thermal Expansion: 5.5.7.1

I tried adding this to my private 1.12 modpack and crashed with the following error:

Crash Stacktrace
net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from Thermal Expansion (thermalexpansion)
Caused by: java.lang.NullPointerException
    at net.theawesomegem.fishingmadebetter.common.recipe.RecipeFishBucket.matches(RecipeFishBucket.java:27)
    at net.minecraft.item.crafting.CraftingManager.findMatchingResult(CraftingManager.java:199)
    at cofh.core.util.helpers.ItemHelper.getCraftingResult(ItemHelper.java:282)
    at cofh.thermalexpansion.util.managers.machine.SawmillManager.initialize(SawmillManager.java:103)
    at cofh.thermalexpansion.ThermalExpansion.initManagers(ThermalExpansion.java:165)
    at cofh.thermalexpansion.ThermalExpansion.postInit(ThermalExpansion.java:109)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:637)
    at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
    at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
    at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
    at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
    at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
    at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
    at com.google.common.eventbus.EventBus.post(EventBus.java:217)
    at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:219)
    at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:197)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
    at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
    at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
    at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
    at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
    at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
    at com.google.common.eventbus.EventBus.post(EventBus.java:217)
    at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:136)
    at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:754)
    at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:336)
    at net.minecraft.client.Minecraft.init(Minecraft.java:535)
    at net.minecraft.client.Minecraft.run(Minecraft.java:3931)
    at net.minecraft.client.main.Main.main(SourceFile:123)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

After scooping around some code, I suspect the following line causing it:
RecipeFishBucket.java#L27

since within the snippet of Thermals erroring code, it passes null as the world argument when generating its recipes for machines:
ThermalExpansion/.../SawmillManager.java#L103

commented

I was unable to reproduce this crash in my game, so I can't really test it myself, but I've uploaded 2.0.2 to Curseforge with a null check which hopefully prevents this crash, let me know.

commented

Yes, this works now. I dunno why exactly this crash happens, as I couldn't reproduce it on a "clean" install either. Probably some inter-mod weirdness ¯\_(ツ)_/¯