multiconnect

multiconnect

108k Downloads

Initializer entrypoint requires MultiConnectAPI

jordin opened this issue ยท 6 comments

commented

The MultiConnect README implies using the MultiConnectAPI is optional, which is currently not the case. The MultiConnect base mod defines Initializer as the main fabric entrypoint, which requires the MultiConnectAPI. This leads to the following crash if you do not have MultiConnectAPI on your classpath:

java.lang.NoClassDefFoundError: net/earthcomputer/multiconnect/api/MultiConnectAPI
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:398)
	at net.fabricmc.loader.util.DefaultLanguageAdapter.create(DefaultLanguageAdapter.java:45)
	at net.fabricmc.loader.EntrypointStorage$NewEntry.create(EntrypointStorage.java:100)
	at net.fabricmc.loader.EntrypointStorage$NewEntry.getOrCreate(EntrypointStorage.java:92)
	at net.fabricmc.loader.EntrypointStorage.getEntrypoints(EntrypointStorage.java:143)
	at net.fabricmc.loader.FabricLoader.getEntrypoints(FabricLoader.java:220)
	at net.fabricmc.loader.entrypoint.minecraft.hooks.EntrypointUtils.invoke0(EntrypointUtils.java:41)
	at net.fabricmc.loader.entrypoint.minecraft.hooks.EntrypointUtils.invoke(EntrypointUtils.java:34)
	at net.fabricmc.loader.entrypoint.minecraft.hooks.EntrypointClient.start(EntrypointClient.java:32)
	at net.minecraft.client.MinecraftClient.<init>(MinecraftClient.java:392)
	at net.minecraft.client.main.Main.main(Main.java:166)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:193)
	at net.fabricmc.loader.launch.knot.Knot.init(Knot.java:138)
	at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:26)
	at net.fabricmc.devlaunchinjector.Main.main(Main.java:84)
Caused by: java.lang.ClassNotFoundException: net.earthcomputer.multiconnect.api.MultiConnectAPI
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
	at net.fabricmc.loader.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:161)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
	... 20 more

The initialization required for the API should take place in the MultiConnectAPI mod, not the MultiConnect base mod.

commented

I am currently unable to run MultiConnect both with and without the MultiConnectAPI in a development environment. Without the API, I run into the ClassNotFoundException issue outlined above. With the API, something in the gradle/loom workflow is unable to resolve the dependencies because multiconnect "has more than one client module definitions":

Could not resolve all dependencies for configuration ':compileClasspath'.
net.earthcomputer:multiconnect:[email protected]_15_2.1.15.2+build.1-v2 has more than one client module definitions.
commented

Experiencing the same issue as well.

commented

I hate gradle... Alright I'll try to fix it

commented

Of course multiconnect requires the multiconnect API. That entry point is to initialize the API for the case where the base mod is installed (the API does not depend on the base mod). I keep having to change the readme back and forth because some people's setups break when they include the API due to "duplicate mod loading", and some people's setups break when the API isn't included.

commented

Any updates about this? :0

commented

I've released a 1.2.7.1 version to the bintray maven. Try following the updated instructions in the readme. Sorry this took so long to fix.