Expand description
Static Minecraft Java Edition game data for the ghast client library.
One module per supported version, each behind a cargo feature:
| module | feature | version | block model |
|---|---|---|---|
v1_8 | v1_8 | 1.8.x (protocol 47) | id << 4 | meta |
v1_16_5 | v1_16_5 | 1.16.5 (protocol 754) | global palette with properties |
All tables are generated (codegen/data) from PrismarineJS minecraft-data 3.119.0 plus a small
hand-maintained file of physics facts, and live in static memory: no runtime parsing, no lazy
initialisation, lookups by id are array indexing, lookups by name are binary searches.
use ghast_data::v1_8::{Block, BlockState};
let slab = BlockState::new(Block::STONE_SLAB, 0);
assert_eq!(slab.shape()[0].max_y, 0.5);
assert_eq!(Block::ICE.physics().slipperiness, 0.98);Collision shapes are vanilla-exact only where the source data is; blocks whose shape depends on
neighbours, entities or block entities say so via ShapeDependency instead of returning a
fake static shape. See the crate README for known data discrepancies.
Re-exports§
pub use common::Aabb;pub use common::BiomeInfo;pub use common::BlockInfo;pub use common::BlockPhysics;pub use common::BoundingBox;pub use common::Collision;pub use common::DigMaterial;pub use common::Drop;pub use common::EffectInfo;pub use common::EnchantCost;pub use common::EnchantmentInfo;pub use common::EntityDimensions;pub use common::EntityInfo;pub use common::EntityKind;pub use common::Fluid;pub use common::FluidKind;pub use common::FoodInfo;pub use common::ItemInfo;pub use common::NeighbourShape;pub use common::PhysicsFlags;pub use common::ShapeDependency;pub use common::VanillaEntitySize;pub use common::WorldCoord;pub use common::WorldCoords;