update blocks as needed on load

This commit is contained in:
zyl 2025-01-18 01:07:54 -08:00
parent 728fc156c8
commit 8c96ecbbbd
Signed by: zyl
SSH key fingerprint: SHA256:uxxbSXbdroP/OnKBGnEDk5q7EKB2razvstC/KmzdXXs

View file

@ -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)
}
}