Remove development things

This commit is contained in:
lukas0008 2024-08-12 20:39:50 +02:00
parent 7a5984984f
commit 435cd3b365
5 changed files with 4 additions and 25 deletions

View File

@ -47,7 +47,7 @@ struct PaletteEntry {
#[derive(serde::Deserialize, Debug, Clone)] #[derive(serde::Deserialize, Debug, Clone)]
struct ChunkSectionBlockStates { struct ChunkSectionBlockStates {
data: Option<LongArray>, // TODO: see if you can use u32 here data: Option<LongArray>,
palette: Vec<PaletteEntry>, palette: Vec<PaletteEntry>,
} }

View File

@ -1,7 +1,7 @@
pub mod chunk; pub mod chunk;
pub mod dimension; pub mod dimension;
pub const WORLD_HEIGHT: usize = 384; pub const WORLD_HEIGHT: usize = 384;
pub const WORLD_Y_START_AT: i32 = -64; // TODO: make sure where it actually starts at (i think its at -64 but not sure) pub const WORLD_Y_START_AT: i32 = -64;
pub const DIRECT_PALETTE_BITS: u32 = 15; pub const DIRECT_PALETTE_BITS: u32 = 15;
mod world; mod world;
mod block_registry; mod block_registry;

View File

@ -209,13 +209,6 @@ impl Level {
return ((old_chunk_x, old_chunk_z), Err(WorldError::ZlibError(err))) return ((old_chunk_x, old_chunk_z), Err(WorldError::ZlibError(err)))
} }
} }
// TODO: remove
// File::create_new(format!("./test-{}.{}.nbt", old_chunk_x, old_chunk_z))
// .await
// .unwrap()
// .write_all(&chunk_data)
// .await
// .unwrap();
( (
(old_chunk_x, old_chunk_z), (old_chunk_x, old_chunk_z),
@ -228,18 +221,3 @@ impl Level {
.collect_vec() .collect_vec()
} }
} }
#[test]
fn wawa() {
tokio::runtime::Runtime::new().unwrap().block_on(async {
Dimension::OverWorld
.into_level(
"C:\\Users\\lukza\\Desktop\\code\\rust\\vanilla_mc_server\\world"
.parse()
.unwrap(),
)
.read_chunk((0, 0))
.await
.unwrap();
});
}

Binary file not shown.

View File

@ -328,7 +328,8 @@ impl Server {
} }
let chunks = Dimension::OverWorld let chunks = Dimension::OverWorld
.into_level( .into_level(
"C:\\Users\\lukza\\Desktop\\code\\rust\\vanilla_mc_server\\world" // TODO: load form config
"./world"
.parse() .parse()
.unwrap(), .unwrap(),
) )