Crashes when loading
JackHarper23 opened this issue ยท 8 comments
Good day. The mod began to crash when loading when the "High-Pressure Turbine" was turned on in the config. Previously, there was no such problem, now there is. Log:
crash-2023-07-18_13.33.55-client.txt
add an item to the oredict blockTungsten via CraftTweaker
Tested, not working. Probably since CraftTweaker apply changes after ImmersiveTechnology init.
Add a mod that adds Tungsten blocks
Not working too, since Jaopca add such block jaopca:block_blocktungsten
, and its still crashing.
CraftTweaker can remove it
No, CraftTweaker cant remove OreDicts since its assumed that they always exist, even without items in them.
The possible solution would be patch IT and instead of using OreDictionary.doesOreNameExist("blockTungsten")
, check amount of blocks in this oredict entry. Or probably even better - move static initialization of structure to later state of the game, when all oredicts already defined.
It would also to be worthy to note that a workaround would not be necessary if the mod that is registering tungsten actually used it.
Have the same issue. Randomly unable to load the pack. Played several years with IT without problems ๐
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:659)
at java.util.ArrayList.get(ArrayList.java:435)
at net.minecraft.util.NonNullList.get(SourceFile:44)
at mctmods.immersivetechnology.common.blocks.metal.multiblocks.MultiblockHighPressureSteamTurbine.<clinit>(MultiblockHighPressureSteamTurbine.java:52)
... 45 more
I found the reason. Its happens when oreDict blockTungsten
exist but have no items in it.
- Mod checking
OreDictionary.doesOreNameExist("blockTungsten")
returningtrue
that means that OreDict exist.
- But when it call
OreDictionary.getOres(blockOreName, false).get(0)
it crashes