
MouseTweaks prevents datagen
rlnt opened this issue ยท 1 comments
Having MouseTweaks on the dev environment prevents data generation from running.
I found this issue and this pull request regarding the same topic, but the problem remains.
I can work around it by removing MouseTweaks temporarily, but I'd love to use it in my dev environment.
Minecraft: 1.21.1
NeoForge: 21.1.118
MouseTweaks: 2.26.1
Log
> Task :net.neoforged.devlaunch.Main.main()
WARN StatusConsoleListener Advanced terminal features are not available in this environment
[19:49:58] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher running: args [--launchTarget, forgedatauserdev, --assetIndex, 17, --assetsDir, C:\\Users\\rlnt\\.gradle\\caches\\neoformruntime\\assets, --gameDir, ., --fml.neoForgeVersion, 21.1.118, --fml.fmlVersion, 4.0.35, --fml.mcVersion, 1.21.1, --fml.neoFormVersion, 20240808.144430, --mod, energymeter, --all, --output, C:\\Users\\rlnt\\repos\\energymeter\\1.21.1\\src\\main\\generated, --existing, C:\\Users\\rlnt\\repos\\energymeter\\1.21.1\\src\\main\\resources]
[19:49:58] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: JVM identified as JetBrains s.r.o. OpenJDK 64-Bit Server VM 21.0.4+8-b613.2
[19:49:58] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher 11.0.4+main.d2e20e43 starting: java version 21.0.4 by JetBrains s.r.o.; OS Windows 11 arch amd64 version 10.0
[19:49:58] [main/WARN] [ne.ne.fm.lo.FMLConfig/CORE]: Configuration file C:\Users\rlnt\repos\energymeter\1.21.1\run\config\fml.toml is not correct. Correcting
[19:49:58] [main/INFO] [ne.ne.fm.lo.ImmediateWindowHandler/]: ImmediateWindowProvider not loading because launch target is forgedatauserdev
[19:49:58] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.7 Source=union:/C:/Users/rlnt/.gradle/caches/modules-2/files-2.1/net.fabricmc/sponge-mixin/0.15.2+mixin.0.8.7/2af2f021d8e02a0220dc27a7a72b4666d66d44ca/sponge-mixin-0.15.2+mixin.0.8.7.jar%23131!/ Service=ModLauncher Env=CLIENT
[19:49:58] [main/WARN] [ne.ne.fm.lo.FMLConfig/CORE]: Configuration file C:\Users\rlnt\repos\energymeter\1.21.1\run\config\fml.toml is not correct. Correcting
[19:49:58] [main/INFO] [ne.ne.fm.lo.mo.lo.JarInJarDependencyLocator/]: Found 2 dependencies adding them to mods collection
[19:49:58] [main/INFO] [ne.ne.fm.lo.mo.ModDiscoverer/]:
Mod List:
Name Version (Mod Id)
Cloth Config v15 API 15.0.140 (cloth_config)
EdivadLib 3.0.0 (edivadlib)
Energy Meter 1.21.1-1.0.0 (energymeter)
Jade 15.9.4+neoforge (jade)
McJtyLib 1.21-9.0.5 (mcjtylib)
Mekanism 10.7.10 (mekanism)
Mekanism: Generators 10.7.10 (mekanismgenerators)
Minecraft 1.21.1 (minecraft)
Mouse Tweaks 2.26.1 (mousetweaks)
NeoForge 21.1.118 (neoforge)
Pipez 1.21.1-1.2.17 (pipez)
Powah 6.1.6 (powah)
RFToolsBase 1.21-6.0.5 (rftoolsbase)
RFToolsPower 1.21-7.0.1 (rftoolspower)
SolarGeneration 7.0.1 (solargeneration)
SuperMartijn642's Config Library 1.1.8 (supermartijn642configlib)
SuperMartijn642's Core Lib 1.1.18+a (supermartijn642corelib)
Trash Cans 1.0.18+c (trashcans)
XNet 1.21-7.0.3 (xnet)
[19:49:59] [main/INFO] [mixin/]: Compatibility level set to JAVA_17
[19:49:59] [main/INFO] [cp.mo.mo.LaunchServiceHandler/MODLAUNCHER]: Launching target 'forgedatauserdev' with arguments [--gameDir, ., --assetsDir, C:\Users\rlnt\.gradle\caches\neoformruntime\assets, --assetIndex, 17, --mod, energymeter, --all, --output, C:\\Users\\rlnt\\repos\\energymeter\\1.21.1\\src\\main\\generated, --existing, C:\\Users\\rlnt\\repos\\energymeter\\1.21.1\\src\\main\\resources]
[19:49:59] [main/WARN] [mixin/]: Reference map 'supermartijn642corelib.mixins.refmap.json' for supermartijn642corelib.mixins.json could not be read. If this is a development environment you can ignore this message
[19:49:59] [main/INFO] [MixinExtras|Service/]: Initializing MixinExtras via com.llamalad7.mixinextras.service.MixinExtrasServiceImpl(version=0.4.1).
[19:49:59] [main/INFO] [ne.ne.ne.da.lo.DatagenModLoader/]: Initializing Data Gatherer for mods [energymeter]
[Mouse Tweaks] Main.initialize()
[19:50:03] [modloading-worker-0/INFO] [ne.ne.ne.co.NeoForgeMod/NEOFORGE-MOD]: NeoForge mod loading, version 21.1.118, for MC 1.21.1
[19:50:03] [modloading-worker-0/ERROR] [ne.ne.fm.ja.FMLModContainer/LOADING]: Failed to create mod instance. ModID: mousetweaks, class yalter.mousetweaks.neoforge.MouseTweaksNeo
java.lang.NullPointerException: Cannot read field "gameDirectory" because "yalter.mousetweaks.Main.mc" is null
at TRANSFORMER/[email protected]/yalter.mousetweaks.Main.initialize(Main.java:45) ~[MouseTweaks-neoforge-mc1.21-2.26.1.jar%23207!/:?] {re:classloading}
at TRANSFORMER/[email protected]/yalter.mousetweaks.neoforge.MouseTweaksNeo.<init>(MouseTweaksNeo.java:26) ~[MouseTweaks-neoforge-mc1.21-2.26.1.jar%23207!/:?] {re:classloading}
at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62) ~[?:?] {}
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502) ~[?:?] {}
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486) ~[?:?] {}
at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.javafmlmod.FMLModContainer.constructMod(FMLModContainer.java:115) ~[loader-4.0.35.jar%23139!/:4.0] {}
at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.ModLoader.lambda$constructMods$3(ModLoader.java:153) ~[loader-4.0.35.jar%23139!/:4.0] {}
at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.ModLoader.lambda$dispatchParallelTask$7(ModLoader.java:231) ~[loader-4.0.35.jar%23139!/:4.0] {}
at java.base/java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:934) [?:?] {re:mixin}
at java.base/java.util.concurrent.CompletableFuture$UniHandle.tryFire(CompletableFuture.java:911) [?:?] {}
at java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483) [?:?] {}
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:507) [?:?] {}
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1491) [?:?] {}
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:2073) [?:?] {}
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:2035) [?:?] {}
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:187) [?:?] {}
[19:50:03] [modloading-worker-0/WARN] [ne.ne.fm.co.ConfigTracker/CONFIG]: Configuration file C:\Users\rlnt\repos\energymeter\1.21.1\run\config\Mekanism\startup.toml is not correct. Correcting
[19:50:04] [main/FATAL] [ne.ne.fm.ModLoader/LOADING]: Failed to wait for future Mod Construction, 1 errors found
Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:32)
at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53)
at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71)
at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.run(Launcher.java:103)
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 [email protected]/cpw.mods.bootstraplauncher.BootstrapLauncher.run(BootstrapLauncher.java:210)
at [email protected]/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:69)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at [email protected]/net.neoforged.devlaunch.Main.main(Main.java:55)
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:118)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.loading.targets.CommonLaunchHandler.runTarget(CommonLaunchHandler.java:136)
Caused by: java.lang.reflect.InvocationTargetException
at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.loading.targets.CommonLaunchHandler.dataService(CommonLaunchHandler.java:132)
at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.loading.targets.NeoForgeDataUserdevLaunchHandler.runService(NeoForgeDataUserdevLaunchHandler.java:28)
at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.loading.targets.CommonLaunchHandler.lambda$launchService$4(CommonLaunchHandler.java:118)
at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30)
... 11 more
Caused by: net.neoforged.fml.ModLoadingException: Loading errors encountered:
- Mouse Tweaks (mousetweaks) has failed to load correctly
Caused by: net.neoforged.fml.ModLoadingException: Loading errors encountered:
java.lang.NullPointerException: Cannot read field "gameDirectory" because "yalter.mousetweaks.Main.mc" is null
at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.ModLoader.waitForFuture(ModLoader.java:281)
at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.ModLoader.dispatchParallelTask(ModLoader.java:244)
at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.ModLoader.constructMods(ModLoader.java:152)
at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:142)
at TRANSFORMER/[email protected]/net.neoforged.neoforge.internal.CommonModLoader.begin(CommonModLoader.java:49)
at TRANSFORMER/[email protected]/net.neoforged.neoforge.data.loading.DatagenModLoader.begin(DatagenModLoader.java:47)
at TRANSFORMER/[email protected]/net.minecraft.data.Main.main(Main.java:101)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
... 17 more
> Task :net.neoforged.devlaunch.Main.main() FAILED
Execution failed for task ':net.neoforged.devlaunch.Main.main()'.
> Process 'command 'C:\Users\rlnt\.jdks\jbr-21.0.4-windows-x64-b613.2\bin\java.exe'' finished with non-zero exit value 1
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.8/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 11s
6 actionable tasks: 3 executed, 3 up-to-date