List of usage examples for org.lwjgl.opengl GL11 glColor4f
public static native void glColor4f(@NativeType("GLfloat") float red, @NativeType("GLfloat") float green, @NativeType("GLfloat") float blue, @NativeType("GLfloat") float alpha);
From source file:com.shinoow.abyssalcraft.client.gui.GuiCrystalBag.java
License:Apache License
@Override protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.getTextureManager().bindTexture(iconLocation); int k = (width - xSize) / 2; int l = (height - ySize) / 2; drawTexturedModalRect(k, l, 0, 0, xSize, invRows * 18 + 17); drawTexturedModalRect(k, l + invRows * 18 + 17, 0, 160, xSize, 96); }
From source file:com.shinoow.abyssalcraft.client.gui.GuiCrystallizer.java
License:Apache License
@Override protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.getTextureManager().bindTexture(crystallizerGuiTextures); int k = (width - xSize) / 2; int l = (height - ySize) / 2; drawTexturedModalRect(k, l, 0, 0, xSize, ySize); int i1;//from www . j a va2 s .co m if (tileCrystallizer.isCrystallizing()) { i1 = tileCrystallizer.getShapeTimeRemainingScaled(12); drawTexturedModalRect(k + 56, l + 36 + 12 - i1, 176, 12 - i1, 14, i1 + 2); } i1 = tileCrystallizer.getFormProgressScaled(24); drawTexturedModalRect(k + 79, l + 34, 176, 14, i1 + 1, 16); }
From source file:com.shinoow.abyssalcraft.client.gui.GuiEngraver.java
License:Apache License
@Override protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.getTextureManager().bindTexture(engraverGuiTexture); int k = (width - xSize) / 2; int l = (height - ySize) / 2; drawTexturedModalRect(k, l, 0, 0, xSize, ySize); int i1;/*from www . j a v a 2s. c o m*/ i1 = tileEngraver.getProcessProgressScaled(24); drawTexturedModalRect(k + 79, l + 34, 176, 14, i1 + 1, 16); }
From source file:com.shinoow.abyssalcraft.client.gui.GuiMaterializer.java
License:Apache License
@Override protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.getTextureManager().bindTexture(materializerGuiTexture); int k = (width - xSize) / 2; int l = (height - ySize) / 2; drawTexturedModalRect(k, l, 0, 0, xSize, ySize); // int i1; ///*from w ww. ja va 2 s.c om*/ // if (tileMaterializer.isTransmutating()) // { // i1 = tileMaterializer.getBurnTimeRemainingScaled(12); // drawTexturedModalRect(k + 56, l + 36 + 12 - i1, 176, 12 - i1, 14, i1 + 2); // } // // i1 = tileMaterializer.getProcessProgressScaled(24); // drawTexturedModalRect(k + 79, l + 34, 176, 14, i1 + 1, 16); }
From source file:com.shinoow.abyssalcraft.client.gui.GuiTransmutator.java
License:Apache License
@Override protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.getTextureManager().bindTexture(transmutatorGuiTexture); int k = (width - xSize) / 2; int l = (height - ySize) / 2; drawTexturedModalRect(k, l, 0, 0, xSize, ySize); int i1;/*from w w w .j av a 2 s .c o m*/ if (tileTransmutator.isTransmuting()) { i1 = tileTransmutator.getBurnTimeRemainingScaled(12); drawTexturedModalRect(k + 56, l + 36 + 12 - i1, 176, 12 - i1, 14, i1 + 2); } i1 = tileTransmutator.getProcessProgressScaled(24); drawTexturedModalRect(k + 79, l + 34, 176, 14, i1 + 1, 16); }
From source file:com.shinoow.abyssalcraft.client.gui.necronomicon.buttons.ButtonCategory.java
License:Apache License
@Override public void drawButton(Minecraft mc, int mx, int my) { FontRenderer fr = mc.fontRenderer;//from w w w. ja v a 2s .c om boolean inside = mx >= xPosition && my >= yPosition && mx < xPosition + width && my < yPosition + height; float time = 5F; if (inside) ticksHovered = Math.min(time, ticksHovered); else ticksHovered = Math.max(0F, ticksHovered); ResourceLocation res = getTexture(icon); if (res == null) res = getTexture(AbyssalCraft.necronomicon); mc.renderEngine.bindTexture(res); float s = 1F / 48F; GL11.glPushMatrix(); GL11.glColor4f(1F, 1F, 1F, 1); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glScalef(0.5F, 0.5F, 0.5F); drawTexturedModalRect(xPosition * 2, yPosition * 2, zLevel * 2, 0, 0, 48, 48, s, s); // drawTexturedModalRect(xPosition, yPosition, 0, 16, 48, 48); GL11.glPopMatrix(); fr.drawString(displayString, xPosition + 20, yPosition + 10, 0); }
From source file:com.shinoow.abyssalcraft.client.gui.necronomicon.buttons.ButtonNextPage.java
License:Apache License
/** * Draws this button to the screen.//from w ww . j av a2s . c o m */ @Override public void drawButton(Minecraft p_146112_1_, int p_146112_2_, int p_146112_3_) { if (visible) { boolean flag = p_146112_2_ >= xPosition && p_146112_3_ >= yPosition && p_146112_2_ < xPosition + width && p_146112_3_ < yPosition + height; GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); p_146112_1_.getTextureManager() .bindTexture(new ResourceLocation("abyssalcraft:textures/gui/necronomicon.png")); int k = 0; int l = 192; if (flag) k += 23; if (!field_146151_o) l += 13; drawTexturedModalRect(xPosition, yPosition, k, l, 23, 13); } }
From source file:com.shinoow.abyssalcraft.client.gui.necronomicon.GuiNecronomicon.java
License:Apache License
/** * Draws the screen and all the components in it. *///from w w w .j a va 2 s . co m @Override public void drawScreen(int par1, int par2, float par3) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.getTextureManager().bindTexture(bookGuiTextures); int k = (width - guiWidth) / 2; byte b0 = 2; drawTexturedModalRect(k, b0, 0, 0, guiWidth, guiHeight); String s; String s1; int l; String stuff; if (isInfo) { if (isNecroInfo) { stuff = NecronomiconText.LABEL_HUH; fontRendererObj.drawSplitString(stuff, k + 20, b0 + 16, 116, 0xC40000); } drawInformationText(); s = I18n.format("book.pageIndicator", new Object[] { Integer.valueOf(currnTurnup + 1), Integer.valueOf(bookTotalTurnups) }); s1 = ""; if (bookPages != null && currnTurnup >= 0 && currnTurnup < bookPages.tagCount()) s1 = bookPages.getStringTagAt(currnTurnup); l = fontRendererObj.getStringWidth(s); fontRendererObj.drawString(s, k - l + guiWidth - 22, b0 + 16, 0); fontRendererObj.drawSplitString(s1, k + 36, b0 + 16 + 16, 116, 0); } else drawIndexText(); super.drawScreen(par1, par2, par3); }
From source file:com.shinoow.abyssalcraft.client.gui.necronomicon.GuiNecronomiconEntry.java
License:Apache License
@Override protected void drawInformationText() { int k = (width - guiWidth) / 2; byte b0 = 2;/* ww w . j a v a 2 s . c o m*/ String stuff; PageData page; Object[] icons = null; if (bool1) { page = data.getPageData()[0]; stuff = StatCollector.translateToLocal(page.getTitle()); fontRendererObj.drawSplitString(stuff, k + 20, b0 + 16, 116, 0xC40000); setTurnupLimit(page.getPageAmount()); switch (page.getPageType()) { case ENTRY: icons = page.getIcons(); break; case INFO: icons = page.getIcons(); break; case NORMAL: break; } if (currnTurnup == 0) { if (page.getPages().length > 1) writeText(2, page.getPages()[1]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[0]); break; case ENTRY: if (icons != null && icons[0] != null) { writeText(1, page.getPages()[0], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[0], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[0]); break; case INFO: if (icons != null && icons[0] != null) { writeText(1, page.getPages()[0], 100); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[0]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); } else writeText(1, page.getPages()[0]); break; } } else if (currnTurnup == 1 && page.getPageAmount() >= 2) { if (page.getPages().length > 3) writeText(2, page.getPages()[3]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[2]); break; case ENTRY: if (icons != null && icons[1] != null) { writeText(1, page.getPages()[2], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[1], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[2]); break; case INFO: if (icons != null && icons[1] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[1]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[2], 100); } else writeText(1, page.getPages()[2]); break; } } else if (currnTurnup == 2 && page.getPageAmount() >= 3) { if (page.getPages().length > 5) writeText(2, page.getPages()[5]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[4]); break; case ENTRY: if (icons != null && icons[2] != null) { writeText(1, page.getPages()[4], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[2], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[4]); break; case INFO: if (icons != null && icons[2] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[2]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[4], 100); } else writeText(1, page.getPages()[4]); break; } } else if (currnTurnup == 3 && page.getPageAmount() >= 4) { if (page.getPages().length > 7) writeText(2, page.getPages()[7]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[6]); break; case ENTRY: if (icons != null && icons[3] != null) { writeText(1, page.getPages()[6], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[3], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[6]); break; case INFO: if (icons != null && icons[3] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[3]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[6], 100); } else writeText(1, page.getPages()[6]); break; } } else if (currnTurnup == 4 && page.getPageAmount() >= 5) { if (page.getPages().length > 9) writeText(2, page.getPages()[9]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[8]); break; case ENTRY: if (icons != null && icons[4] != null) { writeText(1, page.getPages()[8], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[4], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[8]); break; case INFO: if (icons != null && icons[4] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[4]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[8], 100); } else writeText(1, page.getPages()[8]); break; } } else if (currnTurnup == 5 && page.getPageAmount() >= 6) { if (page.getPages().length > 11) writeText(2, page.getPages()[11]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[10]); break; case ENTRY: if (icons != null && icons[5] != null) { writeText(1, page.getPages()[10], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[5], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[10]); break; case INFO: if (icons != null && icons[5] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[5]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[10], 100); } else writeText(1, page.getPages()[10]); break; } } else if (currnTurnup == 6 && page.getPageAmount() >= 7) { if (page.getPages().length > 13) writeText(2, page.getPages()[13]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[12]); break; case ENTRY: if (icons != null && icons[6] != null) { writeText(1, page.getPages()[12], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[6], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[12]); break; case INFO: if (icons != null && icons[6] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[6]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[12], 100); } else writeText(1, page.getPages()[12]); break; } } else if (currnTurnup == 7 && page.getPageAmount() >= 8) { if (page.getPages().length > 15) writeText(2, page.getPages()[15]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[14]); break; case ENTRY: if (icons != null && icons[7] != null) { writeText(1, page.getPages()[14], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[7], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[14]); break; case INFO: if (icons != null && icons[7] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[7]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[14], 100); } else writeText(1, page.getPages()[14]); break; } } else if (currnTurnup == 8 && page.getPageAmount() >= 9) { if (page.getPages().length > 17) writeText(2, page.getPages()[17]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[16]); break; case ENTRY: if (icons != null && icons[8] != null) { writeText(1, page.getPages()[16], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[8], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[16]); break; case INFO: if (icons != null && icons[8] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[8]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[17], 100); } else writeText(1, page.getPages()[16]); break; } } else if (currnTurnup == 9 && page.getPageAmount() >= 10) { if (page.getPages().length > 19) writeText(2, page.getPages()[19]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[18]); break; case ENTRY: if (icons != null && icons[9] != null) { writeText(1, page.getPages()[18], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[9], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[18]); break; case INFO: if (icons != null && icons[9] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[9]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[18], 100); } else writeText(1, page.getPages()[18]); break; } } } else if (bool2) { page = data.getPageData()[1]; stuff = StatCollector.translateToLocal(page.getTitle()); fontRendererObj.drawSplitString(stuff, k + 20, b0 + 16, 116, 0xC40000); setTurnupLimit(page.getPageAmount()); switch (page.getPageType()) { case ENTRY: icons = page.getIcons(); break; case INFO: icons = page.getIcons(); break; case NORMAL: break; } if (currnTurnup == 0) { if (page.getPages().length > 1) writeText(2, page.getPages()[1]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[0]); break; case ENTRY: if (icons != null && icons[0] != null) { writeText(1, page.getPages()[0], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[0], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[0]); break; case INFO: if (icons != null && icons[0] != null) { writeText(1, page.getPages()[0], 100); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[0]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); } else writeText(1, page.getPages()[0]); break; } } else if (currnTurnup == 1 && page.getPageAmount() >= 2) { if (page.getPages().length > 3) writeText(2, page.getPages()[3]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[2]); break; case ENTRY: if (icons != null && icons[1] != null) { writeText(1, page.getPages()[2], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[1], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[2]); break; case INFO: if (icons != null && icons[1] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[1]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[2], 100); } else writeText(1, page.getPages()[2]); break; } } else if (currnTurnup == 2 && page.getPageAmount() >= 3) { if (page.getPages().length > 5) writeText(2, page.getPages()[5]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[4]); break; case ENTRY: if (icons != null && icons[2] != null) { writeText(1, page.getPages()[4], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[2], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[4]); break; case INFO: if (icons != null && icons[2] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[2]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[4], 100); } else writeText(1, page.getPages()[4]); break; } } else if (currnTurnup == 3 && page.getPageAmount() >= 4) { if (page.getPages().length > 7) writeText(2, page.getPages()[7]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[6]); break; case ENTRY: if (icons != null && icons[3] != null) { writeText(1, page.getPages()[6], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[3], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[6]); break; case INFO: if (icons != null && icons[3] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[3]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[6], 100); } else writeText(1, page.getPages()[6]); break; } } else if (currnTurnup == 4 && page.getPageAmount() >= 5) { if (page.getPages().length > 9) writeText(2, page.getPages()[9]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[8]); break; case ENTRY: if (icons != null && icons[4] != null) { writeText(1, page.getPages()[8], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[4], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[8]); break; case INFO: if (icons != null && icons[4] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[4]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[8], 100); } else writeText(1, page.getPages()[8]); break; } } else if (currnTurnup == 5 && page.getPageAmount() >= 6) { if (page.getPages().length > 11) writeText(2, page.getPages()[11]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[10]); break; case ENTRY: if (icons != null && icons[5] != null) { writeText(1, page.getPages()[10], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[5], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[10]); break; case INFO: if (icons != null && icons[5] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[5]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[10], 100); } else writeText(1, page.getPages()[10]); break; } } else if (currnTurnup == 6 && page.getPageAmount() >= 7) { if (page.getPages().length > 13) writeText(2, page.getPages()[13]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[12]); break; case ENTRY: if (icons != null && icons[6] != null) { writeText(1, page.getPages()[12], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[6], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[12]); break; case INFO: if (icons != null && icons[6] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[6]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[12], 100); } else writeText(1, page.getPages()[12]); break; } } else if (currnTurnup == 7 && page.getPageAmount() >= 8) { if (page.getPages().length > 15) writeText(2, page.getPages()[15]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[14]); break; case ENTRY: if (icons != null && icons[7] != null) { writeText(1, page.getPages()[14], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[7], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[14]); break; case INFO: if (icons != null && icons[7] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[7]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[14], 100); } else writeText(1, page.getPages()[14]); break; } } else if (currnTurnup == 8 && page.getPageAmount() >= 9) { if (page.getPages().length > 17) writeText(2, page.getPages()[17]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[16]); break; case ENTRY: if (icons != null && icons[8] != null) { writeText(1, page.getPages()[16], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[8], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[16]); break; case INFO: if (icons != null && icons[8] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[8]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[17], 100); } else writeText(1, page.getPages()[16]); break; } } else if (currnTurnup == 9 && page.getPageAmount() >= 10) { if (page.getPages().length > 19) writeText(2, page.getPages()[19]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[18]); break; case ENTRY: if (icons != null && icons[9] != null) { writeText(1, page.getPages()[18], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[9], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[18]); break; case INFO: if (icons != null && icons[9] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[9]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[18], 100); } else writeText(1, page.getPages()[18]); break; } } } else if (bool3) { page = data.getPageData()[2]; stuff = StatCollector.translateToLocal(page.getTitle()); fontRendererObj.drawSplitString(stuff, k + 20, b0 + 16, 116, 0xC40000); setTurnupLimit(page.getPageAmount()); switch (page.getPageType()) { case ENTRY: icons = page.getIcons(); break; case INFO: icons = page.getIcons(); break; case NORMAL: break; } if (currnTurnup == 0) { if (page.getPages().length > 1) writeText(2, page.getPages()[1]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[0]); break; case ENTRY: if (icons != null && icons[0] != null) { writeText(1, page.getPages()[0], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[0], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[0]); break; case INFO: if (icons != null && icons[0] != null) { writeText(1, page.getPages()[0], 100); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[0]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); } else writeText(1, page.getPages()[0]); break; } } else if (currnTurnup == 1 && page.getPageAmount() >= 2) { if (page.getPages().length > 3) writeText(2, page.getPages()[3]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[2]); break; case ENTRY: if (icons != null && icons[1] != null) { writeText(1, page.getPages()[2], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[1], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[2]); break; case INFO: if (icons != null && icons[1] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[1]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[2], 100); } else writeText(1, page.getPages()[2]); break; } } else if (currnTurnup == 2 && page.getPageAmount() >= 3) { if (page.getPages().length > 5) writeText(2, page.getPages()[5]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[4]); break; case ENTRY: if (icons != null && icons[2] != null) { writeText(1, page.getPages()[4], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[2], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[4]); break; case INFO: if (icons != null && icons[2] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[2]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[4], 100); } else writeText(1, page.getPages()[4]); break; } } else if (currnTurnup == 3 && page.getPageAmount() >= 4) { if (page.getPages().length > 7) writeText(2, page.getPages()[7]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[6]); break; case ENTRY: if (icons != null && icons[3] != null) { writeText(1, page.getPages()[6], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[3], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[6]); break; case INFO: if (icons != null && icons[3] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[3]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[6], 100); } else writeText(1, page.getPages()[6]); break; } } else if (currnTurnup == 4 && page.getPageAmount() >= 5) { if (page.getPages().length > 9) writeText(2, page.getPages()[9]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[8]); break; case ENTRY: if (icons != null && icons[4] != null) { writeText(1, page.getPages()[8], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[4], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[8]); break; case INFO: if (icons != null && icons[4] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[4]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[8], 100); } else writeText(1, page.getPages()[8]); break; } } else if (currnTurnup == 5 && page.getPageAmount() >= 6) { if (page.getPages().length > 11) writeText(2, page.getPages()[11]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[10]); break; case ENTRY: if (icons != null && icons[5] != null) { writeText(1, page.getPages()[10], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[5], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[10]); break; case INFO: if (icons != null && icons[5] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[5]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[10], 100); } else writeText(1, page.getPages()[10]); break; } } else if (currnTurnup == 6 && page.getPageAmount() >= 7) { if (page.getPages().length > 13) writeText(2, page.getPages()[13]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[12]); break; case ENTRY: if (icons != null && icons[6] != null) { writeText(1, page.getPages()[12], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[6], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[12]); break; case INFO: if (icons != null && icons[6] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[6]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[12], 100); } else writeText(1, page.getPages()[12]); break; } } else if (currnTurnup == 7 && page.getPageAmount() >= 8) { if (page.getPages().length > 15) writeText(2, page.getPages()[15]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[14]); break; case ENTRY: if (icons != null && icons[7] != null) { writeText(1, page.getPages()[14], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[7], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[14]); break; case INFO: if (icons != null && icons[7] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[7]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[14], 100); } else writeText(1, page.getPages()[14]); break; } } else if (currnTurnup == 8 && page.getPageAmount() >= 9) { if (page.getPages().length > 17) writeText(2, page.getPages()[17]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[16]); break; case ENTRY: if (icons != null && icons[8] != null) { writeText(1, page.getPages()[16], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[8], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[16]); break; case INFO: if (icons != null && icons[8] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[8]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[17], 100); } else writeText(1, page.getPages()[16]); break; } } else if (currnTurnup == 9 && page.getPageAmount() >= 10) { if (page.getPages().length > 19) writeText(2, page.getPages()[19]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[18]); break; case ENTRY: if (icons != null && icons[9] != null) { writeText(1, page.getPages()[18], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[9], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[18]); break; case INFO: if (icons != null && icons[9] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[9]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[18], 100); } else writeText(1, page.getPages()[18]); break; } } } else if (bool4) { page = data.getPageData()[3]; stuff = StatCollector.translateToLocal(page.getTitle()); fontRendererObj.drawSplitString(stuff, k + 20, b0 + 16, 116, 0xC40000); setTurnupLimit(page.getPageAmount()); switch (page.getPageType()) { case ENTRY: icons = page.getIcons(); break; case INFO: icons = page.getIcons(); break; case NORMAL: break; } if (currnTurnup == 0) { if (page.getPages().length > 1) writeText(2, page.getPages()[1]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[0]); break; case ENTRY: if (icons != null && icons[0] != null) { writeText(1, page.getPages()[0], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[0], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[0]); break; case INFO: if (icons != null && icons[0] != null) { writeText(1, page.getPages()[0], 100); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[0]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); } else writeText(1, page.getPages()[0]); break; } } else if (currnTurnup == 1 && page.getPageAmount() >= 2) { if (page.getPages().length > 3) writeText(2, page.getPages()[3]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[2]); break; case ENTRY: if (icons != null && icons[1] != null) { writeText(1, page.getPages()[2], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[1], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[2]); break; case INFO: if (icons != null && icons[1] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[1]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[2], 100); } else writeText(1, page.getPages()[2]); break; } } else if (currnTurnup == 2 && page.getPageAmount() >= 3) { if (page.getPages().length > 5) writeText(2, page.getPages()[5]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[4]); break; case ENTRY: if (icons != null && icons[2] != null) { writeText(1, page.getPages()[4], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[2], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[4]); break; case INFO: if (icons != null && icons[2] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[2]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[4], 100); } else writeText(1, page.getPages()[4]); break; } } else if (currnTurnup == 3 && page.getPageAmount() >= 4) { if (page.getPages().length > 7) writeText(2, page.getPages()[7]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[6]); break; case ENTRY: if (icons != null && icons[3] != null) { writeText(1, page.getPages()[6], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[3], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[6]); break; case INFO: if (icons != null && icons[3] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[3]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[6], 100); } else writeText(1, page.getPages()[6]); break; } } else if (currnTurnup == 4 && page.getPageAmount() >= 5) { if (page.getPages().length > 9) writeText(2, page.getPages()[9]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[8]); break; case ENTRY: if (icons != null && icons[4] != null) { writeText(1, page.getPages()[8], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[4], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[8]); break; case INFO: if (icons != null && icons[4] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[4]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[8], 100); } else writeText(1, page.getPages()[8]); break; } } else if (currnTurnup == 5 && page.getPageAmount() >= 6) { if (page.getPages().length > 11) writeText(2, page.getPages()[11]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[10]); break; case ENTRY: if (icons != null && icons[5] != null) { writeText(1, page.getPages()[10], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[5], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[10]); break; case INFO: if (icons != null && icons[5] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[5]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[10], 100); } else writeText(1, page.getPages()[10]); break; } } else if (currnTurnup == 6 && page.getPageAmount() >= 7) { if (page.getPages().length > 13) writeText(2, page.getPages()[13]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[12]); break; case ENTRY: if (icons != null && icons[6] != null) { writeText(1, page.getPages()[12], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[6], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[12]); break; case INFO: if (icons != null && icons[6] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[6]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[12], 100); } else writeText(1, page.getPages()[12]); break; } } else if (currnTurnup == 7 && page.getPageAmount() >= 8) { if (page.getPages().length > 15) writeText(2, page.getPages()[15]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[14]); break; case ENTRY: if (icons != null && icons[7] != null) { writeText(1, page.getPages()[14], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[7], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[14]); break; case INFO: if (icons != null && icons[7] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[7]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[14], 100); } else writeText(1, page.getPages()[14]); break; } } else if (currnTurnup == 8 && page.getPageAmount() >= 9) { if (page.getPages().length > 17) writeText(2, page.getPages()[17]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[16]); break; case ENTRY: if (icons != null && icons[8] != null) { writeText(1, page.getPages()[16], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[8], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[16]); break; case INFO: if (icons != null && icons[8] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[8]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[17], 100); } else writeText(1, page.getPages()[16]); break; } } else if (currnTurnup == 9 && page.getPageAmount() >= 10) { if (page.getPages().length > 19) writeText(2, page.getPages()[19]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[18]); break; case ENTRY: if (icons != null && icons[9] != null) { writeText(1, page.getPages()[18], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[9], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[18]); break; case INFO: if (icons != null && icons[9] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[9]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[18], 100); } else writeText(1, page.getPages()[18]); break; } } } else if (bool5) { page = data.getPageData()[4]; stuff = StatCollector.translateToLocal(page.getTitle()); fontRendererObj.drawSplitString(stuff, k + 20, b0 + 16, 116, 0xC40000); setTurnupLimit(page.getPageAmount()); switch (page.getPageType()) { case ENTRY: icons = page.getIcons(); break; case INFO: icons = page.getIcons(); break; case NORMAL: break; } if (currnTurnup == 0) { if (page.getPages().length > 1) writeText(2, page.getPages()[1]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[0]); break; case ENTRY: if (icons != null && icons[0] != null) { writeText(1, page.getPages()[0], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[0], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[0]); break; case INFO: if (icons != null && icons[0] != null) { writeText(1, page.getPages()[0], 100); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[0]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); } else writeText(1, page.getPages()[0]); break; } } else if (currnTurnup == 1 && page.getPageAmount() >= 2) { if (page.getPages().length > 3) writeText(2, page.getPages()[3]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[2]); break; case ENTRY: if (icons != null && icons[1] != null) { writeText(1, page.getPages()[2], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[1], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[2]); break; case INFO: if (icons != null && icons[1] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[1]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[2], 100); } else writeText(1, page.getPages()[2]); break; } } else if (currnTurnup == 2 && page.getPageAmount() >= 3) { if (page.getPages().length > 5) writeText(2, page.getPages()[5]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[4]); break; case ENTRY: if (icons != null && icons[2] != null) { writeText(1, page.getPages()[4], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[2], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[4]); break; case INFO: if (icons != null && icons[2] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[2]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[4], 100); } else writeText(1, page.getPages()[4]); break; } } else if (currnTurnup == 3 && page.getPageAmount() >= 4) { if (page.getPages().length > 7) writeText(2, page.getPages()[7]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[6]); break; case ENTRY: if (icons != null && icons[3] != null) { writeText(1, page.getPages()[6], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[3], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[6]); break; case INFO: if (icons != null && icons[3] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[3]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[6], 100); } else writeText(1, page.getPages()[6]); break; } } else if (currnTurnup == 4 && page.getPageAmount() >= 5) { if (page.getPages().length > 9) writeText(2, page.getPages()[9]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[8]); break; case ENTRY: if (icons != null && icons[4] != null) { writeText(1, page.getPages()[8], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[4], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[8]); break; case INFO: if (icons != null && icons[4] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[4]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[8], 100); } else writeText(1, page.getPages()[8]); break; } } else if (currnTurnup == 5 && page.getPageAmount() >= 6) { if (page.getPages().length > 11) writeText(2, page.getPages()[11]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[10]); break; case ENTRY: if (icons != null && icons[5] != null) { writeText(1, page.getPages()[10], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[5], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[10]); break; case INFO: if (icons != null && icons[5] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[5]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[10], 100); } else writeText(1, page.getPages()[10]); break; } } else if (currnTurnup == 6 && page.getPageAmount() >= 7) { if (page.getPages().length > 13) writeText(2, page.getPages()[13]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[12]); break; case ENTRY: if (icons != null && icons[6] != null) { writeText(1, page.getPages()[12], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[6], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[12]); break; case INFO: if (icons != null && icons[6] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[6]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[12], 100); } else writeText(1, page.getPages()[12]); break; } } else if (currnTurnup == 7 && page.getPageAmount() >= 8) { if (page.getPages().length > 15) writeText(2, page.getPages()[15]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[14]); break; case ENTRY: if (icons != null && icons[7] != null) { writeText(1, page.getPages()[14], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[7], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[14]); break; case INFO: if (icons != null && icons[7] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[7]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[14], 100); } else writeText(1, page.getPages()[14]); break; } } else if (currnTurnup == 8 && page.getPageAmount() >= 9) { if (page.getPages().length > 17) writeText(2, page.getPages()[17]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[16]); break; case ENTRY: if (icons != null && icons[8] != null) { writeText(1, page.getPages()[16], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[8], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[16]); break; case INFO: if (icons != null && icons[8] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[8]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[17], 100); } else writeText(1, page.getPages()[16]); break; } } else if (currnTurnup == 9 && page.getPageAmount() >= 10) { if (page.getPages().length > 19) writeText(2, page.getPages()[19]); switch (page.getPageType()) { case NORMAL: writeText(1, page.getPages()[18]); break; case ENTRY: if (icons != null && icons[9] != null) { writeText(1, page.getPages()[18], 50); itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), (ItemStack) icons[9], k + 60, b0 + 28); RenderHelper.disableStandardItemLighting(); } else writeText(1, page.getPages()[18]); break; case INFO: if (icons != null && icons[9] != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture((ResourceLocation) icons[9]); drawTexturedModalRect(k, b0, 0, 0, 256, 256); writeText(1, page.getPages()[18], 100); } else writeText(1, page.getPages()[18]); break; } } } updateButtons(); }
From source file:com.shinoow.abyssalcraft.client.handlers.AbyssalCraftClientEventHooks.java
License:Apache License
private void renderStarSpawnPlayer(EntityPlayer player, float partialTicks) { mc.renderEngine.bindTexture(new ResourceLocation("abyssalcraft:textures/model/tentacles.png")); for (int j = 0; j < 1; ++j) { GL11.glColor4f(1F, 1F, 1F, 1F); float f10 = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * partialTicks - (player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * partialTicks); float f2 = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * partialTicks; GL11.glPushMatrix();/*w ww .ja v a 2 s . c o m*/ GL11.glFrontFace(GL11.GL_CW); GL11.glRotatef(f10, 0.0F, 1.0F, 0.0F); GL11.glRotatef(f2, 1.0F, 0.0F, 0.0F); GL11.glTranslatef(0, -0.22F, 0); GL11.glScalef(1, 1, 1); model.renderTentacles(0.0625F); GL11.glFrontFace(GL11.GL_CCW); GL11.glPopMatrix(); } }