diff --git a/crates/horizon-client/src/game/creatures.rs b/crates/horizon-client/src/game/creatures.rs index 3a8562ee1..119fe2a1e 100644 --- a/crates/horizon-client/src/game/creatures.rs +++ b/crates/horizon-client/src/game/creatures.rs @@ -391,6 +391,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, @@ -407,8 +410,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/enderman.rs b/crates/horizon-client/src/mobs/enderman.rs index fcfba832e..c5ed01680 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,