thedarkcolour / KotlinForForge

Makes Kotlin forge-friendly.
GNU Lesser General Public License v2.1
194 stars 26 forks source link

[1.21 NeoForge] Architectury - Module fml_loader reads another module named fml_loader #103

Closed FlashHUN closed 4 months ago

FlashHUN commented 4 months ago

Running Architectury + NeoForge with KotlinForForge through IntelliJ IDEA throws the following:

Exception in thread "main" java.lang.module.ResolutionException: Module fml_loader reads another 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:718)
    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/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.ModuleLayerHandler.buildLayer(ModuleLayerHandler.java:75)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.ModuleLayerHandler.buildLayer(ModuleLayerHandler.java:87)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.Launcher.run(Launcher.java:90)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.Launcher.main(Launcher.java:74)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/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:219)

On a previous version (MC 1.20.6, Architectury API 12.1.2, NeoForge 20.6.77-beta, KFF 5.1.0) the project ran perfectly fine, can't figure out whether the issue is with KFF or Architectury so making an issue for Architectury too.

Architectury Enabled Platforms: Fabric, NeoForge Minecraft Version: 1.21 Architectury API Version: 13.0.4 NeoForge Version: 21.0.86-beta KotlinForForge Version: 5.4.0

thedarkcolour commented 4 months ago

This is a bug in Loom. It doesn't happen in plain ModDevGradle/NeoGradle. That being said, have you tried excluding KFF's transitive dependency on FancyModLoader? Has group: net.neoforged.fancymodloader and name: loader.

FlashHUN commented 4 months ago

Excluding it solved the issue, thank you!