1
0
Mirror von https://github.com/Chaoscaot/schemsearch synchronisiert 2024-11-19 10:20:08 +01:00
Dieser Commit ist enthalten in:
Chaoscaot 2023-04-22 21:03:00 +02:00
Ursprung a47c2f44bd
Commit 9a0b0535c6
3 geänderte Dateien mit 1 neuen und 28 gelöschten Zeilen

Datei anzeigen

@ -8,6 +8,4 @@ edition = "2021"
[dependencies]
flate2 = "1.0.25"
hematite-nbt = "0.5.2"
serde = "1.0.152"
serde_json = "1.0.84"

Datei anzeigen

@ -7,6 +7,4 @@ license = "AGPL-3.0-or-later"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
hematite-nbt = "0.5.2"
serde = "1.0.152"
schemsearch-files = { path = "../schemsearch-files" }

Datei anzeigen

@ -17,7 +17,6 @@
pub mod pattern_mapper;
use serde::{Deserialize, Serialize};
use pattern_mapper::match_palette;
use schemsearch_files::SchematicVersioned;
use crate::pattern_mapper::match_palette_adapt;
@ -136,7 +135,7 @@ pub fn normalize_data(data: &str, ignore_data: bool) -> &str {
#[cfg(test)]
mod tests {
use std::path::{Path, PathBuf};
use serde::de::Unexpected::Map;
use schemsearch_files::SchematicVersioned::V2;
use schemsearch_files::SpongeV2Schematic;
use crate::pattern_mapper::strip_data;
use super::*;
@ -245,26 +244,4 @@ mod tests {
println!("{:?}", matches);
assert_eq!(matches.len(), 1);
}
#[test]
pub fn testsezi() {
let schematic = SchematicVersioned::V2(SpongeV2Schematic {
data_version: 0,
metadata: nbt::Map::new(),
width: 16,
height: 16,
length: 16,
offset: [0; 3],
palette_max: 0,
palette: nbt::Map::new(),
block_data: vec![],
entities: Some(vec![]),
block_entities: vec![],
});
println!("{:?}", schematic);
println!("{}", serde_json::to_string_pretty(&schematic).unwrap());
}
}