iopleke / Minechem

Chemical decomposition and synthesis in Minecraft
http://iopleke.github.io/Minechem/
Other
82 stars 94 forks source link

LegacyCraft compatability issue #706

Closed SisterJacq closed 9 years ago

SisterJacq commented 9 years ago

With JUST DragonAPI v4c, LegacyCraft v4a, and Minechem 5.0.5.393 (same with .387) I crash due an NPE, that only happens (300+ w/o LegacyCraft okay, but put LegacyCraft and Minechem together...)

https://gist.github.com/Mortvana/c49316e7e652f5c9c2ae

I have reported this to @ReikaKalseki too

jakimfett commented 9 years ago

Looks like this is due to LegacyCraft overriding the vanilla regeneration potion, and doing it in a way that results in a null potion item. You can prevent this from happening by setting B:"Old Regen and Heal Potions"=false in the LegacyCraft config.

ReikaKalseki commented 9 years ago

I do override the regen potion, but why would that cause a null item?

jakimfett commented 9 years ago

@ReikaKalseki I'm not entirely certain. I'm planning on adding some null checks for the PharmacologyEffect and PharmacologyEffectRegistry so that null values in the potion registry won't cause Minechem to blow up, but I honestly don't know why a null potion would be left in the registry after a potion gets overridden.

ReikaKalseki commented 9 years ago

Perhaps a map key mismatch? Are potions used as map keys anywhere?

jakimfett commented 9 years ago

Nah, that particular bit of code just uses the unlocalized name to get the potion from the potionregistry.

SisterJacq commented 9 years ago

@jakimfett Would make sense, I've had potion name weirdness in the past (since late 1.6.4) with LegacyCraft installed, I knew it was one of Reika's mods, but now I know it is LegacyCraft for sure.

ReikaKalseki commented 9 years ago

Nah, that particular bit of code just uses the unlocalized name to get the potion from the potionregistry.

Would make sense, I've had potion name weirdness in the past (since late 1.6.4) with LegacyCraft installed, I knew it was one of Reika's mods, but now I know it is LegacyCraft for sure.

Wait, is this related to that ".postfix" issue?

SisterJacq commented 9 years ago

Yeah, and sometime the potion names showing up as a bunch of equals signs. I haven't actually been able to properly play with LegacyCraft since 1.6.4, so I can't say anything about 1.7.10 :P

ReikaKalseki commented 9 years ago

It might be fixed for v5.