CraftingGrid
Extends SimpleInventory
Constants
SIZE_BIG
php
public const SIZE_BIG = 3SIZE_SMALL
php
public const SIZE_SMALL = 2Methods
__construct()
php
public function __construct(int $gridWidth)getGridWidth()
php
public function getGridWidth() : intgetIngredient()
php
public function getIngredient(int $x, int $y) : \pocketmine\item\ItemReturns the item at offset x,y, offset by where the starts of the recipe rectangle are.
getRecipeHeight()
php
public function getRecipeHeight() : intReturns the height of the recipe we're trying to craft, based on items currently in the grid.
getRecipeWidth()
php
public function getRecipeWidth() : intReturns the width of the recipe we're trying to craft, based on items currently in the grid.
setItem()
php
public function setItem(int $index, \pocketmine\item\Item $item) : void