D2 Affix

Brings Diablo 2's elite monster affix system with tiered elite types, random affixes, auras, minion spawning and equipment pools

[暗黑2词缀 / D2 Operation] D2 Affix — Beta


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 type definitions are data-driven (JSON) and can be overridden under config/d2affix/elite_types/.


Elite Types (Tiers)

Each tier is defined as a template in data/d2affix/elite_types/*.json, 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. Child types use extends to inherit and override a parent's fields.

Tier Comparison

Tier Display Color Weight (N/H/E) Affix Count Minions
Common None 1500 0 0
Champion Blue 10 / 20 / 30 1 2 (Champion type)
Unique Gold 10 / 20 / 30 2 / 2 / 3 0 / 3 / 4 (Minion type)
Super Unique Red 1 / 2 / 5 2 / 3 / 4 3 / 4 / 6 (Minion type)
Minion Gray 0 0 0

Registered Types

  • common — unrestricted base tier, applies to all eligible mobs
  • champion — minion elite type for Champion minions
  • unique — unrestricted, full prefix + aura affix pool
  • minion — minion elite type for Unique / Super Unique minions, inherits parent name
  • super_unique — base Super Unique template (red, translation-key naming)
  • bonebreaker — UNDEAD, innate spectral_hit, wooden sword
  • bonesaw — UNDEAD, innate extra_strong + magic_resistant, iron axe + shield
  • rakanishu — UNDEAD, innate lightning_enchanted + extra_fast
  • treehead — BEAST tag, innate extra_fast + extra_strong
  • corpsefire — UNDEAD, innate spectral_hit, wooden sword
  • bishibosh — BEAST tag, innate magic_resistant + fire_enchanted

Attribute Modifiers (all MULTIPLY_TOTAL; values are Normal / Nightmare / Hell)

Tier Max HP Atk Dmg Armor Armor Toughness Move Speed
Common -30/-10/+10% -25/-15/0% -25/-15/0% -25/-15/0% 0/+5/+10%
Champion +50/+60/+140% 0/+30/+70% 0/+30/+70% 0/+30/+70% +5/+10/+20%
Unique +50/+100/+200% +25/+50/+100% +25/+50/+100% +25/+50/+100% +10/+20/+30%
Super Unique +75/+150/+300% +25/+75/+150% +25/+75/+150% +25/+75/+150% +15/+25/+40%
Minion -30/0/+20% -15/0/+10% -30/0/+20% -30/0/+20% 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>. Affix numbers scale per difficulty tier.


All Affixes

Prefixes (13) — 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 Max HP ×1.5/×1.75/×2.0; 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%
multiple_shots Fires 2 extra projectiles at ±30° spread
teleportation Teleports to safety when HP < 33%; 60s cooldown; 8~15 blocks
cursed 50% chance: amplify damage (-50% phys resist), 240 ticks
soul_burn 100% chance soul burn 3/5/8s (mining fatigue lv1/2/4 + atk -lv*5%)
spectral_hit Random element (fire/ice/ltg), 75% of atk as that element; fire/ice/ltg resist +40%

Auras (17) — max 1 per mob, radius 10~15 (varies by aura)

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 +3/3.5/4%, crit dmg +21/25/28%
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
conviction_aura Armor ×0.25/×0.17/×0.10; all resists -0.25/0.30/0.35
sanctuary_aura Magic resist +0.1/0.2/0.4 Magic dmg 6.75/8.25/10.5% of atk to UNDEAD only
salvation_aura All 6 elemental resists (phys/magic/fire/ice/ltg/poison) +0.3/0.4/0.5
prayer_aura Heals allies in range 1/3/6 HP per pulse (every 4 ticks)
redemption_aura On death of a creature in range, heal holder 10% of its max HP (min 1)
fire_resistance_aura Fire resist +0.5/0.6/0.7
cold_resistance_aura Cold resist +0.5/0.6/0.7
lightning_resistance_aura Lightning resist +0.5/0.6/0.7

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 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

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: amplify_damage, soul_burn, poison, thorns_aura, might_aura, defense_aura, blessed_aim_aura, concentration_aura, fanaticism_aura, holy_fire_aura_buff/debuff, holy_freeze_aura_buff/debuff, holy_lightning_aura_buff/debuff, conviction_aura, salvation_aura, fire_resistance_aura, cold_resistance_aura, lightning_resistance_aura, sanctuary_aura_buff, prayer_aura, redemption_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/ (created on first run; hot-reloadable via /d2affix reload):

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
elite_types/*.json Per-type elite definitions (override built-in types of the same name)

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 entities
  • d2affix:beast — Beast entities
  • d2affix:enhance_remote_ai — Entities eligible for ranged weapon AI

Damage Tags

  • d2affix:on_crit — Bypasses critical damage
  • minecraft:is_fire — Fire damage
  • minecraft:is_lightning — Lightning damage
  • minecraft:is_freezing — Freezing damage
  • d2affix:is_poison — Poison damage
  • d2affix:no_knockback — No-knockback damage
  • minecraft:bypasses_armor — Armor-piercing damage
  • minecraft:bypasses_invulnerability — Invulnerability-piercing damage
  • d2affix:is_thorns — Thorns reflect damage (prevents reflection loops)

Item Tags

  • d2affix:unlock_0 — Available at Normal difficulty
  • d2affix:unlock_1 — Available at Nightmare difficulty
  • d2affix: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_type> [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 and elite-type files
debug /d2affix debug Toggle debug logging
info /d2affix info Show elite info of the entity you are looking at
set /d2affix set <target> <type_id> Force-set an entity's elite type (bypasses eligibility)

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, ... }   (per-step completion flags)
    └── parent_key: string  (for minion display)

Technical Info

  • Mod ID: d2affix
  • Minecraft: 1.20.1
  • Forge: 47.4.10+
  • Version: 0.1.0-Beta
  • Author: PyroStella

---

中文版

概述

暗黑2操作 是一个 Minecraft Forge 1.20.1 模组,将暗黑破坏神 2 的精英怪物词缀系统完整移植到 Minecraft 中。

怪物可以带有随机词缀(冰冷强化、特别快速、传送……)和光环(力量灵气、神圣冰冻、信念灵气……)生成。精英分为 5 个等级,按难度权重分配,支持随从生成、装备池、动态弩箭弹药切换,以及自定义属性和伤害类型框架。精英类型定义由数据驱动(JSON),可在 config/d2affix/elite_types/ 下覆盖。


精英类型(等级)

每个等级在 data/d2affix/elite_types/*.json 中定义,再以 ID 注册。设置了 applicableTagsapplicableEntities 的类型只在匹配的怪物上生成;两者皆未设置的类型适用于所有符合条件的敌对生物。子类型通过 extends 继承并覆盖父类型的字段。

等级对比

等级 显示颜色 权重(N/H/E) 词缀数量 随从
普通 无色 1500 0 0
冠军 蓝色 10 / 20 / 30 1 2(冠军类型)
独特 金色 10 / 20 / 30 2 / 2 / 3 0 / 3 / 4(随从类型)
超级独特 红色 1 / 2 / 5 2 / 3 / 4 3 / 4 / 6(随从类型)
随从 灰色 0 0 0

已注册类型

  • common — 基础档,无限制,适用所有符合条件的敌对生物
  • champion — 冠军随从专用
  • unique — 无限制,全量前缀 + 光环词缀池
  • minion — 独特/超级独特的随从专用,继承父级名称
  • super_unique — 超级独特基础模板(红色,使用翻译键命名)
  • bonebreaker — 亡灵生物,固有 spectral_hit,木剑
  • bonesaw — 亡灵生物,固有 extra_strong + magic_resistant,铁斧 + 盾牌
  • rakanishu — 亡灵生物,固有 lightning_enchanted + extra_fast
  • treehead — BEAST 标签,固有 extra_fast + extra_strong
  • corpsefire — 亡灵生物,固有 spectral_hit,木剑
  • bishibosh — BEAST 标签,固有 magic_resistant + fire_enchanted

属性修正(全部 MULTIPLY_TOTAL;数值为 普通 / 噩梦 / 地狱)

等级 生命 攻击 护甲 韧性 速度
普通 -30/-10/+10% -25/-15/0% -25/-15/0% -25/-15/0% 0/+5/+10%
冠军 +50/+60/+140% 0/+30/+70% 0/+30/+70% 0/+30/+70% +5/+10/+20%
独特 +50/+100/+200% +25/+50/+100% +25/+50/+100% +25/+50/+100% +10/+20/+30%
超级独特 +75/+150/+300% +25/+75/+150% +25/+75/+150% +25/+75/+150% +15/+25/+40%
随从 -30/0/+20% -15/0/+10% -30/0/+20% -30/0/+20% 0/+15/+30%

难度系统

名称 触发条件
0 普通 默认
1 噩梦 首次击杀末影龙
2 地狱 首次击杀凋灵

通过 SavedData 在主世界持久化,防重复触发。玩家可用 /d2affix difficult <0-2> 手动设置。词缀数值按难度档位缩放。


词缀列表

前缀(13 个)— 独特与超级独特使用

ID 效果
cold_enchanted 冰抗+75%;命中冰伤(攻击 25/50/100%);减速 80/120/160 ticks;死亡冰霜新星(r6,50/75/100% 伤害)
fire_enchanted 火抗+75%;命中火伤(25/50/100%);死亡尸体爆炸(r4,目标最大生命 75~100% 的火伤)
lightning_enchanted 电抗+75%;命中电伤(150/200/350%);受伤时 10/20/50% 概率触发充能弹
poison_enchanted 毒抗+75%;命中毒伤(25/50/100%);中毒 60/120/240 ticks;死亡毒新星(r6,50/75/100%)
extra_strong 生命 ×1.5/×1.75/×2.0;伤害 ×1.5/×1.75/×2.0;暴击率+5%
extra_fast 移速×1.5;暴击伤害+50%
stone_skin 物抗+50%;护甲×2/×2.5/×3
magic_resistant 火/冰/电/毒/魔抗各 +20/40/60%
multiple_shots 额外发射 2 枚弹射物,±30° 散布
teleportation HP<33% 传送至安全位置;60 秒冷却;8~15 格
cursed 50% 概率施加伤害加深(物理抗性 -50%),240 刻
soul_burn 100% 概率灵魂燃烧 3/5/8s(挖掘疲劳 lv1/2/4 + 攻击 -lv*5%)
spectral_hit 随机元素(火/冰/电)造成 75% 攻击力的该元素伤害;火/冰/电抗+40%

光环(17 个)— 每个生物最多 1 个,半径 10~15(随光环不同)

ID 友军增益 敌军减益
might_aura 攻击力×1.75/×1.95/×2.20
defense_aura 护甲×1.5/×1.65/×1.9,韧性×1.25/×1.35/×1.5
blessed_aim_aura 暴击率+10/20/40%
concentration_aura 暴击伤害×1.90/×2.05/×2.20
fanaticism_aura 攻击力×1.75/×2.00/×2.20,暴率+3/3.5/4%,暴伤+21/25/28%
thorns_aura 荆棘反伤 10/15/30%
holy_fire_aura 火抗+0.1/0.2/0.4 火抗-0.05/0.1/0.2;攻击 4.5/5.5/7% 火伤
holy_freeze_aura 冰抗+0.1/0.2/0.4 冰抗-0.05/0.1/0.2;攻击 4.5/5.5/7% 冰伤
holy_lightning_aura 电抗+0.1/0.2/0.4 电抗-0.05/0.1/0.2;攻击 4.5/5.5/7% 电伤
conviction_aura 护甲×0.25/×0.17/×0.10;全抗性-0.25/0.30/0.35
sanctuary_aura 魔抗+0.1/0.2/0.4 仅对亡灵造成魔法伤害(攻击力的 6.75/8.25/10.5%)
salvation_aura 全 6 元素抗性(物/魔/火/冰/电/毒)+0.3/0.4/0.5
prayer_aura 每 4 ticks 为范围内友军恢复 1/3/6 点生命
redemption_aura 范围内生物死亡时,持有者回复其最大生命 10%(至少 1 点)
fire_resistance_aura 火抗+0.5/0.6/0.7
cold_resistance_aura 冰抗+0.5/0.6/0.7
lightning_resistance_aura 电抗+0.5/0.6/0.7

冠军词缀(5 个)— 冠军类型池使用

ID 效果
champion 生命×3/×2.5/×2,伤害×1.5,暴击率+10%
berserker 生命×0.8/0.6/0.4,伤害×3/4/5,暴击伤害+50%,暴击率+15%,红色渲染
ghostly 物理抗性+50%,移动×0.8,四元素抗性+20%,透明度 -0.7,命中 20% 冰伤
fanatical 生命×3,伤害×2,暴击伤害+30%,暴击率+10%,免疫诅咒
leader 生命+20%,攻击时 40% 攻击力的随机元素伤害

自定义属性(13 个)

全部为 RangedAttribute,已同步,抗性范围 [-2, 0.75]。

ID 默认值 最小 最大 描述
physical_resistance 0.0 -2.0 0.75 物理伤害减免(上限 75%)
magic_resistance 0.0 -2.0 0.75 魔法伤害减免
fire_resistance 0.0 -2.0 0.75 火焰伤害减免
cold_resistance 0.0 -2.0 0.75 冰冷伤害减免
lightning_resistance 0.0 -2.0 0.75 闪电伤害减免
poison_resistance 0.0 -2.0 0.75 毒素伤害减免
thorns 0.0 0.0 1024.0 反伤百分比
crit_chance 0.2 0.0 1.0 暴击率(默认 20%)
crit_damage 1.2 1.0 1024.0 暴击倍率(默认 120%)
red_channel -1.0 -1.0 255.0 红色渲染通道
green_channel -1.0 -1.0 255.0 绿色渲染通道
blue_channel -1.0 -1.0 255.0 蓝色渲染通道
alpha_channel -1.0 -1.0 255.0 透明度渲染通道

自定义伤害类型(7 个)

用途
d2affix:cold 基础冰冷伤害
d2affix:fire 基础火焰伤害(尸体爆炸使用)
d2affix:lightning 基础闪电伤害
d2affix:poison 基础毒素伤害
d2affix:holy_freeze 神圣冰冻光环伤害
d2affix:holy_fire 神圣火焰光环伤害
d2affix:holy_lightning 神圣闪电光环伤害

药水与效果

可饮用药水

药水 效果 时长
cold_immunity 冰霜免疫 3 分钟
long_cold_immunity 冰霜免疫 8 分钟
lightning_immunity 闪电免疫 3 分钟
long_lightning_immunity 闪电免疫 8 分钟
poison_immunity 毒素免疫 3 分钟
long_poison_immunity 毒素免疫 8 分钟

均提供喷溅型与滞留型。

生物效果

包括:amplify_damage、soul_burn、poison、thorns_aura、might_aura、defense_aura、blessed_aim_aura、concentration_aura、fanaticism_aura、holy_fire_aura_buff/debuff、holy_freeze_aura_buff/debuff、holy_lightning_aura_buff/debuff、conviction_aura、salvation_aura、fire_resistance_aura、cold_resistance_aura、lightning_resistance_aura、sanctuary_aura_buff、prayer_aura、redemption_aura。


自定义实体

d2affix:charged_bolt — 弹射物实体(0.25×0.25 碰撞箱,追踪 64 格,每 tick 更新)。


自定义 AI

全部继承 RangedWeaponGoal(基于原版 Goal):

目标 武器 射程 冷却 备注
BowAttackGoal >6 格 60 ticks 标准箭矢射击
TridentAttackGoal 三叉戟 >3 格 60 ticks 投掷三叉戟
CrossbowAttackGoal >6 格 60 ticks 状态机(25t 装填)。非普通精英使用烟花火箭(3× 装填,爆炸强度随难度提升)

配置文件

均位于 config/d2affix/(首次运行生成,可通过 /d2affix reload 热重载):

文件 内容
elite_whitelist.json 精英化黑白名单
faction_settings.json 阵营/友军标签(用于友军伤害免疫)
equipment_params.json 装备池:各材质按难度的工具/护甲权重
elite_types/*.json 各精英类型定义(同名覆盖内置类型)

装备池示例

各材质按难度权重(剑/斧/镐/锄/铲 比例 10:7:5:2:2):

  • 皮革/木:N=100, H=30, E=0
  • 锁链/石:N=50, H=70, E=0
  • 铁:N=10, H=150, E=100
  • 金:N=50, H=100, E=50
  • 钻石:N=0, H=10, E=50
  • 下界合金:N=0, H=0, E=1

副手物品:打火石(全部)、盾牌(噩梦+)、图腾(地狱+)。空手权重:N=2000, H=700, E=0。所有物品 drop=false


标签

实体标签

  • d2affix:undead — 亡灵生物(僵尸、骷髅等)
  • d2affix:illager — 灾厄村民生物
  • d2affix:beast — 野兽生物
  • d2affix:enhance_remote_ai — 可启用远程武器 AI 的生物

伤害标签

  • d2affix:on_crit — 无视暴击伤害
  • minecraft:is_fire — 火焰伤害
  • minecraft:is_lightning — 闪电伤害
  • minecraft:is_freezing — 冰冻伤害
  • d2affix:is_poison — 毒素伤害
  • d2affix:no_knockback — 无击退伤害
  • minecraft:bypasses_armor — 无视护甲伤害
  • minecraft:bypasses_invulnerability — 无视无敌伤害
  • d2affix:is_thorns — 荆棘反伤(防止反射循环)

物品标签

  • d2affix:unlock_0 — 普通难度解锁
  • d2affix:unlock_1 — 噩梦难度解锁
  • d2affix:unlock_2 — 地狱难度解锁

指令

所有指令需要权限等级 2(op)。

/d2affix

子命令 语法 描述
affix /d2affix affix <词缀id> <目标> 手动附加词缀到实体
summon /d2affix summon <类型id> <实体类型> [坐标] 生成指定类型的精英怪
difficult /d2affix difficult 查询当前难度
difficult /d2affix difficult <0-2> 设置全局难度
reload /d2affix reload 热重载配置与精英类型文件
debug /d2affix debug 切换调试日志
info /d2affix info 显示视线指向实体的精英信息
set /d2affix set <目标> <类型id> 强制设置实体精英类型(绕过资格检查)

NBT 数据结构

全部存储于 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  (随从的父类型显示用)

技术信息

  • Mod ID: d2affix
  • Minecraft: 1.20.1
  • Forge: 47.4.10+
  • 版本: 0.1.0-Beta
  • 作者: PyroStella

The D2 Affix Team

profile avatar
  • 3
    Projects
  • 198
    Downloads

More from PyroStella

  • Revive CD project image

    Revive CD

    After death, it will no longer be resurrected immediately, but will enter a configurable countdown 死亡后不再马上复活,而是进入可配置的倒计时

    • 10
    • July 27, 2026
  • Evolutionary Defense Tower project image

    Evolutionary Defense Tower

    This mod adds the Hell Tower, a mob inspired by Clash Royale’s Inferno Tower. It features a “Crazier King Mode” upgrade system with iconic paths like “Hell Split Line.” 

    • 159
    • March 31, 2026
  • Revive CD project image

    Revive CD

    After death, it will no longer be resurrected immediately, but will enter a configurable countdown 死亡后不再马上复活,而是进入可配置的倒计时

    • 10
    • July 27, 2026
  • Evolutionary Defense Tower project image

    Evolutionary Defense Tower

    This mod adds the Hell Tower, a mob inspired by Clash Royale’s Inferno Tower. It features a “Crazier King Mode” upgrade system with iconic paths like “Hell Split Line.” 

    • 159
    • March 31, 2026