CraftingManager
in package
Uses
DestructorCallbackTrait
Table of Contents
- $furnaceRecipeManagers : array<string|int, FurnaceRecipeManager>
- $shapedRecipes : array<string|int, array<string|int, ShapedRecipe>>
- $shapelessRecipes : array<string|int, array<string|int, ShapelessRecipe>>
- $destructorCallbacks : ObjectSet
- $recipeRegisteredCallbacks : ObjectSet
- __construct() : mixed
- __destruct() : mixed
- getDestructorCallbacks() : ObjectSet
- getFurnaceRecipeManager() : FurnaceRecipeManager
- getRecipeRegisteredCallbacks() : ObjectSet
- getShapedRecipes() : array<string|int, array<string|int, ShapedRecipe>>
- getShapelessRecipes() : array<string|int, array<string|int, ShapelessRecipe>>
- matchRecipe() : CraftingRecipe|null
- matchRecipeByOutputs() : array<string|int, CraftingRecipe>|Generator
- registerShapedRecipe() : void
- registerShapelessRecipe() : void
- sort() : int
- Function used to arrange Shapeless Recipe ingredient lists into a consistent order.
- hashOutputs() : string
- pack() : array<string|int, Item>
Properties
$furnaceRecipeManagers
protected
array<string|int, FurnaceRecipeManager>
$furnaceRecipeManagers
Tags
$shapedRecipes
protected
array<string|int, array<string|int, ShapedRecipe>>
$shapedRecipes
= []
$shapelessRecipes
protected
array<string|int, array<string|int, ShapelessRecipe>>
$shapelessRecipes
= []
$destructorCallbacks
private
ObjectSet
$destructorCallbacks
= null
Tags
$recipeRegisteredCallbacks
private
ObjectSet
$recipeRegisteredCallbacks
Tags
Methods
__construct()
public
__construct() : mixed
Return values
mixed —__destruct()
public
__destruct() : mixed
Return values
mixed —getDestructorCallbacks()
public
getDestructorCallbacks() : ObjectSet
Tags
Return values
ObjectSet —getFurnaceRecipeManager()
public
getFurnaceRecipeManager(FurnaceType $furnaceType) : FurnaceRecipeManager
Parameters
- $furnaceType : FurnaceType
Return values
FurnaceRecipeManager —getRecipeRegisteredCallbacks()
public
getRecipeRegisteredCallbacks() : ObjectSet
Tags
Return values
ObjectSet —getShapedRecipes()
public
getShapedRecipes() : array<string|int, array<string|int, ShapedRecipe>>
Return values
array<string|int, array<string|int, ShapedRecipe>> —getShapelessRecipes()
public
getShapelessRecipes() : array<string|int, array<string|int, ShapelessRecipe>>
Return values
array<string|int, array<string|int, ShapelessRecipe>> —matchRecipe()
public
matchRecipe(CraftingGrid $grid, array<string|int, Item> $outputs) : CraftingRecipe|null
Parameters
- $grid : CraftingGrid
- $outputs : array<string|int, Item>
Return values
CraftingRecipe|null —matchRecipeByOutputs()
public
matchRecipeByOutputs(array<string|int, Item> $outputs) : array<string|int, CraftingRecipe>|Generator
Parameters
- $outputs : array<string|int, Item>
Tags
Return values
array<string|int, CraftingRecipe>|Generator —registerShapedRecipe()
public
registerShapedRecipe(ShapedRecipe $recipe) : void
Parameters
- $recipe : ShapedRecipe
Return values
void —registerShapelessRecipe()
public
registerShapelessRecipe(ShapelessRecipe $recipe) : void
Parameters
- $recipe : ShapelessRecipe
Return values
void —sort()
Function used to arrange Shapeless Recipe ingredient lists into a consistent order.
public
static sort(Item $i1, Item $i2) : int
Parameters
Return values
int —hashOutputs()
private
static hashOutputs(array<string|int, Item> $outputs) : string
Parameters
- $outputs : array<string|int, Item>
Return values
string —pack()
private
static pack(array<string|int, Item> $items) : array<string|int, Item>
Parameters
- $items : array<string|int, Item>