[PR #6119] [MERGED] Broadcast damage event when Ender Dragon is hurt (#5999) #6662

Closed
opened 2026-11-03 06:24:35 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6119
Author: @Sticky-Bug
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: feat/ender-dragon-hurt-flash


📝 Commits (4)

  • ddd0860 Broadcast damage event when Ender Dragon is hurt (#5999)
  • 7dbda4f Dragon damage event: the hurt flash only; the hurt sound stays the server's
  • dc77793 rustfmt
  • e0cb84d Merge main into #6119 (the mod block entity test fix)

📊 Changes

2 files changed (+45 additions, -3 deletions)

View changed files

📝 crates/horizon-client/src/game/dragon.rs (+29 -3)
📝 crates/horizon-client/src/game/lan.rs (+16 -0)

📄 Description

Closes #5999

Summary

When the Ender Dragon is damaged, the server now broadcasts a damage event packet to tracking clients:

  • In lan_flush_effects (lan.rs), self.dragon's hurt time is now monitored in mob_state alongside standard mobs. When hurt time increments while alive, host.hub.damage_event broadcasts the damage event.
  • Stored last_source on Dragon to preserve the damage type and attacker cause for the broadcast.
  • Allowed remote_dragon_mut to match either the dragon entity ID or its part IDs.
  • In remote_dragon_hurt, sets d.hurt_time = 10 (triggering the red flash in entity.wgsl) and plays entity.ender_dragon.hurt.
  • Added unit test a_landed_hurt_sets_the_dragon_hurt_flash_time.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/6119 **Author:** [@Sticky-Bug](https://github.com/Sticky-Bug) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/ender-dragon-hurt-flash` --- ### 📝 Commits (4) - [`ddd0860`](https://github.com/horizon-rust/horizon/commit/ddd08605911f2bef906b2d9539e782af3655d9f0) Broadcast damage event when Ender Dragon is hurt (#5999) - [`7dbda4f`](https://github.com/horizon-rust/horizon/commit/7dbda4f4f5b34f378c0d8413adf07a0ea429a53d) Dragon damage event: the hurt flash only; the hurt sound stays the server's - [`dc77793`](https://github.com/horizon-rust/horizon/commit/dc77793cdd37462083be65e3e7593aa0fb2fe96e) rustfmt - [`e0cb84d`](https://github.com/horizon-rust/horizon/commit/e0cb84d36122394ccb7d1ec42ef774912ab853bd) Merge main into #6119 (the mod block entity test fix) ### 📊 Changes **2 files changed** (+45 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/dragon.rs` (+29 -3) 📝 `crates/horizon-client/src/game/lan.rs` (+16 -0) </details> ### 📄 Description Closes #5999 ### Summary When the Ender Dragon is damaged, the server now broadcasts a damage event packet to tracking clients: - In `lan_flush_effects` (`lan.rs`), `self.dragon`'s hurt time is now monitored in `mob_state` alongside standard mobs. When hurt time increments while alive, `host.hub.damage_event` broadcasts the damage event. - Stored `last_source` on `Dragon` to preserve the damage type and attacker cause for the broadcast. - Allowed `remote_dragon_mut` to match either the dragon entity ID or its part IDs. - In `remote_dragon_hurt`, sets `d.hurt_time = 10` (triggering the red flash in `entity.wgsl`) and plays `entity.ender_dragon.hurt`. - Added unit test `a_landed_hurt_sets_the_dragon_hurt_flash_time`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:24:35 +07:00
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#6662
No description provided.