pub struct Furnace(pub Address);Expand description
The furnace component (5 methods).
Provided by OpenComputers’ DriverFurnace$Environment.
Tuple Fields§
§0: AddressImplementations§
Source§impl Furnace
impl Furnace
Sourcepub fn get_burn_time(&self) -> Result<Number>
pub fn get_burn_time(&self) -> Result<Number>
The number of ticks that the furnace will keep burning from the last consumed fuel.
Lua: furnace.getBurnTime():number
Indirect call: waits for the next server tick.
Sourcepub async fn get_burn_time_async(&self) -> Result<Number>
pub async fn get_burn_time_async(&self) -> Result<Number>
Self::get_burn_time without blocking: the call is queued, and
the program keeps running until the result comes back; see crate::task.
Sourcepub fn get_cook_time(&self) -> Result<Number>
pub fn get_cook_time(&self) -> Result<Number>
The number of ticks that the current item has been cooking for.
Lua: furnace.getCookTime():number
Indirect call: waits for the next server tick.
Sourcepub async fn get_cook_time_async(&self) -> Result<Number>
pub async fn get_cook_time_async(&self) -> Result<Number>
Self::get_cook_time without blocking: the call is queued, and
the program keeps running until the result comes back; see crate::task.
Sourcepub fn get_current_item_burn_time(&self) -> Result<Number>
pub fn get_current_item_burn_time(&self) -> Result<Number>
The number of ticks that the currently burning fuel lasts in total.
Lua: furnace.getCurrentItemBurnTime():number
Indirect call: waits for the next server tick.
Sourcepub async fn get_current_item_burn_time_async(&self) -> Result<Number>
pub async fn get_current_item_burn_time_async(&self) -> Result<Number>
Self::get_current_item_burn_time without blocking: the call is queued, and
the program keeps running until the result comes back; see crate::task.
Sourcepub fn get_total_cook_time(&self) -> Result<Number>
pub fn get_total_cook_time(&self) -> Result<Number>
The number of ticks that the current item needs to cook.
Lua: furnace.getTotalCookTime():number
Indirect call: waits for the next server tick.
Sourcepub async fn get_total_cook_time_async(&self) -> Result<Number>
pub async fn get_total_cook_time_async(&self) -> Result<Number>
Self::get_total_cook_time without blocking: the call is queued, and
the program keeps running until the result comes back; see crate::task.
Sourcepub fn is_burning(&self) -> Result<bool>
pub fn is_burning(&self) -> Result<bool>
Get whether the furnace is currently active.
Lua: furnace.isBurning():boolean
Indirect call: waits for the next server tick.
Sourcepub async fn is_burning_async(&self) -> Result<bool>
pub async fn is_burning_async(&self) -> Result<bool>
Self::is_burning without blocking: the call is queued, and
the program keeps running until the result comes back; see crate::task.
Trait Implementations§
Source§impl Component for Furnace
impl Component for Furnace
Source§fn from_address(address: Address) -> Self
fn from_address(address: Address) -> Self
fn address(&self) -> &Address
Source§fn at(address: impl Into<Address>) -> Option<Self>
fn at(address: impl Into<Address>) -> Option<Self>
address, if it is of this type.Source§fn invoke(&self, method: &str, args: Vec<Value>) -> Result<Vec<Value>>
fn invoke(&self, method: &str, args: Vec<Value>) -> Result<Vec<Value>>
Source§fn invoke_async(&self, method: &str, args: Vec<Value>) -> Call ⓘ
fn invoke_async(&self, method: &str, args: Vec<Value>) -> Call ⓘ
Component::invoke without blocking; see invoke_async.