Initial comment to start using Blood Utils' book

This commit is contained in:
WayofTime 2014-11-03 18:05:28 -05:00
parent d1fa088923
commit 51346b5638
90 changed files with 2272 additions and 21 deletions

View file

@ -0,0 +1,40 @@
package bloodutils.api.registries;
import java.util.ArrayList;
import java.util.HashMap;
import bloodutils.api.compact.Category;
import bloodutils.api.compact.Entry;
import bloodutils.api.entries.IEntry;
public class EntryRegistry {
public static void registerCategories(Category category){
categories.add(category);
categoryMap.put(category.name, category);
categoryCount++;
}
public static ArrayList<Category> categories = new ArrayList<Category>();
public static HashMap<String, Category> categoryMap = new HashMap<String, Category>();
public static int categoryCount = 0;
public static void registerEntry(Category category, HashMap<String, Entry> 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<Category, HashMap<String, Entry>> entries = new HashMap<Category, HashMap<String, Entry>>();
public static HashMap<Category, Integer> maxEntries = new HashMap<Category, Integer>();
public static HashMap<String, Entry> basics = new HashMap<String, Entry>();
public static HashMap<String, Entry> rituals = new HashMap<String, Entry>();
public static HashMap<String, Entry> bloodUtils = new HashMap<String, Entry>();
}