Vampirism - Become a vampire!

Vampirism - Become a vampire!

16M Downloads

[Bug] Vamp (1.7.4), Error on server, invalid dist DEDICATED_SERVER

Chrisjohnson57387 opened this issue ยท 7 comments

commented

Versions

  • Minecraft: 1.16.4

  • Forge: 35.1.15

  • Vampirism: 1.7.4

  • ModPack: N/A

Issue Description

Error when I run Vampirism 1.7.4 on server, but not on client

Reproduce Steps

Install on forge server, I can send personal modpack if desired.

Additional Information

-- Head --
Thread: main
Stacktrace:
at net.minecraftforge.fml.loading.RuntimeDistCleaner.processClassWithFlags(RuntimeDistCleaner.java:71) ~[forge-1.16.4-35.1.15.jar:35.1] {}
-- MOD vampirism --
Details:
Mod File: Mob - Vampirism.jar
Failure message: Vampirism (vampirism) has failed to load correctly
java.lang.RuntimeException: Attempted to load class net/minecraft/client/gui/screen/Screen for invalid dist DEDICATED_SERVER
Mod Version: 1.7.4
Mod Issue URL: https://github.com/TeamLapen/Vampirism/issues
Exception message: java.lang.RuntimeException: Attempted to load class net/minecraft/client/gui/screen/Screen for invalid dist DEDICATED_SERVER
Stacktrace:
at net.minecraftforge.fml.loading.RuntimeDistCleaner.processClassWithFlags(RuntimeDistCleaner.java:71) ~[forge-1.16.4-35.1.15.jar:35.1] {}
at cpw.mods.modlauncher.LaunchPluginHandler.offerClassNodeToPlugins(LaunchPluginHandler.java:85) ~[modlauncher-8.0.6.jar:?] {}
at cpw.mods.modlauncher.ClassTransformer.transform(ClassTransformer.java:119) ~[modlauncher-8.0.6.jar:?] {}
at cpw.mods.modlauncher.TransformingClassLoader$DelegatedClassLoader.findClass(TransformingClassLoader.java:265) ~[modlauncher-8.0.6.jar:?] {}
at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:136) ~[modlauncher-8.0.6.jar:?] {re:classloading}
at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:98) ~[modlauncher-8.0.6.jar:?] {re:classloading}
at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_271] {}
at java.lang.Class.forName0(Native Method) ~[?:1.8.0_271] {}
at java.lang.Class.forName(Unknown Source) ~[?:1.8.0_271] {}
at de.teamlapen.lib.util.OptifineHandler.isOptifineLoaded(OptifineHandler.java:24) ~[vampirism:1.7.4] {re:classloading}
at de.teamlapen.vampirism.VampirismMod.(VampirismMod.java:160) ~[vampirism:1.7.4] {re:mixin,re:classloading}
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_271] {}
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_271] {}
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_271] {}
at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.8.0_271] {}
at java.lang.Class.newInstance(Unknown Source) ~[?:1.8.0_271] {}
at net.minecraftforge.fml.javafmlmod.FMLModContainer.constructMod(FMLModContainer.java:81) ~[forge:35.1] {re:classloading}
at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$4(ModContainer.java:120) ~[forge:?] {re:classloading}
at java.util.concurrent.CompletableFuture$AsyncRun.run(Unknown Source) ~[?:1.8.0_271] {}
at java.util.concurrent.CompletableFuture$AsyncRun.exec(Unknown Source) ~[?:1.8.0_271] {}
at java.util.concurrent.ForkJoinTask.doExec(Unknown Source) ~[?:1.8.0_271] {}
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(Unknown Source) ~[?:1.8.0_271] {}
at java.util.concurrent.ForkJoinPool.runWorker(Unknown Source) ~[?:1.8.0_271] {re:computing_frames}
at java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source) ~[?:1.8.0_271] {}

commented

Is Optifine in the server's mod directory? If so, can you remove it there and try again?

commented

Yet, Vampirism should probably not crash even if Optifine is present.
Will fix eventually

commented

This is true. For more context, I upgraded the mod in my modlist, but vampirism(pre mc 1.16.5) did work in this setup with optifine before.

commented

That worked. So no Optifine and Vampirism I guess? Or am I doing Optifine wrong?

commented

Optifine is a client only mod, so it should not be in the server's mod directory.

commented

Ah, I see, thank you!

commented

maybe just insert a DistExecutor#safeRunWhenOn when calling

if (OptifineHandler.isOptifineLoaded()) {
or around the try block