YaLTeR / MouseTweaks

A Minecraft mod that enhances inventory management.
https://minecraft.curseforge.com/projects/mouse-tweaks
BSD 3-Clause "New" or "Revised" License
119 stars 33 forks source link

Data Generator fails with MouseTweaks #121

Closed caxapexac closed 10 months ago

caxapexac commented 10 months ago

Minecraft 1.18 Forge MDK, almost no changes from example

Data Generator fails with MouseTweaks:

[04:41:40] [modloading-worker-0/ERROR] [ne.mi.fm.ja.FMLModContainer/LOADING]: Failed to create mod instance. ModID: mousetweaks, class yalter.mousetweaks.forge.MouseTweaksForge
Caused by: java.lang.NullPointerException: Cannot read field "gameDirectory" because "yalter.mousetweaks.Main.mc" is null
    at yalter.mousetweaks.Main.initialize(Main.java:46) ~[mousetweaks-60089-3578801_mapped_parchment_2022.11.06-1.18.2.jar%2392!/:2.21] {re:classloading}

Is it the intended behaviour? How to skip client-side mods on dataGen? My gradle: runtimeOnly fg.deobf("curse.maven:mousetweaks-60089:3578801")

Everything works fine on runClient task but I can't generate data

Seems like Minecraft.getInstance() should be null-checked on Main::initialize because its null on datagen

Is there any way to skip loading MouseTweaks completely on runData task while its not fixed?

YaLTeR commented 10 months ago

Hey, so uh, I've no idea how the data generator works, I've never used it. If you find a way to disable Mouse Tweaks when running the data generator, could you please submit a pull request?

caxapexac commented 10 months ago

Yeah I'll do what I can a little later tonight

caxapexac commented 10 months ago

Sorry still a bit busy, Im still here and gonna deal with it asap

YaLTeR commented 10 months ago

Thanks and no rush

caxapexac commented 10 months ago

Continuation in https://github.com/YaLTeR/MouseTweaks/pull/122