Rust wrapper for minecraft-data
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Wyatt Herkamp 2777e30e10 Improves NativeType::Switch 2 years ago
.github Change default stale period to two weeks 3 years ago
minecraft-data@6428d491a7 Update submodules 2 years ago
src Improves NativeType::Switch 2 years ago
.gitignore Fix field visibility 3 years ago
.gitmodules Add versions and items api 4 years ago
Cargo.toml Update dependencies 2 years ago
LICENSE Add metadata for crates.io 4 years ago
README.md Add badges to README 3 years ago

README.md

minecraft-data-rs

This repository is a rust library to access minecraft data. The data itself hosted in the minecraft-data repository and included into the library at compile time.

Usage

use std::collections::HashMap;
use minecraft_data_rs::Api;
use minecraft_data_rs::models::food::Food;
use minecraft_data_rs::models::version::Version;

// create an api wrapper for the latest stable version
let api = Api::latest().expect("failed to retrieve latest version");
let food: Vec<Food> = api.foods.foods_array().unwrap();

for food in food {
    println!("When eating {} you gain {} food points", food.name, food.food_points);
}

License

This project is Licensed under MIT.