mirror of
https://github.com/zyllian/classics.git
synced 2025-01-18 11:47:14 -08:00
update blocks as needed on load
This commit is contained in:
parent
728fc156c8
commit
8c96ecbbbd
1 changed files with 10 additions and 0 deletions
10
src/level.rs
10
src/level.rs
|
@ -161,6 +161,16 @@ impl Level {
|
||||||
info.blocks.len()
|
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)
|
Ok(info)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue