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

◆ HasIngredient() [2/3]

bool Terraria.Recipe.HasIngredient ( Mod mod,
string itemName )
inline

Definition at line 15961 of file Recipe.cs.

15962 {
15963 if (mod == null)
15964 {
15965 mod = Mod;
15966 }
15967 if (!ModContent.TryFind<ModItem>(mod.Name, itemName, out var item))
15968 {
15969 throw new RecipeException($"The item {itemName} does not exist in the mod {mod.Name}.\r\nIf you are trying to use a vanilla item, try removing the first argument.");
15970 }
15971 return HasIngredient(item.Type);
15972 }
Manages content added by mods. Liasons between mod content and Terraria's arrays and oversees the Loa...
Definition ModContent.cs:38
This class serves as a place for you to place all your properties and hooks for each item....
Definition ModItem.cs:24
virtual string Name
Stores the name of the mod. This name serves as the mod's identification, and also helps with saving ...
Definition Mod.cs:66
readonly Mod Mod
Definition Recipe.cs:108
bool HasIngredient(int itemID)
Definition Recipe.cs:15956

References Terraria.Recipe.HasIngredient(), Terraria.Recipe.Mod, and Terraria.ModLoader.Mod.Name.

+ Here is the call graph for this function: