[PR #4749] [MERGED] Finish dragon killing blow, lightning item bystanders and look-at entity form (parity) #5826

Closed
opened 2026-11-03 05:15:16 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4749
Author: @levzzz5154
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @levzzz5154

Base: main ← Head: parity/R-server


📝 Commits (1)

  • b307359 KilledTrigger (dragon), LightningStrikeTrigger (items), ClientboundPlayerLookAtPacket (entity form): finish the partial ports

📊 Changes

7 files changed (+185 additions, -36 deletions)

View changed files

📝 crates/horizon-client/src/game/advancements.rs (+10 -0)
📝 crates/horizon-client/src/game/commands.rs (+66 -9)
📝 crates/horizon-client/src/game/control.rs (+6 -1)
📝 crates/horizon-client/src/game/creatures.rs (+13 -2)
📝 crates/horizon-client/src/game/dragon.rs (+40 -10)
📝 crates/horizon-client/src/game/lightning.rs (+44 -13)
📝 crates/horizon-client/src/game/wind.rs (+6 -1)

📄 Description

🤖 Opened by levzzz5154's AI agent (Claude Code, Claude Sonnet 5.5), not by levzzz5154 personally.

Part of #3520

Finishes three rows that earlier PRs ported only partly.

Rows

  • KilledTrigger (dragon): the dragon's death now passes the killing blow to player_killed_entity. The last hit the dragon took is kept with its damage type and whether a player was behind it (hit_special takes a DamageKind instead of the arrow flag: player attack, arrow, fireball/thrown, wind charge; crystal blasts are explosion with the crystal as the direct entity), and award_dragon_kill builds the DamageView from it, so killing_blow predicates match.
  • LightningStrikeTrigger.trigger (items): dropped item entities in the 15/15/21 box are bystanders too (getEntities is every alive entity not in hitEntities); the items in the strike box are remembered per bolt (hit_items) the way hitEntities holds them. The three box tests share one in_viewer_box.
  • ClientboundPlayerLookAtPacket (entity form): the entity form is sent for every target with a network id: players (the hub's entity id for the host and guests), items, orbs, projectiles, stands, frames, paintings, boats, carts, other entities, crystals and the dragon. A player whose id is out of reach during a guest's turn falls back to the point form, as before.

Vanilla followed

LivingEntity.die / EnderDragon.hurt / KilledTrigger, LightningBolt.tick (viewers, hitEntities), LightningStrikeTrigger.trigger, ClientboundPlayerLookAtPacket + LookAt.LookAtEntity.perform.

Tests

game::lightning::viewer_tests, game::commands::look_at_tests; the dragon kill path needs a whole Game, so it is covered by compiling against the changed call sites. fmt and clippy -D warnings pass; harnesses left to CI.

🤖 Generated with Claude Code


🔄 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/4749 **Author:** [@levzzz5154](https://github.com/levzzz5154) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `parity/R-server` --- ### 📝 Commits (1) - [`b307359`](https://github.com/horizon-rust/horizon/commit/b307359409dce1bcf07d4892f02c6f634539d5f6) KilledTrigger (dragon), LightningStrikeTrigger (items), ClientboundPlayerLookAtPacket (entity form): finish the partial ports ### 📊 Changes **7 files changed** (+185 additions, -36 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/advancements.rs` (+10 -0) 📝 `crates/horizon-client/src/game/commands.rs` (+66 -9) 📝 `crates/horizon-client/src/game/control.rs` (+6 -1) 📝 `crates/horizon-client/src/game/creatures.rs` (+13 -2) 📝 `crates/horizon-client/src/game/dragon.rs` (+40 -10) 📝 `crates/horizon-client/src/game/lightning.rs` (+44 -13) 📝 `crates/horizon-client/src/game/wind.rs` (+6 -1) </details> ### 📄 Description > 🤖 Opened by levzzz5154's AI agent (Claude Code, Claude Sonnet 5.5), not by levzzz5154 personally. Part of #3520 Finishes three rows that earlier PRs ported only partly. ## Rows - `KilledTrigger (dragon)`: the dragon's death now passes the killing blow to `player_killed_entity`. The last hit the dragon took is kept with its damage type and whether a player was behind it (`hit_special` takes a `DamageKind` instead of the `arrow` flag: player attack, arrow, fireball/thrown, wind charge; crystal blasts are `explosion` with the crystal as the direct entity), and `award_dragon_kill` builds the `DamageView` from it, so `killing_blow` predicates match. - `LightningStrikeTrigger.trigger (items)`: dropped item entities in the 15/15/21 box are bystanders too (`getEntities` is every alive entity not in `hitEntities`); the items in the strike box are remembered per bolt (`hit_items`) the way `hitEntities` holds them. The three box tests share one `in_viewer_box`. - `ClientboundPlayerLookAtPacket (entity form)`: the entity form is sent for every target with a network id: players (the hub's entity id for the host and guests), items, orbs, projectiles, stands, frames, paintings, boats, carts, other entities, crystals and the dragon. A player whose id is out of reach during a guest's turn falls back to the point form, as before. ## Vanilla followed `LivingEntity.die` / `EnderDragon.hurt` / `KilledTrigger`, `LightningBolt.tick` (viewers, `hitEntities`), `LightningStrikeTrigger.trigger`, `ClientboundPlayerLookAtPacket` + `LookAt.LookAtEntity.perform`. ## Tests `game::lightning::viewer_tests`, `game::commands::look_at_tests`; the dragon kill path needs a whole `Game`, so it is covered by compiling against the changed call sites. fmt and clippy `-D warnings` pass; harnesses left to CI. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:15:16 +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#5826
No description provided.