mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-07-04 06:39:07 +02:00
Split up BlockInfo type
By storing block types and depth values separately, the processed world data can be compressed better, decreasing data size by ~10%.
This commit is contained in:
parent
0b392d7a3a
commit
31eb92864c
4 changed files with 45 additions and 43 deletions
|
@ -1,14 +1,18 @@
|
|||
use std::path::{Path, PathBuf};
|
||||
|
||||
use minedmap::{types::*, world};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use minedmap::{types::*, world::layer};
|
||||
|
||||
pub type RegionCoords = (i32, i32);
|
||||
pub type ProcessedRegion = ChunkArray<
|
||||
Option<(
|
||||
Box<world::layer::BlockInfoArray>,
|
||||
Box<world::layer::BiomeArray>,
|
||||
)>,
|
||||
>;
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct ProcessedChunk {
|
||||
pub blocks: Box<layer::BlockArray>,
|
||||
pub biomes: Box<layer::BiomeArray>,
|
||||
pub depths: Box<layer::DepthArray>,
|
||||
}
|
||||
pub type ProcessedRegion = ChunkArray<Option<ProcessedChunk>>;
|
||||
|
||||
pub struct Config {
|
||||
pub region_dir: PathBuf,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue