diff --git a/assets/world/tree/fruit/1.vox b/assets/world/tree/fruit/1.vox new file mode 100644 index 0000000000..0648a279aa Binary files /dev/null and b/assets/world/tree/fruit/1.vox differ diff --git a/assets/world/tree/fruit/2.vox b/assets/world/tree/fruit/2.vox new file mode 100644 index 0000000000..3369c6c853 Binary files /dev/null and b/assets/world/tree/fruit/2.vox differ diff --git a/assets/world/tree/fruit/3.vox b/assets/world/tree/fruit/3.vox new file mode 100644 index 0000000000..634099a2a4 Binary files /dev/null and b/assets/world/tree/fruit/3.vox differ diff --git a/assets/world/tree/fruit/4.vox b/assets/world/tree/fruit/4.vox new file mode 100644 index 0000000000..742845e60c Binary files /dev/null and b/assets/world/tree/fruit/4.vox differ diff --git a/assets/world/tree/fruit/5.vox b/assets/world/tree/fruit/5.vox new file mode 100644 index 0000000000..b6b682ae48 Binary files /dev/null and b/assets/world/tree/fruit/5.vox differ diff --git a/assets/world/tree/fruit/6.vox b/assets/world/tree/fruit/6.vox new file mode 100644 index 0000000000..936d825a06 Binary files /dev/null and b/assets/world/tree/fruit/6.vox differ diff --git a/common/src/terrain/structure.rs b/common/src/terrain/structure.rs index c84041bf19..4d386c9743 100644 --- a/common/src/terrain/structure.rs +++ b/common/src/terrain/structure.rs @@ -14,6 +14,7 @@ pub enum StructureBlock { PineLeaves, Acacia, PalmLeaves, + Fruit, Block(Block), } @@ -92,6 +93,7 @@ impl Asset for Structure { 1 => StructureBlock::PineLeaves, 2 => StructureBlock::PalmLeaves, 4 => StructureBlock::Acacia, + 7 => StructureBlock::Fruit, index => { let color = palette .get(index as usize) diff --git a/world/src/block/mod.rs b/world/src/block/mod.rs index 9e481f6b2a..8913da883d 100644 --- a/world/src/block/mod.rs +++ b/world/src/block/mod.rs @@ -327,6 +327,11 @@ impl<'a> BlockGen<'a> { ) .map(|e| e as u8), ), + StructureBlock::Fruit => Block::new( + 1, + Lerp::lerp(Rgb::new(255.0, 0.0, 0.0), Rgb::new(200.0, 255.0, 6.0), lerp) + .map(|e| e as u8), + ), StructureBlock::Block(block) => block, } } diff --git a/world/src/block/natural.rs b/world/src/block/natural.rs index f496b355a5..55e1ae80e8 100644 --- a/world/src/block/natural.rs +++ b/world/src/block/natural.rs @@ -54,6 +54,7 @@ pub fn structure_gen<'a>( ForestKind::Palm => &PALMS, ForestKind::Savannah => &ACACIAS, ForestKind::Oak if QUIRKY_RAND.get(st_seed) % 16 == 7 => &OAK_STUMPS, + ForestKind::Oak if QUIRKY_RAND.get(st_seed) % 8 == 7 => &FRUIT_TREES, ForestKind::Oak => &OAKS, ForestKind::Pine => &PINES, ForestKind::SnowPine => &SNOW_PINES, @@ -371,6 +372,16 @@ lazy_static! { st_asset("world/tree/acacia/5.vox", (19, 18, 1)), ]; + pub static ref FRUIT_TREES: Vec> = vec![ + // snow pines + st_asset("world/tree/fruit/1.vox", (5, 5, 7)), + st_asset("world/tree/fruit/2.vox", (5, 5, 7)), + st_asset("world/tree/fruit/3.vox", (5, 5, 7)), + st_asset("world/tree/fruit/4.vox", (5, 5, 7)), + st_asset("world/tree/fruit/5.vox", (5, 5, 7)), + st_asset("world/tree/fruit/6.vox", (5, 5, 7)), + ]; + /* // snow birches -> need roots! assets::load_map("world/tree/snow_birch/1.vox", |s: Structure| s