diff options
| author | mat <git@matdoes.dev> | 2025-06-11 16:55:33 +1100 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-06-11 16:55:33 +1100 |
| commit | 9b0bd29db4faa9d94df0cec472346b814e7efcb9 (patch) | |
| tree | 4f681b5143eb5ebe69a0b5b53125ea7509f8026a /azalea-world/src/world.rs | |
| parent | 2a6ac0764fe9975f9b16d495ce773e4ae1f097e0 (diff) | |
| download | azalea-drasl-9b0bd29db4faa9d94df0cec472346b814e7efcb9.tar.xz | |
take BlockPos instead of &BlockPos in all function arguments
Diffstat (limited to 'azalea-world/src/world.rs')
| -rw-r--r-- | azalea-world/src/world.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/azalea-world/src/world.rs b/azalea-world/src/world.rs index 3e6359ff..89132a73 100644 --- a/azalea-world/src/world.rs +++ b/azalea-world/src/world.rs @@ -171,11 +171,11 @@ pub struct Instance { } impl Instance { - pub fn get_block_state(&self, pos: &BlockPos) -> Option<BlockState> { + pub fn get_block_state(&self, pos: BlockPos) -> Option<BlockState> { self.chunks.get_block_state(pos) } - pub fn get_fluid_state(&self, pos: &BlockPos) -> Option<FluidState> { + pub fn get_fluid_state(&self, pos: BlockPos) -> Option<FluidState> { self.chunks.get_block_state(pos).map(FluidState::from) } @@ -187,11 +187,11 @@ impl Instance { /// Note that biomes are internally stored as 4x4x4 blocks, so if you're /// writing code that searches for a specific biome it'll probably be more /// efficient to avoid scanning every single block. - pub fn get_biome(&self, pos: &BlockPos) -> Option<Biome> { + pub fn get_biome(&self, pos: BlockPos) -> Option<Biome> { self.chunks.get_biome(pos) } - pub fn set_block_state(&self, pos: &BlockPos, state: BlockState) -> Option<BlockState> { + pub fn set_block_state(&self, pos: BlockPos, state: BlockState) -> Option<BlockState> { self.chunks.set_block_state(pos, state) } } |
