Skip to content

Commit c89fa00

Browse files
committed
Choose more sane default values for light levels
1 parent 1605738 commit c89fa00

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

feather/base/src/chunk/light.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,13 @@ impl Default for LightStore {
1616
}
1717

1818
impl LightStore {
19-
/// Creates a `LightStore` with all light set to 15.
19+
/// Creates a `LightStore` with sky light set to 15.
2020
pub fn new() -> Self {
2121
let mut this = LightStore {
2222
block_light: PackedArray::new(SECTION_VOLUME, 4),
2323
sky_light: PackedArray::new(SECTION_VOLUME, 4),
2424
};
25-
fill_with_default_light(&mut this.block_light);
26-
fill_with_default_light(&mut this.sky_light);
25+
this.sky_light.fill(15);
2726
this
2827
}
2928

@@ -73,9 +72,3 @@ impl LightStore {
7372
&self.sky_light
7473
}
7574
}
76-
77-
fn fill_with_default_light(arr: &mut PackedArray) {
78-
for i in 0..arr.len() {
79-
arr.set(i, 15);
80-
}
81-
}

0 commit comments

Comments
 (0)