From 1bccbeeb3375e932980a16fa4e3d7ee4130b9ba8 Mon Sep 17 00:00:00 2001 From: trivernis Date: Tue, 4 Jan 2022 16:12:16 +0100 Subject: [PATCH] Update data and dependencies Signed-off-by: trivernis --- Cargo.toml | 14 +++++++------- minecraft-data | 2 +- src/api/biomes.rs | 1 - src/data/datapaths.rs | 2 +- src/data/mod.rs | 8 ++++++++ src/models/block_loot.rs | 2 +- src/models/food.rs | 2 +- 7 files changed, 19 insertions(+), 12 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8d89b32..b61170e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "minecraft-data-rs" -version = "0.3.0" +version = "0.4.0" authors = ["trivernis "] edition = "2018" readme = "README.md" @@ -11,10 +11,10 @@ repository = "https://github.com/Trivernis/minecraft-data-rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -thiserror = "1.0.24" -serde_json = "1.0.64" -serde_derive = "1.0.125" -serde = "1.0.125" -include_dir = "0.6.0" -itertools = "0.10.0" +thiserror = "1.0.30" +serde_json = "1.0.74" +serde_derive = "1.0.133" +serde = "1.0.133" +include_dir = "0.7.2" +itertools = "0.10.3" lazy_static = "1.4.0" \ No newline at end of file diff --git a/minecraft-data b/minecraft-data index 920d361..dcbdb99 160000 --- a/minecraft-data +++ b/minecraft-data @@ -1 +1 @@ -Subproject commit 920d361e13351bbbd812c3bbd0ed05f4194b05fe +Subproject commit dcbdb99f078a84fa34a1dd920de1e9fdda8ecb78 diff --git a/src/api/biomes.rs b/src/api/biomes.rs index 05b857a..4505b24 100644 --- a/src/api/biomes.rs +++ b/src/api/biomes.rs @@ -2,7 +2,6 @@ use crate::data::{get_version_specific_file, BIOMES_FILE}; use crate::models::biome::Biome; use crate::models::version::Version; use crate::DataResult; -use itertools::Itertools; use std::collections::HashMap; use std::iter::FromIterator; use std::sync::Arc; diff --git a/src/data/datapaths.rs b/src/data/datapaths.rs index 19ff87a..ee84c5b 100644 --- a/src/data/datapaths.rs +++ b/src/data/datapaths.rs @@ -4,5 +4,5 @@ use std::collections::HashMap; #[serde(rename_all(deserialize = "camelCase", serialize = "snake_case"))] pub(crate) struct Datapaths { pub pc: HashMap>, - pub pe: HashMap>, + pub bedrock: HashMap>, } diff --git a/src/data/mod.rs b/src/data/mod.rs index 3e601b1..5297c15 100644 --- a/src/data/mod.rs +++ b/src/data/mod.rs @@ -10,21 +10,29 @@ pub static MINECRAFT_DATA: Dir = include_dir::include_dir!("minecraft-data/data" pub static BIOMES_FILE: &str = "biomes"; pub static BLOCK_LOOT_FILE: &str = "blockLoot"; pub static BLOCKS_FILE: &str = "blocks"; +#[allow(unused)] pub static COMMANDS_FILE: &str = "commands"; pub static ENTITIES_FILE: &str = "entities"; pub static ENTITY_LOOT_FILE: &str = "entityLoot"; pub static FOODS_FILE: &str = "foods"; pub static ITEMS_FILE: &str = "items"; +#[allow(unused)] pub static LOGIN_PACKET_FILE: &str = "loginPacket"; +#[allow(unused)] pub static MATERIALS_FILE: &str = "materials"; +#[allow(unused)] pub static PROTOCOL_FILE: &str = "protocol"; pub static RECIPES_FILE: &str = "recipes"; +#[allow(unused)] pub static TINTS_FILE: &str = "tints"; pub static ENCHANTMENTS_FILE: &str = "enchantments"; // pub static VERSION_FILE: &str = "version.json"; +#[allow(unused)] pub static MAP_ICONS_FILE: &str = "mapIcons"; +#[allow(unused)] pub static PARTICLES_FILE: &str = "particles"; pub static PROTOCOL_VERSIONS_FILE: &str = "protocolVersions"; +#[allow(unused)] pub static VERSIONS_FILE: &str = "versions"; /// Returns the string encoded content of the common file diff --git a/src/models/block_loot.rs b/src/models/block_loot.rs index 7387a55..21531c4 100644 --- a/src/models/block_loot.rs +++ b/src/models/block_loot.rs @@ -10,7 +10,7 @@ pub struct BlockLoot { pub struct ItemDrop { pub item: String, pub drop_chance: f32, - pub stack_size_range: [Option; 2], + pub stack_size_range: [Option; 2], pub block_age: Option, pub silk_touch: Option, pub no_silk_touch: Option, diff --git a/src/models/food.rs b/src/models/food.rs index cbd99a5..6ce6709 100644 --- a/src/models/food.rs +++ b/src/models/food.rs @@ -5,7 +5,7 @@ pub struct Food { pub display_name: String, pub stack_size: u8, pub name: String, - pub food_points: u8, + pub food_points: f32, pub saturation: f32, pub effective_quality: f32, pub saturation_ratio: f32,