pub struct FurnaceRecipe {
pub id: String,
pub input: String,
pub output: String,
pub count: u32,
pub experience: f32,
pub cook_time: u32,
}Expand description
A furnace smelting recipe.
Fields§
§id: String§input: String§output: String§count: u32§experience: f32§cook_time: u32Implementations§
Source§impl FurnaceRecipe
impl FurnaceRecipe
pub fn new( id: impl Into<String>, input: impl Into<String>, output: impl Into<String>, count: u32, ) -> FurnaceRecipe
pub fn experience(self, xp: f32) -> FurnaceRecipe
Sourcepub fn cook_time(self, ticks: u32) -> FurnaceRecipe
pub fn cook_time(self, ticks: u32) -> FurnaceRecipe
Cooking time in ticks (default 200 = 10 seconds).
pub fn to_json(&self) -> String
pub fn ns_name(&self) -> (&str, &str)
Trait Implementations§
Source§impl Clone for FurnaceRecipe
impl Clone for FurnaceRecipe
Source§fn clone(&self) -> FurnaceRecipe
fn clone(&self) -> FurnaceRecipe
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FurnaceRecipe
impl RefUnwindSafe for FurnaceRecipe
impl Send for FurnaceRecipe
impl Sync for FurnaceRecipe
impl Unpin for FurnaceRecipe
impl UnsafeUnpin for FurnaceRecipe
impl UnwindSafe for FurnaceRecipe
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more