PocketMine-MP 5.19.1 git-5cc1068cd43264d3363295eb8d6901e02f467897
pocketmine\crafting\ShapelessRecipe Class Reference
+ Inheritance diagram for pocketmine\crafting\ShapelessRecipe:
+ Collaboration diagram for pocketmine\crafting\ShapelessRecipe:

Public Member Functions

 __construct (array $ingredients, array $results, ShapelessRecipeType $type)
 
 getIngredientCount ()
 
 getIngredientList ()
 
 getResults ()
 
 getResultsFor (CraftingGrid $grid)
 
 getType ()
 
 matchesCraftingGrid (CraftingGrid $grid)
 

Detailed Description

Definition at line 30 of file src/crafting/ShapelessRecipe.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\crafting\ShapelessRecipe::__construct ( array  $ingredients,
array  $results,
ShapelessRecipeType  $type 
)
Parameters
RecipeIngredient[]$ingredientsNo more than 9 total. This applies to sum of item stack counts, not count of array.
Item[]$resultsList of result items created by this recipe.

Definition at line 41 of file src/crafting/ShapelessRecipe.php.

References pocketmine\utils\Utils\cloneObjectArray().

+ Here is the call graph for this function:

Member Function Documentation

◆ getIngredientCount()

pocketmine\crafting\ShapelessRecipe::getIngredientCount ( )

Definition at line 73 of file src/crafting/ShapelessRecipe.php.

◆ getIngredientList()

pocketmine\crafting\ShapelessRecipe::getIngredientList ( )

◆ getResults()

pocketmine\crafting\ShapelessRecipe::getResults ( )
Returns
Item[]

Definition at line 54 of file src/crafting/ShapelessRecipe.php.

◆ getResultsFor()

pocketmine\crafting\ShapelessRecipe::getResultsFor ( CraftingGrid  $grid)

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

Returns
Item[]

Implements pocketmine\crafting\CraftingRecipe.

Definition at line 58 of file src/crafting/ShapelessRecipe.php.

◆ getType()

pocketmine\crafting\ShapelessRecipe::getType ( )

Definition at line 62 of file src/crafting/ShapelessRecipe.php.

◆ matchesCraftingGrid()

pocketmine\crafting\ShapelessRecipe::matchesCraftingGrid ( CraftingGrid  $grid)

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

Implements pocketmine\crafting\CraftingRecipe.

Definition at line 77 of file src/crafting/ShapelessRecipe.php.


The documentation for this class was generated from the following file: