跳到正文

Compat API

作者:FixerLink

Universal compat api that auto-loads integrations, data packs and loot modifiers for mods that depend on it.

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

📖 About

Compat API is a lightweight and universal compatibility framework for the entire “Compat” ecosystem by fixerlink — including Compat Delight, the upcoming Compat Artifacts, Compat Decor, and any third-party mod that wants an easy, automated way to add cross-mod integrations.

Instead of hardcoding compat logic or manually managing data packs, Compat API handles everything for you:
auto-loading compat code, injecting data packs, wrapping loot modifiers, applying conditions, and enabling integrations only when the required mods are installed.


📃 Features

  • Smart Compat Scanner: Loads integrations only from mods that explicitly depend on Compat API.
  • Automatic Compat Code Loading:

Detects compat modules in net.<owner>.<moid>.compats.<target> and runs their register, init, or bootstrap hooks automatically.

  • Automatic Data Pack Injection:

Loads content from data/<owner>/<modid>/compats/<target> as built-in data packs — only when the target mod exists.

  • Universal Loot Modifier System:

Adds compat conditions automatically and generates the global loot modifier list.

  • Compatibility Conditions:

Built-in condition compatapi:compat_enabled ensures integrations load safely and only when appropriate.

  • Per-Target Config Toggles:

Every compat module can be enabled or disabled individually via config.

  • Safe & Clean System:

Compat errors never crash the game — they’re logged and gracefully skipped.


📝 Description

How it works:

You install Compat API.
That’s it.

If a mod depends on Compat API and includes compat modules, the API will:

  • detect its compat code
  • inject its compat data packs
  • wrap its loot modifiers
  • apply conditions
  • and enable integrations automatically

If the target mod is missing — the compat simply won’t load. No errors, no crashes, no manual setup needed. Mods can freely add compat folders and classes — Compat API does all the heavy lifting. And of course, every integration can be toggled via config.


🎁 Bonus Info

  • Mods that do not depend on Compat API are fully ignored
  • All integrations load only when their target mods are present
  • Errors in compat code never break the game
  • Fully automated system: code, data packs, conditions, loot modifiers
  • Supports thousands of integrations with minimal boilerplate

🧾 Credits

Compat API is developed by fixerlink as a universal standard for all Compat-series mods
and for developers who want clean, modular, and automated cross-mod integrations.


Feedback is welcome!

常见问题

Compat API 支持哪些 Minecraft 版本?

Compat API 支持 Minecraft Java 版 1.20.1–1.21.1,共 2 个版本,可用的加载器:Fabric / Forge / NeoForge。下载时注意选择和你游戏版本一致的文件。

Compat API 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric / Forge / NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:客户端和服务端都要装。

评论

登录后评论和评分

FixerLink 的其他作品

查看全部 →