Skip to content

Commit

Permalink
Update to latest minecraft-data version and adjust the api accordingly
Browse files Browse the repository at this point in the history
  • Loading branch information
Trivernis committed Feb 28, 2024
1 parent 9ac3eb5 commit 5abe796
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 40 deletions.
17 changes: 0 additions & 17 deletions .github/stale.yml

This file was deleted.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "minecraft-data-rs"
version = "0.7.2"
version = "0.8.0"
authors = ["trivernis <[email protected]>"]
edition = "2018"
edition = "2021"
readme = "README.md"
license = "MIT"
description = "A wrapper for minecraft-data"
Expand Down
2 changes: 1 addition & 1 deletion minecraft-data
Submodule minecraft-data updated 262 files
25 changes: 8 additions & 17 deletions src/api/mod.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
use crate::api::biomes::Biomes;
use crate::api::blocks::Blocks;
use crate::api::enchantments::Enchantments;
use crate::api::entities::Entities;
use crate::api::foods::Foods;
use crate::api::items::Items;
use crate::api::loot::Loot;
use crate::api::recipes::Recipes;
use crate::api::versions::latest_stable;
pub use crate::api::biomes::Biomes;
pub use crate::api::blocks::Blocks;
pub use crate::api::enchantments::Enchantments;
pub use crate::api::entities::Entities;
pub use crate::api::foods::Foods;
pub use crate::api::items::Items;
pub use crate::api::loot::Loot;
pub use crate::api::recipes::Recipes;
use crate::models::version::Version;
use crate::DataResult;
use std::sync::Arc;
Expand All @@ -26,14 +25,6 @@ mod recipes;
mod versions;

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::*;

/// A type wrapping access to all the metadata
Expand Down
2 changes: 1 addition & 1 deletion src/api/tests/blocks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub fn test_blocks_by_name() {
let by_name = api.blocks.blocks_by_name().unwrap();
assert!(by_name.get("dirt").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)
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/models/biome.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ pub struct Biome {
pub name: String,
pub category: String,
pub temperature: f32,
pub precipitation: String,
pub precipitation: Option<String>,
pub depth: Option<f32>,
pub dimension: String,
pub display_name: String,
pub color: u32,
pub rainfall: f32,
pub rainfall: Option<f32>,
}

0 comments on commit 5abe796

Please sign in to comment.