aboutsummaryrefslogtreecommitdiff
path: root/azalea-world/src
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-world/src')
-rw-r--r--azalea-world/src/lib.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/azalea-world/src/lib.rs b/azalea-world/src/lib.rs
index 32b4b82f..2d65ebc8 100644
--- a/azalea-world/src/lib.rs
+++ b/azalea-world/src/lib.rs
@@ -52,6 +52,11 @@ impl Dimension {
self.chunk_storage.replace_with_packet_data(pos, data)
}
+ pub fn set_chunk(&mut self, pos: &ChunkPos, chunk: Option<Chunk>) -> Result<(), BufReadError> {
+ self[pos] = chunk.map(|c| Arc::new(Mutex::new(c)));
+ Ok(())
+ }
+
pub fn update_view_center(&mut self, pos: &ChunkPos) {
self.chunk_storage.view_center = *pos;
}