This class is used to represent a crafting recipe, either a built-in one, or one created dynamically in a plugin. It is used only as a parameter for OnCraftingNoRecipe, OnPostCrafting and OnPreCrafting hooks. Plugins may use it to inspect or modify a crafting recipe that a player views in their crafting window, either at a crafting table or the survival inventory screen.
Name | Parameters | Return value | Notes |
Clear |
|
|
Clears the entire recipe, both ingredients and results |
ConsumeIngredients |
|
|
Consumes ingredients specified in the given cCraftingGrid class |
Dump |
|
|
DEBUG build: dumps ingredients and result into server log. RELEASE build: no action |
GetIngredient |
|
|
Returns the ingredient stored in the recipe at the specified coords |
GetIngredientsHeight |
|
|
Returns the height of the ingredients' grid |
GetIngredientsWidth |
|
|
Returns the width of the ingredients' grid |
GetResult |
|
|
Returns the result of the recipe |
SetIngredient |
|
|
Sets the ingredient at the specified coords |
SetIngredient |
x | number | y | number | ItemType | number | ItemCount | number | ItemDamage | number |
|
|
Sets the ingredient at the specified coords |
SetResult |
ItemType | number | ItemCount | number | ItemDamage | number |
|
|
Sets the result item |
SetResult |
|
|
Sets the result item |