diff options
Diffstat (limited to 'azalea-entity/src')
| -rw-r--r-- | azalea-entity/src/lib.rs | 4 | ||||
| -rw-r--r-- | azalea-entity/src/plugin/mod.rs | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/azalea-entity/src/lib.rs b/azalea-entity/src/lib.rs index 0f33e01e..7b971c27 100644 --- a/azalea-entity/src/lib.rs +++ b/azalea-entity/src/lib.rs @@ -106,10 +106,10 @@ pub fn on_pos(offset: f32, chunk_storage: &ChunkStorage, pos: &Position) -> Bloc // TODO: check if block below is a fence, wall, or fence gate let block_pos = pos.down(1); - let block_state = chunk_storage.get_block_state(&block_pos); + let block_state = chunk_storage.get_block_state(block_pos); if block_state == Some(BlockState::AIR) { let block_pos_below = block_pos.down(1); - let block_state_below = chunk_storage.get_block_state(&block_pos_below); + let block_state_below = chunk_storage.get_block_state(block_pos_below); if let Some(_block_state_below) = block_state_below { // if block_state_below.is_fence() // || block_state_below.is_wall() diff --git a/azalea-entity/src/plugin/mod.rs b/azalea-entity/src/plugin/mod.rs index 03afe7cd..e64f9823 100644 --- a/azalea-entity/src/plugin/mod.rs +++ b/azalea-entity/src/plugin/mod.rs @@ -103,7 +103,7 @@ pub fn update_fluid_on_eyes( let eye_block_pos = BlockPos::from(Vec3::new(position.x, adjusted_eye_y, position.z)); let fluid_at_eye = instance .read() - .get_fluid_state(&eye_block_pos) + .get_fluid_state(eye_block_pos) .unwrap_or_default(); let fluid_cutoff_y = (eye_block_pos.y as f32 + fluid_at_eye.height()) as f64; if fluid_cutoff_y > adjusted_eye_y { @@ -134,7 +134,7 @@ pub fn update_on_climbable( let instance = instance.read(); let block_pos = BlockPos::from(position); - let block_state_at_feet = instance.get_block_state(&block_pos).unwrap_or_default(); + let block_state_at_feet = instance.get_block_state(block_pos).unwrap_or_default(); let block_at_feet = Box::<dyn azalea_block::BlockTrait>::from(block_state_at_feet); let registry_block_at_feet = block_at_feet.as_registry_block(); @@ -159,7 +159,7 @@ fn is_trapdoor_useable_as_ladder( // block below must be a ladder let block_below = instance - .get_block_state(&block_pos.down(1)) + .get_block_state(block_pos.down(1)) .unwrap_or_default(); let registry_block_below = Box::<dyn azalea_block::BlockTrait>::from(block_below).as_registry_block(); @@ -255,7 +255,7 @@ mod tests { &mut chunks, ); partial_instance.chunks.set_block_state( - &BlockPos::new(0, 0, 0), + BlockPos::new(0, 0, 0), azalea_registry::Block::Stone.into(), &chunks, ); @@ -266,7 +266,7 @@ mod tests { }; partial_instance .chunks - .set_block_state(&BlockPos::new(0, 0, 0), ladder.into(), &chunks); + .set_block_state(BlockPos::new(0, 0, 0), ladder.into(), &chunks); let trapdoor = OakTrapdoor { facing: FacingCardinal::East, @@ -277,12 +277,12 @@ mod tests { }; partial_instance .chunks - .set_block_state(&BlockPos::new(0, 1, 0), trapdoor.into(), &chunks); + .set_block_state(BlockPos::new(0, 1, 0), trapdoor.into(), &chunks); let instance = Instance::from(chunks); let trapdoor_matches_ladder = is_trapdoor_useable_as_ladder( instance - .get_block_state(&BlockPos::new(0, 1, 0)) + .get_block_state(BlockPos::new(0, 1, 0)) .unwrap_or_default(), BlockPos::new(0, 1, 0), &instance, |
