From 785d579f47cbd8d260a16c26aa6787e8089bc901 Mon Sep 17 00:00:00 2001 From: Kacpherek Date: Tue, 27 Oct 2026 22:31:17 +0100 Subject: [PATCH] Stop vines spreading when the spread_vines rule is off VineBlock.randomTick only runs when GameRules.SPREAD_VINES is on; Horizon ignored the rule. --- crates/horizon-client/src/game/chat.rs | 1 + crates/horizon-world/src/level/mod.rs | 2 ++ crates/horizon-world/src/level/tick.rs | 3 ++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/horizon-client/src/game/chat.rs b/crates/horizon-client/src/game/chat.rs index 49ad2be44..c88ae7efe 100644 --- a/crates/horizon-client/src/game/chat.rs +++ b/crates/horizon-client/src/game/chat.rs @@ -992,6 +992,7 @@ impl Game<'_> { spawn_mobs: r.bool("spawn_mobs"), spawn_monsters: r.bool("spawn_monsters"), fire_spread_radius_around_player: r.int("fire_spread_radius_around_player"), + spread_vines: r.bool("spread_vines"), } } /// Apply rules mirrored in other state (natural regeneration, difficulty). diff --git a/crates/horizon-world/src/level/mod.rs b/crates/horizon-world/src/level/mod.rs index f0af584ff..3c308b4f6 100644 --- a/crates/horizon-world/src/level/mod.rs +++ b/crates/horizon-world/src/level/mod.rs @@ -183,6 +183,7 @@ pub struct GameRules { pub spawn_monsters: bool, /// `fire_spread_radius_around_player`: -1 spreads everywhere. pub fire_spread_radius_around_player: i32, + pub spread_vines: bool, } impl Default for GameRules { fn default() -> Self { @@ -196,6 +197,7 @@ impl Default for GameRules { spawn_mobs: true, spawn_monsters: true, fire_spread_radius_around_player: 128, + spread_vines: true, } } } diff --git a/crates/horizon-world/src/level/tick.rs b/crates/horizon-world/src/level/tick.rs index d0af71808..0a7172719 100644 --- a/crates/horizon-world/src/level/tick.rs +++ b/crates/horizon-world/src/level/tick.rs @@ -1152,7 +1152,8 @@ impl Sim<'_, L> { let b = self.b; let p = b.props; let block = b.block(state); - if self.rand_int(4) != 0 { + // The spread_vines rule, checked before the roll. + if !self.level.game_rules().spread_vines || self.rand_int(4) != 0 { return; } let direction = Direction::ALL[self.rand_int(6) as usize];