From 47ca0312df721385058e8a7247076bd60f113ebf Mon Sep 17 00:00:00 2001 From: Kacpherek Date: Tue, 27 Oct 2026 21:38:40 +0100 Subject: [PATCH] Skip mod recipe tables until the world resources are loaded On a slow start the title is drawn while the world resources still load. A running mod that reads recipes built its tables every title frame and hit the unloaded resources, which panicked. Fixes #2928. --- crates/horizon-client/src/game/mod_recipes.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/horizon-client/src/game/mod_recipes.rs b/crates/horizon-client/src/game/mod_recipes.rs index b97944e39..726f90145 100644 --- a/crates/horizon-client/src/game/mod_recipes.rs +++ b/crates/horizon-client/src/game/mod_recipes.rs @@ -95,7 +95,9 @@ impl Game<'_> { /// Capability `recipes`'s tables and known displays for this tick's /// snapshot; nothing while no running mod reads them. pub(super) fn mod_recipes(&mut self) -> (Option>, Arc<[i32]>) { - if !self.mods.mods.wants_recipes() { + // The tables come from the world resources, which may still be + // loading behind the title on a slow start. + if !self.mods.mods.wants_recipes() || self.res.rest.get().is_none() { return (None, Arc::from([])); } if self.mods.recipes.is_none() {