TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches
Terraria.ModLoader.RecipeLoader Class Reference

This is where all Recipe hooks are gathered and called. More...

+ Collaboration diagram for Terraria.ModLoader.RecipeLoader:

Static Public Member Functions

static bool RecipeAvailable (Recipe recipe)
 Returns whether or not the conditions are met for this recipe to be available for the player to use.
 
static bool DecraftAvailable (Recipe recipe)
 Returns whether or not the conditions are met for this recipe to be shimmered/decrafted.
 
static void OnCraft (Item item, Recipe recipe, List< Item > consumedItems, Item destinationStack)
 recipe.OnCraftHooks followed by Calls ItemLoader.OnCreate with a RecipeCreationContext
 
static void OnCraft (Item item, Recipe recipe, Item destinationStack)
 Helper version of OnCraft, used in combination with Recipe.Create and the internal ConsumedItems list.
 
static void ConsumeItem (Recipe recipe, int type, ref int amount)
 Allows to edit the amount of item the player uses in a recipe.
 

Static Package Functions

static void Unload ()
 
static void AddRecipes ()
 
static void PostAddRecipes ()
 
static void PostSetupRecipes ()
 
static void OrderRecipes ()
 Orders everything in the recipe according to their Ordering.
 

Static Package Attributes

static Recipe[] FirstRecipeForItem = new Recipe[ItemID.Count]
 
static List< ItemConsumedItems = new List<Item>()
 Cloned list of Items consumed when crafting. Cleared after the OnCreate and OnCraft hooks.
 
static bool setupRecipes = false
 Set when tML sets up modded recipes. Used to detect misuse of CreateRecipe.
 

Properties

static Mod CurrentMod [get, private set]
 The mod currently adding recipes.
 

Detailed Description

This is where all Recipe hooks are gathered and called.

Definition at line 14 of file RecipeLoader.cs.


The documentation for this class was generated from the following file: