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

◆ SetIngredients()

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

Definition at line 15738 of file Recipe.cs.

15739 {
15740 if (ingredients.Length == 1)
15741 {
15742 ingredients = new int[2]
15743 {
15744 ingredients[0],
15745 1
15746 };
15747 }
15748 if (ingredients.Length % 2 != 0)
15749 {
15750 throw new Exception("Bad ingredients amount");
15751 }
15752 for (int i = 0; i < ingredients.Length; i += 2)
15753 {
15754 int num = i / 2;
15756 requiredItem[num].stack = ingredients[i + 1];
15757 }
15758 }
int stack
Definition Item.cs:149
void SetDefaults(int Type=0)
Definition Item.cs:47332
Item[] requiredItem
Definition Recipe.cs:29

References Terraria.Recipe.requiredItem, Terraria.Item.SetDefaults(), and Terraria.Item.stack.

Referenced by Terraria.Recipe.AddLesionFurniture().