ember sprite

This commit is contained in:
Pfauenauge 2020-04-10 21:08:21 +02:00 committed by Joshua Barretto
parent e98a6063b9
commit 6a7e83d2c1
4 changed files with 19 additions and 4 deletions

Binary file not shown.

View File

@ -40,6 +40,7 @@ pub enum BlockKind {
Fern, Fern,
DeadBush, DeadBush,
Blueberry, Blueberry,
Ember,
} }
impl BlockKind { impl BlockKind {
@ -81,13 +82,14 @@ impl BlockKind {
BlockKind::Fern => true, BlockKind::Fern => true,
BlockKind::DeadBush => true, BlockKind::DeadBush => true,
BlockKind::Blueberry => true, BlockKind::Blueberry => true,
BlockKind::Ember => true,
_ => false, _ => false,
} }
} }
pub fn is_fluid(&self) -> bool { pub fn is_fluid(&self) -> bool {
match self { match self {
BlockKind::Water => true, BlockKind::Water => true,
_ => false, _ => false,
} }
} }
@ -123,7 +125,7 @@ impl BlockKind {
BlockKind::LeafyPlant => false, BlockKind::LeafyPlant => false,
BlockKind::Fern => false, BlockKind::Fern => false,
BlockKind::DeadBush => false, BlockKind::DeadBush => false,
BlockKind::Blueberry => false, BlockKind::Blueberry => false,
_ => true, _ => true,
} }
} }
@ -159,6 +161,7 @@ impl BlockKind {
BlockKind::Fern => false, BlockKind::Fern => false,
BlockKind::DeadBush => false, BlockKind::DeadBush => false,
BlockKind::Blueberry => false, BlockKind::Blueberry => false,
BlockKind::Ember => false,
_ => true, _ => true,
} }
} }
@ -180,7 +183,7 @@ impl BlockKind {
BlockKind::Velorite => true, BlockKind::Velorite => true,
BlockKind::VeloriteFrag => true, BlockKind::VeloriteFrag => true,
BlockKind::Chest => true, BlockKind::Chest => true,
BlockKind::Pumpkin => true, BlockKind::Pumpkin => true,
_ => false, _ => false,
} }
} }

View File

@ -170,6 +170,10 @@ fn sprite_config_for(kind: BlockKind) -> Option<SpriteConfig> {
variations: 4, variations: 4,
wind_sway: 0.1, wind_sway: 0.1,
}), }),
BlockKind::Ember => Some(SpriteConfig {
variations: 1,
wind_sway: 4.0,
}),
_ => None, _ => None,
} }
@ -1066,6 +1070,14 @@ impl<V: RectRasterableVol> Terrain<V> {
Vec3::new(-6.0, -6.0, -0.0), Vec3::new(-6.0, -6.0, -0.0),
), ),
), ),
// Ember
(
(BlockKind::Ember, 0),
make_model(
"voxygen.voxel.sprite.ember.1",
Vec3::new(-6.0, -6.0, -0.0),
),
),
] ]
.into_iter() .into_iter()
.collect(), .collect(),

View File

@ -604,7 +604,7 @@ pub fn block_from_structure(
StructureBlock::Fruit => Some(if field.get(pos + structure_pos) % 3 > 0 { StructureBlock::Fruit => Some(if field.get(pos + structure_pos) % 3 > 0 {
Block::empty() Block::empty()
} else { } else {
Block::new(BlockKind::Apple, Rgb::new(194, 30, 37)) Block::new(BlockKind::Ember, Rgb::new(0, 0, 0))
}), }),
StructureBlock::Chest => Some(if structure_seed % 10 < 7 { StructureBlock::Chest => Some(if structure_seed % 10 < 7 {
Block::empty() Block::empty()