TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ PostAddRecipes()

static void Terraria.ModLoader.RecipeLoader.PostAddRecipes ( )
inlinestaticpackage

Definition at line 71 of file RecipeLoader.cs.

72 {
73 MethodInfo postAddRecipesMethod = typeof(Mod).GetMethod("PostAddRecipes", BindingFlags.Instance | BindingFlags.Public);
74 Mod[] mods = ModLoader.Mods;
75 for (int i = 0; i < mods.Length; i++)
76 {
77 Mod mod = (CurrentMod = mods[i]);
78 try
79 {
80 postAddRecipesMethod.Invoke(mod, Array.Empty<object>());
81 SystemLoader.PostAddRecipes(mod);
82 }
83 catch (Exception ex)
84 {
85 ex.Data["mod"] = mod.Name;
86 throw;
87 }
88 finally
89 {
90 CurrentMod = null;
91 }
92 }
93 }
static Mod CurrentMod
The mod currently adding recipes.

References Terraria.ModLoader.RecipeLoader.CurrentMod, Terraria.ModLoader.ModLoader.Mods, Terraria.ModLoader.Mod.Name, and Terraria.ModLoader.SystemLoader.PostAddRecipes().

Referenced by Terraria.Recipe.SetupRecipes().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: