From 1a948b43bea3e39f71b716d74e85c59e60fdb661 Mon Sep 17 00:00:00 2001 From: griffi-gh Date: Sat, 28 Jan 2023 23:43:19 +0100 Subject: [PATCH] fix world gen --- src/world/worldgen.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/world/worldgen.rs b/src/world/worldgen.rs index 0e383d4..471055c 100644 --- a/src/world/worldgen.rs +++ b/src/world/worldgen.rs @@ -18,8 +18,8 @@ pub fn generate_world(chunk_position: IVec3, seed: u64) -> BlockData { let mut blocks = Box::new([[[Block::Air; CHUNK_SIZE]; CHUNK_SIZE]; CHUNK_SIZE]); - if chunk_position.y > 0 { - if chunk_position.y == 1 { + if chunk_position.y >= 0 { + if chunk_position.y == 0 { for x in 0..CHUNK_SIZE { for z in 0..CHUNK_SIZE { blocks[x][0][z] = Block::Dirt;