chore: update linear format from v1 to v2
This commit is contained in:
parent
2b4e3bb332
commit
9dd9754b4e
7
Cargo.lock
generated
7
Cargo.lock
generated
@ -3051,6 +3051,7 @@ dependencies = [
|
||||
"tokio-util",
|
||||
"tracing",
|
||||
"uuid",
|
||||
"xxhash-rust",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -5516,6 +5517,12 @@ version = "0.6.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4"
|
||||
|
||||
[[package]]
|
||||
name = "xxhash-rust"
|
||||
version = "0.8.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fdd20c5420375476fbd4394763288da7eb0cc0b8c11deed431a91562af7335d3"
|
||||
|
||||
[[package]]
|
||||
name = "yoke"
|
||||
version = "0.8.2"
|
||||
|
||||
@ -18,7 +18,7 @@ pub enum ChunkConfig {
|
||||
|
||||
impl Default for ChunkConfig {
|
||||
fn default() -> Self {
|
||||
Self::Anvil(AnvilChunkConfig::default())
|
||||
Self::Linear(LinearChunkConfig::default())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -41,6 +41,7 @@ dashmap.workspace = true
|
||||
flate2.workspace = true
|
||||
lz4-java-wrc.workspace = true
|
||||
ruzstd.workspace = true
|
||||
xxhash-rust = { version = "0.8", features = ["xxh64"] }
|
||||
|
||||
itertools.workspace = true
|
||||
enum_dispatch.workspace = true
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,4 @@
|
||||
use crate::chunk::format::linear::LinearV2File;
|
||||
use crate::chunk_system::{ChunkListener, ChunkLoading, GenerationSchedule, LevelChannel};
|
||||
use crate::generation::generator::VanillaGenerator;
|
||||
use crate::lighting::DynamicLightEngine;
|
||||
@ -6,7 +7,7 @@ use crate::{
|
||||
block::{RawBlockState, entities::BlockEntity},
|
||||
chunk::{
|
||||
ChunkData, ChunkEntityData, ChunkReadingError,
|
||||
format::{anvil::AnvilChunkFile, linear::LinearFile},
|
||||
format::anvil::AnvilChunkFile,
|
||||
io::{Dirtiable, FileIO, LoadedData, file_manager::ChunkFileManager},
|
||||
palette::has_random_ticking_fluid,
|
||||
},
|
||||
@ -163,16 +164,16 @@ impl Level {
|
||||
|
||||
let chunk_saver: Arc<dyn FileIO<Data = SyncChunk>> = match &level_config.chunk {
|
||||
ChunkConfig::Linear(config) => Arc::new(
|
||||
ChunkFileManager::<LinearFile<ChunkData>>::new(config.clone()),
|
||||
ChunkFileManager::<LinearV2File<ChunkData>>::new(config.clone()),
|
||||
),
|
||||
ChunkConfig::Anvil(config) => Arc::new(
|
||||
ChunkFileManager::<AnvilChunkFile<ChunkData>>::new(config.clone()),
|
||||
),
|
||||
};
|
||||
let entity_saver: Arc<dyn FileIO<Data = SyncEntityChunk>> = match &level_config.chunk {
|
||||
ChunkConfig::Linear(config) => Arc::new(
|
||||
ChunkFileManager::<LinearFile<ChunkEntityData>>::new(config.clone()),
|
||||
),
|
||||
ChunkConfig::Linear(config) => Arc::new(ChunkFileManager::<
|
||||
LinearV2File<ChunkEntityData>,
|
||||
>::new(config.clone())),
|
||||
ChunkConfig::Anvil(config) => Arc::new(ChunkFileManager::<
|
||||
AnvilChunkFile<ChunkEntityData>,
|
||||
>::new(config.clone())),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user