ShapedRecipe
Implements CraftingRecipe
Methods
__construct()
php
public function __construct(array $shape, array $ingredients, array $results)Constructs a ShapedRecipe instance.
Note: Recipes do not need to be square. Do NOT add padding for empty rows/columns.
getHeight()
php
public function getHeight() : intgetIngredient()
php
public function getIngredient(int $x, int $y) : ?\pocketmine\crafting\RecipeIngredientgetIngredientList()
php
public function getIngredientList() : arraygetIngredientMap()
php
public function getIngredientMap() : arraygetResults()
php
public function getResults() : arraygetResultsFor()
php
public function getResultsFor(\pocketmine\crafting\CraftingGrid $grid) : arraygetShape()
php
public function getShape() : arrayReturns an array of strings containing characters representing the recipe's shape.
getWidth()
php
public function getWidth() : intmatchesCraftingGrid()
php
public function matchesCraftingGrid(\pocketmine\crafting\CraftingGrid $grid) : bool