diff options
| author | mat <git@matdoes.dev> | 2023-08-01 02:38:49 -0500 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2023-08-01 02:38:49 -0500 |
| commit | 68f01625cc151e57c3639c430da5d47cccf5e39f (patch) | |
| tree | be640ed25b2b495d10bf107302a180bf731e98ca /azalea-world/src/iterators.rs | |
| parent | b762d1dfb28f2e166e5c3b185a12d7b5a6b53885 (diff) | |
| download | azalea-drasl-68f01625cc151e57c3639c430da5d47cccf5e39f.tar.xz | |
improve Instance::find_block
Diffstat (limited to 'azalea-world/src/iterators.rs')
| -rw-r--r-- | azalea-world/src/iterators.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/azalea-world/src/iterators.rs b/azalea-world/src/iterators.rs index 4054bfe0..c7290781 100644 --- a/azalea-world/src/iterators.rs +++ b/azalea-world/src/iterators.rs @@ -181,7 +181,7 @@ pub struct ChunkIterator { pub max_distance: u32, pub start: ChunkPos, pub pos: ChunkPos, - pub layer: i32, + pub layer: u32, pub leg: i32, } impl ChunkIterator { @@ -235,7 +235,7 @@ impl Iterator for ChunkIterator { self.pos.x += 1; self.leg = 0; self.layer += 1; - if self.layer == self.max_distance as i32 { + if self.layer == self.max_distance { return None; } } |
