在此视频中,你可以看到根据武器效率不同而显示不同颜色的命中标记。此外,在准星右侧还会根据元素效率显示红色或绿色的命中标记。
Mebahel RPG 抗性 & 弱点
Mebahel RPG Resistance & Weakness 是一个轻量级的战斗 API 和平衡框架,专为 Minecraft 打造,开箱即用支持原版生物以及来自 Mebahel's Creatures - Draugr Invasion 和 Dwarven Automatons 的生物,无需初始配置。它添加了基于物理武器类型和元素伤害类型的可配置伤害乘数,允许实体对剑、箭矢、锤、火焰、霜冻或其他模组添加的任何自定义元素做出独特的反应。
目标很简单:让战斗更具可读性、更具战术性,并更容易在原版生物、模组生物以及大型 RPG 风格整合包之间进行平衡。
依赖项
Forge / NeoForge
Fabric
核心特性
- 物理伤害类别:Slash(斩击)、Pierce(穿刺) 和 Blunt(钝击)
- 元素伤害类别:Fire(火焰) 和 Frost(霜冻)
- 可扩展的自定义元素,例如 Holy(神圣)、Poison(毒素)、Arcane(奥术)、Lightning(闪电),或者模组开发者想要注册的任何自定义元素
- 通过
entities.json 完全可配置的实体乘数
- 数据包支持预设平衡
- 数据包可以自动向配置中添加缺失条目,而不会覆盖玩家的手动编辑
- 可选的物理和元素有效性命中标记反馈
- 色盲友好的命中标记模式
- 安全支持尚未安装的模组的实体 ID
伤害类型
默认系统将伤害分为两个层级。
| 层级 |
类型 |
目的 |
| Physical (物理) |
Slash, Pierce, Blunt |
代表武器或攻击形状 |
| Elemental (元素) |
Fire, Frost |
代表魔法或元素属性 |
这两个层级可以同时应用。
例如,一支霜冻箭可能被检测为:
| 层级 |
检测到的类型 |
| Physical (物理) |
Pierce (穿刺) |
| Elemental (元素) |
Frost (霜冻) |
最终伤害计算如下:
finalDamage = baseDamage × physicalMultiplier × elementalMultiplier
乘数规则
| 乘数 |
含义 |
1.0 |
中性伤害 |
> 1.0 |
弱点,伤害增加 |
< 1.0 |
抗性,伤害减少 |
0.0 |
完全免疫 |
大多数生物的推荐平衡范围在 0.75 到 1.25 之间。
默认原版平衡概览
默认预设旨在保持原版战斗的熟悉感,同时增添有意义的 RPG 风格优势。
| Entity (实体) |
Slash (斩击) |
Pierce (穿刺) |
Blunt (钝击) |
Fire (火焰) |
Frost (霜冻) |
minecraft:zombie |
1.0 |
0.9 |
1.1 |
1.25 |
0.9 |
minecraft:husk |
1.0 |
0.9 |
1.1 |
1.2 |
0.95 |
minecraft:drowned |
1.0 |
0.9 |
1.1 |
1.1 |
1.0 |
minecraft:zombie_villager |
1.0 |
0.9 |
1.1 |
1.25 |
0.9 |
minecraft:skeleton |
1.0 |
0.95 |
1.15 |
1.1 |
0.9 |
minecraft:stray |
1.0 |
0.95 |
1.15 |
1.15 |
0.85 |
minecraft:wither_skeleton |
1.0 |
0.95 |
1.1 |
0.85 |
1.1 |
minecraft:creeper |
1.0 |
1.05 |
0.9 |
1.1 |
0.95 |
minecraft:spider |
1.1 |
0.95 |
0.95 |
1.2 |
0.9 |
minecraft:cave_spider |
1.1 |
0.95 |
0.95 |
1.2 |
0.9 |
minecraft:witch |
1.0 |
1.0 |
1.0 |
1.1 |
0.95 |
minecraft:pillager |
1.0 |
1.0 |
1.0 |
1.0 |
1.0 |
minecraft:vindicator |
1.0 |
1.0 |
1.05 |
1.0 |
1.0 |
minecraft:evoker |
1.0 |
1.0 |
1.0 |
1.1 |
0.95 |
minecraft:vex |
1.05 |
1.05 |
1.0 |
1.1 |
0.95 |
minecraft:ravager |
0.95 |
0.9 |
1.1 |
1.05 |
0.95 |
minecraft:guardian |
0.95 |
1.0 |
1.05 |
1.15 |
0.9 |
minecraft:elder_guardian |
0.95 |
1.0 |
1.1 |
1.15 |
0.9 |
minecraft:slime |
1.0 |
1.0 |
1.1 |
1.0 |
1.0 |
minecraft:silverfish |
1.0 |
1.0 |
1.1 |
1.0 |
1.0 |
minecraft:endermite |
1.05 |
1.0 |
0.95 |
1.1 |
0.95 |
minecraft:enderman |
1.0 |
1.0 |
0.95 |
1.15 |
0.9 |
minecraft:shulker |
0.9 |
0.9 |
1.15 |
1.0 |
1.0 |
minecraft:ender_dragon |
1.0 |
0.95 |
1.05 |
0.9 |
1.05 |
minecraft:blaze |
1.0 |
1.0 |
1.0 |
0.75 |
1.25 |
minecraft:magma_cube |
1.0 |
1.0 |
1.05 |
0.8 |
1.2 |
minecraft:ghast |
1.0 |
1.05 |
0.95 |
0.9 |
1.1 |
minecraft:piglin |
1.0 |
1.0 |
1.0 |
1.05 |
0.95 |
minecraft:piglin_brute |
1.0 |
1.0 |
1.05 |
1.05 |
0.95 |
minecraft:zombified_piglin |
1.0 |
0.9 |
1.1 |
0.85 |
0.95 |
minecraft:hoglin |
1.0 |
0.95 |
1.1 |
1.0 |
1.05 |
minecraft:zoglin |
1.0 |
0.95 |
1.1 |
0.85 |
1.05 |
minecraft:wither |
1.0 |
0.95 |
1.0 |
0.9 |
1.05 |
minecraft:warden |
1.0 |
0.95 |
1.05 |
0.95 |
0.95 |
minecraft:phantom |
1.0 |
1.1 |
1.0 |
1.1 |
0.95 |
内置 Mebahel 预设
基础配置还可以包含 Mebahel 生态系统中生物的预设。即使相关模组未安装,这些条目也是安全的,因为它们以实体 ID 字符串的形式存储。
Dwarven Automatons
| Entity |
Slash |
Pierce |
Blunt |
Fire |
Frost |
mebahelcreaturesdwarven:dwarven_sphere |
0.8 |
0.8 |
1.4 |
1.0 |
1.0 |
mebahelcreaturesdwarven:dwarven_centurion |
0.8 |
0.8 |
1.4 |
1.0 |
1.0 |
mebahelcreaturesdwarven:dwarven_spider |
0.8 |
0.8 |
1.4 |
1.0 |
1.0 |
mebahelcreaturesdwarven:dwarven_spider_guardian |
0.8 |
0.8 |
1.4 |
1.0 |
1.0 |
矮人自动机是金属构造体。它们抵抗劈砍和穿刺伤害,但易受钝击影响。
亡灵入侵
| Entity |
Slash |
Pierce |
Blunt |
Fire |
Frost |
mebahelcreaturesdraugr:draugr |
1.15 |
0.9 |
0.9 |
1.2 |
0.85 |
mebahelcreaturesdraugr:draugr_archer |
1.15 |
0.9 |
0.9 |
1.2 |
0.85 |
mebahelcreaturesdraugr:draugr_wight |
1.15 |
0.9 |
0.9 |
1.2 |
0.85 |
mebahelcreaturesdraugr:draugr_scourge |
1.2 |
0.85 |
0.85 |
1.15 |
0.8 |
mebahelcreaturesdraugr:draugr_overlord |
1.2 |
0.85 |
0.85 |
1.15 |
0.8 |
mebahelcreaturesdraugr:skeleton_warrior |
1.1 |
0.9 |
0.9 |
1.15 |
0.9 |
mebahelcreaturesdraugr:skeleton_warrior_head |
1.1 |
0.9 |
0.9 |
1.15 |
0.9 |
mebahelcreaturesdraugr:infernal_draugr |
1.15 |
0.9 |
0.9 |
0.75 |
1.25 |
mebahelcreaturesdraugr:flame_atronach |
1.0 |
1.0 |
1.0 |
0.75 |
1.25 |
亡灵(Draugr)是古老的亡灵战士。它们对劈砍伤害和火焰伤害较为脆弱,但能抵抗穿刺、钝击和霜冻伤害。
配置文件
模组在以下位置创建其配置:
config/mebahel-rpg_resistance-weakness/
| File |
Purpose |
config.json |
伤害检测、关键词、优先级以及客户端反馈选项 |
entities.json |
特定实体的抗性与弱点倍率 |
实体配置
entities.json 控制每个生物的实际伤害倍率。
示例:
{
"entities": {
"minecraft:zombie": {
"mebahelrpgresistanceweakness:slash": 1.0,
"mebahelrpgresistanceweakness:pierce": 0.9,
"mebahelrpgresistanceweakness:blunt": 1.1,
"mebahelrpgresistanceweakness:fire": 1.25,
"mebahelrpgresistanceweakness:frost": 0.9
}
}
}
这意味着:
| Damage Type |
Multiplier |
Result |
| Slash |
1.0 |
Neutral |
| Pierce |
0.9 |
伤害减少 10% |
| Blunt |
1.1 |
伤害增加 10% |
| Fire |
1.25 |
伤害增加 25% |
| Frost |
0.9 |
伤害减少 10% |
检测配置
伤害检测在 config.json 中进行配置。
模组使用来自武器、投射物和物品的稳定 ID 和翻译键来检测伤害类型。这避免了对翻译后的显示名称或自定义物品名称的依赖。
示例检测部分:
{
"elementDetection": {
"physicalPriority": [
"mebahelrpgresistanceweakness:blunt",
"mebahelrpgresistanceweakness:pierce",
"mebahelrpgresistanceweakness:slash"
],
"elementalPriority": [
"mebahelrpgresistanceweakness:frost",
"mebahelrpgresistanceweakness:fire"
],
"needles": {
"mebahelrpgresistanceweakness:slash": [
"sword",
"blade",
"slash",
"claw",
"claymore",
"cutlass",
"katana",
"scythe",
"sickle",
"dagger",
"axe",
"war_axe",
"halberd"
],
"mebahelrpgresistanceweakness:pierce": [
"arrow",
"bow",
"bolt",
"trident",
"spear",
"lance",
"javelin",
"rapier",
"pierce"
],
"mebahelrpgresistanceweakness:blunt": [
"mace",
"hammer",
"warhammer",
"club",
"blunt",
"anchor",
"fist",
"pickaxe",
"staff",
"wand"
],
"mebahelrpgresistanceweakness:fire": [
"fire",
"flame",
"burn",
"lava",
"inferno"
],
"mebahelrpgresistanceweakness:frost": [
"frost",
"ice",
"freeze",
"snow",
"stalhrim"
]
}
}
}
物理优先级
physicalPriority 决定当武器匹配多个关键词时,哪种物理类型获胜。
例如,pickaxe(镐)包含 axe(斧),但它应被视为钝器。将 blunt(钝击)放在 slash(劈砍)之前可确保镐被正确分类。
元素优先级
elementalPriority 决定当伤害源匹配多个元素关键词时,哪种元素类型获胜。
例如,一个同时包含 fire(火焰)和 frost(霜冻)关键词的自定义物品将使用优先级列表中第一个匹配的元素。
客户端反馈
模组包含可选的命中标记反馈,以显示攻击是有效还是被抵抗。
配置部分:
{
"clientFeedback": {
"showPhysicalHitmarker": true,
"showElementalHitmarker": true,
"colorblindMode": false
}
}
| Option |
Description |
showPhysicalHitmarker |
启用或禁用物理效果命中标记 |
showElementalHitmarker |
启用或禁用元素效果命中标记 |
colorblindMode |
使用蓝色/橙色代替绿色/红色 |
默认颜色
| 结果 |
普通模式 |
色盲模式 |
| 有效伤害 |
绿色 |
蓝色 |
| 抵抗伤害 |
红色 |
橙色 |
| 中立伤害 |
白色 |
白色 |
物理命中提示使用通用的物理图标。
元素命中提示使用通用的元素图标,使其兼容自定义元素,例如神圣、毒素、闪电或奥术。
数据包支持
数据包可以为原版或模组生物添加新的预设值。
数据包实体文件存放于以下路径:
data/<namespace>/rpg_resweak/entities/<entity_namespace>/<entity_path>.json
示例路径:
data/my_rpg_pack/rpg_resweak/entities/minecraft/zombie.json
推荐格式:
{
"mebahelrpgresistanceweakness:slash": 1.0,
"mebahelrpgresistanceweakness:pierce": 0.9,
"mebahelrpgresistanceweakness:blunt": 1.1,
"mebahelrpgresistanceweakness:fire": 1.25,
"mebahelrpgresistanceweakness:frost": 0.9
}
也支持旧版格式:
{
"multipliers": {
"mebahelrpgresistanceweakness:slash": 1.0,
"mebahelrpgresistanceweakness:pierce": 0.9,
"mebahelrpgresistanceweakness:blunt": 1.1
}
}
数据包值的生效方式
数据包作为预设值发挥作用。
当加载数据包时:
- 新实体被添加到
entities.json
- 缺失的元素倍率会被补充
- 玩家已编辑的值永远不会被覆盖
这意味着数据包可以安全地用于现有世界和整合包中。
示例:
如果 entities.json 中已包含:
{
"entities": {
"minecraft:zombie": {
"mebahelrpgresistanceweakness:fire": 1.5
}
}
}
而某个数据包提供了:
{
"mebahelrpgresistanceweakness:fire": 1.25,
"mebahelrpgresistanceweakness:frost": 0.9
}
最终配置将保留玩家设置的值,并仅添加缺失的值:
{
"entities": {
"minecraft:zombie": {
"mebahelrpgresistanceweakness:fire": 1.5,
"mebahelrpgresistanceweakness:frost": 0.9
}
}
}
加载顺序
在计算伤害时,模组按以下顺序检查数值:
| 优先级 |
来源 |
| 1 |
运行时覆盖值 |
| 2 |
entities.json |
| 3 |
数据包值 |
| 4 |
默认回退值 1.0 |
在正常游戏过程中,生成后 entities.json 是主要的权威数据源。
添加自定义元素
其他模组可以通过 API 注册新的元素伤害类型。这对于需要自定义元素(如神圣、毒素、闪电、奥术、暗影或光辉伤害)的 RPG 系统非常有用。
自定义元素包含两个重要部分:
| 部分 |
用途 |
| 元素 ID |
在配置和数据包中使用的唯一标识符,例如 my_mod:holy |
| 关键词 |
检测器用于识别攻击属于该元素的关键词 |
示例:注册一个神圣元素。
Identifier HOLY = new Identifier("my_mod", "holy");
RPGElements.registerElementalWithNeedles(
HOLY,
new ElementDefinition(HOLY),
List.of(
"holy",
"sun",
"light",
"silver",
"radiant"
)
);
第三个参数 List.of(...) 定义了该元素的检测关键词。检测器基于由武器 ID、投射物 ID、物品 ID 和翻译键构建的稳定签名进行检查。如果这些签名中包含匹配的关键词,则该攻击可被归类为该元素。
例如,上述神圣元素可能通过以下 ID 被检测到:
| ID 或翻译键 |
匹配关键词 |
my_mod:silver_sword |
silver |
my_mod:holy_staff |
holy |
item.my_mod.radiant_blade |
radiant |
my_mod:sun_arrow |
sun |
一旦元素注册完成,它就可以像内置元素一样在 entities.json 中使用:
{
"entities": {
"minecraft:zombie": {
"my_mod:holy": 1.25
}
}
}
这意味着僵尸对检测为 my_mod:holy 的攻击受到的伤害增加 25%。
自定义元素也可以用于数据包:
{
"my_mod:holy": 1.25,
"my_mod:poison": 0.75
}
示例数据包路径:
data/my_rpg_pack/rpg_resweak/entities/minecraft/zombie.json
自定义元素的检测优先级
当使用 RPGElements.registerElementalWithNeedles(...) 注册自定义元素时,可以将其添加到 config.json 中的 elementalPriority。
示例:
{
"elementDetection": {
"elementalPriority": [
"my_mod:holy",
"mebahelrpgresistanceweakness:frost",
"mebahelrpgresistanceweakness:fire"
]
}
}
当同一攻击匹配多个元素关键词时,优先级变得重要。elementalPriority 中第一个匹配的元素将被选中。
例如,如果一个物品 ID 为 my_mod:holy_fire_sword,且 holy 和 fire 都匹配,则选定的元素取决于 elementalPriority 中的顺序。
推荐的关键词规则
为了获得最佳兼容性,请使用可能出现在物品或投射物 ID 中的小写英文关键词。
推荐:
List.of("holy", "sun", "light", "silver", "radiant")
避免使用过于通用的关键词,例如:
List.of("the", "magic", "item", "weapon")
通用关键词可能会意外地将过多攻击分类为该自定义元素。
自定义元素自动受到通用元素命中提示的支持。命中提示不需要针对每个元素设置自定义图标或颜色;它仅指示攻击的元素部分是有效、抵抗还是中立。
面向模组开发者的 API
模组可以通过 API 直接定义默认乘数。
添加五种基础元素
MebahelsRPGWeaknessesResistances.addBasic(
ModEntities.MY_ENTITY,
1.0f, // 挥砍
0.9f, // 穿刺
1.2f, // 钝击
1.25f, // 火焰
0.85f // 冰霜
);
添加或更新一个默认值
MebahelsRPGWeaknessesResistances.putDefault(
ModEntities.MY_ENTITY,
new Identifier("my_mod", "holy"),
1.25f
);
putDefault 是安全的。仅当玩家尚未配置该值时,它才会写入数值。
强制运行时和配置文件覆盖
MebahelsRPGWeaknessesResistances.setMultiplier(
ModEntities.MY_ENTITY,
new Identifier("my_mod", "holy"),
1.5f
);
这适用于命令、调试工具或管理员侧的平衡调整。它会覆盖配置文件中的值。
整合包作者须知
- 使用数据包分发平衡预设
- 使用
entities.json 进行最终的服务端微调
- 除非设计高影响力的机制,否则请将大多数值保持在
0.75 到 1.25 之间
- 除非有意实现完全免疫,否则避免将值设置为
0.0
- 来自缺失模组的实体 ID 是安全的;在相关模组安装之前,它们将保持未使用状态
- 如果
entities.json 中已存在玩家或服务端的编辑内容,数据包不会覆盖这些更改
总结
Mebahel RPG Resistance & Weakness 为 Minecraft 提供了一个清晰、可配置的 RPG 战斗层。它为模组开发者和整合包作者提供了一种灵活的方式,使敌人具有独特的感知,而无需在实体类中进行硬编码平衡。
无论你是想让骷髅畏惧连枷,让自动机抵抗箭矢,让火焰生物无视火焰,还是让不死生物在神圣魔法下燃烧,此模组都提供了干净利落的实现框架。
In this video, you can see hit markers of different colours depending on weapon efficiency. There is also a red or green hit marker at the right of the crossair depending on element efficiency.
Mebahel RPG Resistance & Weakness
Mebahel RPG Resistance & Weakness is a lightweight combat API and balancing framework for Minecraft that includes out-of-the-box support for vanilla mobs as well as creatures from Mebahel's Creatures - Draugr Invasion and Dwarven Automatons, requiring no initial configuration. It adds configurable damage multipliers based on both physical weapon types and elemental damage types, allowing entities to react uniquely to swords, arrows, maces, fire, frost, or any custom element added by other mods.
The goal is simple: make combat feel more readable, more tactical, and easier to balance across vanilla mobs, modded mobs, and large RPG-style modpacks.
Dependencies
Forge / NeoForge
Fabric
Core Features
- Physical damage categories: Slash, Pierce, and Blunt
- Elemental damage categories: Fire and Frost
- Extensible custom elements, such as Holy, Poison, Arcane, Lightning, or any custom element a modder wants to register
- Fully configurable entity multipliers through
entities.json
- Datapack support for preset balancing
- Datapacks can automatically add missing entries to the config without overwriting player edits
- Optional hitmarker feedback for physical and elemental effectiveness
- Colorblind-friendly hitmarker mode
- Safe support for entity IDs from mods that are not currently installed
Damage Types
The default system separates damage into two layers.
| Layer |
Types |
Purpose |
| Physical |
Slash, Pierce, Blunt |
Represents the weapon or attack shape |
| Elemental |
Fire, Frost |
Represents magical or elemental properties |
Both layers can apply at the same time.
For example, a frost arrow may be detected as:
| Layer |
Detected Type |
| Physical |
Pierce |
| Elemental |
Frost |
The final damage is calculated as:
finalDamage = baseDamage × physicalMultiplier × elementalMultiplier
Multiplier Rules
| Multiplier |
Meaning |
1.0 |
Neutral damage |
> 1.0 |
Weakness, increased damage |
< 1.0 |
Resistance, reduced damage |
0.0 |
Full immunity |
Recommended balancing range for most mobs is between 0.75 and 1.25.
Default Vanilla Balance Overview
The default preset is designed to keep vanilla combat familiar while adding meaningful RPG-style advantages.
| Entity |
Slash |
Pierce |
Blunt |
Fire |
Frost |
minecraft:zombie |
1.0 |
0.9 |
1.1 |
1.25 |
0.9 |
minecraft:husk |
1.0 |
0.9 |
1.1 |
1.2 |
0.95 |
minecraft:drowned |
1.0 |
0.9 |
1.1 |
1.1 |
1.0 |
minecraft:zombie_villager |
1.0 |
0.9 |
1.1 |
1.25 |
0.9 |
minecraft:skeleton |
1.0 |
0.95 |
1.15 |
1.1 |
0.9 |
minecraft:stray |
1.0 |
0.95 |
1.15 |
1.15 |
0.85 |
minecraft:wither_skeleton |
1.0 |
0.95 |
1.1 |
0.85 |
1.1 |
minecraft:creeper |
1.0 |
1.05 |
0.9 |
1.1 |
0.95 |
minecraft:spider |
1.1 |
0.95 |
0.95 |
1.2 |
0.9 |
minecraft:cave_spider |
1.1 |
0.95 |
0.95 |
1.2 |
0.9 |
minecraft:witch |
1.0 |
1.0 |
1.0 |
1.1 |
0.95 |
minecraft:pillager |
1.0 |
1.0 |
1.0 |
1.0 |
1.0 |
minecraft:vindicator |
1.0 |
1.0 |
1.05 |
1.0 |
1.0 |
minecraft:evoker |
1.0 |
1.0 |
1.0 |
1.1 |
0.95 |
minecraft:vex |
1.05 |
1.05 |
1.0 |
1.1 |
0.95 |
minecraft:ravager |
0.95 |
0.9 |
1.1 |
1.05 |
0.95 |
minecraft:guardian |
0.95 |
1.0 |
1.05 |
1.15 |
0.9 |
minecraft:elder_guardian |
0.95 |
1.0 |
1.1 |
1.15 |
0.9 |
minecraft:slime |
1.0 |
1.0 |
1.1 |
1.0 |
1.0 |
minecraft:silverfish |
1.0 |
1.0 |
1.1 |
1.0 |
1.0 |
minecraft:endermite |
1.05 |
1.0 |
0.95 |
1.1 |
0.95 |
minecraft:enderman |
1.0 |
1.0 |
0.95 |
1.15 |
0.9 |
minecraft:shulker |
0.9 |
0.9 |
1.15 |
1.0 |
1.0 |
minecraft:ender_dragon |
1.0 |
0.95 |
1.05 |
0.9 |
1.05 |
minecraft:blaze |
1.0 |
1.0 |
1.0 |
0.75 |
1.25 |
minecraft:magma_cube |
1.0 |
1.0 |
1.05 |
0.8 |
1.2 |
minecraft:ghast |
1.0 |
1.05 |
0.95 |
0.9 |
1.1 |
minecraft:piglin |
1.0 |
1.0 |
1.0 |
1.05 |
0.95 |
minecraft:piglin_brute |
1.0 |
1.0 |
1.05 |
1.05 |
0.95 |
minecraft:zombified_piglin |
1.0 |
0.9 |
1.1 |
0.85 |
0.95 |
minecraft:hoglin |
1.0 |
0.95 |
1.1 |
1.0 |
1.05 |
minecraft:zoglin |
1.0 |
0.95 |
1.1 |
0.85 |
1.05 |
minecraft:wither |
1.0 |
0.95 |
1.0 |
0.9 |
1.05 |
minecraft:warden |
1.0 |
0.95 |
1.05 |
0.95 |
0.95 |
minecraft:phantom |
1.0 |
1.1 |
1.0 |
1.1 |
0.95 |
Built-In Mebahel Presets
The base config can also include presets for Mebahel ecosystem mobs. These entries are safe even if the related mods are not installed, because they are stored as entity ID strings.
Dwarven Automatons
| Entity |
Slash |
Pierce |
Blunt |
Fire |
Frost |
mebahelcreaturesdwarven:dwarven_sphere |
0.8 |
0.8 |
1.4 |
1.0 |
1.0 |
mebahelcreaturesdwarven:dwarven_centurion |
0.8 |
0.8 |
1.4 |
1.0 |
1.0 |
mebahelcreaturesdwarven:dwarven_spider |
0.8 |
0.8 |
1.4 |
1.0 |
1.0 |
mebahelcreaturesdwarven:dwarven_spider_guardian |
0.8 |
0.8 |
1.4 |
1.0 |
1.0 |
Dwarven automatons are metal constructs. They resist slashing and piercing damage, but are vulnerable to blunt impact.
Draugr Invasion
| Entity |
Slash |
Pierce |
Blunt |
Fire |
Frost |
mebahelcreaturesdraugr:draugr |
1.15 |
0.9 |
0.9 |
1.2 |
0.85 |
mebahelcreaturesdraugr:draugr_archer |
1.15 |
0.9 |
0.9 |
1.2 |
0.85 |
mebahelcreaturesdraugr:draugr_wight |
1.15 |
0.9 |
0.9 |
1.2 |
0.85 |
mebahelcreaturesdraugr:draugr_scourge |
1.2 |
0.85 |
0.85 |
1.15 |
0.8 |
mebahelcreaturesdraugr:draugr_overlord |
1.2 |
0.85 |
0.85 |
1.15 |
0.8 |
mebahelcreaturesdraugr:skeleton_warrior |
1.1 |
0.9 |
0.9 |
1.15 |
0.9 |
mebahelcreaturesdraugr:skeleton_warrior_head |
1.1 |
0.9 |
0.9 |
1.15 |
0.9 |
mebahelcreaturesdraugr:infernal_draugr |
1.15 |
0.9 |
0.9 |
0.75 |
1.25 |
mebahelcreaturesdraugr:flame_atronach |
1.0 |
1.0 |
1.0 |
0.75 |
1.25 |
Draugr are ancient undead warriors. They are weak to slashing damage and fire, but resist piercing, blunt impact, and frost.
Configuration Files
The mod creates its configuration in:
config/mebahel-rpg_resistance-weakness/
| File |
Purpose |
config.json |
Damage detection, keywords, priorities, and client feedback options |
entities.json |
Entity-specific resistance and weakness multipliers |
Entity Configuration
entities.json controls the actual damage multipliers for each mob.
Example:
{
"entities": {
"minecraft:zombie": {
"mebahelrpgresistanceweakness:slash": 1.0,
"mebahelrpgresistanceweakness:pierce": 0.9,
"mebahelrpgresistanceweakness:blunt": 1.1,
"mebahelrpgresistanceweakness:fire": 1.25,
"mebahelrpgresistanceweakness:frost": 0.9
}
}
}
This means:
| Damage Type |
Multiplier |
Result |
| Slash |
1.0 |
Neutral |
| Pierce |
0.9 |
10% reduced damage |
| Blunt |
1.1 |
10% increased damage |
| Fire |
1.25 |
25% increased damage |
| Frost |
0.9 |
10% reduced damage |
Detection Configuration
Damage detection is configured in config.json.
The mod detects damage types using stable IDs and translation keys from weapons, projectiles, and items. This avoids relying on translated display names or custom item names.
Example detection section:
{
"elementDetection": {
"physicalPriority": [
"mebahelrpgresistanceweakness:blunt",
"mebahelrpgresistanceweakness:pierce",
"mebahelrpgresistanceweakness:slash"
],
"elementalPriority": [
"mebahelrpgresistanceweakness:frost",
"mebahelrpgresistanceweakness:fire"
],
"needles": {
"mebahelrpgresistanceweakness:slash": [
"sword",
"blade",
"slash",
"claw",
"claymore",
"cutlass",
"katana",
"scythe",
"sickle",
"dagger",
"axe",
"war_axe",
"halberd"
],
"mebahelrpgresistanceweakness:pierce": [
"arrow",
"bow",
"bolt",
"trident",
"spear",
"lance",
"javelin",
"rapier",
"pierce"
],
"mebahelrpgresistanceweakness:blunt": [
"mace",
"hammer",
"warhammer",
"club",
"blunt",
"anchor",
"fist",
"pickaxe",
"staff",
"wand"
],
"mebahelrpgresistanceweakness:fire": [
"fire",
"flame",
"burn",
"lava",
"inferno"
],
"mebahelrpgresistanceweakness:frost": [
"frost",
"ice",
"freeze",
"snow",
"stalhrim"
]
}
}
}
Physical Priority
physicalPriority decides which physical type wins when a weapon matches multiple keywords.
For example, pickaxe contains axe, but it should be treated as blunt. Placing blunt before slash ensures pickaxes are classified correctly.
Elemental Priority
elementalPriority decides which elemental type wins when a damage source matches multiple elemental keywords.
For example, a custom item containing both fire and frost keywords will use the first matching element in the priority list.
Client Feedback
The mod includes optional hitmarker feedback to show whether an attack was effective or resisted.
Config section:
{
"clientFeedback": {
"showPhysicalHitmarker": true,
"showElementalHitmarker": true,
"colorblindMode": false
}
}
| Option |
Description |
showPhysicalHitmarker |
Enables or disables the physical effectiveness hitmarker |
showElementalHitmarker |
Enables or disables the elemental effectiveness hitmarker |
colorblindMode |
Uses blue/orange instead of green/red |
Default Colors
| Result |
Normal Mode |
Colorblind Mode |
| Effective damage |
Green |
Blue |
| Resisted damage |
Red |
Orange |
| Neutral damage |
White |
White |
The physical hitmarker uses a generic physical icon.
The elemental hitmarker uses a generic elemental icon, making it compatible with custom elements such as Holy, Poison, Lightning, or Arcane.
Datapack Support
Datapacks can add new preset values for vanilla or modded mobs.
Datapack entity files go here:
data/<namespace>/rpg_resweak/entities/<entity_namespace>/<entity_path>.json
Example path:
data/my_rpg_pack/rpg_resweak/entities/minecraft/zombie.json
Recommended format:
{
"mebahelrpgresistanceweakness:slash": 1.0,
"mebahelrpgresistanceweakness:pierce": 0.9,
"mebahelrpgresistanceweakness:blunt": 1.1,
"mebahelrpgresistanceweakness:fire": 1.25,
"mebahelrpgresistanceweakness:frost": 0.9
}
Legacy format is also supported:
{
"multipliers": {
"mebahelrpgresistanceweakness:slash": 1.0,
"mebahelrpgresistanceweakness:pierce": 0.9,
"mebahelrpgresistanceweakness:blunt": 1.1
}
}
How Datapack Values Are Applied
Datapacks act as presets.
When a datapack is loaded:
- New entities are added to
entities.json
- Missing element multipliers are added
- Existing player-edited values are never overwritten
This means datapacks are safe to use in existing worlds and modpacks.
Example:
If entities.json already contains:
{
"entities": {
"minecraft:zombie": {
"mebahelrpgresistanceweakness:fire": 1.5
}
}
}
and a datapack provides:
{
"mebahelrpgresistanceweakness:fire": 1.25,
"mebahelrpgresistanceweakness:frost": 0.9
}
the final config keeps the player value and only adds the missing one:
{
"entities": {
"minecraft:zombie": {
"mebahelrpgresistanceweakness:fire": 1.5,
"mebahelrpgresistanceweakness:frost": 0.9
}
}
}
Loading Order
When damage is calculated, the mod checks values in this order:
| Priority |
Source |
| 1 |
Runtime overrides |
| 2 |
entities.json |
| 3 |
Datapack values |
| 4 |
Fallback 1.0 |
In normal gameplay, entities.json is the main source of truth once generated.
Adding Custom Elements
Other mods can register new elemental damage types through the API. This is useful for RPG systems that need custom elements such as Holy, Poison, Lightning, Arcane, Shadow, or Radiant damage.
A custom element has two important parts:
| Part |
Purpose |
| Element ID |
The unique identifier used in configs and datapacks, such as my_mod:holy |
| Needles |
The keywords used by the detector to recognize that an attack belongs to this element |
Example: registering a Holy element.
Identifier HOLY = new Identifier("my_mod", "holy");
RPGElements.registerElementalWithNeedles(
HOLY,
new ElementDefinition(HOLY),
List.of(
"holy",
"sun",
"light",
"silver",
"radiant"
)
);
The third argument, List.of(...), defines the detection keywords for the element. The detector checks stable signatures built from weapon IDs, projectile IDs, item IDs, and translation keys. If one of these signatures contains a matching keyword, the attack can be classified as that element.
For example, the Holy element above may be detected from IDs such as:
| ID or Translation Key |
Matching Needle |
my_mod:silver_sword |
silver |
my_mod:holy_staff |
holy |
item.my_mod.radiant_blade |
radiant |
my_mod:sun_arrow |
sun |
Once the element is registered, it can be used in entities.json like any built-in element:
{
"entities": {
"minecraft:zombie": {
"my_mod:holy": 1.25
}
}
}
This means zombies take 25% increased damage from attacks detected as my_mod:holy.
Custom elements can also be used in datapacks:
{
"my_mod:holy": 1.25,
"my_mod:poison": 0.75
}
Example datapack path:
data/my_rpg_pack/rpg_resweak/entities/minecraft/zombie.json
Detection Priority for Custom Elements
When a custom element is registered with RPGElements.registerElementalWithNeedles(...), it can be added to elementalPriority in config.json.
Example:
{
"elementDetection": {
"elementalPriority": [
"my_mod:holy",
"mebahelrpgresistanceweakness:frost",
"mebahelrpgresistanceweakness:fire"
]
}
}
Priority matters when the same attack matches multiple elemental keywords. The first matching element in elementalPriority is selected.
For example, if an item ID is my_mod:holy_fire_sword, and both holy and fire match, the selected element depends on the order in elementalPriority.
Recommended Keyword Rules
For best compatibility, use lowercase English keywords that are likely to appear in item or projectile IDs.
Recommended:
List.of("holy", "sun", "light", "silver", "radiant")
Avoid overly generic keywords such as:
List.of("the", "magic", "item", "weapon")
Generic keywords can accidentally classify too many attacks as the custom element.
Custom elements are automatically supported by the generic elemental hitmarker. The hitmarker does not need a custom icon or color per element; it only indicates whether the elemental part of the attack was effective, resisted, or neutral.
API for Mod Developers
Mods can define default multipliers directly through the API.
Add the five base elements
MebahelsRPGWeaknessesResistances.addBasic(
ModEntities.MY_ENTITY,
1.0f, // slash
0.9f, // pierce
1.2f, // blunt
1.25f, // fire
0.85f // frost
);
Add or update one default value
MebahelsRPGWeaknessesResistances.putDefault(
ModEntities.MY_ENTITY,
new Identifier("my_mod", "holy"),
1.25f
);
putDefault is safe. It only writes a value if the player has not already configured one.
Force a runtime and config override
MebahelsRPGWeaknessesResistances.setMultiplier(
ModEntities.MY_ENTITY,
new Identifier("my_mod", "holy"),
1.5f
);
This is intended for commands, debug tools, or admin-side balancing. It overwrites the config value.
Notes for Modpack Authors
- Use datapacks to distribute balancing presets
- Use
entities.json for final server-side tuning
- Keep most values between
0.75 and 1.25 unless designing high-impact mechanics
- Avoid setting values to
0.0 unless full immunity is intentional
- Entity IDs from missing mods are safe; they remain unused until the relevant mod is installed
- Datapacks will not overwrite player or server edits already present in
entities.json
Summary
Mebahel RPG Resistance & Weakness provides a clean, configurable RPG combat layer for Minecraft. It gives modders and modpack authors a flexible way to make enemies feel distinct without hardcoding balance into entity classes.
Whether you want skeletons to fear maces, automatons to resist arrows, fire creatures to shrug off flames, or undead to burn under holy magic, this mod provides the framework to do it cleanly.
评论 0
登录后参与评分
还没有评论,来抢沙发吧