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

◆ SetIngredients()

void Terraria.Recipe.SetIngredients ( params int[] ingredients)
inlineprivate

Definition at line 15805 of file Recipe.cs.

15806 {
15807 if (ingredients.Length == 1)
15808 {
15809 ingredients = new int[2]
15810 {
15811 ingredients[0],
15812 1
15813 };
15814 }
15815 if (ingredients.Length % 2 != 0)
15816 {
15817 throw new Exception("Bad ingredients amount");
15818 }
15819 for (int i = 0; i < ingredients.Length; i += 2)
15820 {
15821 int num = i / 2;
15822 requiredItem[num].SetDefaults(ingredients[i]);
15823 requiredItem[num].stack = ingredients[i + 1];
15824 }
15825 }
List< Item > requiredItem
Definition Recipe.cs:64

References Terraria.Recipe.requiredItem.

Referenced by Terraria.Recipe.AddLesionFurniture().

+ Here is the caller graph for this function: