Trait oc2_hlapi::device::RedstoneInterface
source · pub trait RedstoneInterface: RpcDevice {
// Required methods
fn get_redstone_input(&self, side: Direction) -> Result<i32>;
fn get_redstone_output(&self, side: Direction) -> Result<i32>;
fn set_redstone_output(&self, side: Direction, val: i32) -> Result<()>;
}Expand description
An interface between redstone signal sending and receiving devices and the HLAPI
Required Methods§
sourcefn get_redstone_input(&self, side: Direction) -> Result<i32>
fn get_redstone_input(&self, side: Direction) -> Result<i32>
Returns a signed 32-bit integer that represents the strength of the redstone input on the provided side. The integer will be in the range [0, 15].
sourcefn get_redstone_output(&self, side: Direction) -> Result<i32>
fn get_redstone_output(&self, side: Direction) -> Result<i32>
Returns a signed 32-bit integer that represents the strength of the redstone output on the provided side. The integer will be in the range [0, 15].
Object Safety§
This trait is not object safe.