pub struct Tool {
pub rules: &'static [ToolRule],
pub default_mining_speed: f32,
pub damage_per_block: u32,
pub can_destroy_blocks_in_creative: bool,
}Expand description
The minecraft:tool component (Tool record).
Fields§
§rules: &'static [ToolRule]Rules in order; the first matching one with the asked field set decides.
default_mining_speed: f32Speed when no rule with a speed matches.
damage_per_block: u32Durability lost per block broken.
can_destroy_blocks_in_creative: boolWhether a creative player can break blocks while holding it.
Implementations§
Trait Implementations§
impl Copy for Tool
impl StructuralPartialEq for Tool
Auto Trait Implementations§
impl Forget for Tool
impl Freeze for Tool
impl Move for Tool
impl RefUnwindSafe for Tool
impl Send for Tool
impl Sync for Tool
impl Unpin for Tool
impl UnsafeUnpin 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