This commit is contained in:
Piotrek
2021-05-06 15:38:51 +02:00
parent 5b1ca38d75
commit 45362afbf4
7 changed files with 26 additions and 30 deletions
+2 -1
View File
@@ -32,10 +32,11 @@ impl World {
// Generate block for chunk
let chunk = self.chunks.get_mut(block_pos).unwrap();
let block = chunk.get_block(&bl_pos);
WorldGen::generate(block);
WorldGen::generate(&bl_pos, block);
block
}
#[allow(unused)]
pub fn get_block(&mut self, block_pos: &Point3<u32>) -> Option<&WorldBlock> {
// Split world space to chunk and block space
let ch_pos = block_pos / chunk::SIZE;