diff --git a/crates/horizon-client/src/game/creatures.rs b/crates/horizon-client/src/game/creatures.rs index 2b65a3289..3a4c9bb4a 100644 --- a/crates/horizon-client/src/game/creatures.rs +++ b/crates/horizon-client/src/game/creatures.rs @@ -549,6 +549,9 @@ impl Game<'_> { ..base.clone() }; let m = &mut mobs[i]; + // getCurrentDifficultyAt(blockPosition()): the mob's own chunk, + // not the local player's (a server thread has no player). + w.difficulty = self.local_difficulty([m.position.x, m.position.y, m.position.z]); w.nearest_player = super::natural_spawning::nearest_player( &players, m.position.x, diff --git a/crates/horizon-client/src/mobs.rs b/crates/horizon-client/src/mobs.rs index 00c21633e..57257ca75 100644 --- a/crates/horizon-client/src/mobs.rs +++ b/crates/horizon-client/src/mobs.rs @@ -1503,7 +1503,8 @@ pub struct MobWorld<'a> { pub biomes: &'a crate::biome::Biomes, /// The `mob_griefing` game rule. pub mob_griefing: bool, - /// `getCurrentDifficultyAt` near the player. + /// `getCurrentDifficultyAt` at the mob being ticked (near the player + /// outside the mob tick). pub difficulty: spawning::LocalDifficulty, /// The End (its dimension type's monster spawn light rules). pub end: bool,