[PR #2567] [MERGED] Check rain at the mob's position, not the global weather #4433

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2567
Author: @kacpherek
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/27/2026
Merged by: @ludovic111

Base: main ← Head: fix/rain-at-mobs


📝 Commits (1)

  • b5794fa Check rain at the mob's position, not the global weather

📊 Changes

7 files changed (+38 additions, -43 deletions)

View changed files

📝 crates/horizon-client/src/mobs/ai.rs (+16 -15)
📝 crates/horizon-client/src/mobs/aquatic.rs (+1 -1)
📝 crates/horizon-client/src/mobs/enderman.rs (+1 -9)
📝 crates/horizon-client/src/mobs/happy_ghast.rs (+3 -2)
📝 crates/horizon-client/src/mobs/species.rs (+1 -1)
📝 crates/horizon-client/src/mobs/tame.rs (+1 -6)
📝 crates/horizon-client/src/mobs/world.rs (+15 -9)

📄 Description

What and why

Mobs checked the world's global raining flag (plus sky light) where vanilla asks whether it rains at the entity's own position. That ignored snow and dry biomes, and roofs that block the rain. This uses MobWorld::raining_at from #2196 in all of these places:

  • Water sensitive mobs (enderman, blaze, snow golem) are hurt in rain only where it rains. Striders were missing from the water sensitive list, so they now take water and rain damage too.
  • An enderman teleports away from rain only where it rains.
  • Dolphins stay moist, and wolves get wet, only where it rains.
  • Undead no longer count as wet from rain that does not fall at their spot.
  • A burning mob is put out by rain, with the extinguish sound.
  • A happy ghast heals fast in rain or snow at its position (Level.precipitationAt), not just any rain with sky light.

Mobs tick the same code on the server thread, so a single player world and guests behave the same.

Vanilla reference

  • Entity.isInRain, Entity.isInWaterOrRain, Entity.baseTick (clearFire in rain)
  • LivingEntity.baseTick (isSensitiveToWater && isInWaterOrRain), Strider.isSensitiveToWater
  • Mob.isSunBurnTick, Dolphin.tick, Wolf.aiStep
  • HappyGhast.continuousHeal, Level.precipitationAt

Self-check

cargo check -p horizon-client passes.


🔄 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/2567 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/rain-at-mobs` --- ### 📝 Commits (1) - [`b5794fa`](https://github.com/horizon-rust/horizon/commit/b5794fa5b38775b620fc8222b7ab3f2b1dd9f6cb) Check rain at the mob's position, not the global weather ### 📊 Changes **7 files changed** (+38 additions, -43 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/mobs/ai.rs` (+16 -15) 📝 `crates/horizon-client/src/mobs/aquatic.rs` (+1 -1) 📝 `crates/horizon-client/src/mobs/enderman.rs` (+1 -9) 📝 `crates/horizon-client/src/mobs/happy_ghast.rs` (+3 -2) 📝 `crates/horizon-client/src/mobs/species.rs` (+1 -1) 📝 `crates/horizon-client/src/mobs/tame.rs` (+1 -6) 📝 `crates/horizon-client/src/mobs/world.rs` (+15 -9) </details> ### 📄 Description ## What and why Mobs checked the world's global raining flag (plus sky light) where vanilla asks whether it rains at the entity's own position. That ignored snow and dry biomes, and roofs that block the rain. This uses `MobWorld::raining_at` from #2196 in all of these places: - Water sensitive mobs (enderman, blaze, snow golem) are hurt in rain only where it rains. Striders were missing from the water sensitive list, so they now take water and rain damage too. - An enderman teleports away from rain only where it rains. - Dolphins stay moist, and wolves get wet, only where it rains. - Undead no longer count as wet from rain that does not fall at their spot. - A burning mob is put out by rain, with the extinguish sound. - A happy ghast heals fast in rain or snow at its position (`Level.precipitationAt`), not just any rain with sky light. Mobs tick the same code on the server thread, so a single player world and guests behave the same. ## Vanilla reference - `Entity.isInRain`, `Entity.isInWaterOrRain`, `Entity.baseTick` (clearFire in rain) - `LivingEntity.baseTick` (`isSensitiveToWater && isInWaterOrRain`), `Strider.isSensitiveToWater` - `Mob.isSunBurnTick`, `Dolphin.tick`, `Wolf.aiStep` - `HappyGhast.continuousHeal`, `Level.precipitationAt` ## Self-check `cargo check -p horizon-client` passes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:17:06 +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#4433
No description provided.