gigaherz / JsonThings

Data-driven minecraft
https://www.curseforge.com/minecraft/mc-mods/json-things
Other
21 stars 6 forks source link

[1.21] NeoForge and Json issue in newest version #33

Closed Periam closed 1 week ago

Periam commented 1 month ago

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

gigaherz commented 1 month ago
Caused by: java.lang.IllegalStateException: Cannot retrieve all materials before registration
    at TRANSFORMER/gtceu@1.3.1/com.gregtechceu.gtceu.common.material.MaterialRegistryManager.getRegisteredMaterials(MaterialRegistryManager.java:88)
    at TRANSFORMER/gtceu@1.3.1/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

Periam commented 1 month ago

ok, it is the combination of both mod installed that made the game crash, Json alone or Gtceu alone do not crash the game.

gigaherz commented 1 month ago

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.

Periam commented 1 month ago

I opened a issue to GtCEU, can I paste your information on the same?

gigaherz commented 1 month ago

Yes you can quote and link to here