How to Fix Minecraft Crashing With Mods (Exit Code 1 and More)
Fix Minecraft crashing with mods step by step, from exit code 1 and missing Fabric API to wrong loader, Java version, duplicates and latest.log.
You dropped a few mods into the mods folder, hit Play, and the launcher came back with exit code 1, or the game closed on the loading screen. Do not wipe everything yet. Most mod crashes come from a handful of familiar causes, and Minecraft almost always writes down the reason. You just need to know where to look.
This guide goes from the quickest fixes to the slowest. Work through it in order and change one thing at a time between launches.
What exit code 1 actually tells you
Exit code 1 simply means Java quit because something went wrong. It says nothing about what. The real information lives in your game folder:
logs/latest.log– the log from your most recent launch.crash-reports/– acrash-<date>-client.txtfile if the game managed to write one.
In Prism Launcher or the Modrinth App, every instance has its own folder; use the launcher's "open folder" button. Open the file in a text editor and search for ERROR, Exception or Caused by, then look for a mod name nearby. If Java itself went down hard, you may find an hs_err_pid....log in the game folder instead of a crash report. Those usually point at graphics drivers or Java rather than a mod.
1. Wrong mod loader
Every mod is built for a specific loader. Fabric mods do not run on Forge and vice versa; depending on the case the loader either ignores the file or throws an error. Common traps:
- From roughly 1.20.2 onward, Forge and NeoForge split, and mods for one generally will not run on the other.
- Quilt can load most Fabric mods, but not the other way around.
- Installing a loader and then launching the vanilla profile in the official launcher means no mods get loaded at all.
Every ModTorch project card lists its supported loaders. Unsure which loader to pick? Read Fabric vs Forge.
2. Wrong Minecraft version
A mod built for 1.20.1 usually will not run on 1.21.1, and a 1.21.x mod is not guaranteed to run on 26.x (Mojang's new year-based numbering). Check the version of the file you downloaded, not just the mod's name. The two most-modded versions right now are 1.20.1 and 1.21.1; if you are new to modding, picking one of them gives you the largest selection of compatible mods.
3. Missing dependencies
This is the number one cause. Lots of mods need a library mod alongside them. Fabric usually shows an incompatible-mods screen listing which mod requires what; Forge and NeoForge show a screen about missing mandatory dependencies. Note the missing mod's name and grab the file that matches your loader and version.
Fabric API
Nearly every Fabric mod needs Fabric API, and forgetting it is the classic beginner crash. Match it to your Minecraft version.
Cloth Config API
A config-screen library used by a long list of mods. If your log mentions cloth-config, this is what you are missing.
Architectury API
A library that lets authors ship one mod across several loaders. It is required on both client and server, so a modded server needs it too.
YetAnotherConfigLib (YACL) and GeckoLib
YACL is another config library, and GeckoLib powers models and animations for creatures and weapons in many content mods. Both names show up constantly in missing-dependency errors.
Other libraries you will run into: Fabric Language Kotlin, Kotlin for Forge, Balm, Collective, Puzzles Lib, Forge Config API Port, Moonlight Lib, owo-lib, Bookshelf and CreativeCore. Only install them when a mod asks for them.
4. Duplicate mods
Two copies of the same mod, say an old and a new version, will make the loader complain or crash. Sort your mods folder by name and delete the older file. This one bites people who update mods by hand.
5. Conflicting mods
Some mods simply do not get along, especially ones that both change rendering. The classic case: OptiFine tends to conflict with Sodium and many Fabric mods. If you want shaders, use Iris with Sodium instead. On older versions (up to 1.21.1), some mods that use the Fabric Rendering API need Indium when running alongside Sodium; newer Sodium releases no longer need it.
Shader crash specifically? See how to install shaders.
6. Wrong Java version
Minecraft needs a matching Java version:
| Minecraft version | Java version |
|---|---|
| 1.17 – 1.20.4 | Java 17 (1.17 uses Java 16) |
| 1.20.5 and newer | Java 21 |
| Latest releases | May need a newer Java; check your loader's requirements |
The official launcher, Prism Launcher and the Modrinth App normally pick or download the right Java for you. Trouble starts when you set a custom Java path and forget to change it after switching versions. A wrong Java version usually shows up in the log as UnsupportedClassVersionError.
7. RAM: too little breaks things, too much does not help
An OutOfMemoryError in the log means the game ran out of memory. The official launcher gives Minecraft 2 GB by default, which is fine for a few mods but usually not for a big modpack. Raise it to the modpack's recommended amount, but do not hand over almost all your RAM: your OS and browser still need some, and an oversized allocation can cause stutter during garbage collection. To lighten the load, see our FPS mods list; FerriteCore, for example, reduces memory usage.
8. The binary search method
When the log is a mess or does not name a culprit, split the problem in half:
- Back up your
modsfolder. - Remove half the mods (keep any libraries the remaining half needs).
- Launch. If the crash is gone, the culprit is in the half you removed; if not, it is in the half you kept.
- Repeat with the guilty half until one mod is left.
With 64 mods that is about six launches to find the troublemaker, far faster than removing mods one at a time.
9. Crashing or disconnecting on a modded server
If singleplayer works but joining a server fails, compare mod lists: you need the same mods at the same versions as the server. Server owners, on the other hand, should not install client-only mods (cards marked server unsupported, like Sodium) on the server. For group play, everyone should run the same pack; see modpacks to play with friends.
Quick checklist
- Open
latest.logand find the mod name nearERROR. - Check the loader and Minecraft version of every mod file.
- Install the libraries: Fabric API, Cloth Config, Architectury and friends.
- Delete duplicates and remove conflicting mods.
- Check Java and RAM.
- Still stuck? Binary-search the
modsfolder.
If nothing works, start over with our mod installation guide, or grab a ready-made pack from the modpack list; pack authors have already tested those mods together. Running a plain Paper server instead? See essential server plugins.
FAQ
What does exit code 1 mean in Minecraft?
It only means the game closed because of an error. It does not say which one. Open logs/latest.log or the crash-reports folder to find the mod responsible.
Why does Minecraft crash after installing Fabric mods?
The usual suspects are a missing Fabric API, mods built for a different Minecraft version, or launching the vanilla profile instead of the Fabric one.
Can Fabric mods run on Forge?
No. A mod only runs on the loader it was built for. Check the loader list on the mod page and download the Fabric, Forge or NeoForge file that matches yours.
Should I give Minecraft as much RAM as possible?
No. Too little RAM causes crashes, but too much can cause stutter and starve your operating system. Follow the modpack's recommended amount.
Where are Minecraft crash reports saved?
In your game folder, crash-reports holds the crash files and logs holds latest.log. In Prism Launcher or the Modrinth App, each instance has its own folder.
💬 Comments
🧩 Featured in this article
Fabric API
by modmuss50
Lightweight and modular API providing common hooks and intercompatibility measures utilized by mods using the Fabric toolchain.
Cloth Config API
by shedaniel
Configuration Library for Minecraft Mods
Architectury API
by shedaniel
An intermediary api aimed to ease developing multiplatform mods.
YetAnotherConfigLib (YACL)
by isxander
A builder-based configuration library for Minecraft!
Geckolib
by Gecko
A 3D animation library for entities, blocks, items, armor, and more!
Fabric Language Kotlin
by modmuss50
This is a mod that enables usage of the Kotlin programming language for Fabric mods.
📚 Related articles
Minecraft Mods Latest Version – What Already Supports 26.3Minecraft mods for the latest version – which popular mods already list 26.3, which lag one step behind, and which stopped earlier. Updated from live data.
· 4 min read
Best Minecraft Mods 1.20.1 – Loader-by-Loader Picks for TodayBest Minecraft mods 1.20.1 split by loader – Fabric, Forge and NeoForge – with performance, library and quality-of-life picks and honest caveats.
· 4 min read
Best Minecraft Mods 1.21.1 – 15 Picks That Are Worth InstallingBest Minecraft mods 1.21.1 players actually keep installed – performance, map, info HUD, voice chat and more, with notes on who each one suits.
· 4 min read