minecraft_data

Crates.iominecraft_data
lib.rsminecraft_data
version
sourcesrc
created_at2023-12-30 04:39:14.390474
updated_at2024-10-25 12:23:54.372481
descriptionminecraft_data
homepage
repositoryhttps://github.com/jvavav/minecraft
max_upload_size
id1083889
Cargo.toml error:TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
na3k (jvavav)

documentation

https://docs.rs/minecraft_data

README

minecraft_data

Supported version:
1.16.5 1.17.1 1.18.2 1.19.4 1.20.6

Usage

[dependencies]
minecraft_data = { version = "1.3", default-features = false, features = [
    "1_16",
] }
pub use minecraft_data::v1_16::*;
pub use minecraft_data::{decode_state, encode_state};

fn main() {
    assert_eq!(core::mem::size_of::<block_state>(), 2);
    assert_eq!(core::mem::size_of::<block>(), 2);
    let offset = oak_log::new().with_axis(prop_axis_x_y_z::z).encode() as raw_block_state;
    let state: block_state = block_state::new(block::oak_log.state_index() + offset);
    assert_eq!(
        oak_log::decode((state.id() - block::oak_log.state_index()) as _).axis(),
        prop_axis_x_y_z::z
    );
    let state: block_state = encode_state!(oak_log(oak_log::new().with_axis(prop_axis_x_y_z::z)));
    assert_eq!(decode_state!(oak_log(state)).axis(), prop_axis_x_y_z::z);
    assert_eq!(state.to_fluid().to_fluid(), fluid::empty);
}
Commit count: 85

cargo fmt