kubi/src/world/worldgen.rs

16 lines
413 B
Rust
Raw Normal View History

use glam::IVec3;
use super::{
chunk::{BlockData, CHUNK_SIZE},
block::Block
};
2023-01-22 20:41:04 -06:00
pub fn generate_world(_position: IVec3, _seed: u32) -> BlockData {
let mut blocks = Box::new([[[Block::Air; CHUNK_SIZE]; CHUNK_SIZE]; CHUNK_SIZE]);
blocks[0][0][0] = Block::Stone;
2023-01-22 20:24:43 -06:00
blocks[1][0][0] = Block::Stone;
blocks[0][1][0] = Block::Stone;
blocks[0][0][1] = Block::Stone;
//TODO actual world generation
blocks
}