Sol's Damage Indicator
支持 Minecraft Forge 1.16.5、1.20.1!
作者: solmochi
需要帮助、想要建议功能或发现了 Bug?
加入我们的社区,在更新正式发布前抢先获取独家早期预览和即将发布的更新日志!
描述
Sol's Indicator 是一款视觉战斗 HUD 模组,可实时显示你造成的确切伤害量。在敌人身上看到飘动的伤害数字,通过风格化的屏幕中央 HUD 追踪你的命中连击,使用准星指示器监控任意实体的生命值,并观看带有自定义 RPG 主题 Boss 条的 Boss 战变得栩栩如生,其中包含按玩家划分的伤害排名和电影般的死亡动画。
⚠️ 支持两种模式——在服务端和客户端都安装以实现完全准确(近战、投射物、法术、技能),或仅客户端使用以进行基本近战追踪。
✅ 在单人世界中完全可用且可玩。
功能
伤害指示器 HUD
- 命中计数器与连击追踪器 — 在屏幕右侧中央显示命中次数、“HIT” / “CRIT” 文本以及累计造成的伤害
- 搏动脉冲动画 — 每次命中都会触发一个缩放脉冲,在快速连击期间叠加
- 暴击检测 — 暴击以绿色显示并带有“CRIT”文本;神器暴击则以亮绿色显示倍数(例如“CRIT 2.1x”)
- 总结阶段 — 3.5 秒无命中后,过渡到总结界面,显示总伤害量并伴有戏剧性的脉冲“DAMAGE”标签
- 自动淡出 — HUD 在无活动 5 秒后淡出,然后重置以供下一次战斗使用
- 可配置位置 — 可放置在屏幕左侧中央或右侧中央
浮动伤害数字
- 世界空间数字 — 伤害数字从命中的实体上方浮动上升,并在 1.5 秒内淡出
- 颜色编码 — 红色用于普通命中,绿色用于原版暴击,亮绿色用于神器系统暴击
- 暴击倍数显示 — 神器暴击显示倍数后缀(例如“12.50 2.1x”)
- 生成动画 — 数字在生成时迅速放大并轻微跳动,然后稳定下来
- 随机扩散 — 多个同时出现的数字会略微分散以避免重叠
- 广告牌渲染 — 数字在世界空间的 3D 中始终面向相机
自定义 Boss 条 HUD
- RPG 主题设计 — 完全替换原版 Boss 条,采用带有金色边框、渐变血条和实体肖像的风格化面板
- 实体肖像 — 在框架肖像框内渲染 Boss 实体的实时 3D 模型
- 动态尺寸 — 条宽度自动扩展以适应长的实体名称和 HP 文本
- 颜色匹配条 — 血条颜色适应实体的自定义名称颜色、Boss 条颜色设置或生物类型(红/绿/蓝)
- HP 数值 — 显示确切的当前 HP / 最大 HP(格式如:“125.4K / 500.0K”)
- 实体标题 — 在实体名称下方显示 CustomNPC 标题(如果可用)
- 多个 Boss 条 — 支持屏幕上配置的最大 Boss 条数(默认:3),超出部分显示“+N more”溢出标签
- 紧凑模式 — 第 2 个及以后的 Boss 条使用紧凑布局,仅显示你自己的伤害贡献
- 过时数据清理 — 当实体恢复到满血或死亡时,自动清除伤害进度
Boss 伤害进度
- 按玩家伤害追踪 — 服务端追踪每个玩家对 Boss 实体造成的累计伤害
- 伤害百分比显示 — 将每个玩家的伤害显示为 Boss 最大 HP 的百分比(例如“PlayerName: 10.83%”)
- RPG 排名样式 — 顶级贡献者获得奖牌图标:第一名皇冠,第 2–3 名钻石,第 4 名及以上箭头
- 双列网格布局 — 前 5 名贡献者以组织好的网格形式显示,带有“Damage Progress”标题
- 自我高亮 — 你自己的名字以绿色高亮显示;其他玩家显示为白色
- 自我追加 — 如果你不在前 5 名,你的条目会单独追加,以便你始终看到自己的贡献
- 自动检测 — 使用反射检测任何具有
ServerBossInfo 字段的实体(支持原版 + 所有模组 Boss)
- 不活跃修剪 — 玩家在配置的不活动时间后(默认:5 分钟)从伤害列表中移除
Boss 死亡动画
- 电影式击杀序列 — 当 Boss 死亡时,播放 10 秒的戏剧性覆盖层,包含多个阶段:
实体生命值指示器
- 准星目标生命值 — 为你注视的实体显示生命值面板
- RPG 面板设计 — 与 Boss 条样式匹配,带有金色边框、肖像和渐变血条
- 实时实体肖像 — 渲染目标实体的 3D 模型
- HP 与护甲显示 — 显示心形图标 + 当前/最大 HP 以及钻石护甲图标与护甲值
- 模组实体支持 — 格式化来自注册表路径的名称(例如,“cartaddon:revolutionary_grunt” → “Revolutionary Grunt”)
仅客户端回退模式
- 无需服务器 — 当服务器未安装该模组时,自动回退到通过健康差值进行的客户端近战追踪
- 无缝切换 — 从第一个伤害数据包检测服务器能力;无需手动配置
- 近战检测 — 通过
AttackEntityEvent 追踪攻击,并每刻监控实体健康变化
- 原版暴击检测 — 在仅客户端模式下检测原版暴击(下落 + 冲刺条件)
安装
- 为 1.16.5 或 1.20.1 安装 Minecraft Forge
- 下载模组
.jar 文件
- 将其放入
.minecraft/mods 文件夹
- 启动 Minecraft
若要启用全部功能(所有伤害来源、Boss 追踪、死亡动画): 在服务端和客户端均安装。
若仅需基本近战追踪: 仅客户端安装即可 — 无需服务器。
配置
客户端设置 (solsdamageindicator-client.toml)
| 设置 |
默认值 |
描述 |
| Boss Bar |
|
|
bossbar.enabled |
true |
使用自定义样式的 HUD 替换原版 Boss 血条 |
bossbar.damageProgress |
true |
在 Boss 血条下方显示每位玩家的伤害贡献 |
bossbar.barWidth |
250 |
Boss 血条的最小宽度(像素)(100–500) |
bossbar.maxBossBars |
3 |
同时显示的 Boss 血条最大数量 (1–10),超出部分显示为 "+N more" |
bossbar.deathAnimation |
true |
当 Boss 死亡时播放电影式死亡覆盖动画 |
| Entity Health |
|
|
entityhealth.enabled |
true |
为准星指向的目标实体显示血条 |
entityhealth.damageProgress |
true |
在实体血条下方显示你的伤害贡献 |
entityhealth.range |
32.0 |
实体血条显示的最大距离(方块数)(4–128) |
| Damage Indicator |
|
|
damageindicator.enabled |
true |
在屏幕中央显示伤害 HUD(命中次数、HIT/CRIT、伤害量) |
damageindicator.leftSide |
false |
将 HUD 定位在屏幕左中而非右中 |
| undefined |
|
|
服务端设置 (solsdamageindicator-server.toml)
| 设置 |
默认值 |
描述 |
bossdamage.enabled |
true |
追踪并广播每位玩家对 Boss 造成的伤害 |
bossdamage.maxEntries |
5 |
Boss 血条进度中显示的最高伤害贡献者最大数量 (1–30) |
bossdamage.relicCritIntegration |
true |
在可用时使用 Sol's Relic System 的暴击检测机制 |
bossdamage.inactivityTimeout |
5 |
不活跃玩家从伤害列表中移除前的分钟数 (0 = 永不移除) |
命令
| 命令 |
描述 |
/solsdi debug |
循环切换 HUD 调试模式 (OFF → IN_TOP5 → NOT_IN_TOP5) |
/solsdi debug death |
预览 Boss 死亡动画(在“在前五名”和“不在前五名”变体之间交替) |
注意: 命令需要操作员权限(权限等级 2)。
跨模组兼容性
Sol's Relic System 集成
- 通过反射检测来自 Sol's Relic System 的自定义暴击(无硬依赖)
- 神器暴击以亮绿色显示,并显示实际倍率(例如,“CRIT 2.1x”)
- 神器暴击的浮动伤害数字比正常大 25%,并附带倍率后缀
- 可通过服务器配置
bossdamage.relicCritIntegration 进行切换
模组化 Boss 支持
- 通过反射自动检测具有
ServerBossInfo 字段的任何实体
- 支持原版 Boss(凋灵、末影龙)以及所有模组化的 Boss
- 嵌套字段搜索(深度 1 层)可捕获如末影龙这类 Boss 血条位于子对象上的情况
模组化实体支持
- 实体血条指示器适用于所有模组化实体
- 自动将注册表名称格式化为可读的显示名称
- 通过
getDisplay().getTitle() 反射检测 CustomNPC 的标题
实体覆盖层抑制
- 抑制来自 Jade、WTHIT、HWYLA 及类似模组的重复实体覆盖层
- 以最高事件优先级运行,在其他模组读取之前将
crosshairPickEntity 置空
- 渲染后恢复目标实体,确保游戏玩法机制不受影响
工作原理
服务端 + 客户端模式(推荐)
- 服务端监听
LivingDamageEvent(在所有减伤计算完成后触发:护甲、附魔、吸收伤害)
- 服务端向攻击者发送包含确切最终伤害值的
DamageIndicatorPacket
- 客户端在 HUD 和浮动数字中显示准确的伤害
- 对于 Boss 实体,服务端还会追踪每位玩家的累计伤害,并向所有查看 Boss 血条的玩家广播更新
仅客户端模式(备用)
- 客户端通过
AttackEntityEvent 检测玩家攻击
- 每 tick 监测被攻击实体的血量变化
- 将
healthBefore - healthAfter 报告为造成伤害
- 局限性: 仅追踪近战/横扫攻击;投射物和间接伤害需要服务端组件
看见每一次命中。追踪每一个 Boss。主宰每一场战斗。
Sol's Damage Indicator
Supports Minecraft Forge 1.16.5, 1.20.1!
Author: solmochi
Need help, want to suggest a feature, or found a bug?
Join our community to catch exclusive early previews and upcoming changelogs before they go live!
Description
Sol's Indicator is a visual combat HUD mod that shows exactly how much damage you deal in real-time. See floating damage numbers on enemies, track your hit combos with a stylish center-screen HUD, monitor any entity's health with a crosshair indicator, and watch boss fights come alive with custom RPG-themed boss bars featuring per-player damage rankings and cinematic death animations.
⚠️ Works in two modes — install on both server and client for full accuracy (melee, projectiles, spells, abilities), or use client-only for basic melee tracking.
✅ Fully functionable and playable on a Single-Player World.
Features
Damage Indicator HUD
- Hit Counter & Combo Tracker — Displays hit count, "HIT" / "CRIT" text, and cumulative damage dealt on the center-right of your screen
- Throbbing Pulse Animation — Each hit triggers a scale pulse that stacks during rapid combos
- Critical Hit Detection — Crits display in green with "CRIT" text; relic crits show the multiplier (e.g., "CRIT 2.1x") in bright green
- Summary Phase — After 3.5 seconds of no hits, transitions to a summary showing total damage dealt with a dramatic pulsed "DAMAGE" label
- Auto-Fade — HUD fades out after 5 seconds of inactivity, then resets for the next combat
- Configurable Position — Can be placed on center-left or center-right of the screen
Floating Damage Numbers
- World-Space Numbers — Damage numbers float upward from hit entities and fade out over 1.5 seconds
- Color-Coded — Red for normal hits, green for vanilla crits, bright green for relic system crits
- Crit Multiplier Display — Relic crits show the multiplier suffix (e.g., "12.50 2.1x")
- Spawn Animation — Numbers scale up with a quick throb on spawn, then settle
- Random Spread — Multiple simultaneous numbers spread out slightly to avoid overlap
- Billboard Rendering — Numbers always face the camera in 3D world space
Custom Boss Bar HUD
- RPG-Themed Design — Fully replaces vanilla boss bars with a styled panel featuring gold frames, gradient health bars, and entity portraits
- Entity Portraits — Renders a live 3D model of the boss entity inside a framed portrait box
- Dynamic Sizing — Bar width auto-expands to fit long entity names and HP text
- Color-Matched Bars — Health bar color adapts to the entity's custom name color, boss bar color setting, or mob type (red/green/blue)
- HP Numbers — Shows exact current HP / max HP (formatted: e.g., "125.4K / 500.0K")
- Entity Titles — Displays CustomNPC titles below the entity name when available
- Multiple Boss Bars — Supports configurable max boss bars on screen (default: 3) with "+N more" overflow label
- Compact Mode — 2nd+ boss bars use a compact layout showing only your own damage contribution
- Stale Data Cleanup — Automatically clears damage progress when entities heal to full or die
Boss Damage Progress
- Per-Player Damage Tracking — Server tracks cumulative damage dealt by each player to boss entities
- Damage Percentage Display — Shows each player's damage as a percentage of the boss's max HP (e.g., "PlayerName: 10.83%")
- RPG Rank Styling — Top contributors get medal icons: crown for #1, diamonds for #2–3, arrows for #4+
- 2-Column Grid Layout — Top 5 contributors displayed in an organized grid with a "Damage Progress" header
- Self-Highlighting — Your own name is highlighted in green; other players appear in white
- Self-Append — If you're not in the top 5, your entry is appended separately so you always see your contribution
- Auto-Detection — Uses reflection to detect any entity with a
ServerBossInfo field (supports vanilla + all modded bosses)
- Inactivity Pruning — Players are removed from the damage list after configurable minutes of inactivity (default: 5 min)
Boss Death Animation
- Cinematic Kill Sequence — When a boss dies, plays a 10-second dramatic overlay with multiple phases:
Entity Health Indicator
- Crosshair Target Health — Shows a health bar panel for the entity you're looking at
- RPG Panel Design — Matches the boss bar style with gold frame, portrait, and gradient health bar
- Live Entity Portrait — Renders a 3D model of the targeted entity
- HP & Armor Display — Shows heart icon + current/max HP and diamond armor icon with armor value
- Modded Entity Support — Formats names from registry paths (e.g., "cartaddon:revolutionary_grunt" → "Revolutionary Grunt")
Client-Only Fallback Mode
- No Server Required — When the server doesn't have the mod, automatically falls back to client-side melee tracking via health deltas
- Seamless Switching — Detects server capability from the first damage packet; no manual configuration needed
- Melee Detection — Tracks attacks via
AttackEntityEvent and monitors entity health changes each tick
- Vanilla Crit Detection — Detects vanilla critical hits (falling + sprinting conditions) in client-only mode
Installation
- Install Minecraft Forge for 1.16.5 or 1.20.1
- Download the mod
.jar file
- Place it in your
.minecraft/mods folder
- Launch Minecraft
For full features (all damage sources, boss tracking, death animations): Install on both server and client.
For basic melee tracking: Client-only installation works — no server needed.
Configuration
Client Settings (solsdamageindicator-client.toml)
| Setting |
Default |
Description |
| Boss Bar |
|
|
bossbar.enabled |
true |
Replace vanilla boss bars with custom styled HUD |
bossbar.damageProgress |
true |
Show per-player damage contribution below boss bars |
bossbar.barWidth |
250 |
Minimum boss bar width in pixels (100–500) |
bossbar.maxBossBars |
3 |
Max boss bars shown at once (1–10), remaining shown as "+N more" |
bossbar.deathAnimation |
true |
Play cinematic death overlay when a boss dies |
| Entity Health |
|
|
entityhealth.enabled |
true |
Show health bar for crosshair target entity |
entityhealth.damageProgress |
true |
Show your damage contribution below entity health bar |
entityhealth.range |
32.0 |
Max distance in blocks for entity health display (4–128) |
| Damage Indicator |
|
|
damageindicator.enabled |
true |
Show the center-screen damage HUD (hit count, HIT/CRIT, damage) |
damageindicator.leftSide |
false |
Position HUD on center-left instead of center-right |
| undefined |
|
|
Server Settings (solsdamageindicator-server.toml)
| Setting |
Default |
Description |
bossdamage.enabled |
true |
Track and broadcast per-player boss damage |
bossdamage.maxEntries |
5 |
Max top damage contributors shown in boss bar progress (1–30) |
bossdamage.relicCritIntegration |
true |
Use Sol's Relic System crit detection when available |
bossdamage.inactivityTimeout |
5 |
Minutes before inactive players are pruned from damage lists (0 = never) |
Commands
| Command |
Description |
/solsdi debug |
Cycle through HUD debug modes (OFF → IN_TOP5 → NOT_IN_TOP5) |
/solsdi debug death |
Preview the boss death animation (alternates between "in top 5" and "not in top 5" variants) |
Note: Commands require operator permissions (permission level 2).
Cross-Mod Compatibility
Sol's Relic System Integration
- Detects custom critical hits from Sol's Relic System via reflection (no hard dependency)
- Relic crits display with bright green color and show the actual multiplier (e.g., "CRIT 2.1x")
- Floating damage numbers for relic crits are 25% larger with the multiplier suffix
- Can be toggled via
bossdamage.relicCritIntegration server config
Modded Boss Support
- Automatically detects any entity with a
ServerBossInfo field via reflection
- Supports vanilla bosses (Wither, Ender Dragon) and all modded bosses
- Nested field search (1 level deep) catches bosses like Ender Dragon where the boss bar is on a sub-object
Modded Entity Support
- Entity health indicator works with all modded entities
- Automatically formats registry names into readable display names
- Detects CustomNPC titles via
getDisplay().getTitle() reflection
Entity Overlay Suppression
- Suppresses duplicate entity overlays from Jade, WTHIT, HWYLA, and similar mods
- Runs at highest event priority to null out
crosshairPickEntity before other mods read it
- Restores the target after rendering so gameplay mechanics remain unaffected
How It Works
Server + Client Mode (Recommended)
- Server listens for
LivingDamageEvent (fires after ALL reductions: armor, enchantments, absorption)
- Server sends a
DamageIndicatorPacket to the attacking player with the exact final damage
- Client displays the accurate damage on the HUD and as floating numbers
- For boss entities, server also tracks cumulative damage per player and broadcasts updates to all boss bar viewers
Client-Only Mode (Fallback)
- Client detects player attacks via
AttackEntityEvent
- Each tick, monitors the attacked entity's health for decreases
- Reports
healthBefore - healthAfter as damage dealt
- Limitation: Only melee/sweep attacks are tracked; projectiles and indirect damage require the server component
See every hit. Track every boss. Dominate every fight.
评论 0
登录后参与评分
还没有评论,来抢沙发吧