[GH-ISSUE #3430] Undead mobs with NoAI don't burn in daylight #975

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

Originally created by @degepie on GitHub (Oct 28, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/3430

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

What happens

A zombie (or any other #burn_in_daylight mob) summoned with NoAI:1b never catches fire in direct sunlight. The same mob without NoAI burns.

What vanilla does

Mob.aiStep calls burnUndead for every mob in #minecraft:burn_in_daylight. burnUndead checks isSunBurnTick and the sunProtectionSlot item, then calls igniteForSeconds(8). Nothing on that path checks NoAI or isEffectiveAi: NoAI only skips serverAiStep, and LivingEntity.tick still calls aiStep. So a NoAI zombie in vanilla burns at noon like any other zombie.

Where in Horizon

At origin/main 142388e1c:

  • crates/horizon-client/src/mobs/ai.rs:1047 does the daylight burn inside ai_step.
  • ai.rs:490 skips the whole of ai_step when m.no_ai, running only the endermite's lifetime there.
  • So the burn never runs for a NoAI mob.

How to reproduce (seen in game, current main, server thread)

/time set noon
/weather clear
/summon minecraft:zombie ~3 ~ ~3 {NoAI:1b,PersistenceRequired:1b,Tags:["na"]}
/summon minecraft:zombie ~-3 ~ ~3 {PersistenceRequired:1b,Tags:["ya"]}

Then poll /data get entity @e[tag=na,limit=1] Fire and /data get entity @e[tag=ya,limit=1] Fire.

  • The zombie with AI had Fire 139 within 3 s.
  • The NoAI one stayed at Fire 0 and Health 20 for 18 s at sky light 15 with nothing above it.

Notes

  • The ai.rs:490 gate covers more than vanilla's NoAI does. Some parts of Mob.aiStep/LivingEntity.aiStep aren't AI and still run in vanilla. #2751 rightly found that travel/gravity are gated (by isEffectiveAi); the daylight burn is not. The NoAI zombie-villager cure is a separate issue with the same cause.
  • Not part of this issue, but nearby and not yet tracked as far as I could find. All of these are from code:
    • The burn check at ai.rs:1047 just skips a mob with a head item. Vanilla's burnUndead instead damages a damageable protection item by random.nextInt(2) per burn tick, so helmets wear out in the sun.
    • sun_burn_tick (ai.rs:1158) counts water and rain as wet, but not powder snow. Vanilla's isSunBurnTick also exempts isInPowderSnow/wasInPowderSnow.
  • The list of mobs that burn (no Parched, add wither skeleton and zombie horse) is already handled by open #2345, and for zombie horses by #3418 / #3301.
Originally created by @degepie on GitHub (Oct 28, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/3430 > 🤖 Filed by degepie's AI agent (Claude Code), not by degepie personally. ## What happens A zombie (or any other `#burn_in_daylight` mob) summoned with `NoAI:1b` never catches fire in direct sunlight. The same mob without NoAI burns. ## What vanilla does `Mob.aiStep` calls `burnUndead` for every mob in `#minecraft:burn_in_daylight`. `burnUndead` checks `isSunBurnTick` and the `sunProtectionSlot` item, then calls `igniteForSeconds(8)`. Nothing on that path checks NoAI or `isEffectiveAi`: NoAI only skips `serverAiStep`, and `LivingEntity.tick` still calls `aiStep`. So a NoAI zombie in vanilla burns at noon like any other zombie. ## Where in Horizon At `origin/main` 142388e1c: - `crates/horizon-client/src/mobs/ai.rs:1047` does the daylight burn inside `ai_step`. - `ai.rs:490` skips the whole of `ai_step` when `m.no_ai`, running only the endermite's lifetime there. - So the burn never runs for a NoAI mob. ## How to reproduce (seen in game, current main, server thread) ``` /time set noon /weather clear /summon minecraft:zombie ~3 ~ ~3 {NoAI:1b,PersistenceRequired:1b,Tags:["na"]} /summon minecraft:zombie ~-3 ~ ~3 {PersistenceRequired:1b,Tags:["ya"]} ``` Then poll `/data get entity @e[tag=na,limit=1] Fire` and `/data get entity @e[tag=ya,limit=1] Fire`. - The zombie with AI had `Fire 139` within 3 s. - The NoAI one stayed at `Fire 0` and `Health 20` for 18 s at sky light 15 with nothing above it. ## Notes - The `ai.rs:490` gate covers more than vanilla's NoAI does. Some parts of `Mob.aiStep`/`LivingEntity.aiStep` aren't AI and still run in vanilla. #2751 rightly found that travel/gravity are gated (by `isEffectiveAi`); the daylight burn is not. The NoAI zombie-villager cure is a separate issue with the same cause. - Not part of this issue, but nearby and not yet tracked as far as I could find. All of these are from code: - The burn check at `ai.rs:1047` just skips a mob with a head item. Vanilla's `burnUndead` instead damages a damageable protection item by `random.nextInt(2)` per burn tick, so helmets wear out in the sun. - `sun_burn_tick` (`ai.rs:1158`) counts water and rain as wet, but not powder snow. Vanilla's `isSunBurnTick` also exempts `isInPowderSnow`/`wasInPowderSnow`. - The list of mobs that burn (no Parched, add wither skeleton and zombie horse) is already handled by open #2345, and for zombie horses by #3418 / #3301.
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#975
No description provided.