PocketMine-MP 5.23.3 git-f7687af337d001ddbcc47b8e773f014a33faa662
Loading...
Searching...
No Matches
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.

@phpstan-param list<RecipeIngredient> $ingredients @phpstan-param list<Item> $results

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

Member Function Documentation

◆ getIngredientCount()

pocketmine\crafting\ShapelessRecipe::getIngredientCount ( )

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

◆ getIngredientList()

pocketmine\crafting\ShapelessRecipe::getIngredientList ( )

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

Returns
RecipeIngredient[] @phpstan-return list<RecipeIngredient>

Implements pocketmine\crafting\CraftingRecipe.

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

◆ getResults()

pocketmine\crafting\ShapelessRecipe::getResults ( )
Returns
Item[] @phpstan-return list<Item>

Definition at line 64 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[] @phpstan-return list<Item>

Implements pocketmine\crafting\CraftingRecipe.

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

◆ getType()

pocketmine\crafting\ShapelessRecipe::getType ( )

Definition at line 72 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 84 of file src/crafting/ShapelessRecipe.php.


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