
受够了硬编码静态附魔逻辑,还在为繁琐的事件处理器头疼吗?Enchantment Core 是一款免费使用的多加载器库,旨在为你的 Minecraft 魔法系统注入强大动力。
探索 Enchantment Core 如何用声明式、数据驱动的 API 取代僵化的公式,实现动态法术场、高级投射物以及复杂的数学缩放效果。
(玩家须知:Enchantment Core 内置了 Configurable Default Enchantments 数据包。启用它即可解锁用户界面,允许你调整所有原版附魔的最大等级、稀有度权重以及铁砝修复成本!)
标准附魔行为以僵硬著称。Enchantment Core 提供了庞大且由数据驱动的自定义效果、修饰符和条件逻辑注册表,让你能够直接在 JSON 中构建高度复杂的魔法机制。
- 扩展触发器: 摆脱原版命中与受伤事件的限制。利用专为独特游戏时刻定制的自定义执行触发器,例如受到致命伤害、使用盾牌格挡、跳跃或保持连续挖掘与战斗连击。
- 环境机动性: 重新定义世界探索。附加模块化组件,使实体能够在指定流体上行走、通过浮力抵消流体下沉、在空中进行多重跳跃,或在方块表面垂直攀爬。
- 高级投射物: 为远程武器分配开箱即用的强大行为,包括追踪能力、磁吸效应、墙壁反弹、多重碎片化弹片以及自定义速度修饰符。
- 方块操作: 安全地转化方块、放置暂时性衰减结构,或基于概率评估器点燃表面。
停止计算笨拙的范围检测。该框架引入了强大的空间评估引擎,用于处理复杂的大范围效果(AoE)能力。
- 自定义拓扑: 使用内置的数学形状(立方体、长方体)结合拓扑距离度量(欧几里得距离、曼哈顿距离),定义精确的空间体积。
- 多目标逻辑: 在你的定义边界内触发同步的方块转化、实体治疗、绝对静止、轨道物理效果以及视觉环境爆发。
- 持久锚点: 将你的魔法从单刻执行中解耦。召唤具有精确时间生命周期的隐形
SpellFieldAnchor 实体,具备激活延迟、可配置 ticks 速率以及振荡的活跃/休息阶段,以实现脉动般的魔法效果。
附魔属性不再必须线性缩放。Enchantment Core 支持高级数学函数来规定力量成长曲线,并确保后期游戏的完美平衡。
- 高级公式: 直接将自定义编解码器注入原版
LevelBasedValue 注册表。利用针对复杂平衡性调整的 configurable 缩放值,包括多项式、指数、对数和 Sigmoid 函数。
- 平衡成长: 轻松将概率性、截断值和递减回报值绑定到附魔等级,从而在不限制等级成长的前提下遏制极端的力量飙升。
平衡性是主观的,因此硬编码数学变量已过时。Enchantment Core 使用 Config Overhauled 桥接后端数据定义与前端的用户界面。
- 配置感知值: 通过利用动态包装器,开发者自动将复杂的缩放公式、稀有度权重和最大等级直接暴露给游戏内的配置 GUI。
- 参数控制: 服务器管理员和整合包开发者可以立即直观地调整细粒度的效果变量(如基础伤害、法术场半径或效果持续时间),而无需触碰任何 JSON 文件。
- 孤儿收容所: 一个内置的安全保障系统,用于捕获缺失的配置依赖项,将被遗弃的数据包属性纳入本地菜单,以防止灾难性的服务器崩溃。
不再与硬编码的字符串拼接、过时的提示数值以及溢出的文本框纠缠。Enchantment Core 提供了一个全面且基于数据的 API,用于将实时数学值和丰富的样式直接插值到附魔描述中。
- 基于指针的值插值: 在你的附魔 JSON 中,使用
enchantment_core:pointer 编解码器包装任何 LevelBasedValue,以向翻译字符串暴露实时缩放曲线。通过 <val:id> 引用活跃等级的值,或通过 <array:id> 引用完整的多等级进度列表。
- 嵌套数学与丰富样式标签: 使用
DynamicDescriptionFormatter 由内而外地转换解析后的数字和文本。链式调用数学修饰符(如 <percent:...>、<roman:...>、<fixed:2:<div:20:...>>)以及基于堆栈的富文本标签(如 <rgb=#hex:...>、<obf:...>、<sga:...>)——或者注册自定义的 ValueModifier 和 StyleModifier 实现。
- 优先级格式化器: 通过
TooltipFormatterRegistry 安全地注入你自己的逻辑。框架基于严格的优先级层次结构评估自定义格式化器,确保你的文本修改能够按预期执行。
- 感知样式的换行与数字: 自动将冗长的多风格描述分割为完美缩进的行,使用
DynamicDescriptionFormatter.wrapRich 和 TooltipLineWrapper,并附带快速解析高达 3999 的 RomanNumeralConverter。
该库消除了结构性样板代码,让你能够专注于在 Fabric、Forge 和 NeoForge 环境中构建传奇装备。
- 单一数据生成源: 在统一的
common 项目中以编程方式生成复杂的法术字段和效果。使用游戏内的 /enchantment_core import 命令,将静态原版 JSON 自动映射到动态配置包装器中。
- 可视化调试: 专用的
SpellFieldDebugRenderer 在游戏中可视化拓扑平面、轴线和边界框(F3+B),使得微调空间魔法几何体变得极其容易。
- 自定义渲染器: 利用
AnchorRendererRegistry 的委托管道,绕过默认的 2D 精灵,将复杂的 3D 几何体或自定义光影附加到你的法术字段上。
本项目包含或依赖于第三方软件组件。
- MultiLoader-Template
- 作者: jaredlll08
- 源码:
- 许可证: CC0 1.0 Universal (公共领域贡献)
- 用途: 用作跨平台构建环境的结构基础。

Tired of hardcoding static enchantment logic and wrestling with repetitive event handlers? Enchantment Core is a free-to-use multi-loader library built to supercharge Minecraft's magic system.
Discover how Enchantment Core replaces rigid formulas with a declarative, data-driven API for dynamic spell fields, advanced projectiles, and complex mathematical scaling.
(Note for Players: Enchantment Core ships with a built-in Configurable Default Enchantments datapack. Enable it to unlock a UI allowing you to tweak the max levels, rarity weights, and anvil costs of every vanilla enchantment!)
Standard enchantment behaviors are notoriously rigid. Enchantment Core provides a vast, data-driven registry of custom effects, modifiers, and conditional logic, allowing you to build highly complex magical mechanics natively in JSON.
- Expanded Triggers: Break free from vanilla hit-and-hurt events. Utilize custom execution triggers tailored for unique gameplay moments, like taking fatal damage, blocking with a shield, jumping, or maintaining consecutive mining and combat streaks.
- Environmental Mobility: Redefine world traversal. Attach modular components that allow entities to walk on specified fluids, negate fluid sinking via buoyancy, perform midair multi-jumps, or vertically climb block surfaces.
- Advanced Projectiles: Assign robust out-of-the-box behaviors to ranged weapons, including homing capabilities, magnetic attraction, wall ricochets, multi-fragment shrapnel, and custom velocity modifiers.
- Block Manipulation: Safely transmute blocks, place temporary decaying structures, or ignite surfaces based on probabilistic evaluators.
Stop calculating clunky radius checks. The framework introduces a powerful spatial evaluation engine to handle complex Area of Effect (AoE) capabilities.
- Custom Topologies: Define exact spatial volumes using built-in mathematical shapes (Cubes, Cuboids) combined with topological distance metrics (Euclidean, Manhattan).
- Multi-Target Logic: Trigger synchronized block transmutation, entity healing, absolute stasis, orbital physics, and visual ambient bursts within your defined boundaries.
- Lingering Anchors: Decouple your magic from single-tick execution. Summon invisible
SpellFieldAnchor entities with precise temporal lifecycles, featuring activation delays, configurable tick rates, and oscillating active/rest phases for pulsing magic.
Enchantment properties no longer have to scale linearly. Enchantment Core supports advanced mathematical functions to dictate power progression and ensure perfect late-game balance.
- Advanced Formulas: Inject custom codecs directly into the vanilla
LevelBasedValue registry. Utilize configurable scaling values tailored for complex balancing, including Polynomial, Exponential, Logarithmic, and Sigmoid functions.
- Balanced Progression: Effortlessly bind probabilistic, clamped, and diminishing returns values to enchantment levels to cap extreme power spikes without limiting level progression.
Balance is subjective, therefore hardcoding mathematical variables is obsolete. Enchantment Core bridges backend data definitions with frontend user interfaces using Config Overhauled.
- Config-Aware Values: By utilizing dynamic wrappers, developers automatically expose complex scaling formulas, rarity weights, and max levels directly to an in-game configuration GUI.
- Parameter Control: Server administrators and modpack developers gain immediate, intuitive access to tweak granular effect variables (such as base damage, spell field radii, or effect durations) without touching a single JSON file.
- The Orphanage: A built-in failsafe system that catches missing configuration dependencies, adopting orphaned datapack properties into the local menu to prevent catastrophic server crashes.
Stop wrestling with hardcoded string concatenation, stale tooltip numbers, and overflowing text boxes. Enchantment Core provides a comprehensive, data-driven API for interpolating live mathematical values and rich styling directly into enchantment descriptions.
- Pointer-Based Value Interpolation: Wrap any
LevelBasedValue in an enchantment_core:pointer codec within your enchantment JSON to expose live scaling curves to translation strings. Reference them via <val:id> for active level values or <array:id> for full multi-level progression lists.
- Nested Math & Rich Style Tags: Transform resolved numbers and text inside-out using
DynamicDescriptionFormatter. Chain mathematical modifiers (<percent:...>, <roman:...>, <fixed:2:<div:20:...>>) alongside stack-based rich text tags (<rgb=#hex:...>, <obf:...>, <sga:...>)—or register custom ValueModifier and StyleModifier implementations.
- Prioritized Formatters: Inject your own logic safely via the
TooltipFormatterRegistry. The framework evaluates custom formatters based on a strict priority hierarchy, ensuring your textual modifications execute predictably.
- Style-Aware Wrapping & Numerals: Automatically slice lengthy, multi-styled descriptions into perfectly indented lines using
DynamicDescriptionFormatter.wrapRich and TooltipLineWrapper, complete with fast RomanNumeralConverter parsing up to 3999.
The library eliminates structural boilerplate so you can focus on building legendary gear across Fabric, Forge, and NeoForge environments.
- Single Source Datagen: Programmatically generate complex spell fields and effects in a unified
common project. Use the in-game /enchantment_core import command to automatically map static vanilla JSONs into dynamic configuration wrappers.
- Visual Debugging: A dedicated
SpellFieldDebugRenderer visualizes topology planes, axes, and bounding boxes in-game (F3+B), making it incredibly easy to fine-tune spatial magic geometries.
- Custom Renderers: Bypass default 2D sprites by utilizing the
AnchorRendererRegistry's delegation pipeline to attach complex 3D geometry or custom shaders to your spell fields.
This project contains or relies on third-party software components.
- MultiLoader-Template
- Author: jaredlll08
- Source:
- License: CC0 1.0 Universal (Public Domain Dedication)
- Role: Utilized as the structural foundation for the cross-platform build environment.
评论 0
登录后参与评分
还没有评论,来抢沙发吧