Iron Backpacks

Iron Backpacks

54M Downloads

Bad "interaction" with Roboticraft resulting in crash on launch

vrork opened this issue ยท 5 comments

commented

Crashing on launch;
https://gist.github.com/vrork/c52f4e128eae3ab91a81a5369b917971

  • IronBackpacks: 1.12.2-3.0.8-12
  • Minecraft: 1.12.2
  • Forge: 14.23.3.702
  • Other Conflicting Mods (may be irrelevant to your issue): Roboticraft 0.10.3 (testing with prior versions atm)
commented

wait so your code is causing a null pointer and its a problem on my end? lets be serious now

commented

@DomAmato Your code is failing for the same reason you hardcode against vanilla instances here. Until you can write your registry in a way that doesn't require actively avoiding those item classes, the problem is on your end.

commented

I'm definitely not saying that the registry is perfect and there is probably a better way but the code that is failing is in iron backpacks on this line:
https://github.com/gr8pefish/IronBackpacks/blob/dev-1.12/src/main/java/gr8pefish/ironbackpacks/item/ItemUpgrade.java#L36

For some reason getUpgrade(stack) is returning null so your isNull() doesn't work because the object is null. Realistically checking that backpackUpgrade == null || backpackUpgrade.isNull() would prevent the crash.

If calling getDisplayName on the subitems returned by your mod item is causing a null pointer I don't think its fair to say that its my registry's fault.

commented

alright i moved the registry creation into the post init phase and tested it along side the most recent master here and it didnt crash so hopefully that fixes all this