一个轻量级的跨加载器抽象与共享 GUI/HUD/功能框架,专为 Crunch 打造,作为完整 Architectury 依赖的替代方案。
CorimLib 是什么
CorimLib 将客户端辅助(QoL)模组实际所需的一小部分加载器特定钩子——按键绑定注册、刻/客户端启动事件、HUD 元素注册、提示词/聊天回调、配置目录解析——统一封装在 PlatformBridge 接口背后,并通过 java.util.ServiceLoader 按加载器分别加载。无需字节码操作 Gradle 插件、无需 @ExpectPlatform、无需 architectury-loom 分支:仅使用纯 Java 接口和服务加载器,因为对于纯客户端 QoL 模组而言,Minecraft 的 Fabric/NeoForge/Forge API 差异远小于全平台内容模组的差异。
在此基础上,CorimLib 还提供:
一套功能/设置框架(布尔值/整数/小数/枚举/颜色/按键绑定/文本设置、分类、通过 Gson 实现 JSON 持久化、配置文件),用于构建基于切换按钮的配置 GUI,无需为每个模组重新发明轮子。 一套深色模态面板/卡片 UI 工具包(CrunchTheme),带有倒角面板和手绘图标,可在不使用原版斜面按钮样式的情况下呈现一致的现代外观。 一套可拖动、自动堆叠的 HUD 文本行系统,当文本行开启或关闭时,会自动重排且不留间隙。
我真的需要这个吗? 如果你正在开发包含跨加载器共享内容(方块、物品、实体等)的模组,你应该选择 Architectury API 或类似的全平台工具链——CorimLib 并不尝试提供这些功能。如果你正在开发纯客户端的 QoL/HUD/视觉类模组,并希望获得上述少量钩子而不引入更重的依赖项,那么 CorimLib 正好满足这一需求,不多不少。
CorimLib 目前是与 Crunch 同步开发的——其公共模块(即功能/设置/配置框架)目前是通用且可复用的;而 GUI/HUD/mixin 逻辑仍较为直接地耦合于 Crunch 自身的类中。请将其视为“为 Crunch 提取而成,其他模组稍作集成即可使用”,而非一个成熟的独立 SDK。
优势
体积小、易审计的表面——无字节码魔法
完全无 Fabric API 依赖(仅依赖 Fabric Loader/Minecraft/Java)
⚠️ 重要通知
不建议新项目使用 CorimLib 1.0.0。
此版本的文档已不再提供。如有更新的带文档版本发布,请使用该版本。
A lightweight cross-loader abstraction and shared GUI/HUD/feature framework, built for Crunch as an alternative to a full Architectury dependency.
What is CorimLib
CorimLib abstracts the small set of loader-specific hooks a client-side QoL mod actually needs - keybind registration, tick/client-started events, HUD element registration, tooltip/chat callbacks, config directory resolution - behind one PlatformBridge interface, loaded per-loader via java.util.ServiceLoader. No bytecode-manipulation Gradle plugin, no @ExpectPlatform, no architectury-loom fork: just plain Java interfaces and a service loader, because Minecraft's Fabric/NeoForge/Forge APIs diverge far less for a client-only QoL mod than they do for full multiplatform content mods.
On top of that, CorimLib ships:
A Feature/Setting framework (Boolean/Int/Decimal/Enum/Color/Keybind/Text settings, categories, JSON persistence via Gson, profiles) for building a toggle-driven config GUI without reinventing it per mod. A dark modal-panel/card UI toolkit (CrunchTheme) with chamfered-corner panels and hand-drawn icons, for a consistent modern look without vanilla's beveled-button chrome. A draggable, auto-stacking HUD text-line system that reflows itself with no gaps when lines are toggled on/off. Do I really need this? If you're building a mod with content shared across loaders (blocks, items, entities), you want Architectury API or a similar full multiplatform toolchain - CorimLib doesn't attempt that. If you're building a client-side-only QoL/HUD/visual mod and want the small set of hooks above without a heavier dependency, CorimLib is that scope, and nothing more.
CorimLib is currently developed alongside Crunch specifically - its common module (the Feature/Setting/Config framework) is generic and reusable today; the GUI/HUD/mixin logic is still wired fairly directly to Crunch's own classes. Treat it as "extracted for Crunch, usable by others with some integration work," not yet a polished standalone SDK.
Advantages
Small, auditable surface - no bytecode magic No Fabric API dependency at all (only Fabric Loader/Minecraft/Java)
⚠️ Important Notice
CorimLib 1.0.0 is currently not recommended for new projects.
Documentation for this version is no longer available. Please use a newer documented release when available.
下载 CorimLib
下载 CorimLib
下载 CorimLib
下载 CorimLib
下载 CorimLib
下载 CorimLib
下载 CorimLib
下载 CorimLib
下载 CorimLib
下载 CorimLib
暂无更新日志
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
AE2:一款流行的自动化与存储模组
评论 0
登录后参与评分
还没有评论,来抢沙发吧