diff --git a/crates/horizon-client/src/game.rs b/crates/horizon-client/src/game.rs index 45068c9d6..62e801f78 100644 --- a/crates/horizon-client/src/game.rs +++ b/crates/horizon-client/src/game.rs @@ -7269,9 +7269,17 @@ impl Game<'_> { .clamp_gui_scale([r.config.width as i32, r.config.height as i32]); } self.streaming.radius = self.settings.render_distance; + // Options.biomeBlendRadius, ambientOcclusion and cutoutLeaves: + // LevelExtractor.allChanged when they change. + let (s, st) = (&self.settings, &self.streaming); + let remesh = (s.biome_blend, s.smooth_lighting, s.cutout_leaves) + != (st.biome_blend, st.smooth_lighting, st.cutout_leaves); self.streaming.biome_blend = self.settings.biome_blend; self.streaming.smooth_lighting = self.settings.smooth_lighting; self.streaming.cutout_leaves = self.settings.cutout_leaves; + if remesh { + self.all_sections_changed(); + } self.audio.master = self.settings.master_volume; horizon_client::hud::GUI_SCALE.store( self.settings.gui_scale, @@ -7279,6 +7287,14 @@ impl Game<'_> { ); self.apply_ui_settings(); } + /// `LevelExtractor.allChanged`: every loaded section is rebuilt. + fn all_sections_changed(&mut self) { + for &(x, z) in self.world.chunks.keys() { + for sy in 0..horizon_client::chunk::HEIGHT / 16 { + self.world.dirty_sections.insert((x, sy, z)); + } + } + } /// Whether precipitation at a column is snow (Biome.coldEnoughToSnow: /// base temperature lowered above y 80) or none (no precipitation). fn precipitation(&self, x: i32, y: i32, z: i32) -> Option { diff --git a/crates/horizon-client/src/game/debug_keys.rs b/crates/horizon-client/src/game/debug_keys.rs index 3e920e60c..0f49cd459 100644 --- a/crates/horizon-client/src/game/debug_keys.rs +++ b/crates/horizon-client/src/game/debug_keys.rs @@ -227,13 +227,7 @@ impl Game<'_> { let player = self.player.is_some() && !self.reduced_debug_info(); match action { DebugAction::ReloadChunks => { - // LevelExtractor.allChanged: every section is rebuilt. - let keys: Vec<(i32, i32)> = self.world.chunks.keys().copied().collect(); - for (x, z) in keys { - for sy in 0..horizon_client::chunk::HEIGHT / 16 { - self.world.dirty_sections.insert((x, sy, z)); - } - } + self.all_sections_changed(); self.debug_translated("debug.reload_chunks.message"); true }