Skip to main content

find_recipe

Function find_recipe 

Source
pub fn find_recipe(
    crafting: &CraftingContainer,
    is_2x2: bool,
) -> Option<CraftingRecipe>
Expand description

Finds a matching recipe for the given crafting container.

§Arguments

  • crafting - The crafting container to check
  • is_2x2 - Whether this is a 2x2 crafting grid

§Returns

The matching recipe, or None if no recipe matches.