Update to latest minecraft-data version and adjust the api accordingly

main
trivernis 9 months ago
parent 9ac3eb5eed
commit 5abe7965ad
Signed by: Trivernis
GPG Key ID: 7E6D18B61C8D2F4B

17
.github/stale.yml vendored

@ -1,17 +0,0 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 14
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false

@ -1,8 +1,8 @@
[package] [package]
name = "minecraft-data-rs" name = "minecraft-data-rs"
version = "0.7.2" version = "0.8.0"
authors = ["trivernis <trivernis@protonmail.com>"] authors = ["trivernis <trivernis@protonmail.com>"]
edition = "2018" edition = "2021"
readme = "README.md" readme = "README.md"
license = "MIT" license = "MIT"
description = "A wrapper for minecraft-data" description = "A wrapper for minecraft-data"

@ -1 +1 @@
Subproject commit 971d49da8395def7f54be6393198ffdebb1d94e1 Subproject commit 46b78398b6f351958e02fbd266424f0ee0ab138b

@ -1,12 +1,11 @@
use crate::api::biomes::Biomes; pub use crate::api::biomes::Biomes;
use crate::api::blocks::Blocks; pub use crate::api::blocks::Blocks;
use crate::api::enchantments::Enchantments; pub use crate::api::enchantments::Enchantments;
use crate::api::entities::Entities; pub use crate::api::entities::Entities;
use crate::api::foods::Foods; pub use crate::api::foods::Foods;
use crate::api::items::Items; pub use crate::api::items::Items;
use crate::api::loot::Loot; pub use crate::api::loot::Loot;
use crate::api::recipes::Recipes; pub use crate::api::recipes::Recipes;
use crate::api::versions::latest_stable;
use crate::models::version::Version; use crate::models::version::Version;
use crate::DataResult; use crate::DataResult;
use std::sync::Arc; use std::sync::Arc;
@ -26,14 +25,6 @@ mod recipes;
mod versions; mod versions;
use crate::api::protocol::Protocol; use crate::api::protocol::Protocol;
pub use biomes::*;
pub use blocks::*;
pub use enchantments::*;
pub use entities::*;
pub use foods::*;
pub use items::*;
pub use loot::*;
pub use recipes::*;
pub use versions::*; pub use versions::*;
/// A type wrapping access to all the metadata /// A type wrapping access to all the metadata

@ -31,7 +31,7 @@ pub fn test_blocks_by_name() {
let by_name = api.blocks.blocks_by_name().unwrap(); let by_name = api.blocks.blocks_by_name().unwrap();
assert!(by_name.get("dirt").is_some()); assert!(by_name.get("dirt").is_some());
assert!(by_name.get("stone").is_some()); assert!(by_name.get("stone").is_some());
assert_eq!(by_name.get("grass").unwrap().stack_size, 64) assert_eq!(by_name.get("grass_block").unwrap().stack_size, 64)
} }
} }

@ -5,10 +5,10 @@ pub struct Biome {
pub name: String, pub name: String,
pub category: String, pub category: String,
pub temperature: f32, pub temperature: f32,
pub precipitation: String, pub precipitation: Option<String>,
pub depth: Option<f32>, pub depth: Option<f32>,
pub dimension: String, pub dimension: String,
pub display_name: String, pub display_name: String,
pub color: u32, pub color: u32,
pub rainfall: f32, pub rainfall: Option<f32>,
} }

Loading…
Cancel
Save