From a64f24eb5832613e3994bcaf1b502f63e5e3e59a Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Sun, 11 May 2025 19:51:49 +0200 Subject: [PATCH] Fix block data key in `read_blocks` function Updated the `read_blocks` function to retrieve `Data` instead of `BlockData` from the NBT structure. This resolves potential mismatches and ensures compatibility with the expected key in the NBT schema. --- schemsearch-files/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schemsearch-files/src/lib.rs b/schemsearch-files/src/lib.rs index ec2a44d..38b867d 100644 --- a/schemsearch-files/src/lib.rs +++ b/schemsearch-files/src/lib.rs @@ -132,7 +132,7 @@ impl SpongeSchematic { offset: read_offset(nbt.get_i32_vec("Offset").map_err(|e| e.to_string())?)?, palette_max: compute_palette_max(blocks.get_compound_tag("Palette").map_err(|e| e.to_string())?), palette: read_palette(blocks.get_compound_tag("Palette").map_err(|e| e.to_string())?), - block_data: read_blocks(blocks.get_i8_vec("BlockData").map_err(|e| e.to_string())?), + block_data: read_blocks(blocks.get_i8_vec("Data").map_err(|e| e.to_string())?), block_entities: read_tile_entities(blocks.get_compound_tag_vec("BlockEntities").unwrap_or_else(|_| vec![]))?, entities: None, })