1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 14:26:04 +00:00

merge main

This commit is contained in:
mat 2023-03-08 16:35:12 +00:00
parent 5dd35c7ed8
commit 5ce830ae6c
2 changed files with 2 additions and 2 deletions

View file

@ -73,7 +73,7 @@ impl Iterator for BlockIterator {
let x = self.pos.x * self.right;
let y = self.pos.y * ((self.apothem as i32) - self.left);
let z = self.pos.z * ((self.apothem as i32) - (i32::abs(x) + i32::abs(y)));
Some(BlockPos { x: x, y, z } + self.start)
Some(BlockPos { x, y, z } + self.start)
}
}

View file

@ -242,7 +242,7 @@ impl Instance {
let this_block_pos = BlockPos { x, y, z };
let this_block_distance = (nearest_to - this_block_pos).length_manhattan();
// only update if it's closer
if !nearest_found_pos.is_some()
if nearest_found_pos.is_none()
|| this_block_distance < nearest_found_distance
{
nearest_found_pos = Some(this_block_pos);