From f56785c2f512eef6eff83687455cbee97ecbcd11 Mon Sep 17 00:00:00 2001 From: Kacpherek Date: Sun, 25 Oct 2026 13:16:16 +0100 Subject: [PATCH] Keep a chunk's scheduled ticks when it unloads before the next tick attach_save_data took a chunk's ticks only from the tick scheduler, which registers new chunks once a tick. A chunk loaded and unloaded again in between was saved with its block and fluid ticks cleared, though its own saved list still held them. --- crates/horizon-client/src/game/persist.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/crates/horizon-client/src/game/persist.rs b/crates/horizon-client/src/game/persist.rs index d3afbf6ce..45ef8801f 100644 --- a/crates/horizon-client/src/game/persist.rs +++ b/crates/horizon-client/src/game/persist.rs @@ -76,15 +76,14 @@ impl Game<'_> { let pos = ChunkPos::new(chunk.x, chunk.z); let time = self.world.game_time; let mut extras: ChunkExtras = chunk.saved.as_deref().cloned().unwrap_or_default(); + // A chunk the scheduler hasn't registered yet (one loaded and + // unloaded again before the next tick) still holds its saved ticks: + // `register_chunk_ticks` empties that list once it takes them. if let Some(t) = self.block_ticks.blocks.chunk(pos) { extras.block_ticks = t.pack(time); - } else { - extras.block_ticks.clear(); } if let Some(t) = self.block_ticks.fluids.chunk(pos) { extras.fluid_ticks = t.pack(time); - } else { - extras.fluid_ticks.clear(); } extras.last_update = time; // TheEndGatewayBlockEntity saves its Age (the server copy's).