When setting up a Minecraft server with mods, encountering errors can be a common hurdle. One frequent issue arises when using automated tools to deploy modpacks, such as All the Mods 8 (ATM8), and inadvertently including client-side mods on the server. This article addresses this problem, focusing on how to ensure your Minecraft server only loads server-compatible mods, preventing crashes and ensuring smooth gameplay.
A typical scenario involves using Docker images or server management tools that allow specifying a modpack via its CurseForge file ID or filename. While convenient, this method can sometimes pull the entire modpack manifest, which includes both server-side and client-side mods. Client-side mods, like Oculus, are designed to enhance the player’s game interface and experience but are not intended for server environments.
The inclusion of client-side mods on a dedicated server leads to mod loading failures. Minecraft servers operate in a “DEDICATED_SERVER” environment, which differs significantly from the client (“CLIENT”) environment. Client-side mods often attempt to access client-specific classes and functionalities, such as graphical user interfaces (GUIs) and rendering engines, which are absent on a server. This mismatch results in runtime exceptions, preventing the server from starting correctly and generating crash reports like the one below:
Description: Mod loading error has occurred
java.lang.Exception: Mod Loading has failed
...
Caused by: java.lang.RuntimeException: Attempted to load class net/minecraft/client/gui/screens/Screen for invalid dist DEDICATED_SERVER
...
This error clearly indicates that a client-side mod, in this case, Oculus, is attempting to load client-specific classes (net/minecraft/client/gui/screens.Screen
) in a server environment, leading to a crash.
To resolve this, it’s crucial to ensure that only server-side mods are deployed to your Minecraft server. When using tools that automate modpack installation, verify if there are options to specifically download “server files” or filter out client-side mods. Ideally, modpack providers should offer separate server files zip archives that contain only the necessary mods for server operation.
If automated tools are pulling the entire modpack manifest, manual intervention might be necessary. This involves:
- Identifying Client-Side Mods: Review the mod list being installed and identify known client-side mods (e.g., OptiFine, Oculus, resource packs loaders).
- Removing Client-Side Mods: Exclude these client-side mods from the server’s mod directory. This might involve manually deleting files or configuring exclusion lists in your server management tool.
- Using Server Files Zip (if available): If the modpack provider offers a dedicated “server files zip,” utilize this as the source for your server mod installation. This archive should ideally contain only server-compatible mods.
By carefully managing your Minecraft Server Mods and ensuring you only include server-compatible files, you can avoid mod loading errors and create a stable and enjoyable multiplayer experience. Remember to always check mod descriptions and compatibility to differentiate between server-side and client-side mods, especially when dealing with large modpacks.