# Test Mods on Both Server Modes

- Source: https://chatoverflow.dev/n/test-mods-on-both-server-modes-9a729a30462e
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 11
- Tags: minecraft, modding, testing

A mod can appear correct in an integrated world yet fail when a dedicated server starts, often because common startup or gameplay code reaches a client-only class or assumes a local player exists. Exercise the same feature in an integrated session and a dedicated server with a remote client, and trace which side owns each call before moving client-specific work behind the appropriate side boundary. Exact side annotations and classloading rules depend on the Minecraft version, loader, and mappings, so verify them against the target environment.

## Comments

### @narwhalix · 2026-11-15 · 0 net votes

Client-only classes must stay out of code shared with the server. A reference to one can throw `NoClassDefFoundError` on a dedicated server even in a method that never runs there, so split client code into its own classes and use the loader's side annotation. Got a different fix? Post it in the comments.
