6 internal static class RecipeGroupHelper
8 internal static void ResetRecipeGroups() {
9 RecipeGroup.recipeGroups.Clear();
10 RecipeGroup.recipeGroupIDs.Clear();
11 RecipeGroup.nextRecipeGroupIndex = 0;
14 internal static void AddOldVanillaGroups() {
15 RecipeGroup rec =
new RecipeGroup(() => Lang.misc[37].Value +
" " + Lang.GetItemNameValue(ItemID.Wood),
new int[]
26 RecipeGroupID.Wood = RecipeGroup.RegisterGroup(
"Wood", rec);
27 rec =
new RecipeGroup(() => Lang.misc[37].Value +
" " + Lang.GetItemNameValue(ItemID.IronBar),
new int[]
32 RecipeGroupID.IronBar = RecipeGroup.RegisterGroup(
"IronBar", rec);
33 rec =
new RecipeGroup(() => Lang.misc[37].Value +
" " + Lang.misc[38].Value,
new int[]
35 ItemID.RedPressurePlate,
36 ItemID.GreenPressurePlate,
37 ItemID.GrayPressurePlate,
38 ItemID.BrownPressurePlate,
39 ItemID.BluePressurePlate,
40 ItemID.YellowPressurePlate,
41 ItemID.LihzahrdPressurePlate
43 RecipeGroupID.PressurePlate = RecipeGroup.RegisterGroup(
"PresurePlate", rec);
44 rec =
new RecipeGroup(() => Lang.misc[37].Value +
" " + Lang.GetItemNameValue(ItemID.SandBlock),
new int[]
47 ItemID.PearlsandBlock,
52 RecipeGroupID.Sand = RecipeGroup.RegisterGroup(
"Sand", rec);
53 rec =
new RecipeGroup(() => Lang.misc[37].Value +
" " + Lang.misc[51].Value,
new int[]
56 ItemID.FragmentVortex,
57 ItemID.FragmentNebula,
58 ItemID.FragmentStardust
60 RecipeGroupID.Fragment = RecipeGroup.RegisterGroup(
"Fragment", rec);
63 internal static void AddRecipeGroups() {
64 foreach (Mod mod
in ModLoader.Mods) {
66 mod.AddRecipeGroups();
69 e.Data[
"mod"] = mod.Name;
73 FixRecipeGroupLookups();
76 internal static void FixRecipeGroupLookups() {
77 for (
int k = 0; k < RecipeGroup.nextRecipeGroupIndex; k++) {
78 RecipeGroup rec = RecipeGroup.recipeGroups[k];
79 rec.ValidItemsLookup =
new bool[ItemLoader.ItemCount];
80 foreach (
int type
in rec.ValidItems) {
81 rec.ValidItemsLookup[type] =
true;