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:
parent
5dd35c7ed8
commit
5ce830ae6c
2 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue