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