diff options
| author | Ubuntu <github@matdoes.dev> | 2022-09-02 17:22:15 +0000 |
|---|---|---|
| committer | Ubuntu <github@matdoes.dev> | 2022-09-02 17:22:15 +0000 |
| commit | 1dec4f5664c08a9571c0fdbdb81088f1fde821db (patch) | |
| tree | 836cf72a67271b8980aad916ab50e79572352047 /azalea-world/src | |
| parent | 2a775c93fa5ba5aa9ece1e82d4f33b66ed780980 (diff) | |
| download | azalea-drasl-1dec4f5664c08a9571c0fdbdb81088f1fde821db.tar.xz | |
make collision test work*
Diffstat (limited to 'azalea-world/src')
| -rw-r--r-- | azalea-world/src/lib.rs | 5 |
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; } |
