Applied water layer after structures layer

This commit is contained in:
Joshua Barretto 2019-09-23 14:13:21 +01:00
parent b6e72b0075
commit 5933ae608a

View File

@ -380,8 +380,17 @@ impl<'a> BlockGen<'a> {
let (st, st_sample) = st.as_ref()?;
st.get(wpos, st_sample)
})
.or(block)
.unwrap_or(Block::empty());
.or(block);
// Water
let block = block.or_else(|| {
if (wposf.z as f32) < water_height {
// Ocean
Some(water)
} else {
None
}
});
Some(block)
}