Client-Only Forge Mod on Server
A Forge server crashed because a client-only Forge mod was installed on it. The mod tries to load client rendering code that a dedicated server does not provide.
What does this error mean?
Forge mods can be marked client-side. When such a mod runs on a server, it attempts to load a net/minecraft/client/ class for the DEDICATED_SERVER dist and fails, because that code only ships with the client.
Attempted to load class net/minecraft/client/... for invalid dist DEDICATED_SERVER
Most Common Causes
- A client-only Forge mod placed in the server mods folder.
- Copying the full client mods folder to the server.
- A graphics/UI mod with no server logic.
- Not checking the mod's declared side.
- A pack that did not separate client mods.
How To Diagnose
- Read the crash for the mod and the client class it failed on.
- Check the mod page/metadata for a client-only marking.
- Decide whether the mod has any server function.
- Review the server mods folder for similar mods.
Recommended Fixes
- Remove it from the server
Delete the client-only Forge mod from the server, keep it on clients. - Separate client/server mods
Keep shared gameplay mods on both sides and client-only mods on clients only. - Use the pack's server set
Install the modpack's server-specific mods rather than the client list. - Check each mod's side
Confirm a mod has server functionality before adding it to the server.
Frequently Asked Questions
Through its metadata/displayTest or documentation. Such mods provide only client features.
Yes, on their clients. It must just be absent from the dedicated server.
The mod actively loads client classes at startup, which crashes a server that lacks them.