List of usage examples for org.lwjgl.opengl GL11 glDisable
public static void glDisable(@NativeType("GLenum") int target)
From source file:com.grillecube.engine.renderer.world.sky.SkyRenderer.java
public void render(CameraProjectiveWorld camera) { World world = super.getWorld(); // GL11.glEnable(GL11.GL_CULL_FACE); // GL11.glCullFace(GL11.GL_BACK); this._sky_program.useStart(); this._sky_program.loadUniforms(world.getWeather(), camera); this._vao.bind(); this._vao.draw(GL11.GL_TRIANGLES, 0, Sphere.getVertexCount(SKYDOME_PRECISION)); this._sky_program.useStop(); GL11.glDisable(GL11.GL_CULL_FACE); }
From source file:com.grillecube.engine.renderer.world.terrain.TerrainRenderer.java
@Override public void render() { if (!this._can_render) { return;//from ww w. j av a 2 s . c om } GL11.glEnable(GL11.GL_CULL_FACE); GL11.glCullFace(GL11.GL_BACK); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); if (this.getParent().getGLFWWindow().isKeyPressed(GLFW.GLFW_KEY_F)) { GL11.glPolygonMode(GL11.GL_FRONT_AND_BACK, GL11.GL_LINE); } this.render(super.getCamera()); GL11.glPolygonMode(GL11.GL_FRONT_AND_BACK, GL11.GL_FILL); GL11.glDisable(GL11.GL_BLEND); GL11.glDisable(GL11.GL_CULL_FACE); }
From source file:com.grillecube.engine.renderer.world.terrain.TerrainRenderer.java
public void render(CameraView camera) { if (!this._can_render) { return;/*from w ww . ja va2s . co m*/ } GL11.glEnable(GL11.GL_DEPTH_TEST); this._terrain_program.useStart(); { // render with the current camera, the current world weather, no // clipping, using reflection and refraction fbos as texture this._terrain_program.loadUniforms(this.getCamera(), this.getWorld(), this.getWorldRenderer().getShadowCamera()); // bind textures this.getParent().getWorldRenderer().getReflectionTexture().bind(GL13.GL_TEXTURE1, GL11.GL_TEXTURE_2D); this.getParent().getWorldRenderer().getRefractionTexture().bind(GL13.GL_TEXTURE2, GL11.GL_TEXTURE_2D); this._dudvmap.bind(GL13.GL_TEXTURE3, GL11.GL_TEXTURE_2D); this._normalmap.bind(GL13.GL_TEXTURE4, GL11.GL_TEXTURE_2D); this.getParent().getWorldRenderer().getShadowMap().bind(GL13.GL_TEXTURE5, GL11.GL_TEXTURE_2D); for (TerrainMesh mesh : this._meshes_camera) { this.bindTextureAtlas(mesh, camera); this._terrain_program.loadInstanceUniforms(mesh); mesh.render(); } } GL11.glDisable(GL11.GL_DEPTH_TEST); }
From source file:com.grillecube.engine.renderer.world.terrain.TerrainRenderer.java
private void renderReflectionRefraction(CameraProjectiveWorld camera, Vector4f clipplane) { if (!this._can_render) { return;// w ww . j a v a 2s. c o m } GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glEnable(GL30.GL_CLIP_DISTANCE0); this._terrain_reflection_refraction_program.useStart(); { // render with the current camera, the current world weather, no // clipping, using reflection and refraction fbos as texture this._terrain_reflection_refraction_program.loadUniforms(camera, this.getWorld().getWeather(), clipplane); // render every meshes for (TerrainMesh mesh : this._meshes_camera) { this.bindTextureAtlas(mesh, camera); this._terrain_reflection_refraction_program.loadInstanceUniforms(mesh); mesh.render(); } } GL11.glDisable(GL11.GL_DEPTH_TEST); GL11.glDisable(GL30.GL_CLIP_DISTANCE0); }
From source file:com.grillecube.engine.renderer.world.terrain.TerrainRenderer.java
@Override public void renderShadow(ShadowCamera shadow_camera) { // terrain do not cast shadow for now if (!this._can_render) { return;/*from w w w. j a v a 2 s . com*/ } GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glDisable(GL11.GL_CULL_FACE); this._terrain_shadow_program.useStart(); { this._terrain_shadow_program.loadUniforms(shadow_camera); // for (TerrainMesh mesh : this._meshes_shadow) { for (TerrainMesh mesh : this._meshes_shadow) { this._terrain_shadow_program.loadInstanceUniforms(mesh); mesh.render(); } } GL11.glDisable(GL11.GL_DEPTH_TEST); }
From source file:com.hea3ven.pandoraschest.client.model.ModelBaseChest.java
License:Open Source License
public void renderItem() { GL11.glPushMatrix();/* w w w . j a va 2s.c om*/ GL11.glDisable(GL11.GL_LIGHTING); // GL11.glTranslatef(0.0f, -0.5f, 0.0f); GL11.glRotatef(180.0f, 0.0f, 1.0f, 0.0f); ModColladaModel.getModelManager().getModel(openResourceName).renderAll(); GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopMatrix(); }
From source file:com.hea3ven.pandoraschest.client.model.ModelFluorecentSpot.java
License:Open Source License
public void renderItem() { GL11.glPushMatrix();/*w w w .j a v a2 s .c o m*/ GL11.glDisable(GL11.GL_LIGHTING); GL11.glTranslatef(0.0f, -0.5f, 0.0f); ModColladaModel.getModelManager().getModel(modelResource).renderAll(); GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopMatrix(); }
From source file:com.hilburn.dimensionguard.client.DisabledRenderer.java
License:Open Source License
@Override public void renderItem(ItemRenderType type, ItemStack itemStack, Object... data) { ItemStack thisStack = ItemStack/*from w w w.j a v a 2 s. c o m*/ .loadItemStackFromNBT((NBTTagCompound) itemStack.stackTagCompound.getTag("ItemStack")); boolean isInventory = type == ItemRenderType.INVENTORY; Tessellator tess = Tessellator.instance; FontRenderer fontRenderer = mc.fontRenderer; TextureManager textureManager = mc.getTextureManager(); GL11.glPushMatrix(); Item item = thisStack.getItem(); Block block = Block.getBlockFromItem(item); if (thisStack != null && block != null && block.getRenderBlockPass() != 0) { GL11.glEnable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_CULL_FACE); OpenGlHelper.glBlendFunc(770, 771, 1, 0); } IItemRenderer storedRenderer = MinecraftForgeClient.getItemRenderer(thisStack, type); //======Handles Special Blocks and Items====== if (storedRenderer != null) { storedRenderer.renderItem(type, thisStack, data); } else { if (thisStack.getItemSpriteNumber() == 0 && item instanceof ItemBlock && RenderBlocks.renderItemIn3d(block.getRenderType())) { //=====Handles regular blocks====== textureManager.bindTexture(textureManager.getResourceLocation(0)); switch (type) { case EQUIPPED_FIRST_PERSON: case EQUIPPED: case ENTITY: GL11.glTranslatef(0.5F, 0.5F, 0.5F); default: } if (thisStack != null && block != null && block.getRenderBlockPass() != 0) { GL11.glDepthMask(false); renderBlocksIr.renderBlockAsItem(block, thisStack.getItemDamage(), 1.0F); GL11.glDepthMask(true); } else { renderBlocksIr.renderBlockAsItem(block, thisStack.getItemDamage(), 1.0F); } } else { //=======Handles Regular Items====== if (isInventory) { renderItem.renderItemIntoGUI(fontRenderer, textureManager, thisStack, 0, 0); } else { GL11.glEnable(GL12.GL_RESCALE_NORMAL); switch (type) { case EQUIPPED_FIRST_PERSON: //TODO: get items to render in the right place GL11.glRotated(90F, 0F, 1F, 0F); GL11.glTranslatef(-1F, 0.5F, 0F); break; case EQUIPPED: GL11.glRotated(90F, 0F, 1F, 0F); GL11.glTranslatef(-1F, 0.5F, 0F); GL11.glRotated(90F, 1F, 0F, 0F); //GL11.glTranslatef(0, -4 / 16f, 0); break; case ENTITY: //GL11.glTranslatef(-0.5f, 0f, 1f / 16f); // correction of the rotation point when items lie on the ground default: } IIcon icon = thisStack.getIconIndex(); float xMax; float yMin; float xMin; float yMax; float depth = 1f / 16f; float width; float height; float xDiff; float yDiff; float xSub; float ySub; xMin = icon.getMinU(); xMax = icon.getMaxU(); yMin = icon.getMinV(); yMax = icon.getMaxV(); width = icon.getIconWidth(); height = icon.getIconHeight(); xDiff = xMin - xMax; yDiff = yMin - yMax; xSub = 0.5f * (xMax - xMin) / width; ySub = 0.5f * (yMax - yMin) / height; //=====Front and back===== tess.startDrawingQuads(); tess.setNormal(0, 0, 1); tess.addVertexWithUV(0, 0, 0, xMax, yMax); tess.addVertexWithUV(1, 0, 0, xMin, yMax); tess.addVertexWithUV(1, 1, 0, xMin, yMin); tess.addVertexWithUV(0, 1, 0, xMax, yMin); tess.draw(); tess.startDrawingQuads(); tess.setNormal(0, 0, -1); tess.addVertexWithUV(0, 1, -depth, xMax, yMin); tess.addVertexWithUV(1, 1, -depth, xMin, yMin); tess.addVertexWithUV(1, 0, -depth, xMin, yMax); tess.addVertexWithUV(0, 0, -depth, xMax, yMax); tess.draw(); // =========Sides============ tess.startDrawingQuads(); tess.setNormal(-1, 0, 0); float pos; float iconPos; float w = width, m = xMax, d = xDiff, s = xSub; for (int k = 0, e = (int) w; k < e; ++k) { pos = k / w; iconPos = m + d * pos - s; tess.addVertexWithUV(pos, 0, -depth, iconPos, yMax); tess.addVertexWithUV(pos, 0, 0, iconPos, yMax); tess.addVertexWithUV(pos, 1, 0, iconPos, yMin); tess.addVertexWithUV(pos, 1, -depth, iconPos, yMin); } tess.draw(); tess.startDrawingQuads(); tess.setNormal(1, 0, 0); float posEnd; w = width; m = xMax; d = xDiff; s = xSub; float d2 = 1f / w; for (int k = 0, e = (int) w; k < e; ++k) { pos = k / w; iconPos = m + d * pos - s; posEnd = pos + d2; tess.addVertexWithUV(posEnd, 1, -depth, iconPos, yMin); tess.addVertexWithUV(posEnd, 1, 0, iconPos, yMin); tess.addVertexWithUV(posEnd, 0, 0, iconPos, yMax); tess.addVertexWithUV(posEnd, 0, -depth, iconPos, yMax); } tess.draw(); tess.startDrawingQuads(); tess.setNormal(0, 1, 0); float h = height; m = yMax; d = yDiff; s = ySub; d2 = 1f / h; for (int k = 0, e = (int) h; k < e; ++k) { pos = k / h; iconPos = m + d * pos - s; posEnd = pos + d2; tess.addVertexWithUV(0, posEnd, 0, xMax, iconPos); tess.addVertexWithUV(1, posEnd, 0, xMin, iconPos); tess.addVertexWithUV(1, posEnd, -depth, xMin, iconPos); tess.addVertexWithUV(0, posEnd, -depth, xMax, iconPos); } tess.draw(); tess.startDrawingQuads(); tess.setNormal(0, -1, 0); h = height; m = yMax; d = yDiff; s = ySub; for (int k = 0, e = (int) h; k < e; ++k) { pos = k / h; iconPos = m + d * pos - s; tess.addVertexWithUV(1, pos, 0, xMin, iconPos); tess.addVertexWithUV(0, pos, 0, xMax, iconPos); tess.addVertexWithUV(0, pos, -depth, xMax, iconPos); tess.addVertexWithUV(1, pos, -depth, xMin, iconPos); } tess.draw(); GL11.glDisable(GL12.GL_RESCALE_NORMAL); } } } if (thisStack != null && block != null && block.getRenderBlockPass() != 0) { GL11.glDisable(GL11.GL_BLEND); } GL11.glPopMatrix(); if (isInventory) { renderItem.renderItemIntoGUI(fontRenderer, textureManager, itemStack, 0, 0); //TODO: only renders on items, not blocks - fix } }
From source file:com.itszuvalex.femtocraft.research.gui.GuiResearch.java
License:Open Source License
/** * Draws the screen and all the components in it. *//* w w w . ja v a 2 s.c o m*/ @Override public void drawScreen(int par1, int par2, float par3) { if (Mouse.isButtonDown(0)) { int k = (this.width - this.researchPaneWidth) / 2; int l = (this.height - this.researchPaneHeight) / 2; int i1 = k + 8; int j1 = l + 17; if ((this.isMouseButtonDown == 0 || this.isMouseButtonDown == 1) && par1 >= i1 && par1 < i1 + 224 && par2 >= j1 && par2 < j1 + 155) { if (this.isMouseButtonDown == 0) { this.isMouseButtonDown = 1; } else { guiMapX -= (double) (par1 - this.mouseX); guiMapY -= (double) (par2 - this.mouseY); field_74124_q = field_74117_m = guiMapX; field_74123_r = field_74115_n = guiMapY; } this.mouseX = par1; this.mouseY = par2; } if (field_74124_q < (double) guiMapTop) { field_74124_q = (double) guiMapTop; } if (field_74123_r < (double) guiMapLeft) { field_74123_r = (double) guiMapLeft; } if (field_74124_q >= (double) guiMapBottom) { field_74124_q = (double) (guiMapBottom - 1); } if (field_74123_r >= (double) guiMapRight) { field_74123_r = (double) (guiMapRight - 1); } } else { this.isMouseButtonDown = 0; } this.drawDefaultBackground(); this.genAchievementBackground(par1, par2, par3); GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_DEPTH_TEST); this.drawTitle(); GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_DEPTH_TEST); }
From source file:com.itszuvalex.femtocraft.research.gui.GuiResearch.java
License:Open Source License
protected void genAchievementBackground(int par1, int par2, float par3) { int k = MathHelper.floor_double(field_74117_m + (guiMapX - field_74117_m) * (double) par3); int l = MathHelper.floor_double(field_74115_n + (guiMapY - field_74115_n) * (double) par3); if (k < guiMapTop) { k = guiMapTop;/*from w ww . j a v a 2s . c o m*/ } if (l < guiMapLeft) { l = guiMapLeft; } if (k >= guiMapBottom) { k = guiMapBottom - 1; } if (l >= guiMapRight) { l = guiMapRight - 1; } int i1 = (this.width - this.researchPaneWidth) / 2; int j1 = (this.height - this.researchPaneHeight) / 2; int k1 = i1 + 16; int l1 = j1 + 17; this.zLevel = 0.0F; GL11.glDepthFunc(GL11.GL_GEQUAL); GL11.glPushMatrix(); GL11.glTranslatef(0.0F, 0.0F, -200.0F); GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glDisable(GL11.GL_LIGHTING); GL11.glEnable(GL12.GL_RESCALE_NORMAL); GL11.glEnable(GL11.GL_COLOR_MATERIAL); int i2 = k + 288 >> 4; int j2 = l + 288 >> 4; int k2 = (k + 288) % 16; int l2 = (l + 288) % 16; Random random = new Random(); int i3; int j3; int k3; // Make background for (i3 = 0; i3 * 16 - l2 < 155; ++i3) { float f1 = 0.6F - (float) (j2 + i3) / 25.0F * 0.3F; GL11.glColor4f(f1, f1, f1, 1.0F); for (k3 = 0; k3 * 16 - k2 < 224; ++k3) { random.setSeed((long) (1234 + i2 + k3)); random.nextInt(); j3 = random.nextInt(1 + j2 + i3) + (j2 + i3) / 2; IIcon icon = Blocks.sand.getIcon(0, 0); if (j3 <= 37 && j2 + i3 != 35) { if (j3 == 22) { if (random.nextInt(2) == 0) { icon = Femtocraft.blockOrePlatinum().getIcon(0, 0); } else { icon = Femtocraft.blockOreFarenite().getIcon(0, 0); } } else if (j3 == 10) { icon = Femtocraft.blockOreTitanium().getIcon(0, 0); } else if (j3 == 8) { icon = Femtocraft.blockOreThorium().getIcon(0, 0); } else if (j3 > 4) { icon = Blocks.stone.getIcon(0, 0); } else if (j3 > 0) { icon = Blocks.dirt.getIcon(0, 0); } } else { icon = Blocks.bedrock.getIcon(0, 0); } Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.locationBlocksTexture); this.drawTexturedModelRectFromIcon(k1 + k3 * 16 - k2, l1 + i3 * 16 - l2, icon, 16, 16); } } GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glDepthFunc(GL11.GL_LEQUAL); // GL11.glDisable(GL11.GL_TEXTURE_2D); int l3; int i4; int j4; for (ITechnology tech : Femtocraft.researchManager().getTechnologies()) { ResearchStatus rs = researchStatus.getTechnology(tech.getName()); if (rs == null) { continue; } if (tech.getPrerequisites() != null) { for (String cr : tech.getPrerequisites()) { TechNode node = Femtocraft.researchManager().getNode(tech); for (IGraphNode parent : node.getParents()) { IGraphNode next = parent; IGraphNode prev = node; while (next instanceof DummyTechNode) { k3 = prev.getDisplayX() * 24 - k + 11 + k1; j3 = prev.getDisplayY() * 24 - l + 11 + l1 - 11; j4 = next.getDisplayX() * 24 - k + 11 + k1; l3 = next.getDisplayY() * 24 - l + 11 + l1 + 11; boolean flag6 = !rs.researched(); i4 = Math.sin( (double) (Minecraft.getSystemTime() % 600L) / 600.0D * Math.PI * 2.0D) > 0.6D ? 255 : 130; int color = tech.getLevel().getColor(); if (flag6) { color += (i4 << 24); } else { color += (255 << 24); } // this.drawHorizontalLine(k3, j4, j3, color); // this.drawVerticalLine(j4, j3, l3, color); RenderUtils.drawLine(k3, j4, j3, l3, 1, color); RenderUtils.drawLine(j4, j4, l3 - 22, l3, 1, color); // Dummy nodes should only have 1 parent prev = next; next = next.getParents().get(0); } k3 = prev.getDisplayX() * 24 - k + 11 + k1; j3 = prev.getDisplayY() * 24 - l + 11 + l1 - 11; j4 = next.getDisplayX() * 24 - k + 11 + k1; l3 = next.getDisplayY() * 24 - l + 11 + l1 + 11; boolean flag6 = !rs.researched(); i4 = Math.sin((double) (Minecraft.getSystemTime() % 600L) / 600.0D * Math.PI * 2.0D) > 0.6D ? 255 : 130; int color = tech.getLevel().getColor(); if (flag6) { color += (i4 << 24); } else { color += (255 << 24); } // this.drawHorizontalLine(k3, j4, j3, color); // this.drawVerticalLine(j4, j3, l3, color); RenderUtils.drawLine(k3, j4, j3, l3, 1, color); } } } } ITechnology tooltipTech = null; RenderItem renderitem = new RenderItem(); RenderHelper.enableGUIStandardItemLighting(); GL11.glDisable(GL11.GL_LIGHTING); GL11.glEnable(GL12.GL_RESCALE_NORMAL); GL11.glEnable(GL11.GL_COLOR_MATERIAL); int l4; int i5; for (ITechnology tech : Femtocraft.researchManager().getTechnologies()) { ResearchStatus ts = researchStatus.getTechnology(tech.getName()); if (ts == null) { continue; } TechNode node = Femtocraft.researchManager().getNode(tech); j4 = node.getDisplayX() * 24 - k; l3 = node.getDisplayY() * 24 - l; if (j4 >= -24 && l3 >= -24 && j4 <= 224 && l3 <= 155) { float f2; if (ts.researched()) { f2 = 1.0F; GL11.glColor4f(f2, f2, f2, 1.0F); } else { f2 = Math.sin((double) (Minecraft.getSystemTime() % 600L) / 600.0D * Math.PI * 2.0D) < 0.6D ? 0.6F : 0.8F; GL11.glColor4f(f2, f2, f2, 1.0F); } // else { // f2 = 0.3F; // GL11.glColor4f(f2, f2, f2, 1.0F); // } Minecraft.getMinecraft().getTextureManager().bindTexture(achievementTextures); i5 = k1 + j4; l4 = l1 + l3; GL11.glEnable(GL11.GL_BLEND);// Forge: Specifically enable blend because it is needed here. And we // fix Generic RenderItem's leakage of it. if (tech.isKeystone()) { this.drawTexturedModalRect(i5 - 2, l4 - 2, 26, 202, 26, 26); } else { this.drawTexturedModalRect(i5 - 2, l4 - 2, 0, 202, 26, 26); } GL11.glDisable(GL11.GL_BLEND); //Forge: Cleanup states we set. // // if (!this.statFileWriter.canUnlockAchievement(achievement2)) // { // float f3 = 0.1F; // GL11.glColor4f(f3, f3, f3, 1.0F); // renderitem.renderWithColor = false; // } GL11.glDisable(GL11.GL_LIGHTING); //Forge: Make sure Lighting is disabled. Fixes MC-33065 GL11.glEnable(GL11.GL_CULL_FACE); RenderHelper.enableGUIStandardItemLighting(); // GL11.glDisable(GL11.GL_LIGHTING); // GL11.glBlendFunc(GL11.GL_DST_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); // GL11.glEnable(GL12.GL_RESCALE_NORMAL); // GL11.glEnable(GL11.GL_COLOR_MATERIAL); // GL11.glEnable(GL11.GL_LIGHTING); // GL11.glEnable(GL11.GL_CULL_FACE); renderitem.renderItemAndEffectIntoGUI(Minecraft.getMinecraft().fontRenderer, Minecraft.getMinecraft().getTextureManager(), tech.getDisplayItem(), i5 + 3, l4 + 3); RenderHelper.disableStandardItemLighting(); // GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); // GL11.glDisable(GL11.GL_LIGHTING); // GL11.glDisable(GL12.GL_RESCALE_NORMAL); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glDisable(GL11.GL_LIGHTING); // if (!this.statFileWriter.canUnlockAchievement(achievement2)) // { // renderitem.renderWithColor = true; // } GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); if (par1 >= k1 && par2 >= l1 && par1 < k1 + 224 && par2 < l1 + 155 && par1 >= i5 && par1 <= i5 + 22 && par2 >= l4 && par2 <= l4 + 22) { tooltipTech = tech; } } } GL11.glDisable(GL11.GL_DEPTH_TEST); GL11.glEnable(GL11.GL_BLEND); GL11.glPopMatrix(); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); Minecraft.getMinecraft().getTextureManager().bindTexture(achievementTextures); this.drawTexturedModalRect(i1, j1, 0, 0, this.researchPaneWidth, this.researchPaneHeight); // GL11.glPopMatrix(); this.zLevel = 0.0F; GL11.glDepthFunc(GL11.GL_LEQUAL); GL11.glDisable(GL11.GL_DEPTH_TEST); GL11.glEnable(GL11.GL_TEXTURE_2D); super.drawScreen(par1, par2, par3); if (tooltipTech != null) { ResearchStatus status = researchStatus.getTechnology(tooltipTech.getName()); String s = tooltipTech.getName(); String s1 = tooltipTech.getShortDescription(); j4 = par1 + 12; l3 = par2 - 4; i5 = Math.max(this.fontRendererObj.getStringWidth(s), 120); l4 = this.fontRendererObj.splitStringWidth(s1, i5); if (status.researched()) { l4 += 12; } this.drawGradientRect(j4 - 3, l3 - 3, j4 + i5 + 3, l3 + l4 + 3 + 12, -1073741824, -1073741824); this.fontRendererObj.drawSplitString(s1, j4, l3 + 12, i5, -6250336); if (status.researched()) { this.fontRendererObj.drawStringWithShadow("Researched!", j4, l3 + l4 + 4, -7302913); } // Keep Commented // else { // i5 = Math.max(this.fontRenderer.getStringWidth(s), 120); // String s2 = I18n.getStringParams("achievement.requires", // new Object[] { I18n // .getString(tooltipTech.parentAchievement // .getName()) }); // i4 = this.fontRenderer.splitStringWidth(s2, i5); // this.drawGradientRect(j4 - 3, l3 - 3, j4 + i5 + 3, l3 + i4 + 12 // + 3, -1073741824, -1073741824); // this.fontRenderer // .drawSplitString(s2, j4, l3 + 12, i5, -9416624); // } this.fontRendererObj.drawStringWithShadow(s, j4, l3, status.researched() ? (tooltipTech.isKeystone() ? -128 : -1) : (tooltipTech.isKeystone() ? -8355776 : -8355712)); } GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glEnable(GL11.GL_LIGHTING); RenderHelper.disableStandardItemLighting(); }