pub struct ShapedRecipe {
pub properties: RecipeProperties,
pub width: usize,
pub height: usize,
pub pattern: Box<[Ingredient]>,
pub result: ItemStackTemplate,
pub symmetrical: bool,
}Expand description
A shaped recipe pattern.
Fields§
§properties: RecipeProperties§width: usize§height: usize§pattern: Box<[Ingredient]>§result: ItemStackTemplate§symmetrical: boolWhether the pattern is horizontally symmetric.
Implementations§
Source§impl ShapedRecipe
impl ShapedRecipe
pub fn new( properties: RecipeProperties, width: usize, height: usize, pattern: Box<[Ingredient]>, result: ItemStackTemplate, ) -> Self
pub fn with_placement(self, placement: PlacementInfo) -> Self
fn compute_symmetrical(width: usize, pattern: &[Ingredient]) -> bool
pub const fn fits_in(&self, width: usize, height: usize) -> bool
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ShapedRecipe
impl !UnwindSafe for ShapedRecipe
impl Freeze for ShapedRecipe
impl Send for ShapedRecipe
impl Sync for ShapedRecipe
impl Unpin for ShapedRecipe
impl UnsafeUnpin for ShapedRecipe
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreWraps this value in an
Arc<SyncMutex<>>