PocketMine-MP 5.18.1 git-9381fc4172e5dce4cada1cb356050c8a2ab57b94
pocketmine\crafting\json\ShapedRecipeData Class Reference
+ Inheritance diagram for pocketmine\crafting\json\ShapedRecipeData:
+ Collaboration diagram for pocketmine\crafting\json\ShapedRecipeData:

Public Member Functions

 __construct (array $shape, array $input, array $output, string $block, int $priority, array $unlockingIngredients=[])
 
 jsonSerialize ()
 

Public Attributes

string $block
 
array $input
 
array $output
 
int $priority
 
array $shape
 
array $unlockingIngredients = []
 

Detailed Description

Definition at line 28 of file ShapedRecipeData.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\crafting\json\ShapedRecipeData::__construct ( array  $shape,
array  $input,
array  $output,
string  $block,
int  $priority,
array  $unlockingIngredients = [] 
)

TODO: convert this to use promoted properties - avoiding them for now since it would break JsonMapper

Parameters
string[]$shape
RecipeIngredientData[]$input
ItemStackData[]$output
RecipeIngredientData[]$unlockingIngredients

@phpstan-param list<string> $shape @phpstan-param array<string, RecipeIngredientData> $input @phpstan-param list<ItemStackData> $output @phpstan-param list<RecipeIngredientData> $unlockingIngredients

Definition at line 72 of file ShapedRecipeData.php.

References pocketmine\crafting\json\ShapedRecipeData\$block, and pocketmine\crafting\json\ShapedRecipeData\$priority.

Member Function Documentation

◆ jsonSerialize()

pocketmine\crafting\json\ShapedRecipeData::jsonSerialize ( )
Returns
mixed[]

Definition at line 84 of file ShapedRecipeData.php.

Member Data Documentation

◆ $block

string pocketmine\crafting\json\ShapedRecipeData::$block

@required

Definition at line 51 of file ShapedRecipeData.php.

Referenced by pocketmine\crafting\json\ShapedRecipeData\__construct().

◆ $input

array pocketmine\crafting\json\ShapedRecipeData::$input

Definition at line 41 of file ShapedRecipeData.php.

◆ $output

array pocketmine\crafting\json\ShapedRecipeData::$output

Definition at line 48 of file ShapedRecipeData.php.

◆ $priority

int pocketmine\crafting\json\ShapedRecipeData::$priority

@required

Definition at line 54 of file ShapedRecipeData.php.

Referenced by pocketmine\crafting\json\ShapedRecipeData\__construct().

◆ $shape

array pocketmine\crafting\json\ShapedRecipeData::$shape

Definition at line 34 of file ShapedRecipeData.php.

◆ $unlockingIngredients

array pocketmine\crafting\json\ShapedRecipeData::$unlockingIngredients = []

Definition at line 57 of file ShapedRecipeData.php.


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