////////////////

        public static ISet <int> GetAvailableRecipesOfIngredients(Player player, IEnumerable <Item> ingredients)
        {
            int[] _;
            IDictionary <int, int> __;
            ISet <int>             addedRecipeIdxs    = new HashSet <int>();
            ISet <int>             possibleRecipeIdxs = new HashSet <int>();

            // Find all potential recipes of each individual ingredient
            foreach (Item ingredient in ingredients)
            {
                IEnumerable <int> ingredientRecipeIdxs = RecipeIdentityHelpers.GetRecipeIndexesUsingIngredient(ingredient.netID);
                possibleRecipeIdxs.UnionWith(ingredientRecipeIdxs);
            }

            // Filter potential recipes list to actual recipes only
            foreach (int recipeIdx in possibleRecipeIdxs)
            {
                Recipe recipe = Main.recipe[recipeIdx];
                if (recipe == null || recipe.createItem.type == 0)
                {
                    continue;
                }                                                                                 // Just in case?

                if (RecipeHelpers.GetRecipeFailReasons(player, recipe, out _, out __, ingredients) == 0)
                {
                    addedRecipeIdxs.Add(recipeIdx);
                }
            }

            return(addedRecipeIdxs);
        }
        ////////////////

        internal static void AwaitCraft(Player player, int recipeIdx)
        {
            var mymod = ModHelpersMod.Instance;

            if (mymod.RecipeHack.IngredientOutsources.Count == 0)
            {
                return;
            }

            int[]  _;
            Recipe recipe = Main.recipe[recipeIdx];
            IDictionary <int, int> missingItemTypesStacks;

            if (RecipeHelpers.GetRecipeFailReasons(Main.LocalPlayer, recipe, out _, out missingItemTypesStacks) != 0)
            {
                RecipeHack.AwaitingRecipeIdx = recipeIdx;
                RecipeHack.AwaitingRecipeMissingIngredients = missingItemTypesStacks;
            }
            else
            {
                RecipeHack.AwaitingRecipeIdx = -1;
                RecipeHack.AwaitingRecipeMissingIngredients = null;
            }
        }
