architectury / architectury-loom

A Gradle plugin to setup environments for Fabric, Forge, NeoForge and Quilt modding.
https://docs.architectury.dev/loom/introduction
MIT License
115 stars 42 forks source link

Error when launching debug client #108

Open EccentricVamp opened 2 years ago

EccentricVamp commented 2 years ago

I'm trying to use Architectury Loom for a 1.19.2 Forge mod.

I downloaded the Forge template from Architectury Templates.

I changed the following values in gradle.properties

-minecraft_version=1.18.1
+minecraft_version=1.19.2
...
-forge_version = 1.18.1-40.1.0
+forge_version = 1.19.2-43.1.1

I ran the Gradle "build" and "vscode" tasks.

When I launch the "Minecraft Client" debugger, I get the following error

[16:41:27] [main/INFO] (Launcher) ModLauncher running: args [--launchTarget, forgeclientuserdev, --version, MOD_DEV, --assetIndex, 1.19.2-1.19, --assetsDir, C:\Users\Eccen\.gradle\caches\fabric-loom\assets, --gameDir, ., --fml.forgeVersion, 43.1.1, --fml.mcVersion, 1.19.2, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20220805.130853, -mixin.config, examplemod.mixins.json]
[16:41:27] [main/INFO] (Launcher) ModLauncher 10.0.8+10.0.8+main.0ef7e830 starting: java version 17.0.4.1 by Eclipse Adoptium; OS Windows 11 arch amd64 version 10.0
Exception in thread "main" java.lang.module.ResolutionException: Module fmlloader reads more than one module named org.spongepowered.mixin
    at java.base/java.lang.module.Resolver.resolveFail(Unknown Source)
    at java.base/java.lang.module.Resolver.checkExportSuppliers(Unknown Source)
    at java.base/java.lang.module.Resolver.finish(Unknown Source)
    at java.base/java.lang.module.Configuration.<init>(Unknown Source)
    at java.base/java.lang.module.Configuration.resolveAndBind(Unknown Source)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.8/cpw.mods.modlauncher.ModuleLayerHandler.buildLayer(ModuleLayerHandler.java:75)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.8/cpw.mods.modlauncher.ModuleLayerHandler.buildLayer(ModuleLayerHandler.java:87)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.8/cpw.mods.modlauncher.TransformationServicesHandler.discoverServices(TransformationServicesHandler.java:130)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.8/cpw.mods.modlauncher.Launcher.run(Launcher.java:86)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.8/cpw.mods.modlauncher.Launcher.main(Launcher.java:77)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.8/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.8/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23)
    at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:149)
    at net.fabricmc.devlaunchinjector.Main.main(Main.java:86)
shedaniel commented 2 years ago

Have you considered downloading the 1.19.2 template directly

EccentricVamp commented 2 years ago

Oops. I didn't scroll down enough to see it. I'll try that.

Where there big changes the Architectury Loom Forge template between 1.18.2 and 1.19.2?

EccentricVamp commented 2 years ago

The 1.19.2 template fails to build due to several errors.

I fixed the errors in the template

// src/main/java/com/example/examplemod/ExampleMod.java
// Line 6
-import net.minecraftforge.event.world.ExplosionEvent;
+import net.minecraftforge.event.level.ExplosionEvent;
...
// Line 44
-        LOGGER.info("Look, I found a {}!", Items.DIAMOND.getRegistryName());
+        LOGGER.info("Look, I found a {}!", ForgeRegistries.ITEMS.getKey(Items.DIAMOND));
...
// Line 55
-        LOGGER.info("Kaboom! Something just blew up in {}!", event.getWorld());
+        LOGGER.info("Kaboom! Something just blew up in {}!", event.getLevel());

After fixing the errors in the template, I reran the "build" and "vscode" Gradle tasks and got the same exact error


[13:28:43] [main/INFO] (Launcher) ModLauncher running: args [--launchTarget, forgeclientuserdev, --version, MOD_DEV, --assetIndex, 1.19.2-1.19, --assetsDir, C:\Users\Eccen\.gradle\caches\fabric-loom\assets, --gameDir, ., --fml.forgeVersion, 43.0.8, --fml.mcVersion, 1.19.2, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20220805.130853, -mixin.config, examplemod.mixins.json]
[13:28:43] [main/INFO] (Launcher) ModLauncher 10.0.8+10.0.8+main.0ef7e830 starting: java version 17.0.4.1 by Eclipse Adoptium; OS Windows 11 arch amd64 version 10.0
Exception in thread "main" java.lang.module.ResolutionException: Module fmlloader reads another module named fmlloader
    at java.base/java.lang.module.Resolver.resolveFail(Unknown Source)
    at java.base/java.lang.module.Resolver.checkExportSuppliers(Unknown Source)
    at java.base/java.lang.module.Resolver.finish(Unknown Source)
    at java.base/java.lang.module.Configuration.<init>(Unknown Source)
    at java.base/java.lang.module.Configuration.resolveAndBind(Unknown Source)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.8/cpw.mods.modlauncher.ModuleLayerHandler.buildLayer(ModuleLayerHandler.java:75)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.8/cpw.mods.modlauncher.ModuleLayerHandler.buildLayer(ModuleLayerHandler.java:87)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.8/cpw.mods.modlauncher.TransformationServicesHandler.discoverServices(TransformationServicesHandler.java:130)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.8/cpw.mods.modlauncher.Launcher.run(Launcher.java:86)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.8/cpw.mods.modlauncher.Launcher.main(Launcher.java:77)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.8/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.8/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23)
    at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141)
    at net.fabricmc.devlaunchinjector.Main.main(Main.java:86)
EccentricVamp commented 2 years ago

I've also tried

EccentricVamp commented 2 years ago

I don't think this was supposed to be fixed (I didn't see it in the changelog), but I'm still getting the error in Architectury Loom 1.0.302

qyl27 commented 2 years ago

same problem here, my project is update from 1.18.2 and architectury loom 0.12.0-snapshot.

EccentricVamp commented 1 year ago

[moving new error to a separate issue]

EccentricVamp commented 1 year ago

Looks like several other people in Discord have the same issue

Cannot launch Forge client or server through run configurations

keep getting Module fmlloader reads another module named fmlloader

anyone know wtf is going on here?

All forge related tasks wont run only for me

SolidBlock-cn commented 1 year ago

Same problem for me. He happens for 0.12.0 and 1.0.

SolidBlock-cn commented 1 year ago

I've found a temporary fix for Module fmlloader reads another module named fmlloader. That's to exclude Forge in the build.gradle, such as:

modImplementation("pers.solid.mod:reasonable-sorting-forge:${project.reasonable_sorting_version}-mc${reasonable_sorting_mc_version}") {
    exclude group: "net.minecraftforge"
}
EccentricVamp commented 1 year ago

I tried the temporary fix. Unfortunately, it did not work for me.

RedstoneWizard08 commented 2 days ago

Having this issue as well (Discord link):

image

Did anyone find a fix?