1.18.2 - 2.3.0-b: server crashes trying to load client

My buddy and I are playing Wold's Vaults (a fork of Vault Hunters 3), and they said I should install this major update on our server. https://www.curseforge.com/minecraft/modpacks/wolds-vaults My server is running Kubuntu 24.04
java --version
openjdk 21.0.6 2025-01-21
OpenJDK Runtime Environment (build 21.0.6+7-Ubuntu-124.04.1)
OpenJDK 64-Bit Server VM (build 21.0.6+7-Ubuntu-124.04.1, mixed mode, sharing)
java --version
openjdk 21.0.6 2025-01-21
OpenJDK Runtime Environment (build 21.0.6+7-Ubuntu-124.04.1)
OpenJDK 64-Bit Server VM (build 21.0.6+7-Ubuntu-124.04.1, mixed mode, sharing)
(I installed openjdk-17 with apt, not sure why it isn't using that, I could not find it on my system) I downloaded the mod with wget https://cdn.modrinth.com/data/uCdwusMi/versions/trPCtnMC/DistantHorizons-fabric-forge-2.3.0-b-1.18.2.jar First Fatal Error:
[01:39:56] [Server thread/FATAL] [ne.mi.fm.lo.RuntimeDistCleaner/DISTXFORM]: Attempted to load class net/minecraft/client/Minecraft for invalid dist DEDICATED_SERVER
[01:39:56] [Server thread/ERROR] [ne.mi.ev.EventBus/EVENTBUS]: Exception caught during firing event: null
[01:39:56] [Server thread/FATAL] [ne.mi.fm.lo.RuntimeDistCleaner/DISTXFORM]: Attempted to load class net/minecraft/client/Minecraft for invalid dist DEDICATED_SERVER
[01:39:56] [Server thread/ERROR] [ne.mi.ev.EventBus/EVENTBUS]: Exception caught during firing event: null
I tested the same .jar file on a dedicated server with no other mods and it works fine. (I did not join with a client though). Server loads up fine without DH 2.3 installed. I attached the crash log. Mods list of the 415 mods (ls ./mods/) is attached as well. Any ideas or tips would be appreciated, though we prob wont be playing any MC until we finish the TrailMakers 2.0 campaign.
CurseForge
Wold's Vaults
An opinionated and heavily customized, and modified Vault Hunters 3 experience. 20.8K Downloads | Modpacks
Solution:
Claude via Cursor IDE said that the version check method being used is not server side safe in forge 1.18.2
"I can see the issue now. The getMinecraftVersion() method is trying to use Minecraft.getInstance() which is a client-only method. For versions before 1.19.2, it's using the client-side method to get the version, while for 1.19.2 and later it's using the server-safe SharedConstants class."
I didn't ask it why it worked fine without other mods, although I did realize that maybe it was the modloader version doing it ...
No description
Jump to solution
6 Replies
Puhpine
Puhpine2mo ago
i hate to inform you, but a /binary search might be necessary
YAGPDB.xyz
YAGPDB.xyz2mo ago
Try a binary search and figure out which mod is causing it. So disable half of the mods, see if issue is still there, if yes disable half again etc etc until you find the mod that's causing the issue.
Tenor
FuzzyExpress
FuzzyExpressOP2mo ago
Yeah figured it prob would be, but I don't need it enough to try that Client side DH works perfectly fine on own Also I'm not actually sure that would work because some of the mods are so closely tied together I might try it next week when I have more time
Puhpine
Puhpine2mo ago
yea fair enough
FuzzyExpress
FuzzyExpressOP2mo ago
I might actually try messing with the source and compiling to see if I can make it work If I figure it out I'll post what I found out got it working
Solution
FuzzyExpress
FuzzyExpress2mo ago
Claude via Cursor IDE said that the version check method being used is not server side safe in forge 1.18.2
"I can see the issue now. The getMinecraftVersion() method is trying to use Minecraft.getInstance() which is a client-only method. For versions before 1.19.2, it's using the client-side method to get the version, while for 1.19.2 and later it's using the server-safe SharedConstants class."
I didn't ask it why it worked fine without other mods, although I did realize that maybe it was the modloader version doing it This was the change it made:
No description

Did you find this page helpful?