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

◆ CollectItemsToCraftWithFrom()

static void Terraria.Recipe.CollectItemsToCraftWithFrom ( Player player)
inlinestaticprivate

Definition at line 610 of file Recipe.cs.

611 {
612 _ownedItems.Clear();
613 CollectItems(player.inventory, 58);
614 if (player.useVoidBag() && player.chest != -5)
615 {
616 CollectItems(player.bank4.item, 40);
617 }
618 if (player.chest != -1)
619 {
620 Item[] currentInventory = null;
621 if (player.chest > -1)
622 {
623 currentInventory = Main.chest[player.chest].item;
624 }
625 else if (player.chest == -2)
626 {
627 currentInventory = player.bank.item;
628 }
629 else if (player.chest == -3)
630 {
631 currentInventory = player.bank2.item;
632 }
633 else if (player.chest == -4)
634 {
635 currentInventory = player.bank3.item;
636 }
637 else if (player.chest == -5)
638 {
639 currentInventory = player.bank4.item;
640 }
642 }
644 {
646 }
648 }
static IEnumerable<(IEnumerable< Item >, ModPlayer.ItemConsumedCallback)> GetModdedCraftingMaterials(Player player)
This is where all ModPlayer hooks are gathered and called.
static void CollectItems(Item[] currentInventory, int slotCap)
Definition Recipe.cs:659
static Dictionary< int, int > _ownedItems
Definition Recipe.cs:106
static void AddFakeCountsForItemGroups()
Definition Recipe.cs:650

References Terraria.Recipe._ownedItems, Terraria.Recipe.AddFakeCountsForItemGroups(), Terraria.Player.bank, Terraria.Player.bank2, Terraria.Player.bank3, Terraria.Player.bank4, Terraria.Main.chest, Terraria.Player.chest, Terraria.Recipe.CollectItems(), Terraria.ModLoader.PlayerLoader.GetModdedCraftingMaterials(), Terraria.Player.inventory, Terraria.Chest.item, Terraria.Main.LocalPlayer, and Terraria.Player.useVoidBag().

Referenced by Terraria.Recipe.FindRecipes().

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