YetAnotherConfigLib

YetAnotherConfigLib

34M Downloads

YACL + Architectury + NeoForge hangs on loading screen in 1.21.4

chimericdream opened this issue ยท 3 comments

commented

I have started updating my mods to 1.21.4, but I am running into the following exception when starting NeoForge:

Exception in thread "main" java.lang.module.ResolutionException: Module thedarkcolour.kotlinforforge reads more than one module named fml_loader
	at java.base/java.lang.module.Resolver.resolveFail(Resolver.java:900)
	at java.base/java.lang.module.Resolver.checkExportSuppliers(Resolver.java:721)
	at java.base/java.lang.module.Resolver.finish(Resolver.java:380)
	at java.base/java.lang.module.Configuration.<init>(Configuration.java:139)
	at java.base/java.lang.module.Configuration.resolveAndBind(Configuration.java:493)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.ModuleLayerHandler.buildLayer(ModuleLayerHandler.java:75)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.ModuleLayerHandler.buildLayer(ModuleLayerHandler.java:87)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.run(Launcher.java:90)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.main(Launcher.java:74)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23)
	at cpw.mods.bootstraplauncher.BootstrapLauncher.run(BootstrapLauncher.java:210)
	at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:69)
	at net.fabricmc.devlaunchinjector.Main.main(Main.java:86)
	at dev.architectury.transformer.TransformerRuntime.main(TransformerRuntime.java:220)

If I comment out the following line in the root build.gradle file, everything works fine, but I obviously can't update any mods that have configs.

modImplementation "dev.isxander:yet-another-config-lib:${rootProject.yacl_version}-neoforge"

After some searching, I found a few suggestions to do things like this:

modImplementation("dev.isxander:yet-another-config-lib:${rootProject.yacl_version}-neoforge") {
    exclude group: "net.neoforged.fancymodloader", module: "loader"
}

However, that didn't fix the issue. With that config, I get a bunch of ClassNotFoundExceptions related to the Kotlin for Forge mod.

I don't actually know if the fact that I am using Architectury makes a difference, but figured I would mention it just in case. Any help would be greatly appreciated!

commented

+1 for this, was getting a ton of reads more than one module named fml_loader for different modules. Switching to implementation as jshipley said, as well as excluding fancymodloader resolved it for me.

commented

Some extra context: this only occurs in my dev environment. If I build a mod and include it in a local modpack, things work normally. I have tried completely nuking my local environment, Gradle cache, etc, but didn't have any success.

commented

I know it's been months, but I ran into the same problem recently. I ended up getting it to work by using implementation instead of modImplementation when declaring the dependency on yacl for neoforge.