[PR #5083] [MERGED] fix(dragon): a wither skull hits the ender dragon's parts and explodes #6050

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

📋 Pull Request Information

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

Base: main ← Head: fix/wither-skull-dragon


📝 Commits (2)

  • 44d5b97 fix(dragon): a wither skull hits the ender dragon's parts and explodes
  • 2138e38 Merge origin/main: keep both the wither skull and firework damage kinds

📊 Changes

9 files changed (+184 additions, -22 deletions)

View changed files

📝 crates/horizon-client/src/game/combat.rs (+3 -0)
📝 crates/horizon-client/src/game/commands/world_cmds.rs (+2 -1)
📝 crates/horizon-client/src/game/creatures.rs (+16 -1)
📝 crates/horizon-client/src/game/dragon.rs (+22 -0)
📝 crates/horizon-client/src/game/wither.rs (+126 -17)
📝 crates/horizon-client/src/mobs.rs (+7 -1)
📝 crates/horizon-client/src/mobs/creaking.rs (+2 -0)
📝 crates/horizon-client/src/mobs/gear.rs (+5 -1)
📝 crates/horizon-client/src/mobs/warden.rs (+1 -1)

📄 Description

What and why

A wither skull that hit a dragon part or an end crystal went through hit_special with 0 damage as thrown, then stopped there
So it never exploded, and the blast is what hurts the dragon when a wither fires at it
Now a skull's hit on a part or crystal goes through wither_skull_hit like any other entity, then the power 1 blast follows
The hit on the part is 8 wither_skull with an owner, 5 magic without one, routed by EnderDragon.hurt (head and neck as is, other parts ÷4 + min(damage, 1), nothing while dying)
A wither's skull takes no health on that hit
Only a player-owned one does, as EnderDragon.hurt asks for a player or #always_hurts_ender_dragons
The skull is no arrow, so a perched dragon doesn't shrug it off
A part is no LivingEntity and is never removed, so no withering and no heal for the owner
The blast names a player owner for the kill credit, the same way a large fireball's does
An end crystal hit by a skull already blew up on main
Now the skull's own blast follows it

Added a WitherSkull damage kind (it's in #is_projectile, not fire) and used it for the owned hit on mobs and players too
Before, mobs took an owned skull as magic, and an unowned one hit players as wither_skull
Endermen now dodge an owned skull, since it's a projectile
A player-owned skull now does 8 instead of 5, since vanilla only asks for a living owner
A skull whose owner is gone or removed deals 5 magic, as getOwner() is null then
An unowned skull's magic hit on a player names no entity and no position, so no mob nearby gets the blame
The skull's owner now heals 5 when the skull kills a player, as a wither already did for mobs
A player owner heals too, since vanilla heals any living owner
A totem that fires is no kill, and an owner at no health doesn't heal
Thorns don't answer a skull hit that kills the player, since doPostAttackEffects only runs on a target that lived
/damage … minecraft:wither_skull mapped to fireball, which is a fire type
It's its own kind now
The skull is now the direct entity in advancement and loot damage checks
A heart-bound creaking reacts to a skull or a wind charge (both are a Projectile direct entity)
A warden takes a skull's hit as indirect

Gaps left
I think a totem that saves the player clears the skull's withering here, since apply_totem clears effects on the next tick
Vanilla applies the totem inside hurtServer, before the skull adds withering
A dangerous (blue) skull's blast doesn't cap block resistance at 0.8 for WitherBoss.canDestroy blocks
That's missing on main for every target
The warden's indirect list still lacks WindCharge (windCharge(charge, owner) isn't direct either)
No game-level test drives a skull into a part and checks the blast, since no test builds a Game
The new tests cover the skull's damage source, the dragon's part cut and owner rule for a skull, and the totem case of the kill check
They don't cover the new routing from projectile_hit into wither_skull_hit or the blast after it

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

WitherSkull.onHitEntity (net/minecraft/world/entity/projectile/hurtingprojectile/WitherSkull.java:59-91): 8 witherSkull(this, owner) with a living owner, else 5 magic, a heal on a kill, withering only on a LivingEntity
WitherSkull.onHit (WitherSkull.java:94-100): explode(this, x, y, z, 1.0F, false, MOB) after super.onHit
Projectile.onHit (net/minecraft/world/entity/projectile/Projectile.java:352-369): onHitEntity first
EnderDragonPart.hurtServer (net/minecraft/world/entity/boss/enderdragon/EnderDragonPart.java:54-56)
EnderDragon.hurt (net/minecraft/world/entity/boss/enderdragon/EnderDragon.java:449-475): dying, onHurt, the part cut, the 0.01 floor, player or ALWAYS_HURTS_ENDER_DRAGONS
AbstractDragonSittingPhase.onHurt (net/minecraft/world/entity/boss/enderdragon/phases/AbstractDragonSittingPhase.java:19-26): only arrows and wind charges are shrugged off
DamageTypeTagsProvider (net/minecraft/data/tags/DamageTypeTagsProvider.java:71-81, :124): wither_skull in #is_projectile, #always_hurts_ender_dragons is #is_explosion
DamageSources.witherSkull, windCharge and explosion (net/minecraft/world/damagesource/DamageSources.java:223-225, :235-237, :255-257)
Explosion.getIndirectSourceEntity (net/minecraft/world/level/Explosion.java:13-24): the skull's blast is a player_explosion with its owner
EndCrystal.hurtServer (net/minecraft/world/entity/boss/enderdragon/EndCrystal.java:89-107)
Entity.isAlive (net/minecraft/world/entity/Entity.java:2318-2320)
LivingEntity.checkTotemDeathProtection (net/minecraft/world/entity/LivingEntity.java:1403-1434)
Enderman.hurtServer (net/minecraft/world/entity/monster/Enderman.java:371-392)
Creaking.hurtServer (net/minecraft/world/entity/monster/creaking/Creaking.java:154-182)
Warden.hurtServer (net/minecraft/world/entity/monster/warden/Warden.java:500-513) and DamageSource.isDirect (net/minecraft/world/damagesource/DamageSource.java:33-35)

New tests only_a_player_owned_wither_skull_takes_the_dragons_health (game/dragon.rs), an_unowned_skull_hurts_as_magic_from_nowhere and a_totem_that_fires_is_no_kill (game/wither.rs)

Other projects' code

none

Self-check

Check Result
Scope ✅ 9 files, +184 −22
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 495 passed (57 s)
rustfmt ✅ (8 s)
clippy ✅ (2 min 0 s)
tests: horizon-client ✅ 1343 passed (5 min 21 s)
doc tests ✅ 0 passed (1 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/5083 **Author:** [@reservedbytes](https://github.com/reservedbytes) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/wither-skull-dragon` --- ### 📝 Commits (2) - [`44d5b97`](https://github.com/horizon-rust/horizon/commit/44d5b972fa185cf3b24fc2efc09e3cf55be8b90f) fix(dragon): a wither skull hits the ender dragon's parts and explodes - [`2138e38`](https://github.com/horizon-rust/horizon/commit/2138e3834956348408e23237a2ce961bd61ba450) Merge origin/main: keep both the wither skull and firework damage kinds ### 📊 Changes **9 files changed** (+184 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/combat.rs` (+3 -0) 📝 `crates/horizon-client/src/game/commands/world_cmds.rs` (+2 -1) 📝 `crates/horizon-client/src/game/creatures.rs` (+16 -1) 📝 `crates/horizon-client/src/game/dragon.rs` (+22 -0) 📝 `crates/horizon-client/src/game/wither.rs` (+126 -17) 📝 `crates/horizon-client/src/mobs.rs` (+7 -1) 📝 `crates/horizon-client/src/mobs/creaking.rs` (+2 -0) 📝 `crates/horizon-client/src/mobs/gear.rs` (+5 -1) 📝 `crates/horizon-client/src/mobs/warden.rs` (+1 -1) </details> ### 📄 Description ## What and why A wither skull that hit a dragon part or an end crystal went through `hit_special` with 0 damage as `thrown`, then stopped there So it never exploded, and the blast is what hurts the dragon when a wither fires at it Now a skull's hit on a part or crystal goes through `wither_skull_hit` like any other entity, then the power 1 blast follows The hit on the part is 8 `wither_skull` with an owner, 5 `magic` without one, routed by `EnderDragon.hurt` (head and neck as is, other parts ÷4 + min(damage, 1), nothing while dying) A wither's skull takes no health on that hit Only a player-owned one does, as `EnderDragon.hurt` asks for a player or `#always_hurts_ender_dragons` The skull is no arrow, so a perched dragon doesn't shrug it off A part is no `LivingEntity` and is never removed, so no withering and no heal for the owner The blast names a player owner for the kill credit, the same way a large fireball's does An end crystal hit by a skull already blew up on `main` Now the skull's own blast follows it Added a `WitherSkull` damage kind (it's in `#is_projectile`, not fire) and used it for the owned hit on mobs and players too Before, mobs took an owned skull as `magic`, and an unowned one hit players as `wither_skull` Endermen now dodge an owned skull, since it's a projectile A player-owned skull now does 8 instead of 5, since vanilla only asks for a living owner A skull whose owner is gone or removed deals 5 `magic`, as `getOwner()` is null then An unowned skull's `magic` hit on a player names no entity and no position, so no mob nearby gets the blame The skull's owner now heals 5 when the skull kills a player, as a wither already did for mobs A player owner heals too, since vanilla heals any living owner A totem that fires is no kill, and an owner at no health doesn't heal Thorns don't answer a skull hit that kills the player, since `doPostAttackEffects` only runs on a target that lived `/damage … minecraft:wither_skull` mapped to `fireball`, which is a fire type It's its own kind now The skull is now the direct entity in advancement and loot damage checks A heart-bound creaking reacts to a skull or a wind charge (both are a `Projectile` direct entity) A warden takes a skull's hit as indirect Gaps left I think a totem that saves the player clears the skull's withering here, since `apply_totem` clears effects on the next tick Vanilla applies the totem inside `hurtServer`, before the skull adds withering A dangerous (blue) skull's blast doesn't cap block resistance at 0.8 for `WitherBoss.canDestroy` blocks That's missing on `main` for every target The warden's indirect list still lacks `WindCharge` (`windCharge(charge, owner)` isn't direct either) No game-level test drives a skull into a part and checks the blast, since no test builds a `Game` The new tests cover the skull's damage source, the dragon's part cut and owner rule for a skull, and the totem case of the kill check They don't cover the new routing from `projectile_hit` into `wither_skull_hit` or the blast after it ## 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 `WitherSkull.onHitEntity` (`net/minecraft/world/entity/projectile/hurtingprojectile/WitherSkull.java:59-91`): 8 `witherSkull(this, owner)` with a living owner, else 5 `magic`, a heal on a kill, withering only on a `LivingEntity` `WitherSkull.onHit` (`WitherSkull.java:94-100`): `explode(this, x, y, z, 1.0F, false, MOB)` after `super.onHit` `Projectile.onHit` (`net/minecraft/world/entity/projectile/Projectile.java:352-369`): `onHitEntity` first `EnderDragonPart.hurtServer` (`net/minecraft/world/entity/boss/enderdragon/EnderDragonPart.java:54-56`) `EnderDragon.hurt` (`net/minecraft/world/entity/boss/enderdragon/EnderDragon.java:449-475`): dying, `onHurt`, the part cut, the 0.01 floor, player or `ALWAYS_HURTS_ENDER_DRAGONS` `AbstractDragonSittingPhase.onHurt` (`net/minecraft/world/entity/boss/enderdragon/phases/AbstractDragonSittingPhase.java:19-26`): only arrows and wind charges are shrugged off `DamageTypeTagsProvider` (`net/minecraft/data/tags/DamageTypeTagsProvider.java:71-81`, `:124`): `wither_skull` in `#is_projectile`, `#always_hurts_ender_dragons` is `#is_explosion` `DamageSources.witherSkull`, `windCharge` and `explosion` (`net/minecraft/world/damagesource/DamageSources.java:223-225`, `:235-237`, `:255-257`) `Explosion.getIndirectSourceEntity` (`net/minecraft/world/level/Explosion.java:13-24`): the skull's blast is a `player_explosion` with its owner `EndCrystal.hurtServer` (`net/minecraft/world/entity/boss/enderdragon/EndCrystal.java:89-107`) `Entity.isAlive` (`net/minecraft/world/entity/Entity.java:2318-2320`) `LivingEntity.checkTotemDeathProtection` (`net/minecraft/world/entity/LivingEntity.java:1403-1434`) `Enderman.hurtServer` (`net/minecraft/world/entity/monster/Enderman.java:371-392`) `Creaking.hurtServer` (`net/minecraft/world/entity/monster/creaking/Creaking.java:154-182`) `Warden.hurtServer` (`net/minecraft/world/entity/monster/warden/Warden.java:500-513`) and `DamageSource.isDirect` (`net/minecraft/world/damagesource/DamageSource.java:33-35`) New tests `only_a_player_owned_wither_skull_takes_the_dragons_health` (`game/dragon.rs`), `an_unowned_skull_hurts_as_magic_from_nowhere` and `a_totem_that_fires_is_no_kill` (`game/wither.rs`) ## Other projects' code none ## Self-check | Check | Result | | --- | --- | | Scope | ✅ 9 files, +184 −22 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 495 passed (57 s) | | rustfmt | ✅ (8 s) | | clippy | ✅ (2 min 0 s) | | tests: horizon-client | ✅ 1343 passed (5 min 21 s) | | doc tests | ✅ 0 passed (1 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:53 +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#6050
No description provided.