[PR #4939] [MERGED] fix(dragon): parts refuse fire and a perched dragon shrugs off wind charges #5958

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4939
Author: @reservedbytes
Created: 10/31/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @rdbtCVS

Base: main ← Head: fix/dragon-fire-and-wind-charge


📝 Commits (1)

  • 27888dc fix(dragon): parts refuse fire and a perched dragon shrugs off wind charges

📊 Changes

4 files changed (+125 additions, -18 deletions)

View changed files

📝 crates/horizon-client/src/game/control.rs (+1 -0)
📝 crates/horizon-client/src/game/creatures.rs (+16 -4)
📝 crates/horizon-client/src/game/dragon.rs (+107 -14)
📝 crates/horizon-client/src/game/wind.rs (+1 -0)

📄 Description

What and why

The ender dragon's type is fire immune, and its parts refuse fire damage before the dragon sees it (EnderDragonPart.hurtServer returns false from isInvulnerableToBase)
Horizon let a fireball's hit through, so a fireball a player sent back took 6 from the head or neck and 2.5 from the other parts
A dragon part now refuses every #minecraft:is_fire damage, before the part's damage cut and the phase's onHurt, and the caller sees the hit refused
A large fireball that hits a part or crystal still explodes, as LargeFireball.onHit does after onHitEntity, and that blast still hurts the dragon like any explosion
Before this, a large fireball that hit a part never exploded
End crystals are fire immune too, so a fireball's hit no longer blows one up with the crystal's own blast
A small fireball now leaves a crystal standing, and a large fireball's blast takes it without a second blast
The blast names the fireball's owner, so a dragon killed by a fireball a player sent back still credits that player

A perched dragon takes no damage from a direct arrow or a direct WindCharge (AbstractDragonSittingPhase.onHurt)
Horizon only checked arrows, so a player's wind charge hurt a perched dragon
The check now looks at the projectile that hit: arrows, tridents and the player's wind charge are shrugged off, a breeze's BreezeWindCharge is not a WindCharge and still lands
The wind charge still bursts after the hit, as AbstractWindCharge.onHitEntity explodes either way

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • bug: a crash or a breakage
  • perf: faster, or less memory
  • feature: something new for players (listed under New in the release notes)
  • extra: Horizon-only, off by default
  • tooling: tools, CI, tests, harnesses
  • docs

Vanilla reference

EnderDragonPart.hurtServer (world/entity/boss/enderdragon/EnderDragonPart.java:54-55): isInvulnerableToBase before EnderDragon.hurt
Entity.isInvulnerableToBase (world/entity/Entity.java:3124-3128): #is_fire with fireImmune() is refused
The part takes the dragon's type (EnderDragonPart.java:23), which is fireImmune() (world/entity/EntityTypes.java:395-398), and #is_fire holds fireball and unattributed_fireball
LargeFireball.onHit (world/entity/projectile/hurtingprojectile/LargeFireball.java:32-38) explodes after onHitEntity (:42-50), whatever the hit returned
EndCrystal.hurtServer (world/entity/boss/enderdragon/EndCrystal.java:89-105) starts with isInvulnerableToBase, and the crystal's type is fireImmune() (world/entity/EntityTypes.java:407-416)
An explosion removes a crystal without its own blast (EndCrystal.java:97), so a large fireball's blast (LargeFireball.java:36) takes it once
Explosion.getDefaultDamageSource (world/level/Explosion.java:13-22): a projectile's blast names its owner
AbstractDragonSittingPhase.onHurt (world/entity/boss/enderdragon/phases/AbstractDragonSittingPhase.java:19-25): a direct AbstractArrow or WindCharge brings the damage to 0
WindCharge and BreezeWindCharge are both AbstractWindCharge, neither extends the other (world/entity/projectile/hurtingprojectile/windcharge/WindCharge.java:23, BreezeWindCharge.java:12)
AbstractWindCharge.onHitEntity (AbstractWindCharge.java:78-94) explodes whatever the hurt returned

Self-check

The one failure is a_swimming_passenger_sits_up_even_when_standing_does_not_fit (motion.rs), it fails on main too with prepared data (since #4662)

Check Result
Scope ✅ 4 files, +125 −18
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 486 passed (51 s)
rustfmt ✅ (8 s)
clippy ✅ (2 min 2 s)
tests: horizon-client ❌ 905 passed, 1 failed (4 min 4 s)
doc tests ✅ 0 passed (2 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🔄 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/4939 **Author:** [@reservedbytes](https://github.com/reservedbytes) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `fix/dragon-fire-and-wind-charge` --- ### 📝 Commits (1) - [`27888dc`](https://github.com/horizon-rust/horizon/commit/27888dc18dee9e4cc0a83a05f54497b328d5c59a) fix(dragon): parts refuse fire and a perched dragon shrugs off wind charges ### 📊 Changes **4 files changed** (+125 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/control.rs` (+1 -0) 📝 `crates/horizon-client/src/game/creatures.rs` (+16 -4) 📝 `crates/horizon-client/src/game/dragon.rs` (+107 -14) 📝 `crates/horizon-client/src/game/wind.rs` (+1 -0) </details> ### 📄 Description ## What and why The ender dragon's type is fire immune, and its parts refuse fire damage before the dragon sees it (`EnderDragonPart.hurtServer` returns false from `isInvulnerableToBase`) Horizon let a fireball's hit through, so a fireball a player sent back took 6 from the head or neck and 2.5 from the other parts A dragon part now refuses every `#minecraft:is_fire` damage, before the part's damage cut and the phase's `onHurt`, and the caller sees the hit refused A large fireball that hits a part or crystal still explodes, as `LargeFireball.onHit` does after `onHitEntity`, and that blast still hurts the dragon like any explosion Before this, a large fireball that hit a part never exploded End crystals are fire immune too, so a fireball's hit no longer blows one up with the crystal's own blast A small fireball now leaves a crystal standing, and a large fireball's blast takes it without a second blast The blast names the fireball's owner, so a dragon killed by a fireball a player sent back still credits that player A perched dragon takes no damage from a direct arrow or a direct `WindCharge` (`AbstractDragonSittingPhase.onHurt`) Horizon only checked arrows, so a player's wind charge hurt a perched dragon The check now looks at the projectile that hit: arrows, tridents and the player's wind charge are shrugged off, a breeze's `BreezeWindCharge` is not a `WindCharge` and still lands The wind charge still bursts after the hit, as `AbstractWindCharge.onHitEntity` explodes either way ## Kind - [x] parity: Horizon now does what vanilla 26.3 does - [ ] bug: a crash or a breakage - [ ] perf: faster, or less memory - [ ] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [ ] tooling: tools, CI, tests, harnesses - [ ] docs ## Vanilla reference `EnderDragonPart.hurtServer` (`world/entity/boss/enderdragon/EnderDragonPart.java:54-55`): `isInvulnerableToBase` before `EnderDragon.hurt` `Entity.isInvulnerableToBase` (`world/entity/Entity.java:3124-3128`): `#is_fire` with `fireImmune()` is refused The part takes the dragon's type (`EnderDragonPart.java:23`), which is `fireImmune()` (`world/entity/EntityTypes.java:395-398`), and `#is_fire` holds `fireball` and `unattributed_fireball` `LargeFireball.onHit` (`world/entity/projectile/hurtingprojectile/LargeFireball.java:32-38`) explodes after `onHitEntity` (`:42-50`), whatever the hit returned `EndCrystal.hurtServer` (`world/entity/boss/enderdragon/EndCrystal.java:89-105`) starts with `isInvulnerableToBase`, and the crystal's type is `fireImmune()` (`world/entity/EntityTypes.java:407-416`) An explosion removes a crystal without its own blast (`EndCrystal.java:97`), so a large fireball's blast (`LargeFireball.java:36`) takes it once `Explosion.getDefaultDamageSource` (`world/level/Explosion.java:13-22`): a projectile's blast names its owner `AbstractDragonSittingPhase.onHurt` (`world/entity/boss/enderdragon/phases/AbstractDragonSittingPhase.java:19-25`): a direct `AbstractArrow` or `WindCharge` brings the damage to 0 `WindCharge` and `BreezeWindCharge` are both `AbstractWindCharge`, neither extends the other (`world/entity/projectile/hurtingprojectile/windcharge/WindCharge.java:23`, `BreezeWindCharge.java:12`) `AbstractWindCharge.onHitEntity` (`AbstractWindCharge.java:78-94`) explodes whatever the hurt returned ## Self-check The one failure is `a_swimming_passenger_sits_up_even_when_standing_does_not_fit` (`motion.rs`), it fails on `main` too with prepared data (since #4662) | Check | Result | | --- | --- | | Scope | ✅ 4 files, +125 −18 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 486 passed (51 s) | | rustfmt | ✅ (8 s) | | clippy | ✅ (2 min 2 s) | | tests: horizon-client | ❌ 905 passed, 1 failed (4 min 4 s) | | doc tests | ✅ 0 passed (2 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:16:13 +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#5958
No description provided.