Trait oc2_hlapi::device::BlockOperationsInterface
source · pub trait BlockOperationsInterface: RpcDevice {
// Required methods
fn excavate(&self, side: Direction) -> Result<bool>;
fn place(&self, side: Direction) -> Result<bool>;
fn durability(&self) -> Result<i32>;
fn repair(&self) -> Result<bool>;
}Expand description
An interface between devices which carry out block operations and the HLAPI
Required Methods§
sourcefn excavate(&self, side: Direction) -> Result<bool>
fn excavate(&self, side: Direction) -> Result<bool>
Mines the adjacent block on the given side. Returns true if the block was able to be mined.
sourcefn place(&self, side: Direction) -> Result<bool>
fn place(&self, side: Direction) -> Result<bool>
Places a block on the given side. Returns true if the block was able to be placed.
sourcefn durability(&self) -> Result<i32>
fn durability(&self) -> Result<i32>
Returns a 32-bit signed integer that represents the durability of the currently active tool
Object Safety§
This trait is not object safe.