Prevents Server Startup
Darkhax opened this issue ยท 4 comments
Installing this mod on the server will prevent server startup. While the mod is not needed on the server, many modpack systems (such as curse) are not smart enough to make this distinction. Because of this, it's considered good practice to detect if the mod is not in the correct environment, and disable itself.
MC: 1.12.1
Version: 2.1.9
net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from Better Foliage (betterfoliage)
Caused by: java.lang.NoClassDefFoundError: mods/betterfoliage/client/Client
at mods.betterfoliage.BetterFoliageMod.factory(BetterFoliageMod.kt:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at net.minecraftforge.fml.common.ILanguageAdapter$JavaAdapter.getNewInstance(ILanguageAdapter.java:189)
at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:580)
at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
at com.google.common.eventbus.EventBus.post(EventBus.java:217)
at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:253)
at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:231)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
at com.google.common.eventbus.EventBus.post(EventBus.java:217)
at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:148)
at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:570)
at net.minecraftforge.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:97)
at net.minecraftforge.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:331)
at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:125)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:484)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: mods.betterfoliage.client.Client
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 37 more
you just need to add:
https://github.com/jaredlll08/Controlling/blob/master/src/main/java/us/getfluxed/controlsearch/Control.java#L15
the
, clientSideOnly = true
part
Yes, I know. I did have a mechanism in place to detect this too, but it got broken somewhere along the way. It's on my todo list.
Thanks for the report and help @Darkhax and @jaredlll08
I appreciate you looking into this @octarine-noise :) Thanks for a great mod!