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)
(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


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.
crash.txt93.33KB
mods.txt19.1KB
CurseForge
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

This was the change it made:
Screenshot_20250314_114343.png
Was this page helpful?