Geolosys

Geolosys

5M Downloads

IndexOutOfBoundsException in BlockOreVanilla.getDrops

arlyon opened this issue ยท 1 comments

commented

Versions:

  • Minecraft Forge: 14.23.1.2577
  • Geolosys: 1.8.10c

What happens:

I've been working on a mod that breaks blocks and seem to be running into a IndexOutOfBounds on this line when calling BlockOreVanilla.getDrops:

drops.add(OreDictionary.getOres("dustSulfur").get(0));

Problem arises when breaking a coal block. Looks like despite having sulfur enabled, OreDictionary.getOres("dustSulfur") returns an empty list which is why get(0) fails. Strangely OreDictionary.doesOreNameExist("dustSulfur") returns true even if it isn't in the OreDict.

As it says in the code, this happens only around 1 in every 50 calls.

commented

Fixed! Thanks :)