package thaumcraft.api.research; import java.util.HashMap; import java.util.List; import java.util.Map; import thaumcraft.api.EnumTag; public class ResearchList { /** Is the smallest column used on the GUI. */ public static int minDisplayColumn; /** Is the smallest row used on the GUI. */ public static int minDisplayRow; /** Is the biggest column used on the GUI. */ public static int maxDisplayColumn; /** Is the biggest row used on the GUI. */ public static int maxDisplayRow; //Research public static Map research = new HashMap(); public static Map craftingRecipesForResearch = new HashMap(); // /** * @param key * @return the research item linked to this key */ public static ResearchItem getResearch(String key) { return research.get(key); } /** * @param key * @return the name of the research linked to this key */ public static String getResearchName(String key) { ResearchItem rr = research.get(key); if (rr==null) return ""; return rr.name; } /** * @param key * @return a list of the enumtags used in this research. returns the numeric values and not the actual enum */ public static byte[] getResearchTags(String key) { ResearchItem rr = research.get(key); if (rr==null) return null; byte[] output = new byte[rr.tags.size()]; EnumTag[] et = rr.tags.getAspects(); for (int a=0;aamt) { t=tag.id; amt=rr.tags.getAmount(tag); }; } return t; } public static int getResearchAmount(String key, EnumTag tag) { ResearchItem rr = research.get(key); if (rr==null) return 0; return rr.tags.getAmount(tag); } }