Server crash related to attempt to load client-only classes
antiphysika opened this issue · 3 comments
Describe the bug
Following on from #704:
FallingTree is causing NeoForge 1.21 servers to crash due to the mod attempting to load client-only classes:
[0:48:1] [modloading-worker-0/ERROR] [ne.ne.fm.ja.FMLModContainer/LOADING]: Failed to create mod instance. ModID: fallingtree, class fr.rakambda.fallingtree.neoforge.FallingTree
java.lang.BootstrapMethodError: java.lang.RuntimeException: Attempted to load class net/minecraft/client/Minecraft for invalid dist DEDICATED_SERVER
at TRANSFORMER/[email protected]/fr.rakambda.fallingtree.neoforge.client.cloth.ClothConfigHook.load(ClothConfigHook.java:37) ~[FallingTree-1.21-1.21.0.1.jar%23223!/:1.21.0.1]
[...]
Per the discussion referenced up top, I'm not sure if Forge is affected too, but I will check when I have a spare 5 minutes and report back.
Logs and crash report linked below. If I've missed anything, please give me a shout.
Minecraft version
1.21
Fabric API version
N/A
Mod version
1.21-1.21.0.1
Configuration
N/A
Relevant log output
Logs:
- [server console.log](https://gist.github.com/antiphysika/817f0daedf8359c1a313c5434d706e70)
- [crash report](https://gist.github.com/antiphysika/ee4318017a48f377dcd2705c7a5aebb9)
Cheers for the speedy responses and fix! Not sure which mod I have that hard depends on cloth-config but it definitely came up early in my testing as needed on both sides here.
Anyway, cheers. And thanks for sharing the mod! 🍺
I have a fix for it, but looking further into it, this seems weird.
Do you perhaps have cloth-config installed on the server even though it's a client only mod ?
because this error should happen only if cloth-config is present in the mod list. And I considered that it should be only on the client.
My fix will kinda safeguard this, but cloth-config shouldn't be on the server in the first place.