tree stumps, shorter pines

This commit is contained in:
Pfauenauge90 2019-06-10 20:17:35 +02:00 committed by Joshua Barretto
parent 00e970bbeb
commit 22e0dbe227
23 changed files with 30 additions and 2 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -165,7 +165,7 @@ impl<'a> Sampler for BlockGen<'a> {
Vec3::new(tree_pos.x, tree_pos.y, tree_sample.alt as i32);
let rpos = wpos - tree_pos3d;
block.or(TREES[*tree_seed as usize % TREES.len()]
.get((rpos * 160) / 128) // Scaling
.get((rpos * 160) / 160) // Scaling
.map(|b| b.clone())
.unwrap_or(Block::empty()))
}

View File

@ -4,7 +4,7 @@ use std::sync::Arc;
use vek::*;
lazy_static! {
pub static ref TREES: [Arc<Structure>; 81] = [
pub static ref TREES: [Arc<Structure>; 90] = [
// green oaks
assets::load_map("world/tree/oak_green/1.vox", |s: Structure| s
.with_center(Vec3::new(15, 18, 14)))
@ -33,6 +33,34 @@ lazy_static! {
assets::load_map("world/tree/oak_green/9.vox", |s: Structure| s
.with_center(Vec3::new(26, 26, 14)))
.unwrap(),
// oak stumps
assets::load_map("world/tree/oak_stump/1.vox", |s: Structure| s
.with_center(Vec3::new(15, 18, 10)))
.unwrap(),
assets::load_map("world/tree/oak_stump/2.vox", |s: Structure| s
.with_center(Vec3::new(15, 18, 10)))
.unwrap(),
assets::load_map("world/tree/oak_stump/3.vox", |s: Structure| s
.with_center(Vec3::new(16, 20, 10)))
.unwrap(),
assets::load_map("world/tree/oak_stump/4.vox", |s: Structure| s
.with_center(Vec3::new(18, 21, 10)))
.unwrap(),
assets::load_map("world/tree/oak_stump/5.vox", |s: Structure| s
.with_center(Vec3::new(18, 18, 10)))
.unwrap(),
assets::load_map("world/tree/oak_stump/6.vox", |s: Structure| s
.with_center(Vec3::new(16, 21, 10)))
.unwrap(),
assets::load_map("world/tree/oak_stump/7.vox", |s: Structure| s
.with_center(Vec3::new(20, 19, 10)))
.unwrap(),
assets::load_map("world/tree/oak_stump/8.vox", |s: Structure| s
.with_center(Vec3::new(22, 20, 10)))
.unwrap(),
assets::load_map("world/tree/oak_stump/9.vox", |s: Structure| s
.with_center(Vec3::new(26, 26, 10)))
.unwrap(),
// green pines
assets::load_map("world/tree/pine_green/1.vox", |s: Structure| s
.with_center(Vec3::new(15, 15, 14)))