mirror of
https://github.com/griffi-gh/kubi.git
synced 2024-12-25 05:08:21 -06:00
Place dirt under trees
This commit is contained in:
parent
7da7a3dc50
commit
5723f07a26
|
@ -242,6 +242,11 @@ pub fn generate_world(chunk_position: IVec3, seed: u64) -> (BlockData, Vec<Queue
|
||||||
}
|
}
|
||||||
//place trees!
|
//place trees!
|
||||||
if rng_map_a[x][z] < 0.001 {
|
if rng_map_a[x][z] < 0.001 {
|
||||||
|
//Replace grass with dirt under the tree
|
||||||
|
if let Some(y) = local_y_position(height, chunk_position) {
|
||||||
|
blocks[x][y][z] = Block::Dirt;
|
||||||
|
}
|
||||||
|
|
||||||
//Place wood (no smart_place needed here!)
|
//Place wood (no smart_place needed here!)
|
||||||
let tree_height = 4 + (rng_map_b[x][z] * 3.).round() as i32;
|
let tree_height = 4 + (rng_map_b[x][z] * 3.).round() as i32;
|
||||||
for tree_y in 0..tree_height {
|
for tree_y in 0..tree_height {
|
||||||
|
|
Loading…
Reference in a new issue