Skip to content

CraftingManager ​

class · pocketmine\crafting\CraftingManager · source

Properties ​

$furnaceRecipeManagers protected ​

php
protected array $furnaceRecipeManagers

$potionContainerChangeRecipes protected ​

php
protected array $potionContainerChangeRecipes

$potionTypeRecipes protected ​

php
protected array $potionTypeRecipes

$shapedRecipes protected ​

php
protected array $shapedRecipes

$shapelessRecipes protected ​

php
protected array $shapelessRecipes

$smithingRecipes 5.46.0 protected ​

php
protected array $smithingRecipes

$specialCraftingRecipes 5.46.0 protected ​

php
protected array $specialCraftingRecipes

Crafting recipes that are neither shaped nor shapeless (e.g. the decorated pot), matched by inspecting the grid.

Methods ​

__construct() ​

php
public function __construct()

getCraftingRecipeFromIndex() ​

php
public function getCraftingRecipeFromIndex(int $index) : ?\pocketmine\crafting\CraftingRecipe

getCraftingRecipeIndex() ​

php
public function getCraftingRecipeIndex() : array

getFurnaceRecipeManager() ​

php
public function getFurnaceRecipeManager(\pocketmine\crafting\FurnaceType $furnaceType) : \pocketmine\crafting\FurnaceRecipeManager

getPotionContainerChangeRecipes() ​

php
public function getPotionContainerChangeRecipes() : array

getPotionTypeRecipes() ​

php
public function getPotionTypeRecipes() : array

getRecipeRegisteredCallbacks() ​

php
public function getRecipeRegisteredCallbacks() : \pocketmine\utils\ObjectSet

getShapedRecipes() ​

php
public function getShapedRecipes() : array

getShapelessRecipes() ​

php
public function getShapelessRecipes() : array

getSmithingRecipeFromIndex() 5.46.0 ​

php
public function getSmithingRecipeFromIndex(int $index) : ?\pocketmine\crafting\SmithingRecipe

getSmithingRecipes() 5.46.0 ​

php
public function getSmithingRecipes() : array

getSpecialCraftingRecipes() 5.46.0 ​

php
public function getSpecialCraftingRecipes() : array

matchBrewingRecipe() ​

php
public function matchBrewingRecipe(\pocketmine\item\Item $input, \pocketmine\item\Item $ingredient) : ?\pocketmine\crafting\BrewingRecipe

matchRecipe() ​

php
public function matchRecipe(\pocketmine\crafting\CraftingGrid $grid, array $outputs) : ?\pocketmine\crafting\CraftingRecipe

matchRecipeByGrid() 5.46.0 ​

php
public function matchRecipeByGrid(\pocketmine\crafting\CraftingGrid $grid) : ?\pocketmine\crafting\CraftingRecipe

Finds the crafting recipe matching the contents of the grid, without knowing the output (e.g. for crafters). Results for grids without NBT are cached.

matchRecipeByOutputs() ​

php
public function matchRecipeByOutputs(array $outputs) : \Generator

registerPotionContainerChangeRecipe() ​

php
public function registerPotionContainerChangeRecipe(\pocketmine\crafting\PotionContainerChangeRecipe $recipe) : void

registerPotionTypeRecipe() ​

php
public function registerPotionTypeRecipe(\pocketmine\crafting\PotionTypeRecipe $recipe) : void

registerShapedRecipe() ​

php
public function registerShapedRecipe(\pocketmine\crafting\ShapedRecipe $recipe) : void

registerShapelessRecipe() ​

php
public function registerShapelessRecipe(\pocketmine\crafting\ShapelessRecipe $recipe) : void

registerSmithingRecipe() 5.46.0 ​

php
public function registerSmithingRecipe(\pocketmine\crafting\SmithingRecipe $recipe) : void

registerSpecialCraftingRecipe() 5.46.0 ​

php
public function registerSpecialCraftingRecipe(\pocketmine\crafting\CraftingRecipe $recipe) : void

Registers a crafting recipe that is neither shaped nor shapeless. It is matched against the crafting grid with CraftingRecipe::matchesCraftingGrid() and its results come from CraftingRecipe::getResultsFor().

sort() ​

php
public static function sort(\pocketmine\item\Item $i1, \pocketmine\item\Item $i2) : int

Deprecated

Deprecated.

Function used to arrange Shapeless Recipe ingredient lists into a consistent order.

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