PlanetTeamSpeakk / DevLogin

Login with your own Minecraft account in a mod development environment.
MIT License
56 stars 4 forks source link

Neoforge support #16

Open MattSturgeon opened 10 months ago

MattSturgeon commented 10 months ago

When running on neoforge I get this error:

[07:22:42] [main/ERROR] (ModSorter) Missing or unsupported mandatory dependencies:
    Mod ID: 'forge', Requested by: 'devlogin', Expected range: '[1,)', Actual version: '[MISSING]'

Would it be possible to provide a neoforge version?

PlanetTeamSpeakk commented 10 months ago

I have attempted to add this in version 3.5. Please confirm whether this works.

MattSturgeon commented 10 months ago

Thanks. This fixes being able to run launch the game with devlogin installed, however if I run using --msa then I get ClassNotFoundException: org.asynchttpclient.AsyncHttpClient.

Full log ``` > Task :neoforge:runModrinthLoggedIn [Architectury Transformer] Architectury Runtime 5.2.80 [Architectury Transformer] Read classpath in 1.187 s [Architectury Transformer] Listening at /home/matt/Projects/Dev/Minecraft/Freecam/common/build/devlibs/freecam-common-1.2.2+1.20.4-dev.jar [07:00:23] [main/INFO] (Launcher) ModLauncher running: args [--launchTarget, forgeclientuserdev, --version, 20.4.60-beta, --assetIndex, 1.20.4-12, --assetsDir, /home/matt/.gradle/caches/fabric-loom/assets, --gameDir, ., --fml.neoForgeVersion, 20.4.60-beta, --fml.fmlVersion, 2.0.6, --fml.mcVersion, 1.20.4, --fml.neoFormVersion, 20231207.154220, --msa] [07:00:23] [main/INFO] (Launcher) ModLauncher 10.0.9+10.0.9+main.dcd20f30 starting: java version 21.0.1 by Oracle Corporation; OS Linux arch amd64 version 6.6.6-1-default [07:00:23] [main/INFO] (ImmediateWindowHandler) Loading ImmediateWindowProvider fmlearlywindow [07:00:23] [main/INFO] (EARLYDISPLAY) Trying GL version 4.6 [07:00:23] [main/INFO] (EARLYDISPLAY) Requested GL version 4.6 got version 4.6 Failed to load NeoForged icon [LWJGL] [ThreadLocalUtil] Unsupported JNI version detected, this may result in a crash. Please inform LWJGL developers. [07:00:24] [main/INFO] (mixin) SpongePowered MIXIN Subsystem Version=0.8.5 Source=union:/home/matt/.gradle/caches/modules-2/files-2.1/org.spongepowered/mixin/0.8.5/9d1c0c3a304ae6697ecd477218fa61b850bf57fc/mixin-0.8.5.jar%23122!/ Service=ModLauncher Env=CLIENT [07:00:24] [main/WARN] (ModFileParser) Mod file /home/matt/.gradle/caches/modules-2/files-2.1/net.neoforged.fancymodloader/language-java/2.0.6/c95c2966735a70f079dfad1bc79582f7fb81390e/language-java-2.0.6.jar is missing mods.toml file [07:00:24] [main/WARN] (ModFileParser) Mod file /home/matt/.gradle/caches/modules-2/files-2.1/net.neoforged.fancymodloader/language-minecraft/2.0.6/826c942ed73adb68d56e4e1a082a1ccd6b629a4a/language-minecraft-2.0.6.jar is missing mods.toml file [07:00:24] [main/WARN] (ModFileParser) Mod file /home/matt/.gradle/caches/modules-2/files-2.1/net.neoforged.fancymodloader/core/2.0.6/cf39a4ebaf150e075f37fa64dd2b9c3d83fcee83/core-2.0.6.jar is missing mods.toml file [07:00:24] [main/WARN] (ModFileParser) Mod file /home/matt/.gradle/caches/modules-2/files-2.1/net.neoforged.fancymodloader/language-lowcode/2.0.6/95555f8280da20ccbe02d9d924011faecc95abbf/language-lowcode-2.0.6.jar is missing mods.toml file [07:00:24] [pool-5-thread-1/INFO] (EARLYDISPLAY) GL info: AMD Radeon RX 5700 XT (navi10, LLVM 17.0.5, DRM 3.54, 6.6.6-1-default) GL version 4.6 (Core Profile) Mesa 23.2.1, AMD [07:00:24] [main/INFO] (ModDiscoverer) Found mod file "language-java-2.0.6.jar" of type LANGPROVIDER with provider net.neoforged.fml.loading.moddiscovery.MinecraftLocator@37672aa7 [07:00:24] [main/INFO] (ModDiscoverer) Found mod file "language-minecraft-2.0.6.jar" of type LANGPROVIDER with provider net.neoforged.fml.loading.moddiscovery.MinecraftLocator@37672aa7 [07:00:24] [main/INFO] (ModDiscoverer) Found mod file "core-2.0.6.jar" of type LIBRARY with provider net.neoforged.fml.loading.moddiscovery.MinecraftLocator@37672aa7 [07:00:24] [main/INFO] (ModDiscoverer) Found mod file "language-lowcode-2.0.6.jar" of type LANGPROVIDER with provider net.neoforged.fml.loading.moddiscovery.MinecraftLocator@37672aa7 [07:00:24] [main/INFO] (ModDiscoverer) Found mod file "neoforge-20.4.60-beta-minecraft-merged-2b4449854b-1.20.4-loom.mappings.1_20_4.layered+hash.40359-v2-neoforge-20.4.60-beta.jar" of type MOD with provider net.neoforged.fml.loading.moddiscovery.MinecraftLocator@37672aa7 [07:00:24] [main/INFO] (ModDiscoverer) Found mod file "main" of type MOD with provider net.neoforged.fml.loading.moddiscovery.MinecraftLocator@37672aa7 [07:00:24] [main/INFO] (ModDiscoverer) Found mod file "" of type MOD with provider net.neoforged.fml.loading.moddiscovery.MinecraftLocator@37672aa7 [07:00:24] [main/ERROR] (ModInfo) Mod 'cloth_config' uses deprecated 'mandatory' field in the dependency declaration for 'neoforge'. Use the 'type' field and 'required'/'optional' instead [07:00:24] [main/ERROR] (ModInfo) Mod 'cloth_config' uses deprecated 'mandatory' field in the dependency declaration for 'neoforge'. Use the 'type' field and 'required'/'optional' instead [07:00:24] [main/INFO] (ModDiscoverer) Found mod file "metadata-1.2.2+1.20.4-neoforge-modrinth.jar" of type MOD with provider net.neoforged.fml.loading.moddiscovery.ClasspathLocator@5bdfae42 [07:00:24] [main/INFO] (ModDiscoverer) Found mod file "cloth-config-neoforge-13.0.114-neoforge.jar" of type MOD with provider net.neoforged.fml.loading.moddiscovery.ClasspathLocator@5bdfae42 [07:00:24] [main/INFO] (ModDiscoverer) Found mod file "devlogin-3.5.jar" of type MOD with provider net.neoforged.fml.loading.moddiscovery.ClasspathLocator@5bdfae42 [07:00:24] [main/INFO] (ModDiscoverer) Found mod file "553367168828673862.jar" of type MOD with provider net.neoforged.fml.loading.moddiscovery.ClasspathLocator@5bdfae42 [07:00:24] [main/INFO] (ModDiscoverer) Found mod file "cloth-config-neoforge-13.0.114-neoforge.jar" of type MOD with provider net.neoforged.fml.loading.moddiscovery.ClasspathLocator@5bdfae42 [07:00:24] [main/INFO] (ModDiscoverer) Found mod file "devlogin-3.5.jar" of type MOD with provider net.neoforged.fml.loading.moddiscovery.ClasspathLocator@5bdfae42 [07:00:24] [main/INFO] (ModDiscoverer) Found mod file "553367168828673862.jar" of type MOD with provider net.neoforged.fml.loading.moddiscovery.ClasspathLocator@5bdfae42 [07:00:24] [main/INFO] (ModDiscoverer) Found mod file "events-2.0.6.jar" of type GAMELIBRARY with provider net.neoforged.fml.loading.moddiscovery.BuiltinGameLibraryLocator@34c3e307 [07:00:24] [main/INFO] (JarInJarDependencyLocator) Found 1 dependencies adding them to mods collection [07:00:24] [main/INFO] (ModDiscoverer) Found mod file "mixinextras-neoforge-0.3.2.jar" of type GAMELIBRARY with provider net.neoforged.fml.loading.moddiscovery.JarInJarDependencyLocator@377b773c [07:00:24] [main/ERROR] (ModInfo) Mod 'cloth_config' uses deprecated 'mandatory' field in the dependency declaration for 'neoforge'. Use the 'type' field and 'required'/'optional' instead [07:00:25] [main/INFO] (mixin) Compatibility level set to JAVA_17 [07:00:25] [main/INFO] (LaunchServiceHandler) Launching target 'forgeclientuserdev' with arguments [--version, 20.4.60-beta, --gameDir, ., --assetsDir, /home/matt/.gradle/caches/fabric-loom/assets, --assetIndex, 1.20.4-12, --msa] [07:00:25] [main/INFO] (unprotect) Found 7774 Minecraft classes [07:00:25] [main/INFO] (MixinExtras|Service) Initializing MixinExtras via com.llamalad7.mixinextras.service.MixinExtrasServiceImpl(version=0.3.2). 2023-12-30 07:00:25,675 main WARN Advanced terminal features are not available in this environment Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.9/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:32) at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.9/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.9/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.9/cpw.mods.modlauncher.Launcher.run(Launcher.java:108) at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.9/cpw.mods.modlauncher.Launcher.main(Launcher.java:78) at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.9/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.9/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) at dev.architectury.transformer.TransformerRuntime.main(TransformerRuntime.java:219) Caused by: java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:118) Caused by: java.lang.reflect.InvocationTargetException at java.base/java.lang.reflect.Method.invoke(Method.java:580) at MC-BOOTSTRAP/fml_loader@2.0.6/net.neoforged.fml.loading.targets.CommonLaunchHandler.runTarget(CommonLaunchHandler.java:126) at MC-BOOTSTRAP/fml_loader@2.0.6/net.neoforged.fml.loading.targets.CommonLaunchHandler.clientService(CommonLaunchHandler.java:114) at MC-BOOTSTRAP/fml_loader@2.0.6/net.neoforged.fml.loading.targets.ForgeClientUserdevLaunchHandler.runService(ForgeClientUserdevLaunchHandler.java:19) at MC-BOOTSTRAP/fml_loader@2.0.6/net.neoforged.fml.loading.targets.CommonLaunchHandler.lambda$launchService$4(CommonLaunchHandler.java:108) at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.9/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) ... 9 more Caused by: java.lang.NoClassDefFoundError: org/asynchttpclient/AsyncHttpClient Caused by: java.lang.NoClassDefFoundError: org/asynchttpclient/AsyncHttpClient at TRANSFORMER/devlogin@3.5/neoforge.com.ptsmods.devlogin.DevLogin.loginMSA(DevLogin.java:151) at TRANSFORMER/devlogin@3.5/neoforge.com.ptsmods.devlogin.DevLogin.modifyArgs(DevLogin.java:49) at TRANSFORMER/minecraft@1.20.4/net.minecraft.client.main.Main.localvar$zbc000$modifyArgs(Main.java:521) at TRANSFORMER/minecraft@1.20.4/net.minecraft.client.main.Main.main(Main.java:98) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ... 15 more Caused by: java.lang.ClassNotFoundException: org.asynchttpclient.AsyncHttpClient Caused by: java.lang.ClassNotFoundException: org.asynchttpclient.AsyncHttpClient at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526) at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:193) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526) at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:193) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526) ... 20 more ```

Could be an issue on my end, my run config uses a custom source set, but its runtimeClasspath does inherit main's, so things should work...

Also, does 3.5 drop legacy-forge support, since you can only have one mods.toml?

PlanetTeamSpeakk commented 10 months ago

I was afraid of this as I had it in a dev env too. Not a clue why this happens as other mod launchers don't have this issue. Will look into this.

MattSturgeon commented 10 months ago

I wonder if shadowing (& relocating) async-http-client in your jar would help?