thaumcraft.api.research.ResearchPage Java Examples
The following examples show how to use
thaumcraft.api.research.ResearchPage.
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: GuiResearchRecipeAuraEffects.java From Gadomancy with GNU Lesser General Public License v3.0 | 6 votes |
private void drawAuraAspectPagePre(ResearchPage page, int side, int x, int y, int mx, int my, int thisPage) { GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS); String researchName = Gadomancy.MODID.toUpperCase() + ".AURA_EFFECTS"; //We know the name of that research. researchName = StatCollector.translateToLocal(researchName); if ((thisPage == 0) && (side == 0)) { drawTexturedModalRect(x + 4, y - 13, 24, 184, 96, 4); drawTexturedModalRect(x + 4, y + 4, 24, 184, 96, 4); int offset = this.fontRendererObj.getStringWidth(researchName); if (offset <= 130) { this.fontRendererObj.drawString(researchName, x + 52 - offset / 2, y - 6, 3158064); } else { float vv = 130.0F / offset; GL11.glPushMatrix(); GL11.glTranslatef(x + 52 - offset / 2 * vv, y - 6.0F * vv, 0.0F); GL11.glScalef(vv, vv, vv); this.fontRendererObj.drawString(researchName, 0, 0, 3158064); GL11.glPopMatrix(); } y += 25; } GL11.glAlphaFunc(GL11.GL_GREATER, 0.003921569F); drawAuraPage(side, x - 8, y - 8, mx, my, page.aspects); GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F); GL11.glPopAttrib(); }
Example #2
Source File: RegisteredResearches.java From Gadomancy with GNU Lesser General Public License v3.0 | 6 votes |
public static void postInit() { ResearchItem researchJar = PseudoResearchItem.create("JARLABEL", -3, -7).registerResearchItem(); RecipeVisualStickyJar visualRecipe = new RecipeVisualStickyJar(); ResearchPage page = new ResearchPage(visualRecipe); researchStickyJar = new StickyJarResearchItem("STICKYJAR", -5, -5, 2, new AspectList().add(Aspect.SLIME, 8).add(Aspect.EARTH, 8)) .setParents(researchJar.key).setConcealed() .setPages(new ResearchPage("gadomancy.research_page.STICKYJAR.1"), page).registerResearchItem(); if(researchBlockProtector != null) { researchBlockProtector.setParents(researchStickyJar.key); } String[] parents = Config.allowMirrors ? new String[] { researchJar.key, "MIRRORESSENTIA" } : new String[] { researchJar.key }; researchRemoteJar = new SimpleResearchItem("REMOTEJAR", -4, -3, 3, RegisteredRecipes.recipeRemoteJar.getRecipeOutput(), new AspectList().add(Aspect.WATER, 4).add(Aspect.MECHANISM, 8).add(Aspect.EARTH, 4).add(Aspect.ORDER, 8)) .setParents(parents).setConcealed() .setPages(new ResearchPage("gadomancy.research_page.REMOTEJAR.1"), new ResearchPage(RegisteredRecipes.recipeRemoteJar), new ResearchPage("gadomancy.research_page.REMOTEJAR.2")).registerResearchItem(); //Aura researches AuraResearchManager.registerAuraResearches(); }
Example #3
Source File: EMTResearchItem.java From Electro-Magic-Tools with GNU General Public License v3.0 | 6 votes |
@Override public ResearchItem setPages(ResearchPage... par) { for (ResearchPage page : par) { if (page.type == PageType.TEXT) page.text = "emt.text." + key; if (page.type == PageType.INFUSION_CRAFTING) { if (parentsHidden == null || parentsHidden.length == 0) parentsHidden = new String[]{"INFUSION"}; else { String[] newParents = new String[parentsHidden.length + 1]; newParents[0] = "INFUSION"; for (int i = 0; i < parentsHidden.length; i++) newParents[i + 1] = parentsHidden[i]; parentsHidden = newParents; } } } return super.setPages(par); }
Example #4
Source File: GuiResearchRecipeAuraEffects.java From Gadomancy with GNU Lesser General Public License v3.0 | 5 votes |
public GuiResearchRecipeAuraEffects(ResearchItem research, int page, double x, double y) { super(research, page, x, y); Injector inj = new Injector(this, GuiResearchRecipe.class); ResearchPage[] additionalPages = ResearchPageAuraAspects.createAllAuraPagesFor(Minecraft.getMinecraft().thePlayer); ResearchPage[] pages = inj.getField("pages"); ResearchPage[] newPages = new ResearchPage[pages.length + additionalPages.length]; System.arraycopy(pages, 0, newPages, 0, pages.length); System.arraycopy(additionalPages, 0, newPages, pages.length, additionalPages.length); inj.setField("pages", newPages); inj.setField("maxPages", newPages.length); List<String> list = Thaumcraft.proxy.getScannedObjects().get(Minecraft.getMinecraft().thePlayer.getCommandSenderName()); if ((list != null) && (list.size() > 0)) { for (String s : list) { try { String s2 = s.substring(1); ItemStack is = getFromCache(Integer.parseInt(s2)); if (is != null) { AspectList tags = ThaumcraftCraftingManager.getObjectTags(is); tags = ThaumcraftCraftingManager.getBonusTags(is, tags); if ((tags != null) && (tags.size() > 0)) { for (Aspect a : tags.getAspects()) { ArrayList<ItemStack> items = itemMap.get(a.getTag()); if (items == null) { items = new ArrayList<ItemStack>(); } ItemStack is2 = is.copy(); is2.stackSize = tags.getAmount(a); items.add(is2); itemMap.put(a.getTag(), items); } } } } catch (NumberFormatException e) {} } } }
Example #5
Source File: DisguiseResearchItem.java From Gadomancy with GNU Lesser General Public License v3.0 | 5 votes |
@Override public ResearchItem setPages(ResearchPage... pages) { for(ResearchPage page : pages) { if(page.type == ResearchPage.PageType.INFUSION_CRAFTING && page.recipe instanceof InfusionVisualDisguiseArmor) { recipe = (InfusionVisualDisguiseArmor) page.recipe; } } return super.setPages(pages); }
Example #6
Source File: ResearchPageAuraAspects.java From Gadomancy with GNU Lesser General Public License v3.0 | 5 votes |
public static ResearchPage[] createAllAuraPagesFor(EntityPlayer player) { List<ResearchPage> pages = new ArrayList<ResearchPage>(); int additionalPages = ResearchPageAuraAspects.getAdditionalPagesFor(player); for (int i = 0; i < additionalPages; i++) { List<String> tags = ResearchPageAuraAspects.getAspectTagsForPageIndex(player, i); AspectList list = ResearchPageAuraAspects.createPageAspectList(tags); pages.add(new ResearchPageAuraAspects(list)); } ResearchPage[] t = new ResearchPage[1]; return pages.toArray(t); }
Example #7
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 #8
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 #9
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 #10
Source File: ForbiddenResearch.java From ForbiddenMagic with Do What The F*ck You Want To Public License | 5 votes |
public static void addResearch() { ResearchCategories.registerCategory("FORBIDDEN", new ResourceLocation("forbidden", "textures/misc/forbidden.png"), new ResourceLocation("forbidden", "textures/misc/runecircle.png")); addInfernalism(); addTaint(); if(thaumcraft.common.config.Config.researchDifficulty != -1) (new DarkResearchItem("CRYSTALWELL", "FORBIDDEN", (new AspectList()).add(Aspect.MIND, 3).add(Aspect.CRYSTAL, 2).add(Aspect.MAGIC, 1), -2, -8, 1, new ItemStack(ForbiddenItems.crystalwell, 1, 0))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.CRYSTALWELL.1"), new ResearchPage((IArcaneRecipe) recipes.get("Crystalwell")) }).setParents(new String[] { "RESEARCH" }).registerResearchItem(); else (new DarkResearchItem("CRYSTALWELL", "FORBIDDEN", (new AspectList()).add(Aspect.MIND, 3).add(Aspect.CRYSTAL, 2).add(Aspect.MAGIC, 1), -2, -8, 1, new ItemStack(ForbiddenItems.crystalwell, 1, 0))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.CRYSTALWELL.1b"), new ResearchPage((IArcaneRecipe) recipes.get("Crystalwell")) }).setParents(new String[] { "RESEARCH" }).registerResearchItem(); (new DarkResearchItem("PRIMEWELL", "FORBIDDEN", (new AspectList()).add(Aspect.MIND, 3).add(Aspect.ELDRITCH, 6).add(Aspect.CRAFT, 1), 2, -8, 1, new ItemStack(ForbiddenItems.primewell, 1, 0))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.PRIMEWELL.1"), new ResearchPage((IArcaneRecipe) recipes.get("Primewell")) }).setParents(new String[] { "PRIMPEARL" }).setConcealed().registerResearchItem(); if (Config.emeraldTrans) (new DarkResearchItem("TRANSEMERALD", "FORBIDDEN", (new AspectList()).add(Aspect.CRYSTAL, 2).add(Aspect.EXCHANGE, 5).add(Aspect.GREED, 4), 0, -6, 3, new ItemStack(ForbiddenItems.resource, 1, 0))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.TRANSEMERALD.1"), new ResearchPage((CrucibleRecipe) recipes.get("TransEmerald")) }).setSecondary().setConcealed().setParents(new String[] { "TRANSGOLD" }).registerResearchItem(); (new DarkResearchItem("BLACKFLOWER", "FORBIDDEN", (new AspectList()).add(Aspect.PLANT, 3).add(Aspect.SENSES, 2).add(Aspect.DARKNESS, 4), -2, -6, 1, new ItemStack(ForbiddenBlocks.blackFlower, 1, 0))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.BLACKFLOWER.1"), new ResearchPage((CrucibleRecipe) recipes.get("BlackFlower")), new ResearchPage((IRecipe) recipes.get("BlackInk")) }).setAspectTriggers(new Aspect[] { Aspect.SENSES }).registerResearchItem(); (new DarkResearchItem("RIDINGCROP", "FORBIDDEN", new AspectList(), 0, -8, 0, new ItemStack(ForbiddenItems.ridingCrop))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.RIDINGCROP.1"), new ResearchPage((IRecipe) recipes.get("RidingCrop")) }).setStub().setRound().setAutoUnlock().registerResearchItem(); if(Config.enchanting) { (new DarkResearchItem("CONSUMING", "FORBIDDEN", (new AspectList()).add(Aspect.VOID, 4).add(Aspect.ENTROPY, 3).add(Aspect.MAGIC, 2), -4, -8, 1, new ResourceLocation("forbidden", "textures/misc/consuming.png"))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.CONSUMING.1"), new ResearchPage((InfusionEnchantmentRecipe) recipes.get("Consuming"))}).setParents(new String[]{"INFUSIONENCHANTMENT"}).setSecondary().setConcealed().registerResearchItem(); (new DarkResearchItem("EDUCATIONAL", "FORBIDDEN", (new AspectList()).add(Aspect.MIND, 5).add(Aspect.WEAPON, 1).add(Aspect.MAGIC, 3), -4, -7, 2, new ResourceLocation("forbidden", "textures/misc/educational.png"))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.EDUCATIONAL.1"), new ResearchPage((InfusionEnchantmentRecipe) recipes.get("Educational"))}).setParents(new String[]{"INFUSIONENCHANTMENT"}).setSecondary().setConcealed().registerResearchItem(); } if(Compat.botan || Compat.bm || Compat.am2) (new DarkResearchItem("SCHOOLS", "FORBIDDEN", new AspectList(), -1, 1, 0, new ItemStack(Blocks.enchanting_table))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.SCHOOLS.1") }).setRound().setStub().setAutoUnlock().registerResearchItem(); }
Example #11
Source File: ForbiddenResearch.java From ForbiddenMagic with Do What The F*ck You Want To Public License | 5 votes |
public static void addTaint() { (new DarkResearchItem("TAINTSHOVEL", "FORBIDDEN", (new AspectList()).add(Aspect.CRYSTAL, 3).add(Aspect.TAINT, 2).add(Aspect.TOOL, 1), -8, 1, 2, new ItemStack(ForbiddenItems.taintShovel))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.TAINTSHOVEL.1"), new ResearchPage((InfusionRecipe) recipes.get("TaintShovel")), new ResearchPage("forbidden.research_page.TAINTSHOVEL.2") }).setParents(new String[] { "THAUMIUM", "INFUSION", "ETHEREALBLOOM" }).setConcealed().registerResearchItem(); (new DarkResearchItem("TAINTPICK", "FORBIDDEN", (new AspectList()).add(Aspect.TOOL, 2).add(Aspect.TAINT, 4).add(Aspect.ENTROPY, 3), -10, 1, 2, new ItemStack(ForbiddenItems.taintPickaxe))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.TAINTPICK.1"), new ResearchPage((InfusionRecipe) recipes.get("TaintPick")) }).setParents(new String[] { "THAUMIUM", "INFUSION" }).setConcealed().registerResearchItem(); (new DarkResearchItem("ROD_tainted", "FORBIDDEN", (new AspectList()).add(Aspect.MAGIC, 4).add(Aspect.TAINT, 5).add(Aspect.TOOL, 2), -8, 3, 3, new ItemStack(ForbiddenItems.wandCore, 1, 0))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.ROD_tainted.1"), new ResearchPage((InfusionRecipe) recipes.get("WandRodTainted")) }).setParents(new String[] { "ROD_silverwood", "TAINTSHOVEL", "INFUSION" }).setConcealed().registerResearchItem(); (new DarkResearchItem("TAINTTREE", "FORBIDDEN", (new AspectList()).add(Aspect.TREE, 4).add(Aspect.TAINT, 6).add(Aspect.POISON, 2).add(Aspect.PLANT, 3), -11, 3, 3, new ItemStack(ForbiddenBlocks.taintSapling))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.TAINTTREE.1"), new ResearchPage((CrucibleRecipe) recipes.get("TaintTree")), new ResearchPage((IRecipe) recipes.get("TaintPlank")), new ResearchPage(new ItemStack(ForbiddenBlocks.taintLog, 1, 0)) }).setParents(new String[]{"THAUMIUM", "INFUSION", "ETHEREALBLOOM"}).setConcealed().registerResearchItem(); ThaumcraftApi.addWarpToResearch("TAINTTREE", 1); ThaumcraftApi.addWarpToItem(new ItemStack(ForbiddenBlocks.taintSapling, 1, 0), 1); (new DarkResearchItem("TAINTSTONE", "FORBIDDEN", (new AspectList()).add(Aspect.EARTH, 4).add(Aspect.TAINT, 6).add(Aspect.ORDER, 2), -10, 3, 2, new ItemStack(ForbiddenBlocks.taintStone, 1, 1))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.TAINTSTONE.1"), new ResearchPage((IArcaneRecipe) recipes.get("TaintStone")), new ResearchPage((IRecipe) recipes.get("TaintBrick"))}).setParents(new String[]{"THAUMIUM", "INFUSION", "ETHEREALBLOOM"}).setConcealed().registerResearchItem(); ThaumcraftApi.addWarpToResearch("ROD_tainted", 2); }
Example #12
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 #13
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; }
Example #14
Source File: GuiResearchRecipeAuraEffects.java From Gadomancy with GNU Lesser General Public License v3.0 | 4 votes |
@Override protected void genResearchBackground(int par1, int par2, float par3) { int sw = (this.width - this.paneWidth) / 2; int sh = (this.height - this.paneHeight) / 2; float var10 = (this.width - this.paneWidth * 1.3F) / 2.0F; float var11 = (this.height - this.paneHeight * 1.3F) / 2.0F; GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); UtilsFX.bindTexture(this.tex1); GL11.glPushMatrix(); GL11.glTranslatef(var10, var11, 0.0F); GL11.glEnable(GL11.GL_BLEND); GL11.glScalef(1.3F, 1.3F, 1.0F); drawTexturedModalRect(0, 0, 0, 0, this.paneWidth, this.paneHeight); GL11.glPopMatrix(); Injector inj = new Injector(this, GuiResearchRecipe.class); ArrayList<List> reference = inj.getField("reference"); inj.setField("tooltip", null); ResearchPage[] pages = inj.getField("pages"); int page = inj.getField("page"); int maxPages = inj.getField("maxPages"); reference.clear(); int current = 0; for (int a = 0; a < pages.length; a++) { if (((current == page) || (current == page + 1)) && (current < maxPages)) { ResearchPage rPage = pages[a]; if (rPage instanceof ResearchPageAuraAspects) { drawAuraAspectPagePre(rPage, current % 2, sw, sh, par1, par2, page); } else if(rPage != null) { try { Method m = Injector.getMethod("drawPage", GuiResearchRecipe.class, ResearchPage.class, int.class, int.class, int.class, int.class, int.class); m.setAccessible(true); m.invoke(this, pages[a], current % 2, sw, sh, par1, par2); } catch (Exception e) { e.printStackTrace(); } } } current++; if (current > page + 1) { break; } } UtilsFX.bindTexture(this.tex1); float bob = MathHelper.sin(this.mc.thePlayer.ticksExisted / 3.0F) * 0.2F + 0.1F; if (!history.isEmpty()) { GL11.glEnable(GL11.GL_BLEND); drawTexturedModalRectScaled(sw + 118, sh + 189, 38, 202, 20, 12, bob); } if (page > 0) { GL11.glEnable(GL11.GL_BLEND); drawTexturedModalRectScaled(sw - 16, sh + 190, 0, 184, 12, 8, bob); } if (page < maxPages - 2) { GL11.glEnable(GL11.GL_BLEND); drawTexturedModalRectScaled(sw + 262, sh + 190, 12, 184, 12, 8, bob); } inj.setField("reference", reference); }
Example #15
Source File: PseudoResearchItem.java From Gadomancy with GNU Lesser General Public License v3.0 | 4 votes |
@Override public ResearchPage[] getPages() { return original.getPages(); }
Example #16
Source File: ForbiddenResearch.java From ForbiddenMagic with Do What The F*ck You Want To Public License | 4 votes |
public static void addInfernalism() { if (!Config.noLust) (new DarkResearchItem("NETHERSHARDS", "FORBIDDEN", new AspectList(), -8, -5, 0, new ItemStack(ForbiddenItems.deadlyShards, 1, 0))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.NETHERSHARDS.1"), new ResearchPage("forbidden.research_page.NETHERSHARDS.2"), new ResearchPage("forbidden.research_page.NETHERSHARDS.3") }).setStub().setRound().setAutoUnlock().registerResearchItem(); else (new DarkResearchItem("NETHERSHARDS", "FORBIDDEN", new AspectList(), -8, -5, 0, new ItemStack(ForbiddenItems.deadlyShards, 1, 0))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.NETHERSHARDS.1"), new ResearchPage("forbidden.research_page.NETHERSHARDS.2b"), new ResearchPage("forbidden.research_page.NETHERSHARDS.3") }).setStub().setRound().setAutoUnlock().registerResearchItem(); (new DarkResearchItem("HELLFIRE", "FORBIDDEN", (new AspectList()).add(Aspect.FIRE, 3).add(DarkAspects.NETHER, 4).add(Aspect.TRAVEL, 2), -8, -8, 1, new ItemStack(Blocks.fire))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.HELLFIRE.1") }).setRound().registerResearchItem().setHidden().setAspectTriggers(new Aspect[]{DarkAspects.NETHER}).setParents(new String[] { "NETHERSHARDS" }); (new DarkResearchItem("ROD_profane", "FORBIDDEN", (new AspectList()), -9, -8, 0, new ItemStack(ForbiddenItems.wandCore, 1, 5))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.ROD_profane.1") }).setRound().registerResearchItem().setHidden().setParents(new String[] { "NETHERSHARDS" }).setStub(); if(!Config.noLust) (new DarkResearchItem("SUBCOLLAR", "FORBIDDEN", (new AspectList().add(Aspect.AURA, 3).add(DarkAspects.LUST, 8).add(Aspect.MAGIC, 3).add(Aspect.TRAP, 6).add(Aspect.FLESH, 4)), -11, -5, 2, new ItemStack(ForbiddenItems.subCollar))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.SUBCOLLAR.1"), new ResearchPage((InfusionRecipe) recipes.get("SubCollar")) }).setParents(new String[] { "NETHERSHARDS", "VISAMULET", "INFUSION" }).setHidden().setAspectTriggers(new Aspect[]{DarkAspects.LUST}).registerResearchItem(); (new DarkResearchItem("SKULLAXE", "FORBIDDEN", (new AspectList()).add(Aspect.WEAPON, 3).add(DarkAspects.WRATH, 4).add(DarkAspects.NETHER, 1), -11, -7, 2, new ItemStack(ForbiddenItems.skullAxe))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.SKULLAXE.1"), new ResearchPage((InfusionRecipe) recipes.get("SkullAxe")) }).setParents(new String[] { "NETHERSHARDS", "THAUMIUM", "INFUSION" }).setConcealed().registerResearchItem(); ThaumcraftApi.addWarpToResearch("SKULLAXE", 1); if(Config.gluttony != 1) { (new DarkResearchItem("RINGFOOD", "FORBIDDEN", (new AspectList()).add(DarkAspects.GLUTTONY, 4).add(Aspect.HUNGER, 3).add(Aspect.LIFE, 2), -11, -6, 2, new ItemStack(ForbiddenItems.ringFood))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.RINGFOOD.1"), new ResearchPage((IArcaneRecipe) recipes.get("RingFood"))}).setParents(new String[]{"NETHERSHARDS"}).registerResearchItem(); (new DarkResearchItem("ARCANECAKE", "FORBIDDEN", (new AspectList()).add(DarkAspects.GLUTTONY, 6).add(Aspect.HUNGER, 3).add(Aspect.CRAFT, 2), -12, -6, 2, new ItemStack(ForbiddenItems.arcaneCakeItem))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.ARCANECAKE.1"), new ResearchPage((InfusionRecipe) recipes.get("ArcaneCake"))}).setParents(new String[]{"NETHERSHARDS", "INFUSION"}).setAspectTriggers(new Aspect[]{DarkAspects.GLUTTONY}).setConcealed().registerResearchItem(); } (new DarkResearchItem("FOCUSBLINK", "FORBIDDEN", (new AspectList()).add(Aspect.TRAVEL, 3).add(Aspect.ENTROPY, 3).add(DarkAspects.NETHER, 3).add(DarkAspects.SLOTH, 6), -11, -3, 2, new ItemStack(ForbiddenItems.blinkFocus))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.FOCUSBLINK.1"), new ResearchPage((InfusionRecipe) recipes.get("FocusBlink"))}).setConcealed().setParents(new String[]{"NETHERSHARDS", "INFUSION"}).registerResearchItem(); (new DarkResearchItem("MORPHTOOLS", "FORBIDDEN", (new AspectList()).add(Aspect.TOOL, 2).add(DarkAspects.ENVY, 3).add(Aspect.EXCHANGE, 2), -9, -3, 4, new ItemStack(ForbiddenItems.morphPickaxe))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.MORPHTOOLS.1"), new ResearchPage((InfusionRecipe) recipes.get("MorphPick")), new ResearchPage((InfusionRecipe) recipes.get("MorphSword")), new ResearchPage((InfusionRecipe) recipes.get("MorphShovel")), new ResearchPage((InfusionRecipe) recipes.get("MorphAxe")) }).setParentsHidden(new String[] { "THAUMIUM", "INFUSIONENCHANTMENT" }).setParents(new String[] { "NETHERSHARDS" }).setConcealed().registerResearchItem(); ThaumcraftApi.addWarpToResearch("MORPHTOOLS", 4); (new DarkResearchItem("ROD_infernal", "FORBIDDEN", (new AspectList()).add(DarkAspects.NETHER, 4).add(Aspect.FIRE, 3).add(Aspect.TOOL, 1), -11, -4, 3, new ItemStack(ForbiddenItems.wandCore, 1, 1))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.ROD_infernal.1"), new ResearchPage((InfusionRecipe) recipes.get("WandRodInfernal")), new ResearchPage("forbidden.research_page.ROD_infernal.2") }).setParents(new String[] { "ROD_silverwood", "INFUSION", "NETHERSHARDS" }).setConcealed().registerResearchItem(); ThaumcraftApi.addWarpToResearch("ROD_infernal", 2); if(Config.enchanting) { (new DarkResearchItem("WRATH", "FORBIDDEN", (new AspectList()).add(DarkAspects.WRATH, 16).add(Aspect.WEAPON, 20).add(Aspect.MAGIC, 10), -6, -3, 4, new ResourceLocation("forbidden", "textures/misc/wrath.png"))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.WRATH.1"), new ResearchPage((InfusionEnchantmentRecipe) recipes.get("Wrath"))}).setParents(new String[]{"NETHERSHARDS", "INFUSIONENCHANTMENT"}).setConcealed().registerResearchItem(); ThaumcraftApi.addWarpToResearch("WRATH", 3); if (Config.greedyEnch) (new DarkResearchItem("GREEDY", "FORBIDDEN", (new AspectList()).add(Aspect.MAGIC, 2).add(Aspect.WEAPON, 1).add(Aspect.GREED, 3), -6, -5, 2, new ResourceLocation("forbidden", "textures/misc/greedy.png"))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.GREEDY.1"), new ResearchPage((InfusionEnchantmentRecipe) recipes.get("Greedy"))}).setParents(new String[]{"NETHERSHARDS", "INFUSIONENCHANTMENT"}).setConcealed().registerResearchItem(); (new DarkResearchItem("CORRUPTING", "FORBIDDEN", (new AspectList()).add(DarkAspects.NETHER, 5).add(Aspect.CRYSTAL, 2).add(Aspect.EXCHANGE, 1), -6, -4, 1, new ResourceLocation("forbidden", "textures/misc/corrupting.png"))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.CORRUPTING.1"), new ResearchPage((InfusionEnchantmentRecipe) recipes.get("Corrupting"))}).setParents(new String[]{"NETHERSHARDS", "INFUSIONENCHANTMENT"}).setConcealed().registerResearchItem(); (new DarkResearchItem("CLUSTER", "FORBIDDEN", (new AspectList()).add(Aspect.METAL, 1).add(Aspect.FIRE, 4).add(DarkAspects.ENVY, 3), -10, -1, 3, new ResourceLocation("forbidden", "textures/misc/lucrative.png"))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.CLUSTER.1"), new ResearchPage((InfusionEnchantmentRecipe) recipes.get("Cluster"))}).setParents(new String[]{"MORPHTOOLS", "ELEMENTALPICK"}).setSecondary().setConcealed().registerResearchItem(); (new DarkResearchItem("IMPACT", "FORBIDDEN", (new AspectList()).add(Aspect.ENTROPY, 8).add(Aspect.TOOL, 10).add(Aspect.MINE, 16).add(DarkAspects.ENVY, 10), -9, -1, 3, new ResourceLocation("forbidden", "textures/misc/impact.png"))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.IMPACT.1"), new ResearchPage((InfusionEnchantmentRecipe) recipes.get("Impact"))}).setParents(new String[]{"MORPHTOOLS", "ELEMENTALSHOVEL"}).setConcealed().registerResearchItem(); (new DarkResearchItem("VOIDTOUCHED", "FORBIDDEN", (new AspectList()).add(Aspect.ELDRITCH, 16).add(Aspect.TOOL, 10).add(Aspect.CRAFT, 8).add(DarkAspects.ENVY, 32), -8, -1, 4, new ResourceLocation("forbidden", "textures/misc/voidtouched.png"))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.VOIDTOUCHED.1"), new ResearchPage((InfusionEnchantmentRecipe) recipes.get("Voidtouched"))}).setParents(new String[]{"MORPHTOOLS", "VOIDMETAL"}).setConcealed().registerResearchItem(); ThaumcraftApi.addWarpToResearch("VOIDTOUCHED", 3); } if (Config.wrathCage) { (new DarkResearchItem("FORK", "FORBIDDEN", (new AspectList()).add(DarkAspects.NETHER, 3).add(Aspect.MECHANISM, 1).add(Aspect.TOOL, 1), -6, -7, 0, new ItemStack(ForbiddenItems.fork))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.FORK.1"), new ResearchPage((InfusionRecipe) recipes.get("Fork")), new ResearchPage("WRATHCAGE", "forbidden.research_page.FORK.wc") }).setParents(new String[] {"INFUSION", "NETHERSHARDS", "THAUMIUM"}).setSecondary().setConcealed().registerResearchItem(); if (Config.wrathCost > 0) (new DarkResearchItem("WRATHCAGE", "FORBIDDEN", (new AspectList()).add(DarkAspects.WRATH, 5).add(Aspect.MECHANISM, 3).add(Aspect.BEAST, 2), -6, -9, 4, new ItemStack(ForbiddenBlocks.wrathCage))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.WRATHCAGE.1"), new ResearchPage((InfusionRecipe) recipes.get("WrathCage")), new ResearchPage("forbidden.research_page.WRATHCAGE.2"), new ResearchPage("forbidden.research_page.WRATHCAGE.3"), new ResearchPage((CrucibleRecipe) recipes.get("MobCrystal"))}).setParents(new String[]{"FORK"}).setParentsHidden(new String[]{"INFUSION", "THAUMIUM", "DISTILESSENTIA"}).setConcealed().registerResearchItem(); else (new DarkResearchItem("WRATHCAGE", "FORBIDDEN", (new AspectList()).add(DarkAspects.WRATH, 5).add(Aspect.MECHANISM, 3).add(Aspect.BEAST, 2), -6, -9, 4, new ItemStack(ForbiddenBlocks.wrathCage))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.WRATHCAGE.1"), new ResearchPage((InfusionRecipe) recipes.get("WrathCage")), new ResearchPage("forbidden.research_page.WRATHCAGE.3"), new ResearchPage((CrucibleRecipe) recipes.get("MobCrystal"))}).setParents(new String[]{"FORK"}).setParentsHidden(new String[]{"INFUSION", "THAUMIUM", "DISTILESSENTIA"}).setConcealed().registerResearchItem(); ThaumcraftApi.addWarpToResearch("WRATHCAGE", 3); ThaumcraftApi.addWarpToItem(new ItemStack(ForbiddenBlocks.wrathCage, 1), 5); } }