# Two mods refuse to run together

The mod loader stopped the server because one mod declares that it does not work with another installed mod, or with the installed loader version.

- Code: `mod_incompatible`
- Severity: fatal
- Category: Mods
- Server types: NeoForge, Fabric, Quilt
- Page: https://failures.perland.online/failures/mod_incompatible/

## Example log

```text
[16:40:21.318] [main/ERROR] [loading.ModSorter/LOADING]: Incompatibilities between mods:
	Mod 'betterbiomegen' is incompatible with 'terrashapes', versions: '[2.0,)'; Version found: '2.1.4'
```

## Parameters

| Parameter | Meaning |
| --- | --- |
| `mod` | The mod that declares the conflict, when the loader names the pair (its mod id, or its display name on Quilt). |
| `conflictsWith` | The installed mod, or the loader, that it refuses, when the loader names the pair. |

## Log lines this page covers

- `Incompatible mods found!`
- `Some of your mods are incompatible with the game or each other!`
- `Mod resolution encountered an incompatible mod set!`
- `is incompatible with any version of mod`
- `breaks all versions of <mod>, which is present!`
- `Incompatibilities between mods:`
- `Mod '<mod>' is incompatible with '<other>'`
- `Error during pre-loading phase: Mod <mod> is incompatible with <other>`

## What it means

Besides what it needs, a mod can declare what it cannot run with: another mod that changes the same part of the game, or a range of versions of the loader. When such a mod is installed next to the one it refuses, the loader stops before the world loads and prints the pair.

On Fabric and Quilt the same report also lists missing dependencies. When a dependency is missing, the diagnosis reports that instead (see the related code); this issue is the report that names only conflicts.

## Why it happens

- **Two mods do the same job.** World generation, rendering or performance mods often declare each other incompatible because they replace the same code.
- **A mod refuses a version of the other.** The conflict covers only some versions: an older or newer release of one of them runs fine.
- **A mod refuses the loader version.** On NeoForge a mod can declare it does not run on a NeoForge version, and the log names `neoforge` as the other side.
- **A modpack update** brought in a mod that conflicts with one added by hand.

## How to fix

1. Read `mod` and `conflictsWith`: the first declared the conflict, the second is what it refuses. When the issue names neither, the log under the header lists the pairs.
2. Decide which of the two you need and remove the other. Check the mod's page (Modrinth or CurseForge): it often says which mods it replaces.
3. If you need both, look for versions made for each other. The log prints the versions the conflict covers, and the mod's changelog may say when it was lifted.
4. **NeoForge, a conflict with `neoforge`:** use a version of the mod made for the NeoForge version the server runs, or change the server's loader version to one the mod accepts.
5. **Fabric and Quilt:** the "potential solution" lines above the details suggest which mod to remove or replace.

## In Perland

The issue appears in the server's Diagnosis tab with the two mods it names. On a server whose mods come from a modpack, the fix button leads to the server's Sources, and Mod Studio is where you remove or change the version of the pack's mods; it also warns when a mod you add is incompatible with one already in the pack. Otherwise, remove the jar from the `mods` folder in the Files tab.

## References

- [Fabric wiki: fabric.mod.json (`breaks`)](https://wiki.fabricmc.net/documentation:fabric_mod_json)
- [NeoForge documentation: mod files (dependency types)](https://docs.neoforged.net/docs/gettingstarted/modfiles)