Example #3
0
        internal static void DefineItemWeaponGroups1(Action <string, string[], Matcher> addDef)
        {
            // Weapon Classes

            addDef("Any Ranged Weapon", null,
                   (item, grps) => {
                return(item.ranged);
            });
            addDef("Any Magic Weapon", null,
                   (item, grps) => {
                return(item.magic);
            });
            addDef("Any Melee Weapon", null,
                   (item, grps) => {
                return(item.melee);
            });
            addDef("Any Thrown Weapon", null,
                   (item, grps) => {
                return(item.thrown);
            });

            // Melee Sub Classes

            addDef("Any Swingable", null,
                   (item, grps) => {
                return(item.melee && item.useStyle == 1);
            });
            addDef("Any Thrustable", null,
                   (item, grps) => {
                return(item.melee && item.useStyle == 5);
            });
            addDef("Any Flail", null,
                   (item, grps) => {
                if (!item.melee || item.useStyle != 5)
                {
                    return(false);
                }
                if (item.type == ItemID.Anchor)
                {
                    return(true);
                }

                if (item.shoot == 0)
                {
                    return(false);
                }
                var projPool = ModHelpersMod.Instance.EntityGroups.GetProjPool();

                switch (projPool[item.shoot].aiStyle)
                {
                case 15:                            // Standard
                case 13:                            // Chain Knife, Boxing Glove
                case 69:                            // Flairon
                case 75:                            // Solar Eruption
                    return(true);
                }
                return(false);
            });
            addDef("Any Boomerang", null,
                   (item, grps) => {
                if (!item.melee || item.useStyle != 1)
                {
                    return(false);
                }
                if (item.type == ItemID.FlyingKnife)
                {
                    return(true);
                }

                if (item.shoot == 0)
                {
                    return(false);
                }
                var projPool = ModHelpersMod.Instance.EntityGroups.GetProjPool();

                switch (projPool[item.shoot].aiStyle)
                {
                case 3:                            // Boomerangs
                case 15:                           // Thorn Chakram
                    return(true);
                }
                return(false);
            });
            addDef("Any Yoyo", null,
                   (item, grps) => {
                return(ItemAttributeHelpers.IsYoyo(item));
            });

            // Magic Sub Classes

            addDef("Any Magic Staff Or Scepter Or Wand", null,
                   (item, grps) => {
                if (!item.magic)
                {
                    return(false);
                }

                string name = ItemIdentityHelpers.GetQualifiedName(item);
                return(name.Contains("Staff") ||
                       name.Contains("Scepter") ||
                       name.Contains("Wand"));
            });
            addDef("Any Magic Rod", null,
                   (item, grps) => {
                if (!item.magic)
                {
                    return(false);
                }

                string name = ItemIdentityHelpers.GetQualifiedName(item);
                return(name.Contains("Rod"));
            });
            addDef("Any Magic Gun", null,
                   (item, grps) => {
                if (!item.magic)
                {
                    return(false);
                }

                switch (item.type)
                {
                case ItemID.LeafBlower:
                    return(true);
                }

                string name = ItemIdentityHelpers.GetQualifiedName(item);
                return(name.Contains("Gun") ||
                       name.Contains("Rifle") ||
                       name.Contains("Ray") ||
                       name.Contains("Cannon") ||
                       name.Contains("Laser"));
            });
            addDef("Any Magic Tome", null,
                   (item, grps) => {
                if (!item.magic)
                {
                    return(false);
                }

                switch (item.type)
                {
                case ItemID.DemonScythe:
                case ItemID.WaterBolt:
                case ItemID.LunarFlareBook:
                case ItemID.MagnetSphere:
                case ItemID.RazorbladeTyphoon:
                    return(true);
                }

                var has = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.SpellTome
                }, 1);
                if (has)
                {
                    return(true);
                }

                string name = ItemIdentityHelpers.GetQualifiedName(item);
                return(name.Contains("Book") ||
                       name.Contains("Tome"));
            });

            // Ranged Sub Classes

            addDef("Any Ranger Gun", null,
                   (item, grps) => {
                if (!item.ranged)
                {
                    return(false);
                }
                return(item.useAmmo == AmmoID.Bullet ||
                       item.useAmmo == AmmoID.CandyCorn ||
                       item.useAmmo == AmmoID.Coin);
            });
            addDef("Any Ranger Bow", null,
                   (item, grps) => {
                if (!item.ranged)
                {
                    return(false);
                }
                return(item.useAmmo == AmmoID.Arrow ||
                       item.useAmmo == AmmoID.Stake);
            });
            addDef("Any Ranger Launcher", null,
                   (item, grps) => {
                if (!item.ranged)
                {
                    return(false);
                }
                return(item.useAmmo == AmmoID.Rocket ||
                       item.useAmmo == AmmoID.StyngerBolt ||
                       item.useAmmo == AmmoID.JackOLantern ||
                       item.useAmmo == AmmoID.NailFriendly);
            });

            // Summon Sub Classes

            addDef("Any Minion Summon Item", null,
                   (item, grps) => {
                return(item.summon && !item.sentry);
            });
            addDef("Any Sentry Summon Item", null,
                   (item, grps) => {
                return(item.summon && item.sentry);
            });

            // Vanity Classes
            addDef("Any Vanity Accessory", null,
                   (item, grps) => {
                if (!item.vanity)
                {
                    return(false);
                }
                return(item.accessory);
            });
            addDef("Any Vanity Garment", null,
                   (item, grps) => {
                if (!item.vanity)
                {
                    return(false);
                }
                return(!item.accessory);
            });
        }
