pub struct BlockInfo {Show 15 fields
pub id: u16,
pub name: &'static str,
pub display_name: &'static str,
pub hardness: Option<f32>,
pub resistance: f32,
pub stack_size: u8,
pub diggable: bool,
pub transparent: bool,
pub emit_light: u8,
pub filter_light: u8,
pub bounding_box: BoundingBox,
pub material: Option<DigMaterial>,
pub harvest_tools: &'static [u16],
pub drops: &'static [Drop],
pub physics: BlockPhysics,
}Expand description
Static description of a block (cold data: names, digging, light, drops).
Fields§
§id: u16Registry id (1.8: 0..=255, 1.16: 0..763).
name: &'static strRegistry name without namespace ("stone").
display_name: &'static strEnglish display name.
hardness: Option<f32>Hardness (vanilla “strength”); None when minecraft-data lists null (unbreakable in 1.8).
Note: 1.16 data lists unbreakable blocks (bedrock, barrier, …) with hardness 0 and
diggable == false; always check BlockInfo::diggable.
resistance: f32Blast resistance.
stack_size: u8Max stack size of the block’s item.
diggable: boolWhether the block can be dug at all.
transparent: boolminecraft-data “transparent” flag (light passes / not an opaque cube).
emit_light: u8Emitted light level 0..=15.
filter_light: u8Light absorbed 0..=15.
bounding_box: BoundingBoxCoarse bounding-box class.
material: Option<DigMaterial>Tool-speed group; None = no tool bonus.
harvest_tools: &'static [u16]Item ids that can harvest this block (get drops). Empty = any tool / hand.
drops: &'static [Drop]Item drops (basic list, no loot tables).
physics: BlockPhysicsPhysics properties.