Compatibility
Minecraft: Java Edition
Platforms
Supported environments
Links
Tags
Creators
Details
[暗黑2词缀 / D2 Operation] D2 Affix — Alpha
English section (Machine-translated. Please excuse any grammatical errors.)
Overview
D2 Affix is a Minecraft Forge 1.20.1 mod that brings Diablo II's elite monster affix system into Minecraft.
Monsters can spawn as elites with randomized affixes (Cold Enchanted, Extra Fast, Teleportation...) and auras (Might, Holy Freeze, Conviction...). Elites are classified into 5 tiers with per-difficulty weight balancing, minion spawning, equipment pools, dynamic crossbow ammo, and a custom attribute + damage-type framework.
Elite Types (Tiers)
Each tier is defined as a template in EliteTypes, then registered with an ID. Types that set applicableTags or applicableEntities only spawn on matching monsters; types with neither restriction apply to all eligible mobs.
Tier Comparison
| Tier | Display Color | Weight (N/H/E) | Affix Count | Minions | Stat Multiplier |
|---|---|---|---|---|---|
| Common | None | 2000 / 2000 / 2000 | 0 | 0 | +50~100% HP, +75~100% DMG |
| Champion | Blue | 10 / 20 / 30 | 1 | 2 (Champion type) | +100~240% HP, +100~170% DMG |
| Unique | Gold | 10 / 20 / 30 | 2 / 2 / 3 | 0 / 3 / 4 (Minion type) | +150~300% HP, +125~200% DMG |
| Super Unique | Red | 1 / 2 / 5 | 2 / 3 / 4 | 3 / 4 / 5 (Minion type) | +150~400% HP, +125~250% DMG |
| Minion | Gray | 0 | 0 | 0 | +70~120% HP, +85~110% DMG |
Registered Types
common— unrestricted, applies to all eligible mobschampion— minion elite type for Champion minionsunique— unrestricted, full prefix/suffix/aura affix poolminion— minion elite type for Unique / Super Unique minions, no renamesuper_bonebreaker— UNDEAD, spectral_hit innate, 3 affix poolsuper_bonesaw— UNDEAD, extra_strong + magic_resistant innate, 3 affix poolsuper_rakanishu— UNDEAD, lightning_enchanted + extra_fast innate, 2 affix poolsuper_treehead— BEAST tag, no innate/pool
Attribute Modifiers (all MULTIPLY_TOTAL)
| Tier | Max HP | Atk Dmg | Armor | Armor Toughness | Move Speed |
|---|---|---|---|---|---|
| Common | +50/70/100% | +75/85/100% | +50/70/100% | +50/70/100% | +0/10/20% |
| Champion | +100/160/240% | +100/130/170% | +100/160/240% | +100/160/240% | +10/30/50% |
| Unique | +150/200/300% | +125/150/200% | +150/200/300% | +150/200/300% | +20/40/60% |
| Super Unique | +150/250/400% | +125/175/250% | +150/250/400% | +150/250/400% | +30/50/70% |
| Minion | +70/100/120% | +85/100/110% | +70/100/120% | +70/100/120% | +0/15/30% |
Difficulty System
| Value | Name | Trigger |
|---|---|---|
| 0 | Normal | Default |
| 1 | Nightmare | First Ender Dragon kill |
| 2 | Hell | First Wither kill |
Persistence via SavedData in the Overworld. Kill flags prevent repeated triggers. Players can manually set with /d2affix difficult <0-2>.
All Affixes
Prefixes (14) — used by Unique and Super Unique
| ID | Effect |
|---|---|
cold_enchanted |
Cold resist +75%; on-hit cold dmg (25/50/100% of atk); slow 80/120/160 ticks; death frost nova (r6, 50/75/100% dmg) |
fire_enchanted |
Fire resist +75%; on-hit fire dmg (25/50/100%); death corpse explosion (r4, 75~100% of target max HP fire dmg) |
lightning_enchanted |
Lightning resist +75%; on-hit lightning dmg (150/200/350%); 10/20/50% chance charged bolt on hurt |
poison_enchanted |
Poison resist +75%; on-hit poison dmg (25/50/100%); poison 60/120/240 ticks; death poison nova (r6, 50/75/100%) |
extra_strong |
Atk dmg ×1.5/×1.75/×2.0; crit chance +5% |
extra_fast |
Move speed ×1.5; crit dmg +50% |
stone_skin |
Physical resist +50%; armor ×2/×2.5/×3 |
magic_resistant |
Fire/ice/ltg/poison/magic resist each +20/40/60% |
ghostly |
Physical resist +50%; move ×0.8; 4 element resist +20% each; alpha -0.7; on-hit 20% ice dmg |
multiple_shots |
Fires 2 extra projectiles at ±30° spread |
teleportation |
Teleports to safety when HP < 33%; 60s cooldown; 8~15 blocks |
cursed |
25% chance: amplify damage (-50% phys resist), +slow (NM), +weakness (Hell) |
soul_burn |
100% chance soul burn 3/5/8s (mining fatigue lv1/2/4 + atk -lv*5%) |
spectral_hit |
Random element (fire/ice/ltg/poison), 75% of atk as that element; fire/ice/ltg resist +40% |
Auras (11) — max 1 per mob, radius 11~15
| ID | Ally Buff | Enemy Debuff |
|---|---|---|
might_aura |
Atk ×1.75/×1.95/×2.20 | — |
defense_aura |
Armor ×1.5/×1.65/×1.9, Toughness ×1.25/×1.35/×1.5 | — |
blessed_aim_aura |
Crit chance +10/20/40% | — |
concentration_aura |
Crit dmg ×1.90/×2.05/×2.20 | — |
fanaticism_aura |
Atk ×1.75/×2.00/×2.20, crit rate +5/10/15%, crit dmg +20/25/30% | — |
thorns_aura |
Thorns 10/15/30% | — |
holy_fire_aura |
Fire resist +0.1/0.2/0.4 | Fire resist -0.05/0.1/0.2; 4.5/5.5/7% atk fire dmg |
holy_freeze_aura |
Cold resist +0.1/0.2/0.4 | Cold resist -0.05/0.1/0.2; 4.5/5.5/7% atk cold dmg |
holy_lightning_aura |
Lightning resist +0.1/0.2/0.4 | Lightning resist -0.05/0.1/0.2; 4.5/5.5/7% atk lightning dmg |
holy_shock_aura |
Knockback resist +0.1/0.2/0.4 | Knockback resist -0.05/0.1/0.2; 4.5/5.5/7% atk physical dmg |
conviction_aura |
— | Armor ×0.25/×0.17/×0.10; all resists -0.25/0.30/0.35 |
Suffixes (3)
| ID | Effect |
|---|---|
regeneration |
Regens 1.5/2/2.5% of max HP per second |
precision |
Crit chance +5% |
stone |
Physical resist +25%, armor ×1.5, move speed ×0.75 |
Champion Affixes (5) — used by Champion type pool
| ID | Effect |
|---|---|
champion |
HP ×3/×2.5/×2, dmg ×1.5, crit +10% |
berserker |
HP ×0.8/0.6/0.4, dmg ×3/4/5, crit dmg +50%, crit rate +15%, red tint |
ghostly_champion |
Phys resist +50%, move ×0.8, +4 elem resist 20%, alpha -0.7, 20% ice on-hit |
fanatical |
HP ×3, dmg ×2, crit dmg +30%, crit rate +10%, immune to curse |
leader |
HP +20%, random element dmg (40% of atk) on attack |
Custom Attributes (D2Attributes)
All RangedAttribute, synced, range [-2, 0.75] for resists.
| ID | Default | Min | Max | Description |
|---|---|---|---|---|
physical_resistance |
0.0 | -2.0 | 0.75 | Physical dmg reduction (cap 75%) |
magic_resistance |
0.0 | -2.0 | 0.75 | Magic dmg reduction |
fire_resistance |
0.0 | -2.0 | 0.75 | Fire dmg reduction |
cold_resistance |
0.0 | -2.0 | 0.75 | Cold dmg reduction |
lightning_resistance |
0.0 | -2.0 | 0.75 | Lightning dmg reduction |
poison_resistance |
0.0 | -2.0 | 0.75 | Poison dmg reduction |
thorns |
0.0 | 0.0 | 1024.0 | Reflect dmg percentage |
crit_chance |
0.2 | 0.0 | 1.0 | Crit rate (default 20%) |
crit_damage |
1.2 | 1.0 | 1024.0 | Crit multiplier (default 120%) |
red_channel |
-1.0 | -1.0 | 255.0 | Red render channel |
green_channel |
-1.0 | -1.0 | 255.0 | Green render channel |
blue_channel |
-1.0 | -1.0 | 255.0 | Blue render channel |
alpha_channel |
-1.0 | -1.0 | 255.0 | Alpha render channel |
Custom Damage Types
| Key | Usage |
|---|---|
d2affix:cold |
Basic cold damage |
d2affix:fire |
Basic fire damage (used by corpse explosion) |
d2affix:lightning |
Basic lightning damage |
d2affix:poison |
Basic poison damage |
d2affix:holy_freeze |
Holy Freeze aura damage |
d2affix:holy_fire |
Holy Fire aura damage |
d2affix:holy_lightning |
Holy Lightning aura damage |
d2affix:holy_shock |
Holy Shock aura damage |
Custom Potions & Effects
Drinkable Potions
| Potion | Effect | Duration |
|---|---|---|
cold_immunity |
Cold immunity | 3 min |
long_cold_immunity |
Cold immunity | 8 min |
lightning_immunity |
Lightning immunity | 3 min |
long_lightning_immunity |
Lightning immunity | 8 min |
poison_immunity |
Poison immunity | 3 min |
long_poison_immunity |
Poison immunity | 8 min |
All available as splash and lingering variants.
Mob Effects
Includes: cold_immunity, lightning_immunity, poison_immunity, knockback_immunity, poison, amplify_damage, soul_burn, might_aura, defense_aura, blessed_aim_aura, concentration_aura, fanaticism_aura, thorns_aura, holy_fire_aura_buff/debuff, holy_freeze_aura_buff/debuff, holy_lightning_aura_buff/debuff, holy_shock_aura_buff/debuff, conviction_aura.
Custom Entity
d2affix:charged_bolt — projectile entity (0.25×0.25 hitbox, tracking 64 blocks, update interval 1 tick)
Custom AI Goals
All extend RangedWeaponGoal (based on vanilla Goal):
| Goal | Weapon | Range | Cooldown | Notes |
|---|---|---|---|---|
BowAttackGoal |
Bow | >6 blocks | 60 ticks | Standard arrow shooting |
TridentAttackGoal |
Trident | >3 blocks | 60 ticks | Trident throwing |
CrossbowAttackGoal |
Crossbow | >6 blocks | 60 ticks | State-machine (25t charge). Non-Common elites use fireworks (3× charge, explosion scales with difficulty) |
Config Files
All in config/d2affix/:
| File | Content |
|---|---|
elite_whitelist.json |
Whitelist and blacklist for elite eligibility |
faction_settings.json |
Faction/tag system for friendly-fire immunity |
equipment_params.json |
Equipment pool: tool/armor/material weights per difficulty |
Equipment Pool Example
Weapon priority per material tier (sword/axe/pickaxe/hoe/shovel ratio 10:7:5:2:2):
- Leather/Wood: N=100, H=30, E=0
- Chain/Stone: N=50, H=70, E=0
- Iron: N=10, H=150, E=100
- Gold: N=50, H=100, E=50
- Diamond: N=0, H=10, E=50
- Netherite: N=0, H=0, E=1
Offhand items: Flint (all), Shield (NM+), Totem (Hell+). Empty hand weight: N=2000, H=700, E=0. All items drop=false.
Tags
Entity Tags
d2affix:undead— Undead entities (zombies, skeletons, etc.)d2affix:illager— Illager entitiesd2affix:beast— Beast entitiesd2affix:enhance_remote_ai— Entities eligible for ranged weapon AI
Damage Tags
d2affix:on_crit— Bypasses critical damageminecraft:is_fire— Fire damageminecraft:is_lightning— Lightning damageminecraft:is_freezing— Freezing damaged2affix:is_poison— Poison damaged2affix:no_knockback— No-knockback damageminecraft:bypasses_armor— Armor-piercing damageminecraft:bypasses_invulnerability— Invulnerability-piercing damaged2affix:is_thorns— Thorns reflect damage (prevents reflection loops)
Item Tags
d2affix:unlock_0— Available at Normal difficultyd2affix:unlock_1— Available at Nightmare difficultyd2affix:unlock_2— Available at Hell difficulty
Commands
All commands require permission level 2 (op).
/d2affix
| Subcommand | Syntax | Description |
|---|---|---|
affix |
/d2affix affix <affix_id> <targets> |
Manually attach an affix to entities |
summon |
/d2affix summon <type_id> <entity> [x y z] |
Spawn an elite of the given type |
difficult |
/d2affix difficult |
Query current difficulty |
difficult |
/d2affix difficult <0-2> |
Set global difficulty |
reload |
/d2affix reload |
Hot-reload config files |
/d2affix ai (test command)
| Syntax | Description |
|---|---|
/d2affix ai <targets> bow |
Add bow AI to target mobs |
/d2affix ai <targets> trident |
Add trident AI |
/d2affix ai <targets> crossbow |
Add crossbow AI (auto-switches ammo) |
NBT Data Structure
All stored in PersistentData → d2affix:
d2affix/
├── affixes/ [ { id: "cold_enchanted" }, ... ]
├── component/ { teleport_cooldown: ... }
└── elite/
├── is_processed: bool
├── type_id: string
├── steps/ { fill_affixes, spawn_minions, ... }
└── parent_key: string (for minion display)
中文版
概述
暗黑2操作 是一个 Minecraft Forge 1.20.1 模组,将暗黑破坏神 2 的精英怪物词缀系统完整移植到 Minecraft 中。
怪物可以带有随机词缀(冰冷强化、特别快速、传送……)和光环(力量灵气、神圣冰冻、信念灵气……)生成。精英分为 5 个等级,按难度权重分配,支持随从生成、装备池、动态弩箭弹药切换,以及自定义属性和伤害类型框架。
精英类型(等级)
等级对比
| 等级 | 显示颜色 | 权重(N/H/E) | 词缀数量 | 随从 |
|---|---|---|---|---|
| 普通 | 无色 | 2000 / 2000 / 2000 | 0 | 0 |
| 冠军 | 蓝色 | 10 / 20 / 30 | 1 | 2(冠军类型) |
| 独特 | 金色 | 10 / 20 / 30 | 2 / 2 / 3 | 0 / 3 / 4(随从类型) |
| 超级独特 | 红色 | 1 / 2 / 5 | 2 / 3 / 4 | 3 / 4 / 5(随从类型) |
| 随从 | 灰色 | 0 | 0 | 0 |
已注册怪物
common— 无限制,适用所有敌对生物champion— 冠军随从专用unique— 无限制,全量词缀池minion— 独特/超级独特的随从专用,不重命名super_bonebreaker— 亡灵生物,幽灵一击固有super_bonesaw— 亡灵生物,特别强壮+魔法抵抗固有super_rakanishu— 亡灵生物,闪电强化+特别快速固有super_treehead— BEAST 标签,无固有词缀
属性修正(全部 MULTIPLY_TOTAL)
| 等级 | 生命 | 攻击 | 护甲 | 韧性 | 速度 |
|---|---|---|---|---|---|
| 普通 | +50/70/100% | +75/85/100% | +50/70/100% | +50/70/100% | +0/10/20% |
| 冠军 | +100/160/240% | +100/130/170% | +100/160/240% | +100/160/240% | +10/30/50% |
| 独特 | +150/200/300% | +125/150/200% | +150/200/300% | +150/200/300% | +20/40/60% |
| 超级独特 | +150/250/400% | +125/175/250% | +150/250/400% | +150/250/400% | +30/50/70% |
| 随从 | +70/100/120% | +85/100/110% | +70/100/120% | +70/100/120% | +0/15/30% |
难度系统
| 值 | 名称 | 触发条件 |
|---|---|---|
| 0 | 普通 | 默认 |
| 1 | 噩梦 | 首次击杀末影龙 |
| 2 | 地狱 | 首次击杀凋灵 |
通过 SavedData 在主世界持久化,防重复触发。
词缀列表
前缀(14 个)
cold_enchanted— 冰抗+75%;命中冰伤;减速;死亡冰霜新星fire_enchanted— 火抗+75%;命中火伤;死亡尸体爆炸lightning_enchanted— 电抗+75%;命中电伤;受伤充能弹poison_enchanted— 毒抗+75%;命中毒伤;死亡毒新星extra_strong— 伤害×1.5~2,暴率+5%extra_fast— 速度×1.5,暴伤+50%stone_skin— 物抗+50%,护甲×2~3magic_resistant— 全元素抗+20~60%ghostly— 物抗+50%,半透明,元素抗+20%,附加冰伤multiple_shots— 额外发射 2 枚弹射物teleportation— HP<33% 传送,60 秒冷却cursed— 25% 概率诅咒(伤害加深等)soul_burn— 灵魂燃烧(挖掘疲劳+攻击削弱)spectral_hit— 随机元素 75% 攻击力伤害
光环(11 个)— 每个生物最多 1 个
might_aura— 友军攻击力×1.75~2.2defense_aura— 友军护甲×1.5~1.9blessed_aim_aura— 友军暴率+10~40%concentration_aura— 友军暴伤×1.9~2.2fanaticism_aura— 友军攻击、暴率、暴伤全面提升thorns_aura— 荆棘反伤 10~30%holy_fire_aura— 敌军火伤 + 降低火抗holy_freeze_aura— 敌军冰伤 + 降低冰抗holy_lightning_aura— 敌军电伤 + 降低电抗holy_shock_aura— 敌军物理伤害 + 降低击退抗conviction_aura— 敌军护甲×0.1~0.25,全抗-0.25~0.35
后缀(3 个)
regeneration— 每秒回复 1.5~2.5% 最大生命precision— 暴率+5%stone— 物抗+25%,护甲×1.5,速度×0.75
冠军词缀(5 个)
champion— 生命×2~3,伤害×1.5berserker— 低血量高伤害,红色渲染ghostly_champion— 物理抗性,半透明fanatical— 高血量高伤害,免疫诅咒leader— 随机元素伤害
自定义属性(13 个)
物理/魔法/火/冰/电/毒抗性(范围 -2~0.75)、荆棘、暴击率(默认 20%)、暴击伤害(默认 120%)、红/绿/蓝/Alpha 渲染通道(默认 -1,范围 -1~255)
自定义伤害类型(8 个)
冰、火、电、毒、神圣冰冻/火焰/闪电/冲击
药水
3 种免疫药水(冰霜/闪电/毒素免疫),各有长效版本,均支持喷溅和滞留型。
自定义 AI
- 弓射击 AI(>6 格,60t 冷却)
- 三叉戟投掷 AI(>3 格,60t 冷却)
- 弩射击 AI(状态机 25t 装填,非普通精英使用烟花火箭,3 倍装填,爆炸强度随难度提升)
配置文件
位于 config/d2affix/:
elite_whitelist.json— 精英化黑白名单faction_settings.json— 阵营/友军标签equipment_params.json— 装备池(各材质按难度的权重)
指令
/d2affix(需要 op 权限)
| 子命令 | 描述 |
|---|---|
affix <词缀id> <目标> |
手动附加词缀 |
summon <类型id> <实体> [坐标] |
生成精英怪 |
difficult |
查询难度 |
difficult <0-2> |
设置难度 |
reload |
热重载配置 |
/d2affix ai(测试用)
bow— 弓 AItrident— 三叉戟 AIcrossbow— 弩 AI(自动切换弹药)
NBT 数据路径
PersistentData → d2affix → { affixes, component, elite }
elite 下包含:is_processed(已处理标记)、type_id(精英类型)、steps(各步骤完成状态)、parent_key(随从的父类型)
技术信息
- Mod ID:
d2affix - Minecraft: 1.20.1
- Forge: 47.4.10+
- 版本: 0.0.1-Alpha
- 作者: PyroStella


