@@ -10,10 +10,10 @@ macro_rules! for_each_chunk_coordinate {
10
10
#[ cfg( feature = "skip_chunk_padding" ) ]
11
11
if x == 0
12
12
|| 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
17
17
{
18
18
continue ;
19
19
}
@@ -69,24 +69,23 @@ impl Generator {
69
69
let y = position. y as usize ;
70
70
let z = position. z as usize ;
71
71
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;
75
75
}
76
76
77
-
78
77
let mut depth_below_nearest_air = 0 ;
79
78
let depth_check = 5 ;
80
79
81
80
for delta_height in 0 ..depth_check {
82
81
if !Chunk :: valid_unpadded ( x, y + delta_height, z) {
83
- break
82
+ break ;
84
83
}
85
84
86
- let block = chunk. get_unpadded ( x, y + delta_height, z) ;
85
+ let block = chunk. get_unpadded ( x, y + delta_height, z) ;
87
86
88
87
if block == BlockId :: Air {
89
- break
88
+ break ;
90
89
}
91
90
92
91
depth_below_nearest_air += 1 ;
@@ -95,7 +94,7 @@ impl Generator {
95
94
match depth_below_nearest_air {
96
95
0_i32 ..=1_i32 => BlockId :: Grass ,
97
96
2 ..5 => BlockId :: Dirt ,
98
- _ => BlockId :: Stone
97
+ _ => BlockId :: Stone ,
99
98
}
100
99
}
101
100
0 commit comments