thaumcraft.api.research.ResearchCategoryList Java Examples
The following examples show how to use
thaumcraft.api.research.ResearchCategoryList.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ExThaumiquo.java From Ex-Aliquo with MIT License | 6 votes |
private static void removeResearch(String research) { Collection researchcategory = ResearchCategories.researchCategories.values(); for (Object obj : researchcategory) { Collection researchlist = ((ResearchCategoryList)obj).research.values(); for (Object researchitem : researchlist) { if (((ResearchItem)researchitem).key.equals(research)) { researchlist.remove(researchitem); break; } } } }
Example #2
Source File: ThaumcraftApi.java From AdvancedMod with GNU General Public License v3.0 | 5 votes |
public static Object[] getCraftingRecipeKey(EntityPlayer player, ItemStack stack) { int[] key = new int[] {Item.getIdFromItem(stack.getItem()),stack.getItemDamage()}; if (keyCache.containsKey(key)) { if (keyCache.get(key)==null) return null; if (ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), (String)(keyCache.get(key))[0])) return keyCache.get(key); else return null; } for (ResearchCategoryList rcl:ResearchCategories.researchCategories.values()) { for (ResearchItem ri:rcl.research.values()) { if (ri.getPages()==null) continue; for (int a=0;a<ri.getPages().length;a++) { ResearchPage page = ri.getPages()[a]; if (page.recipe!=null && page.recipe instanceof CrucibleRecipe[]) { CrucibleRecipe[] crs = (CrucibleRecipe[]) page.recipe; for (CrucibleRecipe cr:crs) { if (cr.getRecipeOutput().isItemEqual(stack)) { keyCache.put(key,new Object[] {ri.key,a}); if (ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), ri.key)) return new Object[] {ri.key,a}; } } } else if (page.recipeOutput!=null && stack !=null && page.recipeOutput.isItemEqual(stack)) { keyCache.put(key,new Object[] {ri.key,a}); if (ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), ri.key)) return new Object[] {ri.key,a}; else return null; } } } } keyCache.put(key,null); return null; }
Example #3
Source File: ThaumcraftApi.java From Chisel-2 with GNU General Public License v2.0 | 5 votes |
public static Object[] getCraftingRecipeKey(EntityPlayer player, ItemStack stack) { int[] key = new int[] {Item.getIdFromItem(stack.getItem()),stack.getItemDamage()}; if (keyCache.containsKey(key)) { if (keyCache.get(key)==null) return null; if (ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), (String)(keyCache.get(key))[0])) return keyCache.get(key); else return null; } for (ResearchCategoryList rcl:ResearchCategories.researchCategories.values()) { for (ResearchItem ri:rcl.research.values()) { if (ri.getPages()==null) continue; for (int a=0;a<ri.getPages().length;a++) { ResearchPage page = ri.getPages()[a]; if (page.recipe!=null && page.recipe instanceof CrucibleRecipe[]) { CrucibleRecipe[] crs = (CrucibleRecipe[]) page.recipe; for (CrucibleRecipe cr:crs) { if (cr.getRecipeOutput().isItemEqual(stack)) { keyCache.put(key,new Object[] {ri.key,a}); if (ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), ri.key)) return new Object[] {ri.key,a}; } } } else if (page.recipeOutput!=null && stack !=null && page.recipeOutput.isItemEqual(stack)) { keyCache.put(key,new Object[] {ri.key,a}); if (ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), ri.key)) return new Object[] {ri.key,a}; else return null; } } } } keyCache.put(key,null); return null; }
Example #4
Source File: ThaumcraftApi.java From GardenCollection with MIT License | 5 votes |
public static Object[] getCraftingRecipeKey(EntityPlayer player, ItemStack stack) { int[] key = new int[] {Item.getIdFromItem(stack.getItem()),stack.getItemDamage()}; if (keyCache.containsKey(key)) { if (keyCache.get(key)==null) return null; if (ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), (String)(keyCache.get(key))[0])) return keyCache.get(key); else return null; } for (ResearchCategoryList rcl:ResearchCategories.researchCategories.values()) { for (ResearchItem ri:rcl.research.values()) { if (ri.getPages()==null) continue; for (int a=0;a<ri.getPages().length;a++) { ResearchPage page = ri.getPages()[a]; if (page.recipe!=null && page.recipe instanceof CrucibleRecipe[]) { CrucibleRecipe[] crs = (CrucibleRecipe[]) page.recipe; for (CrucibleRecipe cr:crs) { if (cr.getRecipeOutput().isItemEqual(stack)) { keyCache.put(key,new Object[] {ri.key,a}); if (ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), ri.key)) return new Object[] {ri.key,a}; } } } else if (page.recipeOutput!=null && stack !=null && page.recipeOutput.isItemEqual(stack)) { keyCache.put(key,new Object[] {ri.key,a}); if (ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), ri.key)) return new Object[] {ri.key,a}; else return null; } } } } keyCache.put(key,null); return null; }
Example #5
Source File: ThaumcraftApi.java From ForbiddenMagic with Do What The F*ck You Want To Public License | 5 votes |
public static Object[] getCraftingRecipeKey(EntityPlayer player, ItemStack stack) { int[] key = new int[] {Item.getIdFromItem(stack.getItem()),stack.getItemDamage()}; if (keyCache.containsKey(key)) { if (keyCache.get(key)==null) return null; if (ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), (String)(keyCache.get(key))[0])) return keyCache.get(key); else return null; } for (ResearchCategoryList rcl:ResearchCategories.researchCategories.values()) { for (ResearchItem ri:rcl.research.values()) { if (ri.getPages()==null) continue; for (int a=0;a<ri.getPages().length;a++) { ResearchPage page = ri.getPages()[a]; if (page.recipe!=null && page.recipe instanceof CrucibleRecipe[]) { CrucibleRecipe[] crs = (CrucibleRecipe[]) page.recipe; for (CrucibleRecipe cr:crs) { if (cr.getRecipeOutput().isItemEqual(stack)) { keyCache.put(key,new Object[] {ri.key,a}); if (ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), ri.key)) return new Object[] {ri.key,a}; } } } else if (page.recipeOutput!=null && stack !=null && page.recipeOutput.isItemEqual(stack)) { keyCache.put(key,new Object[] {ri.key,a}); if (ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), ri.key)) return new Object[] {ri.key,a}; else return null; } } } } keyCache.put(key,null); return null; }
Example #6
Source File: ThaumcraftApi.java From PneumaticCraft with GNU General Public License v3.0 | 5 votes |
public static Object[] getCraftingRecipeKey(EntityPlayer player, ItemStack stack) { int[] key = new int[] {Item.getIdFromItem(stack.getItem()),stack.getItemDamage()}; if (keyCache.containsKey(key)) { if (keyCache.get(key)==null) return null; if (ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), (String)(keyCache.get(key))[0])) return keyCache.get(key); else return null; } for (ResearchCategoryList rcl:ResearchCategories.researchCategories.values()) { for (ResearchItem ri:rcl.research.values()) { if (ri.getPages()==null) continue; for (int a=0;a<ri.getPages().length;a++) { ResearchPage page = ri.getPages()[a]; if (page.recipe!=null && page.recipe instanceof CrucibleRecipe[]) { CrucibleRecipe[] crs = (CrucibleRecipe[]) page.recipe; for (CrucibleRecipe cr:crs) { if (cr.getRecipeOutput().isItemEqual(stack)) { keyCache.put(key,new Object[] {ri.key,a}); if (ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), ri.key)) return new Object[] {ri.key,a}; } } } else if (page.recipeOutput!=null && stack !=null && page.recipeOutput.isItemEqual(stack)) { keyCache.put(key,new Object[] {ri.key,a}); if (ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), ri.key)) return new Object[] {ri.key,a}; else return null; } } } } keyCache.put(key,null); return null; }