====== cCraftingRecipe class ======
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 [[API:plugin:OnCraftingNoRecipe|OnCraftingNoRecipe]], [[API:plugin:OnPostCrafting|OnPostCrafting]] and [[API:plugin:OnPreCrafting|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.

Internally, the class contains a [[API:cCraftingGrid|cCraftingGrid]] for the ingredients and a [[API:cItem|cItem]] for the result.

===== Functions =====
^ Function name ^ Parameters ^ Return values ^ Notes ^
| Clear | | | Clears the entire recipe, both ingredients and results |
| ConsumeIngredients | CraftingGrid | | Consumes ingredients specified in the given [[API:cCraftingGrid|cCraftingGrid]] class |
| Dump | | | DEBUG build: dumps ingredients and result into server log. RELEASE build: no action |
| GetIngredient | x, y | [[API:cItem|cItem]] | Returns the ingredient stored in the recipe at the specified coords |
| GetIngredientsHeight | | number | Returns the height of the ingredients' grid |
| GetIngredientsWidth | | number | Returns the width of the ingredients' grid |
| GetResult | | [[API:cItem|cItem]] | Returns the result of the recipe |
| SetIngredient | x, y, [[API:cItem|cItem]] | | Sets the ingredient at the specified coords |
| SetIngredient | x, y, ItemType, ItemCount, ItemDamage | | Sets the ingredient at the specified coords |
| SetResult | [[API:cItem|cItem]] | | Sets the result item |
| SetResult | ItemType, ItemCount, ItemDamage | | Sets the result item |