diff --git a/pumpkin-world/src/chunk.rs b/pumpkin-world/src/chunk.rs index fcb1b3dd8..c3ebeddba 100644 --- a/pumpkin-world/src/chunk.rs +++ b/pumpkin-world/src/chunk.rs @@ -47,7 +47,7 @@ struct PaletteEntry { #[derive(serde::Deserialize, Debug, Clone)] struct ChunkSectionBlockStates { - data: Option, // TODO: see if you can use u32 here + data: Option, palette: Vec, } diff --git a/pumpkin-world/src/lib.rs b/pumpkin-world/src/lib.rs index 98b0d4701..dd42f3e46 100644 --- a/pumpkin-world/src/lib.rs +++ b/pumpkin-world/src/lib.rs @@ -1,7 +1,7 @@ pub mod chunk; pub mod dimension; 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; mod world; mod block_registry; diff --git a/pumpkin-world/src/world.rs b/pumpkin-world/src/world.rs index 6d689f24d..7f5d2ce88 100644 --- a/pumpkin-world/src/world.rs +++ b/pumpkin-world/src/world.rs @@ -209,13 +209,6 @@ impl Level { 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), @@ -228,18 +221,3 @@ impl Level { .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(); - }); -} diff --git a/pumpkin-world/test.nbt b/pumpkin-world/test.nbt deleted file mode 100644 index 15c363133..000000000 Binary files a/pumpkin-world/test.nbt and /dev/null differ diff --git a/pumpkin/src/server.rs b/pumpkin/src/server.rs index aa6876bb7..134d7bfa1 100644 --- a/pumpkin/src/server.rs +++ b/pumpkin/src/server.rs @@ -328,7 +328,8 @@ impl Server { } let chunks = Dimension::OverWorld .into_level( - "C:\\Users\\lukza\\Desktop\\code\\rust\\vanilla_mc_server\\world" + // TODO: load form config + "./world" .parse() .unwrap(), )