diff options
| author | mat <git@matdoes.dev> | 2023-10-02 19:57:13 -0500 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2023-10-02 19:57:13 -0500 |
| commit | 985327241d341caf2ce357955cb46657cfa303cb (patch) | |
| tree | 285f7b4a1d07707c7de1e308b54d9fb2110aaf6a /azalea-world/src | |
| parent | 7b10e5cd7e80be85f7b0517f941b175e733d3fc4 (diff) | |
| download | azalea-drasl-985327241d341caf2ce357955cb46657cfa303cb.tar.xz | |
yet another W for linear searches
Diffstat (limited to 'azalea-world/src')
| -rwxr-xr-x | azalea-world/src/chunk_storage.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/azalea-world/src/chunk_storage.rs b/azalea-world/src/chunk_storage.rs index ce611a61..acf0cf22 100755 --- a/azalea-world/src/chunk_storage.rs +++ b/azalea-world/src/chunk_storage.rs @@ -397,7 +397,7 @@ impl McBufWritable for Section { } impl Section { - fn get(&self, pos: ChunkSectionBlockPos) -> BlockState { + pub fn get(&self, pos: ChunkSectionBlockPos) -> BlockState { // TODO: use the unsafe method and do the check earlier let state = self .states @@ -406,7 +406,7 @@ impl Section { BlockState::try_from(state).unwrap_or(BlockState::AIR) } - fn get_and_set(&mut self, pos: ChunkSectionBlockPos, state: BlockState) -> BlockState { + pub fn get_and_set(&mut self, pos: ChunkSectionBlockPos, state: BlockState) -> BlockState { let previous_state = self.states .get_and_set(pos.x as usize, pos.y as usize, pos.z as usize, state.id); @@ -414,7 +414,7 @@ impl Section { BlockState::try_from(previous_state).unwrap_or(BlockState::AIR) } - fn set(&mut self, pos: ChunkSectionBlockPos, state: BlockState) { + pub fn set(&mut self, pos: ChunkSectionBlockPos, state: BlockState) { self.states .set(pos.x as usize, pos.y as usize, pos.z as usize, state.id); } |
