From b31b2d344e244baa735b7a144b7f71c056712438 Mon Sep 17 00:00:00 2001 From: Joey Sacchini Date: Fri, 1 Jan 2021 17:08:56 -0500 Subject: make the type for 1.15.2 packet smaller (4k+ -> a few hundred bytes) --- src/v1_15_2.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/v1_15_2.rs b/src/v1_15_2.rs index fae1cb8..fef7ce0 100644 --- a/src/v1_15_2.rs +++ b/src/v1_15_2.rs @@ -2449,7 +2449,7 @@ pub struct ChunkData { pub position: ChunkPosition, pub primary_bit_mask: VarInt, pub heightmaps: NamedNbtTag, - pub biomes: Option<[i32; 1024]>, + pub biomes: Option>, pub data: CountedArray, pub block_entities: Vec, } @@ -2464,7 +2464,7 @@ impl Serialize for ChunkData { if full_chunk { let biomes = self.biomes.as_ref().unwrap(); - for elem in biomes { + for elem in biomes.iter() { to.serialize_other(elem)?; } } @@ -2511,7 +2511,7 @@ impl Deserialize for ChunkData { position, primary_bit_mask, heightmaps, - biomes, + biomes: biomes.map(move |b| Box::new(b)), data: chunk_data, block_entities, }, data) -- cgit