From 311c0f7392d45ebf72ed637367d14c98978a614d Mon Sep 17 00:00:00 2001 From: Kacpherek Date: Mon, 26 Oct 2026 11:05:49 +0100 Subject: [PATCH 1/2] Stop endermen teleporting nonstop in the End The End has a fixed time and no precipitation, so endermen there must not flee daylight or take rain damage. --- crates/horizon-client/src/mobs/ai.rs | 2 +- crates/horizon-client/src/mobs/enderman.rs | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/crates/horizon-client/src/mobs/ai.rs b/crates/horizon-client/src/mobs/ai.rs index c9bc15fda..e2043772a 100644 --- a/crates/horizon-client/src/mobs/ai.rs +++ b/crates/horizon-client/src/mobs/ai.rs @@ -521,7 +521,7 @@ fn base_tick(m: &mut Mob, w: &MobWorld, events: &mut Vec) { } if m.kind.flags.water_sensitive - && (m.fluids.in_water || w.raining && w.can_see_sky(ex, ey, ez)) + && (m.fluids.in_water || w.raining && !w.end && w.can_see_sky(ex, ey, ez)) { m.damage(1.0, Damage::of(DamageKind::Drown)); } diff --git a/crates/horizon-client/src/mobs/enderman.rs b/crates/horizon-client/src/mobs/enderman.rs index fcfba832e..85967e96e 100644 --- a/crates/horizon-client/src/mobs/enderman.rs +++ b/crates/horizon-client/src/mobs/enderman.rs @@ -138,9 +138,10 @@ fn teleport_towards( let z = m.position.z + (m.random.next_double() - 0.5) * 8.0 - d[2] * 16.0; teleport_to(m, w, x, y, z, events) } -/// Enderman.customServerAiStep: in daylight, flee by teleporting. +/// Enderman.customServerAiStep: in daylight, flee by teleporting. The End has a +/// fixed time, so `Level.isBrightOutside` is never true there. pub fn custom_server_ai_step(m: &mut Mob, cx: &mut Cx) { - if cx.w.daylight && m.age as i32 >= m.extra.counter + 600 { + if cx.w.daylight && !cx.w.end && m.age as i32 >= m.extra.counter + 600 { let br = super::hostile::mob_brightness(m, cx.w); let (x, y, z) = ( m.position.x.floor() as i32, @@ -185,6 +186,7 @@ pub fn ai_step(m: &mut Mob, w: &MobWorld, events: &mut Vec) { } if (m.fluids.in_water || w.raining + && !w.end && w.can_see_sky( m.position.x.floor() as i32, m.eye_y().floor() as i32, From bde76794eed1b4902a4d13039395a848d819634c Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Mon, 26 Oct 2026 11:37:30 +0100 Subject: [PATCH 2/2] Mobs: no rain or thunder outside the overworld Level.canHaveWeather is false in the Nether and the End, so their rain and thunder levels stay at 0. Set that once in the mob world instead of checking the End at two of the rain sites: bees, dolphins, wolves and happy ghasts read the same flag. Co-Authored-By: Claude Opus 5.5 --- crates/horizon-client/src/game/creatures.rs | 7 +++++-- crates/horizon-client/src/mobs/ai.rs | 2 +- crates/horizon-client/src/mobs/enderman.rs | 1 - 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/crates/horizon-client/src/game/creatures.rs b/crates/horizon-client/src/game/creatures.rs index be7923037..a4be9e484 100644 --- a/crates/horizon-client/src/game/creatures.rs +++ b/crates/horizon-client/src/game/creatures.rs @@ -388,6 +388,9 @@ impl Game<'_> { } pub(super) fn mob_world_base<'s>(&'s self, others: &'s [Seen]) -> MobWorld<'s> { let (rain, thunder) = self.world.weather.levels(1.0); + // Level.canHaveWeather: only the overworld's rain and thunder levels + // ever rise, so nothing rains or thunders in the Nether or the End. + let weather = self.dim == Dim::Overworld; let player = self.player_view(); MobWorld { world: &self.world, @@ -404,8 +407,8 @@ impl Game<'_> { daylight: self.dim != Dim::Nether && self.sky_darken() < 4, game_time: self.world.game_time, day_time: self.world.day_time, - raining: rain > 0.2, - thundering: thunder > 0.9, + raining: weather && rain > 0.2, + thundering: weather && thunder > 0.9, nether: self.dim == Dim::Nether, block_tags: &self.res.items().block_tags, biomes: self.res.biomes(), diff --git a/crates/horizon-client/src/mobs/ai.rs b/crates/horizon-client/src/mobs/ai.rs index e2043772a..c9bc15fda 100644 --- a/crates/horizon-client/src/mobs/ai.rs +++ b/crates/horizon-client/src/mobs/ai.rs @@ -521,7 +521,7 @@ fn base_tick(m: &mut Mob, w: &MobWorld, events: &mut Vec) { } if m.kind.flags.water_sensitive - && (m.fluids.in_water || w.raining && !w.end && w.can_see_sky(ex, ey, ez)) + && (m.fluids.in_water || w.raining && w.can_see_sky(ex, ey, ez)) { m.damage(1.0, Damage::of(DamageKind::Drown)); } diff --git a/crates/horizon-client/src/mobs/enderman.rs b/crates/horizon-client/src/mobs/enderman.rs index 85967e96e..c5ed01680 100644 --- a/crates/horizon-client/src/mobs/enderman.rs +++ b/crates/horizon-client/src/mobs/enderman.rs @@ -186,7 +186,6 @@ pub fn ai_step(m: &mut Mob, w: &MobWorld, events: &mut Vec) { } if (m.fluids.in_water || w.raining - && !w.end && w.can_see_sky( m.position.x.floor() as i32, m.eye_y().floor() as i32,