Initial commit: Terrafier v0.1.0
- Core world model (World, Dimension, Tile, Terrain, Platform) - NBT reader/writer with full tag support - Anvil region (.mca) format reader with chunk parsing - Block palette compression and export - Biome database with Minecraft 1.21 biomes - CLI commands: new, import, export, info, render - GUI application with egui (viewport, tools, undo/redo) - Noise-based heightmap generation and editing operations License: GPL-3.0-or-later
This commit is contained in:
commit
91835402b3
94 changed files with 12372 additions and 0 deletions
26
core/src/model/terrain.rs
Executable file
26
core/src/model/terrain.rs
Executable file
|
|
@ -0,0 +1,26 @@
|
|||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub enum Terrain {
|
||||
Desert,
|
||||
Grass,
|
||||
Forest,
|
||||
Rock,
|
||||
Sand,
|
||||
Swamp,
|
||||
Water,
|
||||
}
|
||||
|
||||
impl Terrain {
|
||||
pub fn name(&self) -> &'static str {
|
||||
match self {
|
||||
Terrain::Desert => "Desert",
|
||||
Terrain::Grass => "Grass",
|
||||
Terrain::Forest => "Forest",
|
||||
Terrain::Rock => "Rock",
|
||||
Terrain::Sand => "Sand",
|
||||
Terrain::Swamp => "Swamp",
|
||||
Terrain::Water => "Water",
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue