From 8c96ecbbbda1b80a5558817078fe0bcf4c7a5de0 Mon Sep 17 00:00:00 2001 From: zyl Date: Sat, 18 Jan 2025 01:07:54 -0800 Subject: [PATCH] update blocks as needed on load --- src/level.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/level.rs b/src/level.rs index 3be9c3a..439ed52 100644 --- a/src/level.rs +++ b/src/level.rs @@ -161,6 +161,16 @@ impl Level { info.blocks.len() ); } + + // queue updates for blocks which didn't update properly before (i.e. for flowing water if fluid_spreads was set to false) + for (i, id) in info.blocks.iter().enumerate() { + if let Some(block) = BLOCK_INFO.get(id) { + if block.block_type.needs_update_on_place() { + info.awaiting_update.insert(i); + } + } + } + Ok(info) } }