zlepper / itlt

It's the little things mod, a mod about the little things.
MIT License
12 stars 5 forks source link

[Bug - 1.19.2] Incompatible with "ChatImage" #45

Open KuryKat opened 1 year ago

KuryKat commented 1 year ago

Related to kitUIN/ChatImage#17

Describe the bug Unable to launch the game when using ChatImage + It's the Little things because both export the same package...

To Reproduce

  1. Install Minecraft + Forge 43.2.23
  2. Install ChatImage 1.1.6
  3. Install ITLT (It's the little things) 2.2.0
  4. Try to Launch the Game
  5. Exception caught from launcher (check below for the logs)

Expected behavior My game not crashing :)

Environment details

Logs and additional context

Exception caught from launcher
java.lang.reflect.InvocationTargetException
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at io.github.zekerzhayard.forgewrapper.installer.Main.main(Main.java:58)
    at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:88)
    at org.prismlauncher.EntryPoint.listen(EntryPoint.java:126)
    at org.prismlauncher.EntryPoint.main(EntryPoint.java:71)
Caused by: java.lang.module.ResolutionException: Modules itlt and chatimage export package net.sf.image4j.util to module forge
    at java.base/java.lang.module.Resolver.resolveFail(Resolver.java:901)
    at java.base/java.lang.module.Resolver.failTwoSuppliers(Resolver.java:815)
    at java.base/java.lang.module.Resolver.checkExportSuppliers(Resolver.java:736)
    at java.base/java.lang.module.Resolver.finish(Resolver.java:380)
    at java.base/java.lang.module.Configuration.<init>(Configuration.java:140)
    at java.base/java.lang.module.Configuration.resolveAndBind(Configuration.java:494)

Maybe this or this could help?

kitUIN commented 1 year ago

ITLT that have the same module patch as ChatImage. It's unfixable. You can only delete the mods that have the same module.

kitUIN commented 1 year ago

You can easily fix it by opening the ChatImage jar file and delete the folder net.sf.image4j

KuryKat commented 1 year ago

I can't do such a thing, since I am distributing the mods in my modpack, there's not a way for me to edit the jar and then release it with the modpack, and that could break some licenses even if I could 😅😅

KuryKat commented 1 year ago

I think this could be fixed with JarJar.... but not entirely sure, what do you guys think?

You can read more about JarJar here: https://forge.gemwire.uk/wiki/Jar-in-jar

KuryKat commented 1 year ago

After some tests I managed to fix with simple relocation using the shadow plugin, quick fix

I tested on 1.19.2 and it worked, but it should work on any other version as well.