[1.21] NeoForge and Json issue in newest version
Periam opened this issue ยท 5 comments
After installing the below list of mods, the game crashed on the initial load scream
NeoForge 21.0.95
gtceu-1.21-1.3.1.jar
JsonThings-1.21-0.12.1.jar
jei-1.21-neoforge-19.5.0.33.jar
Logs
crash-2024-07-15_09.01.24-client.txt
debug.log
latest.log
Caused by: java.lang.IllegalStateException: Cannot retrieve all materials before registration
at TRANSFORMER/[email protected]/com.gregtechceu.gtceu.common.material.MaterialRegistryManager.getRegisteredMaterials(MaterialRegistryManager.java:88)
at TRANSFORMER/[email protected]/com.gregtechceu.gtceu.data.item.GTItems.<clinit>(GTItems.java:173)
it would appear to be an error in gtceu, if you find that it still happens with only Json Things please post a new debug log
ok, it is the combination of both mod installed that made the game crash, Json alone or Gtceu alone do not crash the game.
I think I may know why. Json Things adds a new type of pack type, which loads before the other ones.
This is causing GTCEU to initialize things too early.
I can't change anything on my end because I need the thingpack loading to happen before the registry events, so only gtceu can fix it on their end by ensuring that they don't load their items and blocks too early.
Looking at their code: https://github.com/GregTechCEu/GregTech-Modern/blob/e1a2a6fd5a6cae525c8ddd54ad71b7a49c7b379c/src/main/java/com/gregtechceu/gtceu/common/CommonProxy.java#L245
All they have to do is add an if in that else
to make sure the else branch only runs for the datapack, instead of anything that's not client.