core/region_processor: sort processed block entities

Make the block entity list more reproducible when the stored chunk order
changes.
This commit is contained in:
Matthias Schiffer 2023-11-26 12:27:43 +01:00
parent e36ae4601d
commit 7740ce0522
Signed by: neocturne
GPG key ID: 16EF3F64CB201D9C

View file

@ -195,11 +195,13 @@ impl<'a> SingleRegionProcessor<'a> {
/// Saves processed entity data /// Saves processed entity data
/// ///
/// The timestamp is the time of the last modification of the input region data. /// The timestamp is the time of the last modification of the input region data.
fn save_entities(&self) -> Result<()> { fn save_entities(&mut self) -> Result<()> {
if !self.entities_needed { if !self.entities_needed {
return Ok(()); return Ok(());
} }
self.entities.block_entities.sort_unstable();
storage::write_file( storage::write_file(
&self.entities_path, &self.entities_path,
&self.entities, &self.entities,