pub struct ShapelessRecipe {
pub id: Identifier,
pub category: CraftingCategory,
pub ingredients: &'static [Ingredient],
pub result: RecipeResult,
}Expand description
A shapeless crafting recipe where ingredient order doesn’t matter.
Fields§
§id: Identifier§category: CraftingCategory§ingredients: &'static [Ingredient]§result: RecipeResultImplementations§
Source§impl ShapelessRecipe
impl ShapelessRecipe
Sourcepub fn fits_in_2x2(&self) -> bool
pub fn fits_in_2x2(&self) -> bool
Returns true if this recipe fits in a 2x2 grid.
Sourcepub fn matches(&self, input: &CraftingInput) -> bool
pub fn matches(&self, input: &CraftingInput) -> bool
Tests if the crafting input matches this recipe.
Sourcepub fn get_remaining_items(&self, input: &CraftingInput) -> Vec<ItemStack>
pub fn get_remaining_items(&self, input: &CraftingInput) -> Vec<ItemStack>
Gets the remaining items after crafting (e.g., empty buckets).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ShapelessRecipe
impl RefUnwindSafe for ShapelessRecipe
impl Send for ShapelessRecipe
impl Sync for ShapelessRecipe
impl Unpin for ShapelessRecipe
impl UnsafeUnpin for ShapelessRecipe
impl UnwindSafe for ShapelessRecipe
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