[PR #3780] [CLOSED] Commands: /kill completes dragon fight and matches multipart entity IDs #5214

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3780
Author: @echo-ilovech3ss
Created: 10/29/2026
Status: ❌ Closed

Base: main ← Head: fix/ender-dragon-kill-command


📝 Commits (2)

  • 72d2cc8 Commands: /kill completes dragon fight and matches multipart entity IDs
  • fae2a55 Merge branch 'main' into fix/ender-dragon-kill-command and drop id == 0 matching

📊 Changes

2 files changed (+43 additions, -4 deletions)

View changed files

📝 crates/horizon-client/src/game/commands.rs (+3 -3)
📝 crates/horizon-client/src/game/dragon.rs (+40 -1)

📄 Description

What and Why

Fixes #3319.

The /kill command reported success but did not kill the Ender Dragon because kill_dragon removed the entity (self.dragon = None) without invoking dragon_killed, so tick_fight immediately respawned a new dragon on the subsequent tick. Furthermore, Target::Dragon only matched the exact root entity ID, ignoring multipart sub-entity hits.

In vanilla Minecraft Java Edition (EnderDragon.kill), killing the dragon via /kill marks the fight completed without triggering the 200-tick death flight.

Changes

  • crates/horizon-client/src/game/dragon.rs: Added matches_id to match the body ID, unassigned ID (0), and multipart sub-entity IDs (id + 1..=id + 8). Updated kill_dragon to call self.dragon_killed() when in the End. Added unit tests.
  • crates/horizon-client/src/game/commands.rs: Updated dragon target matching to use d.matches_id(id).

Checks

  • cargo test -p horizon-client --bin horizon-client -- dragon: 8/8 tests pass.
  • python3 tools/check_public_tree.py: passed.

🔄 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/3780 **Author:** [@echo-ilovech3ss](https://github.com/echo-ilovech3ss) **Created:** 10/29/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/ender-dragon-kill-command` --- ### 📝 Commits (2) - [`72d2cc8`](https://github.com/horizon-rust/horizon/commit/72d2cc85ea3196b8f5ea76c3f51ba02dcce4518b) Commands: /kill completes dragon fight and matches multipart entity IDs - [`fae2a55`](https://github.com/horizon-rust/horizon/commit/fae2a554e99ee24e489d61eeba70a1432536fd22) Merge branch 'main' into fix/ender-dragon-kill-command and drop id == 0 matching ### 📊 Changes **2 files changed** (+43 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/commands.rs` (+3 -3) 📝 `crates/horizon-client/src/game/dragon.rs` (+40 -1) </details> ### 📄 Description ### What and Why Fixes #3319. The `/kill` command reported success but did not kill the Ender Dragon because `kill_dragon` removed the entity (`self.dragon = None`) without invoking `dragon_killed`, so `tick_fight` immediately respawned a new dragon on the subsequent tick. Furthermore, `Target::Dragon` only matched the exact root entity ID, ignoring multipart sub-entity hits. In vanilla Minecraft Java Edition (`EnderDragon.kill`), killing the dragon via `/kill` marks the fight completed without triggering the 200-tick death flight. ### Changes - `crates/horizon-client/src/game/dragon.rs`: Added `matches_id` to match the body ID, unassigned ID (0), and multipart sub-entity IDs (`id + 1..=id + 8`). Updated `kill_dragon` to call `self.dragon_killed()` when in the End. Added unit tests. - `crates/horizon-client/src/game/commands.rs`: Updated dragon target matching to use `d.matches_id(id)`. ### Checks - `cargo test -p horizon-client --bin horizon-client -- dragon`: 8/8 tests pass. - `python3 tools/check_public_tree.py`: passed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:11:00 +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#5214
No description provided.