pub struct Tool {
pub default_mining_speed: f32,
pub damage_per_block: i32,
pub rules: Vec<ToolRules>,
}
Expand description
A tool that can be used to mine blocks.
Fields§
§default_mining_speed: f32
The default mining speed of this tool, used if no rules override it. Defaults to 1.0.
damage_per_block: i32
The amount of durability to remove each time a block is broken with this tool. Must be a non-negative integer.
rules: Vec<ToolRules>
A list of rules for the blocks that this tool has a special behavior with.
Trait Implementations§
Source§impl FromCompoundNbt for Tool
impl FromCompoundNbt for Tool
fn from_compound_nbt(nbt: &NbtCompound<'_, '_>) -> Result<Self, SculkParseError>where
Self: Sized,
impl StructuralPartialEq for Tool
Auto Trait Implementations§
impl Freeze for Tool
impl RefUnwindSafe for Tool
impl Send for Tool
impl Sync for Tool
impl Unpin for Tool
impl UnwindSafe for Tool
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