
受够了硬编码静态附魔逻辑,还在为繁琐的事件处理器头疼吗?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
SpellFieldAnchorentities 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
LevelBasedValueregistry. 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
LevelBasedValuein anenchantment_core:pointercodec 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 customValueModifierandStyleModifierimplementations. - 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.wrapRichandTooltipLineWrapper, complete with fastRomanNumeralConverterparsing 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
commonproject. Use the in-game/enchantment_core importcommand to automatically map static vanilla JSONs into dynamic configuration wrappers. - Visual Debugging: A dedicated
SpellFieldDebugRenderervisualizes 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.
下载 Enchantment Core
下载 Enchantment Core
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Enchantment Core
下载 Enchantment Core
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Enchantment Core
下载 Enchantment Core
下载 Enchantment Core
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Enchantment Core
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Enchantment Core
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Enchantment Core
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
修复
-
Forge MixinExtras 打包:
-
修复了在 Forge 上因未原生捆绑 MixinExtras 而导致的启动时
ClassNotFoundException(com.llamalad7.mixinextras.injector.wrapoperation.Operation)。 -
启用了 Forge Jar-in-Jar (
jarJar) 功能,将mixinextras-forge0.5.0([0.5.0,))打包到已发布的 Forge 工件中,并将mixinextras-common更新至0.5.0以匹配声明的minVersion。
-
-
Fabric Minecraft 版本兼容性:
- 修复了
fabric.mod.json中的minecraft依赖项被限制为仅基础 Minecraft 版本,而非发布版所支持的全部版本范围的问题。
- 修复了
修复
-
Forge MixinExtras 打包:
-
修复了在 Forge 上因未原生捆绑 MixinExtras 而导致的启动时
ClassNotFoundException(com.llamalad7.mixinextras.injector.wrapoperation.Operation)。 -
启用了 Forge Jar-in-Jar (
jarJar) 功能,将mixinextras-forge0.5.0([0.5.0,))打包到已发布的 Forge 工件中,并将mixinextras-common更新至0.5.0以匹配声明的minVersion。
-
-
Fabric Minecraft 版本兼容性:
- 修复了
fabric.mod.json中的minecraft依赖项被限制为仅基础 Minecraft 版本,而非发布版所支持的全部版本范围的问题。
- 修复了
修复
-
Forge MixinExtras 捆绑:
-
修复了 Forge 上因 MixinExtras 未原生捆绑而导致的启动时
ClassNotFoundException(com.llamalad7.mixinextras.injector.wrapoperation.Operation)。 -
启用了 Forge Jar-in-Jar (
jarJar),将mixinextras-forge0.5.0([0.5.0,))打包到发布的 Forge 工件中,并将mixinextras-common更新为0.5.0以匹配声明的minVersion。
-
修复
-
Forge MixinExtras 捆绑:
-
修复了 Forge 上因 MixinExtras 未原生捆绑而导致的启动时
ClassNotFoundException(com.llamalad7.mixinextras.injector.wrapoperation.Operation)。 -
启用了 Forge Jar-in-Jar (
jarJar),将mixinextras-forge0.5.0([0.5.0,))打包到发布的 Forge 工件中,并将mixinextras-common更新为0.5.0以匹配声明的minVersion。
-
新增
- 动态描述系统:引入了一种数据驱动的方式,将计算后的数学曲线直接注入附魔翻译字符串中(支持
<val:key>和<array:key>语法)。 - 自动接线编解码器:
EnchantmentCodecMixin现在会自动扫描深层嵌套效果中的PointerValue标记,并将其连接到根描述组件。 PointerValueLevelBasedValue(注册为enchantment_core:pointer),用于标记需要提取的目标方程。DESCRIPTION_ARGS数据组件(注册为enchantment_core:description_args),用于存储提取曲线的查找映射表。DynamicDescriptionParser工具类,用于无缝解析翻译字符串并注入已计算的参数。POWDER_SNOW_WALKABLEEnchantmentEffectComponent
修复
- 依赖 JAR 中的 Forge Mixin 加载:在
forge/build.gradle的jar.manifest中显式声明了MixinConfigs,以便在作为库依赖使用且未执行reobfJar时,能够发现并加载 Mixin 配置(enchantment_core.mixins.json和enchantment_core.forge.mixins.json)。 - 过早查询注册表编解码器:将
EnchantmentCoreRegistries中的分发获取方法(getDistanceScalingFunctionCodec()、getSpellFieldShapeCodec()和getBaseSpellFieldEffectCodec())包装在Codec.lazyInitialized(...)中,以防止在自定义注册表填充之前、Forge 早期生命周期事件期间过早触发供应商查询及导致NullPointerException崩溃。
新增
- 动态描述系统:引入了一种数据驱动的方式,将计算后的数学曲线直接注入附魔翻译字符串中(支持
<val:key>和<array:key>语法)。 - 自动接线编解码器:
EnchantmentCodecMixin现在会自动扫描深层嵌套效果中的PointerValue标记,并将其连接到根描述组件。 PointerValueLevelBasedValue(注册为enchantment_core:pointer),用于标记需要提取的目标方程。DESCRIPTION_ARGS数据组件(注册为enchantment_core:description_args),用于存储提取曲线的查找映射表。DynamicDescriptionParser工具类,用于无缝解析翻译字符串并注入已计算的参数。POWDER_SNOW_WALKABLEEnchantmentEffectComponent
修复
- 依赖 JAR 中的 Forge Mixin 加载:在
forge/build.gradle的jar.manifest中显式声明了MixinConfigs,以便在作为库依赖使用且未执行reobfJar时,能够发现并加载 Mixin 配置(enchantment_core.mixins.json和enchantment_core.forge.mixins.json)。 - 过早查询注册表编解码器:将
EnchantmentCoreRegistries中的分发获取方法(getDistanceScalingFunctionCodec()、getSpellFieldShapeCodec()和getBaseSpellFieldEffectCodec())包装在Codec.lazyInitialized(...)中,以防止在自定义注册表填充之前、Forge 早期生命周期事件期间过早触发供应商查询及导致NullPointerException崩溃。
新增
- 动态描述系统:引入了一种数据驱动的方式,将计算后的数学曲线直接注入附魔翻译字符串中(支持
<val:key>和<array:key>语法)。 - 自动接线编解码器:
EnchantmentCodecMixin现在会自动扫描深层嵌套效果中的PointerValue标记,并将其连接到根描述组件。 PointerValueLevelBasedValue(注册为enchantment_core:pointer),用于标记需要提取的目标方程。DESCRIPTION_ARGS数据组件(注册为enchantment_core:description_args),用于存储提取曲线的查找映射表。DynamicDescriptionParser工具类,用于无缝解析翻译字符串并注入已计算的参数。POWDER_SNOW_WALKABLEEnchantmentEffectComponent
修复
- 依赖 JAR 中的 Forge Mixin 加载:在
forge/build.gradle的jar.manifest中显式声明了MixinConfigs,以便在作为库依赖使用且未执行reobfJar时,能够发现并加载 Mixin 配置(enchantment_core.mixins.json和enchantment_core.forge.mixins.json)。 - 过早查询注册表编解码器:将
EnchantmentCoreRegistries中的分发获取方法(getDistanceScalingFunctionCodec()、getSpellFieldShapeCodec()和getBaseSpellFieldEffectCodec())包装在Codec.lazyInitialized(...)中,以防止在自定义注册表填充之前、Forge 早期生命周期事件期间过早触发供应商查询及导致NullPointerException崩溃。
新增
- 动态描述系统:引入了一种数据驱动的方式,将计算后的数学曲线直接注入附魔翻译字符串中(支持
<val:key>和<array:key>语法)。 - 自动接线编解码器:
EnchantmentCodecMixin现在会自动扫描深层嵌套效果中的PointerValue标记,并将其连接到根描述组件。 PointerValueLevelBasedValue(注册为enchantment_core:pointer),用于标记需要提取的目标方程。DESCRIPTION_ARGS数据组件(注册为enchantment_core:description_args),用于存储提取曲线的查找映射表。DynamicDescriptionParser工具类,用于无缝解析翻译字符串并注入已计算的参数。POWDER_SNOW_WALKABLEEnchantmentEffectComponent
修复
- 依赖 JAR 中的 Forge Mixin 加载:在
forge/build.gradle的jar.manifest中显式声明了MixinConfigs,以便在作为库依赖使用且未执行reobfJar时,能够发现并加载 Mixin 配置(enchantment_core.mixins.json和enchantment_core.forge.mixins.json)。 - 过早查询注册表编解码器:将
EnchantmentCoreRegistries中的分发获取方法(getDistanceScalingFunctionCodec()、getSpellFieldShapeCodec()和getBaseSpellFieldEffectCodec())包装在Codec.lazyInitialized(...)中,以防止在自定义注册表填充之前、Forge 早期生命周期事件期间过早触发供应商查询及导致NullPointerException崩溃。
新增
- 动态描述系统:引入了一种数据驱动的方式,将计算后的数学曲线直接注入附魔翻译字符串中(支持
<val:key>和<array:key>语法)。 - 自动接线编解码器:
EnchantmentCodecMixin现在会自动扫描深层嵌套效果中的PointerValue标记,并将其连接到根描述组件。 PointerValueLevelBasedValue(注册为enchantment_core:pointer),用于标记需要提取的目标方程。DESCRIPTION_ARGS数据组件(注册为enchantment_core:description_args),用于存储提取曲线的查找映射表。DynamicDescriptionParser工具类,用于无缝解析翻译字符串并注入已计算的参数。POWDER_SNOW_WALKABLEEnchantmentEffectComponent
修复
- 依赖 JAR 中的 Forge Mixin 加载:在
forge/build.gradle的jar.manifest中显式声明了MixinConfigs,以便在作为库依赖使用且未执行reobfJar时,能够发现并加载 Mixin 配置(enchantment_core.mixins.json和enchantment_core.forge.mixins.json)。 - 过早查询注册表编解码器:将
EnchantmentCoreRegistries中的分发获取方法(getDistanceScalingFunctionCodec()、getSpellFieldShapeCodec()和getBaseSpellFieldEffectCodec())包装在Codec.lazyInitialized(...)中,以防止在自定义注册表填充之前、Forge 早期生命周期事件期间过早触发供应商查询及导致NullPointerException崩溃。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
AE2:一款流行的自动化与存储模组
评论 0
登录后参与评分
还没有评论,来抢沙发吧