Skip to content

Commit 7c7e418

Browse files
authored
Merge pull request #502 from Schuwi/fix_block_light
Set more sane default values for light levels
2 parents 122f433 + c89fa00 commit 7c7e418

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)