Trait oc2_hlapi::device::ItemHandlerInterface
source · pub trait ItemHandlerInterface: RpcDevice {
// Required methods
fn get_item_slot_count(&self) -> Result<i32>
where i32: DeserializeOwned + 'static;
fn get_item_slot_limit(&self, slot: i32) -> Result<i32>
where i32: DeserializeOwned + 'static;
fn get_item_stack_in_slot<T>(&self, slot: i32) -> Result<T>
where T: DeserializeOwned + 'static;
}Expand description
An interface between item storage devices or blocks and the HLAPI.
Required Methods§
sourcefn get_item_slot_count(&self) -> Result<i32>where
i32: DeserializeOwned + 'static,
fn get_item_slot_count(&self) -> Result<i32>where
i32: DeserializeOwned + 'static,
Returns a signed 32-bit integer that represents the slots in the storage block.
sourcefn get_item_slot_limit(&self, slot: i32) -> Result<i32>where
i32: DeserializeOwned + 'static,
fn get_item_slot_limit(&self, slot: i32) -> Result<i32>where
i32: DeserializeOwned + 'static,
Returns a signed 32-bit integer that represents how many items can be stored in a single slot in the storage block.
sourcefn get_item_stack_in_slot<T>(&self, slot: i32) -> Result<T>where
T: DeserializeOwned + 'static,
fn get_item_stack_in_slot<T>(&self, slot: i32) -> Result<T>where
T: DeserializeOwned + 'static,
Returns a type which can be deserialized from JSON which represents the current Minecraft IItemStack in the specified slot.
Object Safety§
This trait is not object safe.