Skip to content

Commit 7905866

Browse files
Fix linter
1 parent 55f34a7 commit 7905866

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

src/server/terrain/util/generator.rs

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ macro_rules! for_each_chunk_coordinate {
1010
#[cfg(feature = "skip_chunk_padding")]
1111
if x == 0
1212
|| x == CHUNK_SIZE + 1
13-
|| y == 0
14-
|| y == CHUNK_SIZE + 1
15-
|| z == 0
16-
|| z == CHUNK_SIZE + 1
13+
|| y == 0
14+
|| y == CHUNK_SIZE + 1
15+
|| z == 0
16+
|| z == CHUNK_SIZE + 1
1717
{
1818
continue;
1919
}
@@ -69,24 +69,23 @@ impl Generator {
6969
let y = position.y as usize;
7070
let z = position.z as usize;
7171

72-
let block = chunk.get_unpadded(x,y,z);
73-
if block == BlockId::Air {
74-
return block;
72+
let block = chunk.get_unpadded(x, y, z);
73+
if block == BlockId::Air {
74+
return block;
7575
}
7676

77-
7877
let mut depth_below_nearest_air = 0;
7978
let depth_check = 5;
8079

8180
for delta_height in 0..depth_check {
8281
if !Chunk::valid_unpadded(x, y + delta_height, z) {
83-
break
82+
break;
8483
}
8584

86-
let block = chunk.get_unpadded(x,y + delta_height,z);
85+
let block = chunk.get_unpadded(x, y + delta_height, z);
8786

8887
if block == BlockId::Air {
89-
break
88+
break;
9089
}
9190

9291
depth_below_nearest_air += 1;
@@ -95,7 +94,7 @@ impl Generator {
9594
match depth_below_nearest_air {
9695
0_i32..=1_i32 => BlockId::Grass,
9796
2..5 => BlockId::Dirt,
98-
_ => BlockId::Stone
97+
_ => BlockId::Stone,
9998
}
10099
}
101100

0 commit comments

Comments
 (0)