Expand description
§mcdata
A Rust library providing traits and types representing various Minecraft NBT structures.
§Overview
Currently, this crate provides three traits along with some implementations of those traits:
BlockStatefor block states. See theblock_statemodule for more.Entityfor normal entities. See theentitymodule for more.BlockEntityfor block entities. See theblock_entitymodule for more.
There’s one “generic” implementation for each of these in the corresponding module. Other implementations are locked behind features.
With serde support enabled, all types in this crate can be full serialized and
deserialized from/to NBT. The recommended crate for that is
fastnbt which is also internally used by
the types in this crate. For example entity::GenericEntity is almost fully
represented by a fastnbt::Value.
§Features
serde— Provide implementations of serde’sSerializeandDeserializetraits for the various typesblock-states— Include lists for known, typed block statesentities— Include lists for known, typed entitiesblock-entities— Include lists for known, typed block entitiesdocs— Enable this when building the docslatest— Enable lists for the latest supported Minecraft version1.14— Enable lists for Minecraft 1.14, extracted from Minecraft 1.14.41.15— Enable lists for Minecraft 1.15, extracted from Minecraft 1.15.21.16— Enable lists for Minecraft 1.16, extracted from Minecraft 1.16.51.17-1.18— Enable lists for Minecraft 1.17-1.18, extracted from Minecraft 1.18.21.19— Enable lists for Minecraft 1.19, extracted from Minecraft 1.19.21.19.3— Enable lists for Minecraft 1.19.3, extracted from Minecraft 1.19.31.19.4— Enable lists for Minecraft 1.19.4, extracted from Minecraft 1.19.41.20— Enable lists for Minecraft 1.20, extracted from Minecraft 1.20.11.20.2— Enable lists for Minecraft 1.20.2, extracted from Minecraft 1.20.21.20.3— Enable lists for Minecraft 1.20.3, extracted from Minecraft 1.20.41.20.5— Enable lists for Minecraft 1.20.5, extracted from Minecraft 1.20.6
Re-exports§
pub use block_entity::BlockEntity;pub use block_state::BlockState;pub use entity::Entity;
Modules§
- Types and traits describing Minecraft block entities, a.k.a. tile entities.
- Types and traits describing Minecraft block states.
- Types and traits describing Minecraft entities.
- Other Minecraft related types.