
这是我为 NeoForge 模组提供的共享开发库。
它包含可复用的系统,否则这些系统需要在每个项目中单独实现。该库有意专注于框架基础设施,而非提供自己的游戏玩法机制。
功能
- 数值追踪:具有衰减、阈值、效果、递减收益、来源记忆、协同效应和里程碑的持久化玩家数值。
- 通用追踪:用于诸如挖掘方块数、击败实体数、行进距离、机器操作次数及其他数值统计的可复用计数器。
- 分类:支持标签、命名空间、关键词、配方、加权信号、覆盖、排除和运行时解析的可配置物品分类。
- 兼容性:通过模组提供的注册表和配置覆盖实现的运行时兼容性定义。
- 资源系统:基于 JSON、配置文件和数据包的定义与覆盖。
- 动态 UI:可复用组件、可拖拽/调整大小的面板、小部件、通知、渲染工具以及共享的命令中心(Command Center)。
- UI 编辑:模块定位、缩放、可见性、颜色、布局编辑、工具箱及编辑器控制。
- 开发者工具:框架命令、诊断工具、分类追踪以及请求/响应网络通信。
- KubeJS 集成:针对选定框架 API 的实验性绑定。
架构
MariesLib 分为以下几个模块:
marie-core:核心 API、追踪、分类、兼容性及共享服务
marie-commands:命令与诊断工具
marie-resources:基于资源的定义与覆盖
marie-ui:可复用的 UI 基础设施
marie-editor:UI 编辑与配置基础设施
该库的设计原则是:消费方模组提供具体的含义和游戏玩法规则。
例如:
MariesLib::提供通用的数值追踪。
Nourished::定义营养值及其对玩家的影响方式。
兼容性 & API
MariesLib 目标平台为 Minecraft 1.21.1 / NeoForge 21.1.x / Java 21。
该库使用明确的 API 稳定性级别:
@Stable:适用于外部使用
@Experimental:可用但可能发生变化
@Internal:实现细节,不打算供外部使用
MariesLib 作为普通的 NeoForge 依赖项分发,未通过 Jar-in-Jar 方式捆绑。
项目
目前使用或计划用于:
- Nourished
- Thermal_Systems (WIP)
- ProjectE Extended Life (WIP)
许可证: LGPL-3.0-only
源码: GitHub
文档: API Reference
更新日志: CHANGELOG.md

This is a shared development library for my NeoForge mods.
It contains reusable systems that would otherwise have to be implemented separately in each project. It is intentionally focused on framework infrastructure rather than providing its own gameplay mechanics.
What it provides
- Value tracking: persistent player values with decay, thresholds, effects, diminishing returns, source memory, synergies, and milestones.
- Generic tracking: reusable counters for things such as blocks mined, entities defeated, distance traveled, machine operations, and other numeric statistics.
- Classification: configurable item classification with tags, namespaces, keywords, recipes, weighted signals, overrides, exclusions, and runtime resolution.
- Compatibility: runtime compatibility definitions with mod-provided registrations and configuration overrides.
- Resource systems: JSON, configuration, and datapack-driven definitions and overrides.
- Dynamic UI: reusable components, draggable/resizable panels, widgets, notifications, rendering utilities, and the shared Command Center.
- UI editing: module positioning, scaling, visibility, colors, layout editing, toolboxes, and editor controls.
- Developer tooling: framework commands, diagnostics, classification tracing, and request/response networking.
- KubeJS integration: experimental bindings for selected framework APIs.
Architecture
MariesLib is split into several modules:
marie-core: core APIs, tracking, classification, compatibility, and shared services
marie-commands: commands and diagnostic tooling
marie-resources: resource-driven definitions and overrides
marie-ui: reusable UI infrastructure
marie-editor: UI editing and configuration infrastructure
The library is designed so that consuming mods provides the actual meaning and gameplay rules.
For example:
MariesLib:: provides generic value tracking.
Nourished:: defines nutrition values and how they affect the player.
Compatibility & API
MariesLib targets Minecraft 1.21.1 / NeoForge. 21.1.x / Java 21.
The library uses explicit API stability levels:
@Stable: intended for external use
@Experimental: usable but subject to change
@Internal: implementation detail and not intended for external use
MariesLib is distributed as a normal NeoForge dependency and is not bundled through Jar-in-Jar.
Projects
Currently used or planned for:
- Nourished
- Thermal_Systems(WIP)
- ProjectE Extended Life (WIP)
License: LGPL-3.0-only
Source: GitHub
Documentation: API Reference
Changelog: CHANGELOG.md
评论 0
登录后参与评分
还没有评论,来抢沙发吧