package WayofTime.alchemicalWizardry.book.registries; import java.util.ArrayList; import java.util.HashMap; import WayofTime.alchemicalWizardry.book.compact.Category; import WayofTime.alchemicalWizardry.book.compact.Entry; public class EntryRegistry { public static void registerCategories(Category category){ categories.add(category); categoryMap.put(category.name, category); categoryCount++; } public static ArrayList categories = new ArrayList(); public static HashMap categoryMap = new HashMap(); public static int categoryCount = 0; public static void registerEntry(Category category, HashMap entryMap, Entry entry){ entryMap.put(entry.name, entry); entries.put(category, entryMap); if(maxEntries.containsKey(category) && entry.indexPage > maxEntries.get(category)) maxEntries.put(category, entry.indexPage); else if(!maxEntries.containsKey(category)) maxEntries.put(category, 0); } public static HashMap> entries = new HashMap>(); public static HashMap maxEntries = new HashMap(); public static HashMap basics = new HashMap(); public static HashMap rituals = new HashMap(); public static HashMap bloodUtils = new HashMap(); }