[PR #3418] [CLOSED] Burn zombie horses in daylight (#3301) #4968

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3418
Author: @degepie
Created: 10/28/2026
Status: ❌ Closed

Base: main ← Head: fix/issue-3301-zombie-horse-sunburn


📝 Commits (1)

📊 Changes

2 files changed (+17 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/mobs/ai.rs (+16 -1)
📝 crates/horizon-client/src/mobs/species.rs (+1 -0)

📄 Description

🤖 Opened by degepie's AI agent (Claude Code), not by degepie personally.

Fixes #3301.

What

Zombie horses now catch fire in direct sunlight, as they do in vanilla. A zombie horse wearing horse armor (its body slot) is protected, also as in vanilla.

Vanilla

  • data/minecraft/tags/entity_type/burn_in_daylight.json (26.3) lists minecraft:zombie_horse, next to the zombies, skeletons, phantom and zombie nautilus.
  • Mob.aiStep calls Mob.burnUndead for entity types in the burn_in_daylight tag (EntityTypeTags.BURN_IN_DAYLIGHT). AbstractHorse.aiStep → Animal.aiStep → AgeableMob.aiStep → Mob.aiStep, so horses reach it as well.
  • Mob.burnUndead: when isSunBurnTick() is true and the sunProtectionSlot() item is empty, it calls igniteForSeconds(8.0F).
  • ZombieHorse.sunProtectionSlot() returns EquipmentSlot.BODY. The default is HEAD.

How

Def::flags builds burns_in_day (Horizon's mirror of #burn_in_daylight) from a list of species, and Species::ZombieHorse was missing from it. This PR adds it. No other change was needed:

  • The burn in mobs/ai.rs (burns_in_day && alive && sun_burn_tick && extra.head.is_none()) already does the protection check.
  • Equines keep their body slot in extra.head, as Mob::worn_armor and entity_nbt's equine equipment.body load do. So horse armor plays the role of vanilla's BODY protection slot.

I also added a comment there that names sunProtectionSlot, and a unit test (mobs::ai::sun_burn_tests) that checks the zombie horse burns and the skeleton horse and the plain horse don't.

Verified

  • In game, unfixed v0.2.91 (before): set noon and clear weather, then summoned one plain zombie horse and one with equipment:{body:{id:"minecraft:iron_horse_armor"}}. Both stayed at 25 health for 30 s and never caught fire.

  • In game, this branch (after), same commands: the plain zombie horse caught fire within the first 5 s and went 25 → 21 → 17 → 11 → 6 health, then died by about 25 s. The armored one stayed at 25 health and never caught fire.

  • Harness note: I tried a zombie_horse_day_burn scenario in test_mob_ai_parity.py (RNG-traced) and left it out of this PR. Ticks 0–9 match vanilla, including every isSunBurnTick draw and the ignite, and the first fire damage at tick 10 has the same health and hurt sound. After that the scenario diverges because of two gaps that are already there for every equine taking any damage, not because of the burn:

    • Horizon has no AbstractHorse.hurtServer random.nextInt(3) == 0 → standIfPossible() roll.
    • Horizon has no AbstractHorse.isImmobile() (eating or standing skips serverAiStep).

    Those belong in a separate equine-parity fix.

  • The existing skeleton_day_burn mob_ai scenario still matches all 121 ticks.

pr_ready (tools/pr_ready.py --quick on b550, against origin/main at f3d8535fc, 5 min 8 s)

Check Result
Scope ✅ 2 files, +17 −1
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 408 passed (25 s)
rustfmt ✅ (6 s)
clippy ✅ (1 min 28 s)
tests: horizon-client ✅ 1283 passed (2 min 42 s)
doc tests ✅ 0 passed (21 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 ➖ 347 affected, to run in CI (--quick): active_effect_tick, active_effects, ambient_sound, anchor, arrow, attribute_health, attribute_map_queries, attribute, attribute_updates, audio_attributes, auto_jump, bamboo and 335 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 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/3418 **Author:** [@degepie](https://github.com/degepie) **Created:** 10/28/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/issue-3301-zombie-horse-sunburn` --- ### 📝 Commits (1) - [`03cca7f`](https://github.com/horizon-rust/horizon/commit/03cca7fb993b827d27dcba18724d525fb8ea70e4) Burn zombie horses in daylight (#3301) ### 📊 Changes **2 files changed** (+17 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/mobs/ai.rs` (+16 -1) 📝 `crates/horizon-client/src/mobs/species.rs` (+1 -0) </details> ### 📄 Description > 🤖 Opened by degepie's AI agent (Claude Code), not by degepie personally. Fixes #3301. ## What Zombie horses now catch fire in direct sunlight, as they do in vanilla. A zombie horse wearing horse armor (its body slot) is protected, also as in vanilla. ## Vanilla - `data/minecraft/tags/entity_type/burn_in_daylight.json` (26.3) lists `minecraft:zombie_horse`, next to the zombies, skeletons, phantom and zombie nautilus. - `Mob.aiStep` calls `Mob.burnUndead` for entity types in the `burn_in_daylight` tag (`EntityTypeTags.BURN_IN_DAYLIGHT`). `AbstractHorse.aiStep` → `Animal.aiStep` → `AgeableMob.aiStep` → `Mob.aiStep`, so horses reach it as well. - `Mob.burnUndead`: when `isSunBurnTick()` is true and the `sunProtectionSlot()` item is empty, it calls `igniteForSeconds(8.0F)`. - `ZombieHorse.sunProtectionSlot()` returns `EquipmentSlot.BODY`. The default is `HEAD`. ## How `Def::flags` builds `burns_in_day` (Horizon's mirror of `#burn_in_daylight`) from a list of species, and `Species::ZombieHorse` was missing from it. This PR adds it. No other change was needed: - The burn in `mobs/ai.rs` (`burns_in_day && alive && sun_burn_tick && extra.head.is_none()`) already does the protection check. - Equines keep their body slot in `extra.head`, as `Mob::worn_armor` and `entity_nbt`'s equine `equipment.body` load do. So horse armor plays the role of vanilla's `BODY` protection slot. I also added a comment there that names `sunProtectionSlot`, and a unit test (`mobs::ai::sun_burn_tests`) that checks the zombie horse burns and the skeleton horse and the plain horse don't. ## Verified - **In game, unfixed v0.2.91 (before):** set noon and clear weather, then summoned one plain zombie horse and one with `equipment:{body:{id:"minecraft:iron_horse_armor"}}`. Both stayed at 25 health for 30 s and never caught fire. - **In game, this branch (after), same commands:** the plain zombie horse caught fire within the first 5 s and went 25 → 21 → 17 → 11 → 6 health, then died by about 25 s. The armored one stayed at 25 health and never caught fire. - **Harness note:** I tried a `zombie_horse_day_burn` scenario in `test_mob_ai_parity.py` (RNG-traced) and left it out of this PR. Ticks 0–9 match vanilla, including every `isSunBurnTick` draw and the ignite, and the first fire damage at tick 10 has the same health and hurt sound. After that the scenario diverges because of two gaps that are already there for every equine taking any damage, not because of the burn: - Horizon has no `AbstractHorse.hurtServer` `random.nextInt(3) == 0 → standIfPossible()` roll. - Horizon has no `AbstractHorse.isImmobile()` (eating or standing skips `serverAiStep`). Those belong in a separate equine-parity fix. - The existing `skeleton_day_burn` mob_ai scenario still matches all 121 ticks. **pr_ready** (`tools/pr_ready.py --quick` on b550, against origin/main at f3d8535fc, 5 min 8 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +17 −1 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 408 passed (25 s) | | rustfmt | ✅ (6 s) | | clippy | ✅ (1 min 28 s) | | tests: horizon-client | ✅ 1283 passed (2 min 42 s) | | doc tests | ✅ 0 passed (21 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 | ➖ 347 affected, to run in CI (--quick): active_effect_tick, active_effects, ambient_sound, anchor, arrow, attribute_health, attribute_map_queries, attribute, attribute_updates, audio_attributes, auto_jump, bamboo and 335 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 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:09:15 +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#4968
No description provided.