← All guides

Fix "Invalid Dist DEDICATED_SERVER": Client-Only Mod Crashing Your Server

Updated November 28, 2026 · 5 min read

Your modded server worked yesterday, or you just installed a fresh pack, and now it dies a few seconds into startup with a wall of red text and this somewhere in it:

Attempted to load class net/minecraft/client/gui/screens/Screen for invalid dist DEDICATED_SERVER

This is one of the most common startup crashes on Forge and NeoForge modpack servers, and it's almost always a quick fix: one mod in the server's mods folder was only ever meant to run on a player's game.

Short answer
A client-only mod is on the server. Open logs/latest.log, find the mod named next to the error (Forge prints the mod ID and jar file), move that jar out of the server's mods folder, and restart. Repeat until the server reaches "Done". Players keep the mod on their own game.

What the error actually means

Minecraft is two programs that share most of their code: the client (the game you play, with graphics, menus and sound) and the dedicated server (no screen at all). Anything under net/minecraft/client/ only exists in the client.

Mods that only change what you see, like shader loaders, custom main menus, loading screens or HUD tweaks, are built against that client code. When one of them ends up on a server and tries to load a client class, Forge and NeoForge refuse and stop the server. "Dist" is short for distribution, and DEDICATED_SERVER is the server one.

You'll see it in a few forms depending on the loader:

Loader What the error looks like
Forge Attempted to load class net/minecraft/client/... for invalid dist DEDICATED_SERVER
NeoForge Same wording, often inside Mod <id> has failed to load correctly
Fabric Cannot load class net.minecraft.client... in environment type SERVER
Any java.lang.NoClassDefFoundError: net/minecraft/client/...

Step 1: Find the mod in the log

Open logs/latest.log (or the newest file in crash-reports/) and search for invalid dist or net/minecraft/client. Then read the lines just above and below it. You're looking for one of these:

If you only have a mod ID, list the mods folder and look for the jar with a matching name. If the name doesn't make it obvious, open the jar like a zip file: META-INF/mods.toml (Forge) or META-INF/neoforge.mods.toml (NeoForge) lists the mod ID inside.

New to crash logs? How to read a Minecraft server crash report walks through the layout.

Step 2: Move it out, don't delete it

Make a folder called removed-mods next to mods and move the jar there. That way, if you picked the wrong one, putting it back is one drag.

Restart the server. Two things can happen:

  1. It reaches Done (x.xxxs)! For help, type "help". Fixed.
  2. It crashes with the same error, naming a different mod. Packs often have more than one client-only mod. Repeat steps 1 and 2 until it boots.

Don't remove mods at random. A mod that adds blocks, items or mobs has to be on both sides, and removing it from the server will make players unable to join with a mismatched mod list.

Mods that commonly cause it

Any mod that only changes visuals or menus can trigger this. The usual suspects are:

Many of these are written carefully enough to do nothing on a server, so their presence alone isn't proof. Always go by the name in your log, not this list.

Why a working pack suddenly breaks

The most confusing version of this: the pack ran fine, you updated to the new pack version, and now it won't start. Pack authors usually build one mod list for players and export the server files from it. If a new version adds a client-only mod that doesn't flag itself properly, it lands in the server files too.

Recently we tested a horror pack where exactly this happened: one small notification mod in the latest version crashed every fresh server on startup. With that one jar removed, it booted in under a minute.

How to stop it happening again

If the server still won't start after the client mods are gone, the cause is something else, like the wrong Java version or a missing library. Forge server won't start: every fix covers the rest.

On FreaksMC

When you install a pack with our one-click modpack installer, we boot-test the packs on our list first and strip the client-only mods we've found, so the server starts the first time. If you hit this on a pack we haven't seen, email support and we'll fix it and add it to the list.

Try a FreaksMC server free

Get your own Minecraft server free for 14 days with your own address and Bedrock crossplay set up. No card needed.

Start your free trial

FAQ

What does "invalid dist DEDICATED_SERVER" mean?

It means a mod tried to use code that only exists in the Minecraft game client (graphics, menus, sounds) while running on a dedicated server, which doesn't have that code. Forge and NeoForge stop the server instead of letting it run broken.

How do I know which mod is causing it?

Look in logs/latest.log or the crash report for the lines right around the error. Forge and NeoForge usually print the mod ID and the jar file, for example Mod File: /mods/examplemod-1.2.jar. The class name in the error (like com/example/mod/client/...) also points at the mod.

Do players need to remove the mod too?

No. Client-only mods like shader loaders, menu mods and minimaps are fine on players' games. Only the server copy has to go.

What is the Fabric version of this error?

On Fabric it usually reads Cannot load class net.minecraft.client... in environment type SERVER. The fix is the same: remove the client-only mod from the server.

Why did the pack's server files include a client-only mod?

Some packs are uploaded as one list for both client and server, and not every mod marks itself as client-only correctly. A new pack version can add one even if the last version booted fine.

Want a server that just runs fast?

FreaksMC runs on NVMe hardware with performance-tuned defaults baked in - pre-optimized Paper, sane view distances, and one-click world pre-generation. Set up in 60 seconds.

See plans from $3/mo

We use cookies for analytics & ads to measure how our site performs. Essential cookies always run. See our Privacy Policy.