[GH-ISSUE #4689] TNT death message omits igniter player #1421

Closed
opened 2026-11-02 15:46:49 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @calclb on GitHub (Oct 30, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/4689

Originally assigned to: @calclb on GitHub.

🤖 Filed by calclb's AI agent (omp, deepseek-v4.1-flash), not by calclb personally.

Summary

A player who dies to primed TNT that another player lit sees death.attack.explosion (" blew up") instead of vanilla's death.attack.explosion.player (" was blown up by ").

Reproduce

Place TNT, light it with flint and steel, stand next to it and die.

Vanilla reference

Explosion.getIndirectSourceEntity returns PrimedTnt.getOwner(), and with both the direct entity and the cause set, DamageSources.explosion(entity, cause) picks minecraft:player_explosion (message id explosion.player), so the causing entity is %2$s.

Horizon today

  • crates/horizon-client/src/game/tnt.rs:14-22: PrimedTnt holds id, position, previous, velocity, fuse, on_ground. No owner.
  • crates/horizon-client/src/game/explosion.rs:458-465: the blast's cause is self.combat.explosion_owner.or(exploding).map(Who::Mob), always a mob.
  • explosion_hurt_player (same file, ~line 261) takes only a mob id.

What the fix touches

The igniter on PrimedTnt for every ignition path (flint and steel, dispenser, fire arrow, TNT minecart), synced and persisted, then passed as the blast's causing entity to explosion_hurt_player and the mob loop.

  • A player's custom-named weapon falls back to the plain message instead of death.attack.<kind>.item: the item lookup only resolves mobs.
  • A mace smash or spear hit on a player uses minecraft:player_attack (lan_pvp.rs hardcodes it), so vanilla's "was smashed by"/"was speared by" never appear.
  • A player's thrown trident never hits a player: meets_players covers only arrow, snowball and egg.

Related to #4529.

Originally created by @calclb on GitHub (Oct 30, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/4689 Originally assigned to: @calclb on GitHub. > 🤖 Filed by calclb's AI agent (omp, deepseek-v4.1-flash), not by calclb personally. ## Summary A player who dies to primed TNT that another player lit sees `death.attack.explosion` ("<victim> blew up") instead of vanilla's `death.attack.explosion.player` ("<victim> was blown up by <igniter>"). ## Reproduce Place TNT, light it with flint and steel, stand next to it and die. ## Vanilla reference `Explosion.getIndirectSourceEntity` returns `PrimedTnt.getOwner()`, and with both the direct entity and the cause set, `DamageSources.explosion(entity, cause)` picks `minecraft:player_explosion` (message id `explosion.player`), so the causing entity is `%2$s`. ## Horizon today - `crates/horizon-client/src/game/tnt.rs:14-22`: `PrimedTnt` holds id, position, previous, velocity, fuse, on_ground. No owner. - `crates/horizon-client/src/game/explosion.rs:458-465`: the blast's cause is `self.combat.explosion_owner.or(exploding).map(Who::Mob)`, always a mob. - `explosion_hurt_player` (same file, ~line 261) takes only a mob id. ## What the fix touches The igniter on `PrimedTnt` for every ignition path (flint and steel, dispenser, fire arrow, TNT minecart), synced and persisted, then passed as the blast's causing entity to `explosion_hurt_player` and the mob loop. ## Related gaps - A player's custom-named weapon falls back to the plain message instead of `death.attack.<kind>.item`: the item lookup only resolves mobs. - A mace smash or spear hit on a player uses `minecraft:player_attack` (`lan_pvp.rs` hardcodes it), so vanilla's "was smashed by"/"was speared by" never appear. - A player's thrown trident never hits a player: `meets_players` covers only arrow, snowball and egg. Related to #4529.
Author
Owner

@calclb commented on GitHub (Oct 30, 2026):

🤖 Agent: /claim

Starting on it: carry the igniter on the primed TNT, pass it as the blast's causing entity so a player-caused blast is minecraft:player_explosion (death.attack.explosion.player), and add a LAN check for the message.

<!-- gh-comment-id:6533693179 --> @calclb commented on GitHub (Oct 30, 2026): 🤖 Agent: /claim Starting on it: carry the igniter on the primed TNT, pass it as the blast's causing entity so a player-caused blast is `minecraft:player_explosion` (`death.attack.explosion.player`), and add a LAN check for the message.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#1421
No description provided.