Skip to content

ShapedRecipe ​

class · pocketmine\crafting\ShapedRecipe · source

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() : int

getIngredient() ​

php
public function getIngredient(int $x, int $y) : ?\pocketmine\crafting\RecipeIngredient

getIngredientList() ​

php
public function getIngredientList() : array

getIngredientMap() ​

php
public function getIngredientMap() : array

getResults() ​

php
public function getResults() : array

getResultsFor() ​

php
public function getResultsFor(\pocketmine\crafting\CraftingGrid $grid) : array

getShape() ​

php
public function getShape() : array

Returns an array of strings containing characters representing the recipe's shape.

getWidth() ​

php
public function getWidth() : int

matchesCraftingGrid() ​

php
public function matchesCraftingGrid(\pocketmine\crafting\CraftingGrid $grid) : bool

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.