From 435cd3b365dd952c1bb6ee03fe0a590f1a3e07ce Mon Sep 17 00:00:00 2001 From: lukas0008 Date: Mon, 12 Aug 2024 20:39:50 +0200 Subject: [PATCH] Remove development things --- pumpkin-world/src/chunk.rs | 2 +- pumpkin-world/src/lib.rs | 2 +- pumpkin-world/src/world.rs | 22 ---------------------- pumpkin-world/test.nbt | Bin 56986 -> 0 bytes pumpkin/src/server.rs | 3 ++- 5 files changed, 4 insertions(+), 25 deletions(-) delete mode 100644 pumpkin-world/test.nbt 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 15c3631335e5b4829d182cf876d3d7d10a36cfc6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 56986 zcmeHQZERcTb$&@v7A1dO(oT~W=_XQ2S36BAiHg%^`C*fk<0x*d+OmgsEgagSWW|c4 zh_oele-cl!<)RDRB5Bp21=1qP>}DN0U>gG0KN@3O0|XfypuqklL4yrTHo%TI6zHGM z-gD0T9`f?)UVc+jYu?0s?)!C~=bZPwm%Qgvyd6pf)w%=ORQ5zhZF*{aGJSL=HJW{B z^u)wOiwb;WXey(ywX01>CZ>)aKb)S-j%UZyT&d9E6gu3xb?bKl)v-5~$sU{@NoCVC zLbbj0oetHJ$62a#~(TT_`bt?2X-AAI6!e^yNDzC&+*_m z1{QPiK$-l{$C3TN4db}k5y$2#tYj5#{Ih-g_a+Y?IJkfJuEcCxdPVke+V7ePzZJ~E@WA#^H~;&2$6Xo z5u*}-jj2gB#-WRkn#n2+#y?`Ps2et)#nM78Xr}(e4=UzG8U0{U^OF#Crm_W#XaQh6 zIGLYBF+ZB%9gR{bQwMC=Cp8d)-2jatO|V7$MA8cv$*W%2CBx{xh5E8l%|d4IkBD=? zyV{)Dr8cGk^;SJX51@Vek4vNl@>DBvN4C+$5YMV|? zq_f#HeNYGnRp9XyF0MlPE3+f%kr`a|;aaR?Xl80UJwum%=$D!s&nVw1TsrC@wu`xu zbb2~7K^KA2XyxsV&7@AIC!FS5CdRX>bu=}R$q(wx56W3QJd+;DWTz(6ho@%pJ@0nw zIX*KrSVB_XBA_32x z-XDC(cH3SjUE#4d>wNcfnIC*eT#a{toeVA4z_@?ed4G-v1^0|HX5D>pO-1+jZ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%$N4eKM6z9ip%OOie1a`Dx7Y=){Tf5k1FR G)c*r-pMW?3 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(), )