aboutsummaryrefslogtreecommitdiff
path: root/azalea-world/src/world.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-05-06 09:28:28 -1030
committermat <git@matdoes.dev>2025-05-07 06:00:29 +1000
commitaf3affb467c01ee2880fbbc366ea0420c0580ab8 (patch)
treef8619a19b927f18cdf18445890f65cedb9773f58 /azalea-world/src/world.rs
parent68f657310bf7f69f7f9dd0476ca9c04da191ab33 (diff)
downloadazalea-drasl-af3affb467c01ee2880fbbc366ea0420c0580ab8.tar.xz
fix chunk errors when joining a world with a same name but different height
Diffstat (limited to 'azalea-world/src/world.rs')
-rw-r--r--azalea-world/src/world.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/azalea-world/src/world.rs b/azalea-world/src/world.rs
index a650f152..4b2b2a19 100644
--- a/azalea-world/src/world.rs
+++ b/azalea-world/src/world.rs
@@ -41,6 +41,12 @@ impl PartialInstance {
entity_infos: PartialEntityInfos::new(owner_entity),
}
}
+
+ /// Clears the internal references to chunks in the PartialInstance and
+ /// resets the view center.
+ pub fn reset(&mut self) {
+ self.chunks = PartialChunkStorage::new(self.chunks.chunk_radius);
+ }
}
/// An entity ID used by Minecraft.