跳到正文

Player Damage Feedback

作者:ringoway

See the damage you take, and the damage you deal to other players.

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

Player Damage Feedback

See the damage you take, and the damage you deal to other players. A number pops up whenever a player is hurt – the victim always sees it, and if another player landed the hit, that player sees it too. Multiplayer-correct by design: the server tells each client exactly what it’s allowed to see.


What does this mod do?

Damage numbers, scoped to players

Most damage-number mods show a floating number over anything that gets hurt – zombies, cows, item frames, all of it. This mod does one thing: players. When a player takes damage, a number appears above them.

Two viewers, two colors

  • The victim always sees the damage they took (red by default).
  • The attacker, if the hit came from another player, sees the damage they dealt (white by default) – so PvP finally gives you a number to react to instead of guessing from a health bar you can’t even see.

Both colors are configurable, and the attacker’s view can be turned off entirely if you only want players to see their own damage.

Actually multiplayer-safe

The server watches the real damage event – after armor, enchantments, and absorption are all applied – and sends a tiny packet to whoever is allowed to see the result. There’s no client-side guessing based on health-bar changes, so the number you see is always the number that actually happened, and a player without the mod simply doesn’t receive anything extra.


Configuration

config/player_damage_feedback-client.toml (client-side, no balance impact)

# Master on/off switch
enabled = true

# Also show a number above the enemy when YOU hit them
showToAttacker = true

Size:

# NOT pixels. Damage numbers are 3D text billboards rendered directly in the
# game world (like a nameplate), so this is a world-space scale multiplier.
# 1.0 = normal readable size at close range.
# 0.5 = half size, 2.0 = double size.
size = 1.0

Timing and motion:

# How long a number stays on screen, in game ticks (20 ticks = 1 second)
lifetimeTicks = 40

# Initial upward speed in blocks per tick, before gravity pulls it back down
riseSpeed = 0.09

# Random horizontal offset in blocks, so repeated hits don't fully overlap
horizontalSpread = 0.3

Colors (hex RGB):

# Color of the number when YOU take damage
colorTaken = "#FF5555"

# Color of the number above an enemy when YOU deal the damage
colorDealt = "#FFFFFF"

How it works

  1. A player takes damage. Forge fires LivingDamageEvent on the server, after all mitigation is resolved.
  2. The server sends the final amount to the victim’s client.
  3. If the source of the damage was another player, the server also sends it to the attacker’s client.
  4. Each client checks its own config and, if allowed, spawns a floating number above the victim – rendered as a billboard that always faces the camera, rising and falling with a bit of gravity, fading out over its lifetime.

No mixins, no vanilla particle registry, no client-side detection tricks – just one event, one packet type, and direct rendering during the world’s particle pass.


Requirements

Install on both the client and the server for the full experience – a vanilla client connecting to a server running this mod simply won’t get the extra packets, and a modded client on a vanilla server won’t have anything to receive.


Credits

  • Inspired by damagenumbers by Lua (foxgirl.dev) – a great mod for general mob damage numbers. This mod covers the one thing a purely client-side mod can’t: telling an attacking player how much damage they dealt to another player.

常见问题

Player Damage Feedback 支持哪些 Minecraft 版本?

Player Damage Feedback 支持 Minecraft Java 版 1.20.1,可用的加载器:Forge。下载时注意选择和你游戏版本一致的文件。

Player Damage Feedback 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Forge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:客户端和服务端都要装。

评论

登录后评论和评分

ringoway 的其他作品

查看全部 →