Mekanism Additions

Mekanism Additions

24M Downloads

Crashes on dedicated servers

jwright159 opened this issue ยท 1 comments

commented

Issue description

java.lang.RuntimeException: Attempted to load class net/minecraft/client/multiplayer/ClientLevel for invalid dist DEDICATED_SERVER
    at MC-BOOTSTRAP/fml_loader@4.0.38/net.neoforged.fml.common.asm.RuntimeDistCleaner.processClassWithFlags(RuntimeDistCleaner.java:60) ~[loader-4.0.38.jar%2360!/:4.0] {}
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.LaunchPluginHandler.offerClassNodeToPlugins(LaunchPluginHandler.java:94) ~[modlauncher-11.0.4.jar%2362!/:?] {}
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.ClassTransformer.transform(ClassTransformer.java:120) ~[modlauncher-11.0.4.jar%2362!/:?] {}
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.TransformingClassLoader.maybeTransformClassBytes(TransformingClassLoader.java:57) ~[modlauncher-11.0.4.jar%2362!/:?] {}
    at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.readerToClass(ModuleClassLoader.java:190) ~[securejarhandler-3.0.8.jar:?] {}
    at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.lambda$findClass$20(ModuleClassLoader.java:298) ~[securejarhandler-3.0.8.jar:?] {}
    at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.loadFromModule(ModuleClassLoader.java:311) ~[securejarhandler-3.0.8.jar:?] {}
    at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.findClass(ModuleClassLoader.java:298) ~[securejarhandler-3.0.8.jar:?] {}
    at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:214) ~[securejarhandler-3.0.8.jar:?] {}
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526) ~[?:?] {}
    at TRANSFORMER/mekanism@10.7.11/mekanism.common.recipe.MekanismRecipeType.getRecipes(MekanismRecipeType.java:231) ~[Mekanism-1.21.1-10.7.11.76.jar%23372!/:10.7.11] {re:classloading}
    at TRANSFORMER/mekanism@10.7.11/mekanism.common.recipe.MekanismRecipeType.getRecipes(MekanismRecipeType.java:202) ~[Mekanism-1.21.1-10.7.11.76.jar%23372!/:10.7.11] {re:classloading}
    at TRANSFORMER/mekanism@10.7.11/mekanism.common.recipe.lookup.cache.AbstractInputRecipeCache.initCacheIfNeeded(AbstractInputRecipeCache.java:38) ~[Mekanism-1.21.1-10.7.11.76.jar%23372!/:10.7.11] {re:classloading}

Because MekanismRecipeType references RecipeViewerUtils which is a client class, which wasn't originally an issue, but as of 5 days ago RecipeViewerUtils now also references net.minecraft.client.Minecraft which causes the crash.

Probably.

Steps to reproduce

  1. Boot up dedicated server with Mek
  2. Crash

Minecraft version

1.21.1 (Latest)

NeoForge version

21.1.133

Mekanism version

10.7.11 (Latest)

Other relevant versions

No response

If a (crash)log is relevant for this issue, link it here: (It's almost always relevant)

No response

commented

Thanks for the report, should be fixed in 10.7.12