Documentation

CraftingRecipe

Table of Contents

getIngredientList()  : array<string|int, Item>
Returns a list of items needed to craft this recipe. This MUST NOT include Air items or items with a zero count.
getResultsFor()  : array<string|int, Item>
Returns a list of results this recipe will produce when the inputs in the given crafting grid are consumed.
matchesCraftingGrid()  : bool
Returns whether the given crafting grid meets the requirements to craft this recipe.

Methods

getIngredientList()

Returns a list of items needed to craft this recipe. This MUST NOT include Air items or items with a zero count.

public getIngredientList() : array<string|int, Item>
Return values
array<string|int, Item>

getResultsFor()

Returns a list of results this recipe will produce when the inputs in the given crafting grid are consumed.

public getResultsFor(CraftingGrid $grid) : array<string|int, Item>
Parameters
$grid : CraftingGrid
Return values
array<string|int, Item>

matchesCraftingGrid()

Returns whether the given crafting grid meets the requirements to craft this recipe.

public matchesCraftingGrid(CraftingGrid $grid) : bool
Parameters
$grid : CraftingGrid
Return values
bool

Search results