Example #4
0
        internal static void DefineItemMiscGroups3(Action <string, string[], Matcher> addDef)
        {
            addDef("Any Plain Material",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                return(item.material &&
                       //!EntityGroups.ItemGroups["Any Placeable"].Contains( item.type ) &&
                       !grps["Any Equipment"].Contains(item.type));
            });

            addDef("Any Vanilla Corruption Item", null,
                   (item, grps) => {
                switch (item.type)
                {
                case ItemID.Ebonwood:
                case ItemID.EbonsandBlock:
                case ItemID.CorruptSandstone:
                case ItemID.CorruptSandstoneWall:
                case ItemID.CorruptHardenedSand:
                case ItemID.CorruptHardenedSandWall:
                case ItemID.EbonstoneBlock:
                case ItemID.DemoniteBrick:
                case ItemID.PurpleIceBlock:

                case ItemID.CorruptSeeds:
                case ItemID.VileMushroom:
                case ItemID.VilePowder:
                case ItemID.Deathweed:
                case ItemID.DeathweedSeeds:
                case ItemID.RottenChunk:
                case ItemID.WormTooth:
                case ItemID.SoulofNight:
                case ItemID.DarkShard:

                case ItemID.ShadowScale:
                case ItemID.EaterMask:
                case ItemID.EaterofWorldsTrophy:
                case ItemID.EatersBone:

                case ItemID.CorruptionKey:
                case ItemID.CorruptionKeyMold:                        //?

                case ItemID.AncientShadowGreaves:
                case ItemID.AncientShadowHelmet:
                case ItemID.AncientShadowScalemail:
                case ItemID.BallOHurt:
                case ItemID.Musket:
                case ItemID.ShadowOrb:
                case ItemID.Vilethorn:
                case ItemID.BandofStarpower:

                case ItemID.ChainGuillotines:
                case ItemID.ClingerStaff:
                case ItemID.DartRifle:
                case ItemID.PutridScent:

                case ItemID.WormFood:
                case ItemID.NightsEdge:
                case ItemID.TrueNightsEdge:

                case ItemID.Ebonkoi:
                case ItemID.PurpleClubberfish:
                case ItemID.Toxikarp:
                case ItemID.CorruptFishingCrate:
                    return(true);
                }

                if (item.type <= ItemID.Count)
                {
                    if (RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                        ItemID.VilePowder
                    }, 1))
                    {
                        return(true);
                    }
                    if (RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                        ItemID.DemoniteOre
                    }, 1))
                    {
                        return(true);
                    }
                    if (RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                        ItemID.DemoniteBar
                    }, 1))
                    {
                        return(true);
                    }

                    if (RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                        ItemID.ShadowScale
                    }, 1))
                    {
                        return(true);
                    }
                    if (RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                        ItemID.CursedFlames
                    }, 1))
                    {
                        return(true);
                    }

                    if (RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                        ItemID.Ebonwood
                    }, 1))
                    {
                        return(true);
                    }
                    if (RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                        ItemID.PurpleIceBlock
                    }, 1))
                    {
                        return(true);
                    }
                    if (RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                        ItemID.EbonstoneBlock
                    }, 1))
                    {
                        return(true);
                    }
                    if (RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                        ItemID.EbonstoneBrick
                    }, 1))
                    {
                        return(true);
                    }
                    if (RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                        ItemID.DemoniteBrick
                    }, 1))
                    {
                        return(true);
                    }

                    if (RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                        ItemID.CorruptSeeds
                    }, 1))
                    {
                        return(true);
                    }
                }

                return(false);
            });

            addDef("Any Vanilla Crimson Item", null,
                   (item, grps) => {
                switch (item.type)
                {
                case ItemID.Shadewood:
                case ItemID.CrimsandBlock:
                case ItemID.CrimsonSandstone:
                case ItemID.CrimsonSandstoneWall:
                case ItemID.CrimsonHardenedSand:
                case ItemID.CrimsonHardenedSandWall:
                case ItemID.CrimstoneBlock:
                case ItemID.CrimtaneBrick:
                case ItemID.RedIceBlock:
                case ItemID.FleshBlock:

                case ItemID.CrimsonSeeds:
                case ItemID.ViciousMushroom:
                case ItemID.ViciousPowder:
                case ItemID.Deathweed:
                case ItemID.DeathweedSeeds:
                case ItemID.Vertebrae:
                case ItemID.SoulofNight:
                case ItemID.DarkShard:
                case ItemID.MeatGrinder:

                case ItemID.TissueSample:
                case ItemID.BrainMask:
                case ItemID.BrainofCthulhuTrophy:
                case ItemID.BoneRattle:

                case ItemID.CrimsonKey:
                case ItemID.CrimsonKeyMold:                        //?

                case ItemID.TheUndertaker:
                case ItemID.TheRottedFork:
                case ItemID.CrimsonRod:
                case ItemID.PanicNecklace:
                case ItemID.CrimsonHeart:

                case ItemID.SoulDrain:
                case ItemID.DartPistol:
                case ItemID.FetidBaghnakhs:
                case ItemID.FleshKnuckles:
                case ItemID.TendonHook:

                case ItemID.BloodySpine:
                case ItemID.NightsEdge:
                case ItemID.TrueNightsEdge:

                case ItemID.CrimsonTigerfish:
                case ItemID.Hemopiranha:
                case ItemID.CrimsonFishingCrate:
                case ItemID.Bladetongue:
                    return(true);
                }

                if (item.type <= ItemID.Count)
                {
                    if (RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                        ItemID.ViciousPowder
                    }, 1))
                    {
                        return(true);
                    }
                    if (RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                        ItemID.Vertebrae
                    }, 1))
                    {
                        return(true);
                    }
                    if (RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                        ItemID.CrimtaneOre
                    }, 1))
                    {
                        return(true);
                    }
                    if (RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                        ItemID.CrimtaneBar
                    }, 1))
                    {
                        return(true);
                    }
                    if (RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                        ItemID.Ichor
                    }, 1))
                    {
                        return(true);
                    }

                    if (RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                        ItemID.TissueSample
                    }, 1))
                    {
                        return(true);
                    }

                    if (RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                        ItemID.Shadewood
                    }, 1))
                    {
                        return(true);
                    }
                    if (RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                        ItemID.RedIceBlock
                    }, 1))
                    {
                        return(true);
                    }
                    if (RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                        ItemID.CrimstoneBlock
                    }, 1))
                    {
                        return(true);
                    }
                    if (RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                        ItemID.CrimtaneBrick
                    }, 1))
                    {
                        return(true);
                    }
                    if (RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                        ItemID.FleshBlock
                    }, 1))
                    {
                        return(true);
                    }

                    if (RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                        ItemID.CrimsonSeeds
                    }, 1))
                    {
                        return(true);
                    }
                }

                return(false);
            });

            ////

            addDef("Any Vanilla Alchemy Herb", null,
                   (item, grps) => {
                switch (item.type)
                {
                case ItemID.Daybloom:
                case ItemID.Blinkroot:
                case ItemID.Moonglow:
                case ItemID.Waterleaf:
                case ItemID.Deathweed:
                case ItemID.Fireblossom:
                case ItemID.Shiverthorn:
                    return(true);

                default:
                    return(false);
                }
            });

            addDef("Any Vanilla Alchemy Fish", null,
                   (item, grps) => {
                switch (item.type)
                {
                case ItemID.DoubleCod:
                case ItemID.Damselfish:
                case ItemID.ArmoredCavefish:
                case ItemID.CrimsonTigerfish:
                case ItemID.Obsidifish:
                case ItemID.Prismite:
                case ItemID.PrincessFish:
                case ItemID.Hemopiranha:
                case ItemID.Stinkfish:
                case ItemID.VariegatedLardfish:
                case ItemID.FrostMinnow:
                case ItemID.Ebonkoi:
                case ItemID.SpecularFish:
                case ItemID.ChaosFish:
                    return(true);

                default:
                    return(false);
                }
            });

            addDef("Any Vanilla Alchemy Misc", null,
                   (item, grps) => {
                switch (item.type)
                {
                case ItemID.Mushroom:
                case ItemID.GlowingMushroom:
                case ItemID.Gel:
                case ItemID.Cactus:
                case ItemID.FallenStar:
                case ItemID.PinkGel:
                case ItemID.Lens:
                case ItemID.IronOre:
                case ItemID.LeadOre:
                case ItemID.GoldOre:
                case ItemID.PlatinumOre:
                case ItemID.Obsidian:
                case ItemID.Cobweb:
                case ItemID.CrispyHoneyBlock:
                case ItemID.Coral:
                case ItemID.Amber:
                case ItemID.Feather:
                case ItemID.AntlionMandible:
                case ItemID.SharkFin:
                case ItemID.Stinger:
                case ItemID.WormTooth:
                case ItemID.RottenChunk:
                case ItemID.Vertebrae:
                case ItemID.Bone:
                case ItemID.PixieDust:
                case ItemID.CrystalShard:
                case ItemID.UnicornHorn:
                case ItemID.FragmentNebula:
                case ItemID.FragmentSolar:
                case ItemID.FragmentStardust:
                case ItemID.FragmentVortex:
                    return(true);

                default:
                    return(false);
                }
            });
        }
        internal static void DefineItemEquipmentGroups3(IList <EntityGroupMatcherDefinition <Item> > defs)
        {
            // Equipment Tiers

            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Tiki Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                string name          = ItemAttributeHelpers.GetQualifiedName(item);

                if (!hasEquip || !name.Contains("Tiki"))
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));

            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Cactus Equipment",
                         new string[] { "Any Equipment", },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.Cactus, 1 }
                });

                if (!has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));

            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Plain Wood Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.Wood, 2 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Boreal Wood Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.BorealWood, 2 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Palm Wood Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.PalmWood, 2 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Rich Mahogany Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.RichMahogany, 2 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Ebonwood Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.Ebonwood, 2 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Shadewood Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.Shadewood, 2 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Pearlwood Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.Pearlwood, 2 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Dynasty Wood Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.DynastyWood, 2 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Spooky Wood Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.SpookyWood, 2 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));

            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Tin Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.TinBar, 1 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Copper Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.CopperBar, 1 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));

            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Iron Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.IronBar, 1 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Lead Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.LeadBar, 1 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));

            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Silver Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.SilverBar, 1 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Tungsten Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.TungstenBar, 1 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));

            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Gold Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.GoldBar, 1 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Platinum Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.PlatinumBar, 1 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));

            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Meteor Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.MeteoriteBar, 1 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Demonite Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.DemoniteBar, 1 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Crimtane Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.CrimtaneBar, 1 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Jungle Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.JungleSpores, 1 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Bee Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.BeeWax, 1 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Bone Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.Bone, 1 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Hellstone Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.HellstoneBar, 1 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));

            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Cobalt Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.CobaltBar, 1 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Palladium Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.PalladiumBar, 1 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Mythril Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.MythrilBar, 1 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Orichalcum Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.OrichalcumBar, 1 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Adamantite Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.AdamantiteBar, 1 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Titanium Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.TitaniumBar, 1 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));

            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Frost Core Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.FrostCore, 1 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Forbidden Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.AncientBattleArmorMaterial, 1 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Hallow Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.HallowedBar, 1 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Chlorophyte Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.ChlorophyteBar, 1 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Shroomite Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.ShroomiteBar, 1 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Spectre Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.SpectreBar, 1 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Shell Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has1             = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.BeetleShell, 1 }
                });
                var has2 = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.TurtleShell, 1 }
                });

                if (!hasEquip || (!has1 && !has2))
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));

            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Nebula Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.FragmentNebula, 1 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Vortex Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.FragmentVortex, 1 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Solar Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.FragmentSolar, 1 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Stardust Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.FragmentStardust, 1 }
                });

                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Luminite Ore Equipment",
                         new string[] { "Any Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                var anyEquipItemDefs = grps["Any Equipment"].ToDictionary(kv => kv, kv => 1);
                bool hasEquip        = RecipeHelpers.ItemHasIngredients(item.type, anyEquipItemDefs);
                var has = RecipeHelpers.ItemHasIngredients(item.type, new Dictionary <int, int> {
                    { ItemID.LunarBar, 1 }
                });

                if (!has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));
        }
        internal static void DefineItemEquipmentGroups4(IList <EntityGroupMatcherDefinition <Item> > defs)
        {
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Wood Equipment",
                         new string[] { "Any Equipment", "Any Wood" },
                         new ItemGroupMatcher((item, grps) => {
                IDictionary <int, int> anyEquipGrp = grps["Any Equipment"].ToDictionary(id => id, id => 1);
                IDictionary <int, int> anyWoodGrp  = grps["Any Wood"].ToDictionary(id => id, id => 1);

                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, anyEquipGrp);
                bool hasWood  = RecipeHelpers.ItemHasIngredients(item.type, anyWoodGrp);
                if (!hasEquip || !hasWood)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Copper Or Tin Equipment",
                         new string[] { "Any Copper Equipment", "Any Tin Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                return(grps["Any Copper Equipment"].Contains(item.type) ||
                       grps["Any Tin Equipment"].Contains(item.type));
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Iron Or Lead Equipment",
                         new string[] { "Any Iron Equipment", "Any Lead Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                return(grps["Any Iron Equipment"].Contains(item.type) ||
                       grps["Any Lead Equipment"].Contains(item.type));
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Silver Or Tungsten Equipment",
                         new string[] { "Any Silver Equipment", "Any Tungsten Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                return(grps["Any Silver Equipment"].Contains(item.type) ||
                       grps["Any Tungsten Equipment"].Contains(item.type));
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Gold Or Platinum Equipment",
                         new string[] { "Any Gold Equipment", "Any Platinum Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                return(grps["Any Gold Equipment"].Contains(item.type) ||
                       grps["Any Platinum Equipment"].Contains(item.type));
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Demonite Or Crimtane Equipment",
                         new string[] { "Any Demonite Equipment", "Any Crimtane Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                return(grps["Any Demonite Equipment"].Contains(item.type) ||
                       grps["Any Crimtane Equipment"].Contains(item.type));
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Meteor Or Jungle Or Bone Or Bee Equipment",
                         new string[] { "Any Meteor Equipment", "Any Jungle Equipment", "Any Bone Equipment", "Any Bee Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                return(grps["Any Meteor Equipment"].Contains(item.type) ||
                       grps["Any Jungle Equipment"].Contains(item.type) ||
                       grps["Any Bone Equipment"].Contains(item.type) ||
                       grps["Any Bee Equipment"].Contains(item.type));
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Cobalt Or Palladium Equipment",
                         new string[] { "Any Cobalt Equipment", "Any Palladium Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                return(grps["Any Cobalt Equipment"].Contains(item.type) ||
                       grps["Any Palladium Equipment"].Contains(item.type));
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Mythril Or Orichalcum Equipment",
                         new string[] { "Any Mythril Equipment", "Any Orichalcum Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                return(grps["Any Mythril Equipment"].Contains(item.type) ||
                       grps["Any Orichalcum Equipment"].Contains(item.type));
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Adamantite Or Titanium Equipment",
                         new string[] { "Any Adamantite Equipment", "Any Titanium Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                return(grps["Any Adamantite Equipment"].Contains(item.type) ||
                       grps["Any Titanium Equipment"].Contains(item.type));
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Frost Core Or Forbidden Equipment",
                         new string[] { "Any Frost Core Equipment", "Any Forbidden Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                return(grps["Any Frost Core Equipment"].Contains(item.type) ||
                       grps["Any Forbidden Equipment"].Contains(item.type));
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Chlorophyte Or Shroomite Or Spectre Equipment",
                         new string[] { "Any Chlorophyte Equipment", "Any Shroomite Equipment", "Any Spectre Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                return(grps["Any Chlorophyte Equipment"].Contains(item.type) ||
                       grps["Any Shroomite Equipment"].Contains(item.type) ||
                       grps["Any Spectre Equipment"].Contains(item.type));
            })
                         ));
            defs.Add(new EntityGroupMatcherDefinition <Item>(
                         "Any Celestial Equipment",
                         new string[] { "Any Nebula Equipment", "Any Vortex Equipment", "Any Solar Equipment", "Any Stardust Equipment" },
                         new ItemGroupMatcher((item, grps) => {
                return(grps["Any Nebula Equipment"].Contains(item.type) ||
                       grps["Any Vortex Equipment"].Contains(item.type) ||
                       grps["Any Solar Equipment"].Contains(item.type) ||
                       grps["Any Stardust Equipment"].Contains(item.type));
            })
                         ));
        }
 internal static void DefineItemEquipmentGroups4(Action <string, string[], Matcher> addDef)
 {
     addDef("Any Wood Equipment",
            new string[] { "Any Equipment", "Any Wood" },
            (item, grps) => {
         bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
         bool hasWood  = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Wood"], 1);
         if (!hasEquip || !hasWood)
         {
             return(false);
         }
         return(item.createTile == -1 && item.createWall == -1);
     }
            );
     addDef("Any Copper Or Tin Equipment",
            new string[] { "Any Copper Equipment", "Any Tin Equipment" },
            (item, grps) => {
         return(grps["Any Copper Equipment"].Contains(item.type) ||
                grps["Any Tin Equipment"].Contains(item.type));
     }
            );
     addDef("Any Iron Or Lead Equipment",
            new string[] { "Any Iron Equipment", "Any Lead Equipment" },
            (item, grps) => {
         return(grps["Any Iron Equipment"].Contains(item.type) ||
                grps["Any Lead Equipment"].Contains(item.type));
     }
            );
     addDef("Any Silver Or Tungsten Equipment",
            new string[] { "Any Silver Equipment", "Any Tungsten Equipment" },
            (item, grps) => {
         return(grps["Any Silver Equipment"].Contains(item.type) ||
                grps["Any Tungsten Equipment"].Contains(item.type));
     }
            );
     addDef("Any Gold Or Platinum Equipment",
            new string[] { "Any Gold Equipment", "Any Platinum Equipment" },
            (item, grps) => {
         return(grps["Any Gold Equipment"].Contains(item.type) ||
                grps["Any Platinum Equipment"].Contains(item.type));
     }
            );
     addDef("Any Demonite Or Crimtane Equipment",
            new string[] { "Any Demonite Equipment", "Any Crimtane Equipment" },
            (item, grps) => {
         return(grps["Any Demonite Equipment"].Contains(item.type) ||
                grps["Any Crimtane Equipment"].Contains(item.type));
     }
            );
     addDef("Any Meteor Or Jungle Or Bone Or Bee Equipment",
            new string[] { "Any Meteor Equipment", "Any Jungle Equipment", "Any Bone Equipment", "Any Bee Equipment" },
            (item, grps) => {
         return(grps["Any Meteor Equipment"].Contains(item.type) ||
                grps["Any Jungle Equipment"].Contains(item.type) ||
                grps["Any Bone Equipment"].Contains(item.type) ||
                grps["Any Bee Equipment"].Contains(item.type));
     }
            );
     addDef("Any Cobalt Or Palladium Equipment",
            new string[] { "Any Cobalt Equipment", "Any Palladium Equipment" },
            (item, grps) => {
         return(grps["Any Cobalt Equipment"].Contains(item.type) ||
                grps["Any Palladium Equipment"].Contains(item.type));
     }
            );
     addDef("Any Mythril Or Orichalcum Equipment",
            new string[] { "Any Mythril Equipment", "Any Orichalcum Equipment" },
            (item, grps) => {
         return(grps["Any Mythril Equipment"].Contains(item.type) ||
                grps["Any Orichalcum Equipment"].Contains(item.type));
     }
            );
     addDef("Any Adamantite Or Titanium Equipment",
            new string[] { "Any Adamantite Equipment", "Any Titanium Equipment" },
            (item, grps) => {
         return(grps["Any Adamantite Equipment"].Contains(item.type) ||
                grps["Any Titanium Equipment"].Contains(item.type));
     }
            );
     addDef("Any Frost Core Or Forbidden Equipment",
            new string[] { "Any Frost Core Equipment", "Any Forbidden Equipment" },
            (item, grps) => {
         return(grps["Any Frost Core Equipment"].Contains(item.type) ||
                grps["Any Forbidden Equipment"].Contains(item.type));
     }
            );
     addDef("Any Chlorophyte Or Shroomite Or Spectre Equipment",
            new string[] { "Any Chlorophyte Equipment", "Any Shroomite Equipment", "Any Spectre Equipment" },
            (item, grps) => {
         return(grps["Any Chlorophyte Equipment"].Contains(item.type) ||
                grps["Any Shroomite Equipment"].Contains(item.type) ||
                grps["Any Spectre Equipment"].Contains(item.type));
     }
            );
     addDef("Any Celestial Equipment",
            new string[] { "Any Nebula Equipment", "Any Vortex Equipment", "Any Solar Equipment", "Any Stardust Equipment" },
            (item, grps) => {
         return(grps["Any Nebula Equipment"].Contains(item.type) ||
                grps["Any Vortex Equipment"].Contains(item.type) ||
                grps["Any Solar Equipment"].Contains(item.type) ||
                grps["Any Stardust Equipment"].Contains(item.type));
     }
            );
 }
        internal static void DefineItemEquipmentGroups3(Action <string, string[], Matcher> addDef)
        {
            // Equipment Tiers

            addDef("Any Tiki Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                string name   = ItemIdentityHelpers.GetQualifiedName(item);
                if (!hasEquip || !name.Contains("Tiki"))
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });

            addDef("Any Cactus Equipment",
                   new string[] { "Any Equipment", },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.Cactus
                }, 1);
                if (!has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            }
                   );

            addDef("Any Plain Wood Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.Wood
                }, 2);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });
            addDef("Any Boreal Wood Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.BorealWood
                }, 2);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });
            addDef("Any Palm Wood Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.PalmWood
                }, 2);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });
            addDef("Any Rich Mahogany Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.RichMahogany
                }, 2);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });
            addDef("Any Ebonwood Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.Ebonwood
                }, 2);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });
            addDef("Any Shadewood Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.Shadewood
                }, 2);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });
            addDef("Any Pearlwood Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.Pearlwood
                }, 2);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });
            addDef("Any Dynasty Wood Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.DynastyWood
                }, 2);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });
            addDef("Any Spooky Wood Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.SpookyWood
                }, 2);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });

            addDef("Any Tin Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.TinBar
                }, 1);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });
            addDef("Any Copper Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.CopperBar
                }, 1);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });

            addDef("Any Iron Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.IronBar
                }, 1);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });
            addDef("Any Lead Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.LeadBar
                }, 1);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });

            addDef("Any Silver Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.SilverBar
                }, 1);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });
            addDef("Any Tungsten Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.TungstenBar
                }, 1);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });

            addDef("Any Gold Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.GoldBar
                }, 1);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });
            addDef("Any Platinum Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.PlatinumBar
                }, 1);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });

            addDef("Any Meteor Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.MeteoriteBar
                }, 1);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });
            addDef("Any Demonite Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.DemoniteBar
                }, 1);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });
            addDef("Any Crimtane Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.CrimtaneBar
                }, 1);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });
            addDef("Any Jungle Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.JungleSpores
                }, 1);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });
            addDef("Any Bee Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.BeeWax
                }, 1);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });
            addDef("Any Bone Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.Bone
                }, 1);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });
            addDef("Any Hellstone Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.HellstoneBar
                }, 1);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });

            addDef("Any Cobalt Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.CobaltBar
                }, 1);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });
            addDef("Any Palladium Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.PalladiumBar
                }, 1);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });
            addDef("Any Mythril Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.MythrilBar
                }, 1);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });
            addDef("Any Orichalcum Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.OrichalcumBar
                }, 1);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });
            addDef("Any Adamantite Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.AdamantiteBar
                }, 1);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });
            addDef("Any Titanium Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.TitaniumBar
                }, 1);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });

            addDef("Any Frost Core Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.FrostCore
                }, 1);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });
            addDef("Any Forbidden Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.AncientBattleArmorMaterial
                }, 1);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });
            addDef("Any Hallow Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.HallowedBar
                }, 1);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });
            addDef("Any Chlorophyte Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.ChlorophyteBar
                }, 1);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });
            addDef("Any Shroomite Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.ShroomiteBar
                }, 1);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });
            addDef("Any Spectre Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.SpectreBar
                }, 1);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });
            addDef("Any Shell Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has1      = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.BeetleShell
                }, 1);
                var has2 = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.TurtleShell
                }, 1);
                if (!hasEquip || (!has1 && !has2))
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });

            addDef("Any Nebula Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.FragmentNebula
                }, 1);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });
            addDef("Any Vortex Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.FragmentVortex
                }, 1);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });
            addDef("Any Solar Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.FragmentSolar
                }, 1);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });
            addDef("Any Stardust Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.FragmentStardust
                }, 1);
                if (!hasEquip || !has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });
            addDef("Any Luminite Ore Equipment",
                   new string[] { "Any Equipment" },
                   (item, grps) => {
                bool hasEquip = RecipeHelpers.ItemHasIngredients(item.type, grps["Any Equipment"], 1);
                var has       = RecipeHelpers.ItemHasIngredients(item.type, new HashSet <int> {
                    ItemID.LunarBar
                }, 1);
                if (!has)
                {
                    return(false);
                }
                return(item.createTile == -1 && item.createWall == -1);
            });
        }