Default sky light to 15 when out of bounds

This commit is contained in:
Thinkofname 2016-04-03 21:03:56 +01:00
parent 98ecd348c6
commit ed4399a3e6
1 changed files with 1 additions and 1 deletions

View File

@ -783,7 +783,7 @@ impl Chunk {
fn get_sky_light(&self, x: i32, y: i32, z: i32) -> u8 {
let s_idx = y >> 4;
if s_idx < 0 || s_idx > 15 {
return 0;
return 15;
}
match self.sections[s_idx as usize].as_ref() {
Some(sec) => sec.get_sky_light(x, y & 0xF, z),