Mod fails to load in Dedicated Server scenarios
Kaiede opened this issue · 5 comments
Issue:
I use itgz's minecraft docker container, along with a Modrinth based modpack to manage the mods for both players and the server. Unfortunately, it looks like Nemo's Inventory Sorting doesn't quite behave properly when dist is DEDICATED_SERVER when it loads. This means that if I tell the container to just load everything in the modpack, it will fail to launch the server unless I exclude it manually.
Workaround:
The workaround is to use the EXCLUDE_FILES functionality of the docker container. For a Modrinth pack like I'm using with itgz's container, a user can use the MODRINTH_EXCLUDE_FILES environment variable by adding this to their docker compose:
MODRINTH_EXCLUDE_FILES: nemos-inventory-sorting
Versions:
Minecraft: 1.20.1
Forge: 47.3.33
Mod: 1.8
Logs:
Crash Report UUID: 3c93bea6-96ae-4187-9d94-246bb1d92ae3
FML: 47.3
Forge: net.minecraftforge:47.3.33[16:35:35] [main/ERROR] [minecraft/Main]: Failed to start the minecraft server
net.minecraftforge.fml.LoadingFailedException: Loading errors encountered: [
Nemo's Inventory Sorting (nemos_inventory_sorting) has failed to load correctly
§7java.lang.RuntimeException: Attempted to load class net/minecraft/client/Options for invalid dist DEDICATED_SERVER
]
at net.minecraftforge.fml.ModLoader.waitForTransition(ModLoader.java:246) ~[fmlcore-1.20.1-47.3.33.jar%23230!/:?] {}
at net.minecraftforge.fml.ModLoader.lambda$dispatchAndHandleError$20(ModLoader.java:210) ~[fmlcore-1.20.1-47.3.33.jar%23230!/:?] {}
at java.util.Optional.ifPresent(Unknown Source) ~[?:?] {re:mixin}
at net.minecraftforge.fml.ModLoader.dispatchAndHandleError(ModLoader.java:210) ~[fmlcore-1.20.1-47.3.33.jar%23230!/:?] {}
at net.minecraftforge.fml.ModLoader.lambda$gatherAndInitializeMods$13(ModLoader.java:183) ~[fmlcore-1.20.1-47.3.33.jar%23230!/:?] {}
at java.lang.Iterable.forEach(Unknown Source) ~[?:?] {re:mixin}
at net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:183) ~[fmlcore-1.20.1-47.3.33.jar%23230!/:?] {}
at net.minecraftforge.server.loading.ServerModLoader.load(ServerModLoader.java:30) ~[forge-1.20.1-47.3.33-universal.jar%23234!/:?] {re:classloading}
at net.minecraft.server.Main.main(Main.java:125) ~[server-1.20.1-20230612.114412-srg.jar%23229!/:?] {re:mixin,re:classloading,pl:mixin:A}
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source) ~[?:?] {}
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:?] {}
at net.minecraftforge.fml.loading.targets.CommonLaunchHandler.runTarget(CommonLaunchHandler.java:111) ~[fmlloader-1.20.1-47.3.33.jar%2369!/:?] {}
at net.minecraftforge.fml.loading.targets.CommonLaunchHandler.serverService(CommonLaunchHandler.java:103) ~[fmlloader-1.20.1-47.3.33.jar%2369!/:?] {}
at net.minecraftforge.fml.loading.targets.CommonServerLaunchHandler.lambda$makeService$0(CommonServerLaunchHandler.java:27) ~[fmlloader-1.20.1-47.3.33.jar%2369!/:?] {}
at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) ~[modlauncher-10.0.9.jar%2355!/:?] {}
at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) ~[modlauncher-10.0.9.jar%2355!/:?] {}
at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) ~[modlauncher-10.0.9.jar%2355!/:?] {}
at cpw.mods.modlauncher.Launcher.run(Launcher.java:108) ~[modlauncher-10.0.9.jar%2355!/:?] {}
at cpw.mods.modlauncher.Launcher.main(Launcher.java:78) ~[modlauncher-10.0.9.jar%2355!/:?] {}
at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) ~[modlauncher-10.0.9.jar%2355!/:?] {}
at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) ~[modlauncher-10.0.9.jar%2355!/:?] {}
at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) ~[bootstraplauncher-1.1.2.jar:?] {}
No worries. I'm not in a rush since the container makes working around this easy, but figured I'd share the report since this is currently the only mod I have to tell the container to exclude.
Can you check if this is fixed with the latest update? Now there shouldn't be anything running on server side