From 94e8c85fd020014cf660800dcad308c941a81a03 Mon Sep 17 00:00:00 2001 From: Kacpherek Date: Tue, 27 Oct 2026 22:29:29 +0100 Subject: [PATCH] Roll a natural salmon's size Salmon.finalizeSpawn picks small 30, medium 50 or large 15; natural spawns kept variant 0, so every salmon rendered small. --- crates/horizon-client/src/mobs/spawning.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/crates/horizon-client/src/mobs/spawning.rs b/crates/horizon-client/src/mobs/spawning.rs index b7930f259..ca31c9ca6 100644 --- a/crates/horizon-client/src/mobs/spawning.rs +++ b/crates/horizon-client/src/mobs/spawning.rs @@ -307,6 +307,17 @@ pub fn finalize(m: &mut Mob, biome: &BiomeFacts, difficulty: &LocalDifficulty) { } S::Fox | S::Panda | S::Dolphin => m.extra.pick_up_loot = true, S::TropicalFish => super::aquatic::finalize(m), + // Salmon.finalizeSpawn: a weighted size (small 30, medium 50, large 15). + S::Salmon => { + let r = m.random.next_int_bound(95).unwrap_or(0); + m.extra.variant = if r < 30 { + 0 + } else if r < 80 { + 1 + } else { + 2 + }; + } S::Slime | S::MagmaCube => super::cube::finalize(m), _ => {} }