pub struct BlockInfo {
pub state: String,
pub hardness: f32,
pub replaceable: bool,
pub air: bool,
pub fluid: Option<String>,
pub fluid_source: bool,
pub redstone: u8,
pub in_world: bool,
}Expand description
A block’s properties, as Server::block_info
sees them.
Fields§
§state: StringFull block state, e.g. "minecraft:oak_log[axis=y]".
hardness: f32Destroy time; negative for unbreakable blocks (bedrock).
replaceable: boolPlacing a block here replaces this one (air, grass, water…).
air: boolAir of any kind.
fluid: Option<String>Id of the fluid in this block ("minecraft:water"), if any.
fluid_source: boolWhether that fluid is a source block.
redstone: u8Redstone power the block receives (0–15).
in_world: boolInside the world’s build height and world border.
Implementations§
Trait Implementations§
impl StructuralPartialEq for BlockInfo
Auto Trait Implementations§
impl Freeze for BlockInfo
impl RefUnwindSafe for BlockInfo
impl Send for BlockInfo
impl Sync for BlockInfo
impl Unpin for BlockInfo
impl UnsafeUnpin for BlockInfo
impl UnwindSafe for BlockInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more