浮动伤害指示器
每个目标上方显示浮动的伤害和治疗数字,包括你受到的伤害,按伤害类型着色,并完全可配置。
支持自定义原版/模组化伤害类型的样式。
注意: FDI 必须在服务器和客户端都安装,才能用于多人游戏服务器。
⚡ 功能
- 在你击中的任何实体上方显示浮动伤害数字。
- 也能看到你受到的伤害。
- 按伤害类型着色。
- 完全可配置。
- 在单人游戏和专用多人游戏中均有效。
| 类型 |
图标 |
颜色 |
示例 |
| NORMAL |
— |
红色 |
普通攻击 |
| CRITICAL |
✦ |
金色 |
跳跃暴击 |
| PROJECTILE |
➵ |
青色 |
箭矢、三叉戟 |
| FIRE |
♨ |
橙色 |
火焰附加 |
| POISON |
⚗ |
绿色 |
中毒 |
| WITHER |
☠ |
深灰色 |
凋零效果 |
| RECEIVING |
— |
浅灰色 |
你受到的伤害 |
| INSTANT_KILL |
⚡ INSTANT KILL |
金色 |
一击必杀敌人 |
| HEAL |
+ |
石灰绿 |
受到的治疗 |
| MAGIC |
✧ |
紫色 |
瞬间伤害、唤魔者尖牙 |
⚙️ 配置
配置 Floating Damage Indicators 最简单的方法是在游戏内:打开 Mod Menu (Fabric) 或模组列表中的 Config 按钮 (NeoForge)。
注意: 界面有三个选项卡:General 用于主要开关,Formats 用于颜色、前缀和每种类型的选项(包括 Healing 下的治疗选项),以及 Custom 用于打开自定义伤害类型样式文件。客户端更改无需重启游戏即可生效。
首次启动游戏后,会生成一个配置文件:
config/floatingdamageindicators.json
可用选项:
重要: showDamage 是 伤害的主开关。如果设置为 false,则不显示任何伤害数字(包括你受到的伤害)。showReceivedDamage 仅在 showDamage 为 true 时生效。治疗由 showHealing 独立控制。
注意: formats 部分 仅限客户端,除了 INSTANT_KILL 的 enabled,服务器也会读取它。服务器仅读取 showDamage、showReceivedDamage、showHealing、minHealAmount、healTargets 以及 INSTANT_KILL 的 enabled。在专用服务器上,服务器端值仍需要重启服务器。
提示: 某些 Unicode 字符或表情符号可能无法正确显示,这取决于你的 Minecraft 字体。如果字符显示为空白方块,请尝试其他字符。建议使用基本 Unicode 符号以获得最佳效果。
提示: 颜色使用 #RRGGBB 格式。无效值如 "ZZZ123" 或 "FF" 将静默回退到该伤害类型的默认值。
{
"showDamage": true,
"showReceivedDamage": true,
"showHealing": true,
"minHealAmount": 0.5,
"healTargets": "ALL",
"formats": {
"NORMAL": { "enabled": true, "prefix": "", "color": "#FF3333", "showDamage": true },
"CRITICAL": { "enabled": true, "prefix": "\u2726", "color": "#FFD700", "showDamage": true },
"PROJECTILE": { "enabled": true, "prefix": "\u27B5", "color": "#00FFFF", "showDamage": true },
"FIRE": { "enabled": true, "prefix": "\u2668", "color": "#FF6600", "showDamage": true },
"POISON": { "enabled": true, "prefix": "\u2697", "color": "#4A9E2F", "showDamage": true },
"WITHER": { "enabled": true, "prefix": "\u2620", "color": "#3C3C3C", "showDamage": true },
"RECEIVING": { "enabled": true, "prefix": "(You) ", "color": "#AAAAAA", "showDamage": true },
"HEAL": { "enabled": true, "prefix": "+", "color": "#55FF55", "showDamage": true },
"MAGIC": { "enabled": true, "prefix": "\u2727", "color": "#B06CFF", "showDamage": true },
"INSTANT_KILL": { "enabled": true, "prefix": "\u26A1 INSTANT KILL", "color": "#FFD700", "showDamage": false }
}
}
每个格式条目:
- enabled: 完全显示/隐藏此伤害类型
- prefix: 显示在数字之前(或替代数字)的自定义文本
- color: 6位十六进制颜色代码 (RGB)
- showDamage: 如果为 false,则仅显示前缀(不显示伤害数字)
治疗选项:
- showHealing: 显示治疗数字(与
showDamage 独立)。
- minHealAmount: 低于此数值的治疗将被忽略。默认为
0.5。
- healTargets:
ALL (默认), PLAYERS (仅被治疗的玩家) 或 SELF (仅被治疗的玩家自己)。
自定义伤害类型样式
你可以为任何伤害类型 ID 设置自己的颜色和前缀。这位于 单独的客户端文件 中,因此那里的错误永远不会破坏主配置文件:
config/floatingdamageindicators-custom-damagetype.json
它在首次启动时作为空的 {} 生成,并且 永不 重写。示例:
{
"minecraft:player_attack": { "color":"#FF00FF","prefix":"HIT " },
"irons_spellbooks:fire_magic": { "color": "#FF7A18" },
"irons_spellbooks:ice_magic": { "color": "#7FD7FF", "prefix": "\u2744 " }
}
color(#RRGGBB)和 prefix 是可选的;缺失的字段将回退到正常的类型样式。
- 仅验证 ID 语法。尚不存在(或永远不会出现)的 ID 仅仅不会被使用。
CRITICAL、INSTANT_KILL、HEAL 和 POISON 保持其各自的样式。RECEIVING 采用自定义颜色,但保留 (You)。
- 兼容任何模组且无依赖项。可从 Custom 选项卡打开或手动编辑。
- 更改在保存后约一秒自动生效;无需重启。如果文件暂时无效,最后有效的样式将保持活动状态,且文件不会被覆盖。
📦 依赖
Fabric
- Fabric API
- Mod Menu(可选)
- (+26.X) Java 25 或更高版本
NeoForge
💬 建议与问题
如果你有想法、建议或发现了 bug,欢迎在 CurseForge 页面留言或在 GitHub 仓库中提交 issue。
❓ 常见问题
我可以在公共整合包中使用此模组吗?
可以!你可以自由地将其包含在任何公共或私有整合包中,无需许可。
📜 许可证
本项目基于 MIT License 授权。
Floating Damage Indicators
Floating damage and healing numbers above every target, including your own incoming damage, color-coded by damage type and fully configurable.
Supports custom styles for vanilla/modded damage types.
Note: FDI must be installed on both the server and client for multiplayer servers.
⚡ Features
- Floating damage numbers above any entity you hit.
- See your own incoming damage too.
- Color-coded by damage type.
- Fully Configurable.
- Works in both singleplayer and dedicated multiplayer.
| Type |
Icon |
Color |
Example |
| NORMAL |
— |
Red |
Normal hit |
| CRITICAL |
✦ |
Gold |
Jump crit |
| PROJECTILE |
➵ |
Cyan |
Arrow, trident |
| FIRE |
♨ |
Orange |
Fire Aspect |
| POISON |
⚗ |
Green |
Poison |
| WITHER |
☠ |
Dark gray |
Wither effect |
| RECEIVING |
— |
Light gray |
Damage you take |
| INSTANT_KILL |
⚡ INSTANT KILL |
Gold |
Kill an enemy in one hit |
| HEAL |
+ |
Lime green |
Healing received |
| MAGIC |
✧ |
Purple |
Instant damage, evoker fangs |
⚙️ Configuration
The easiest way to configure Floating Damage Indicators is in-game: open Mod Menu (Fabric) or the Config button in the mods list (NeoForge).
Note: The screen has three tabs: General for the main toggles, Formats for the color, prefix and per-type options (including the healing options under Healing), and Custom to open the custom damage type styles file. Client-side changes are applied without restarting the game.
After launching the game once, a configuration file will be generated:
config/floatingdamageindicators.json
Available options:
Important: showDamage is the master switch for damage. If it is set to false, no damage numbers are shown (including your own incoming damage). showReceivedDamage only takes effect while showDamage is true. Healing is controlled independently by showHealing.
Note: The formats section is client-side only, except INSTANT_KILL's enabled, which the server also reads. The server only reads showDamage, showReceivedDamage, showHealing, minHealAmount, healTargets, and INSTANT_KILL's enabled. On a dedicated server, the server-side values still require a server restart.
Tip: Some Unicode characters or emojis may not display correctly depending on your Minecraft font. If a character shows as a blank square, try a different one. Stick to basic Unicode symbols for best results.
Tip: Colors use #RRGGBB. Invalid values like "ZZZ123" or "FF" will silently fall back to the default for that damage type.
{
"showDamage": true,
"showReceivedDamage": true,
"showHealing": true,
"minHealAmount": 0.5,
"healTargets": "ALL",
"formats": {
"NORMAL": { "enabled": true, "prefix": "", "color": "#FF3333", "showDamage": true },
"CRITICAL": { "enabled": true, "prefix": "\u2726", "color": "#FFD700", "showDamage": true },
"PROJECTILE": { "enabled": true, "prefix": "\u27B5", "color": "#00FFFF", "showDamage": true },
"FIRE": { "enabled": true, "prefix": "\u2668", "color": "#FF6600", "showDamage": true },
"POISON": { "enabled": true, "prefix": "\u2697", "color": "#4A9E2F", "showDamage": true },
"WITHER": { "enabled": true, "prefix": "\u2620", "color": "#3C3C3C", "showDamage": true },
"RECEIVING": { "enabled": true, "prefix": "(You) ", "color": "#AAAAAA", "showDamage": true },
"HEAL": { "enabled": true, "prefix": "+", "color": "#55FF55", "showDamage": true },
"MAGIC": { "enabled": true, "prefix": "\u2727", "color": "#B06CFF", "showDamage": true },
"INSTANT_KILL": { "enabled": true, "prefix": "\u26A1 INSTANT KILL", "color": "#FFD700", "showDamage": false }
}
}
Each format entry:
- enabled: show/hide this damage type entirely
- prefix: custom text shown before (or instead of) the number
- color: 6-digit hex color (RGB)
- showDamage: if false, only the prefix is shown (no damage number)
Healing options:
- showHealing: show healing numbers (independent of
showDamage).
- minHealAmount: heals below this amount are ignored. Default is
0.5.
- healTargets:
ALL (default), PLAYERS (only healed players) or SELF (only the healed player).
Custom damage type styles
You can give any damage type ID its own color and prefix. This lives in a separate client-side file, so a mistake there can never break the main config:
config/floatingdamageindicators-custom-damagetype.json
It is generated as an empty {} on first launch and never rewritten. Example:
{
"minecraft:player_attack": { "color":"#FF00FF","prefix":"HIT " },
"irons_spellbooks:fire_magic": { "color": "#FF7A18" },
"irons_spellbooks:ice_magic": { "color": "#7FD7FF", "prefix": "\u2744 " }
}
color (#RRGGBB) and prefix are optional; missing fields fall back to the normal type style.
- Only the ID syntax is validated. IDs that don't exist yet (or never appear) are simply unused.
CRITICAL, INSTANT_KILL, HEAL and POISON keep their own style. RECEIVING takes the custom color but keeps (You).
- Works with any mod and adds no dependencies. Open it from the Custom tab or edit it by hand.
- Changes apply automatically about a second after saving; no restart. If the file is temporarily invalid, the last valid styles stay active and the file is not overwritten.
📦 Requirements
Fabric
- Fabric API
- Mod Menu (optional)
- (+26.X) Java 25 or newer
NeoForge
💬 Suggestions & Issues
If you have an idea, a suggestion, or found a bug, feel free to leave a comment on the CurseForge page or open an issue on the GitHub repository.
❓ FAQ
Can I use this mod in a public modpack?
Yes! You're free to include it in any public or private modpack, no permission needed.
📜 License
This project is licensed under the MIT License.
评论 0
登录后参与评分
还没有评论,来抢沙发吧