Skip to content

CraftingGrid ​

abstract class · pocketmine\crafting\CraftingGrid · source

Extends SimpleInventory

Constants ​

SIZE_BIG ​

php
public const SIZE_BIG = 3

SIZE_SMALL ​

php
public const SIZE_SMALL = 2

Methods ​

__construct() ​

php
public function __construct(int $gridWidth)

getGridWidth() ​

php
public function getGridWidth() : int

getIngredient() ​

php
public function getIngredient(int $x, int $y) : \pocketmine\item\Item

Returns the item at offset x,y, offset by where the starts of the recipe rectangle are.

getRecipeHeight() ​

php
public function getRecipeHeight() : int

Returns the height of the recipe we're trying to craft, based on items currently in the grid.

getRecipeWidth() ​

php
public function getRecipeWidth() : int

Returns 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

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