Sanguimancy

Sanguimancy

4M Downloads

ArrayIndexOutOfBoundsException

plaguewolf opened this issue ยท 4 comments

commented

[03:29:56] [Client thread/INFO] [STDERR]: [tombenpotter.sanguimancy.registry.PotionsRegistry:potionPreInit:31]: Severe error during potions pre-init, please report this to the mod author:
[03:29:56] [Client thread/INFO] [STDERR]: [tombenpotter.sanguimancy.registry.PotionsRegistry:potionPreInit:32]: java.lang.ArrayIndexOutOfBoundsException

a good thing to note is that i have reikas mods, and dragon api actually modifies the ASM of poition ID handler class, to extend the ammount of potion IDs available

commented

I have the same issue although I don't have DragonAPI, i use Potion ID Helper and it does extend Potion ASM

commented

This looks like a problem in "src/main/java/tombenpotter/sanguimancy/registry/PotionsRegistry.java" line 26:
final Potion[] newPotionTypes = new Potion[128];

This should instead be:
final Potion[] newPotionTypes = new Potion[potionTypes.length];

That will cover the cases where any mods increase the size of the potions array. Note, this same line appears to have been changed on May 6th to 128 from 256, however even with 256 the issue would still occur if any mods extended the potions array.

Extending the potions array is necessary when playing with several potion ID hungry mods together like Ars Magica 2 and Witchery.

commented

yup. too bad biomes cant be done the same way. from what i undestand its byte codes...?

commented

Well I've done the PR #99