veloren/common/src/terrain/block.rs

22 lines
307 B
Rust
Raw Normal View History

2019-01-14 18:49:53 +00:00
// Crate
use crate::vol::Vox;
#[derive(Copy, Clone, Debug)]
2019-01-02 19:22:01 +00:00
pub struct Block {
kind: u8,
color: [u8; 3],
}
2019-01-14 18:49:53 +00:00
impl Vox for Block {
fn empty() -> Self {
Self {
kind: 0,
color: [0; 3],
}
}
fn is_empty(&self) -> bool {
self.kind == 0
}
}