Example usage for org.lwjgl.opengl GL11 glColor3f

List of usage examples for org.lwjgl.opengl GL11 glColor3f

Introduction

In this page you can find the example usage for org.lwjgl.opengl GL11 glColor3f.

Prototype

public static native void glColor3f(@NativeType("GLfloat") float red, @NativeType("GLfloat") float green,
        @NativeType("GLfloat") float blue);

Source Link

Document

Float version of #glColor3b Color3b

Usage

From source file:com.github.begla.blockmania.blocks.Block.java

License:Apache License

/**
 * Generates the display list used for rendering the block.
 *
 * @return The id of the display list//from  w w  w. j av  a  2 s.c  om
 */
private int generateDisplayList() {
    int id = glGenLists(1);

    glNewList(id, GL11.GL_COMPILE);
    glBegin(GL_QUADS);
    GL11.glColor3f(1.0f, 1.0f, 1.0f);

    // TOP
    GL11.glTexCoord2f(calcTextureOffsetFor(SIDE.TOP).x, calcTextureOffsetFor(SIDE.TOP).y);
    GL11.glVertex3f(-0.5f, 0.5f, 0.5f);
    GL11.glTexCoord2f(calcTextureOffsetFor(SIDE.TOP).x + 0.0624f, calcTextureOffsetFor(SIDE.TOP).y);
    GL11.glVertex3f(0.5f, 0.5f, 0.5f);
    GL11.glTexCoord2f(calcTextureOffsetFor(SIDE.TOP).x + 0.0624f, calcTextureOffsetFor(SIDE.TOP).y + 0.0624f);
    GL11.glVertex3f(0.5f, 0.5f, -0.5f);
    GL11.glTexCoord2f(calcTextureOffsetFor(SIDE.TOP).x, calcTextureOffsetFor(SIDE.TOP).y + 0.0624f);
    GL11.glVertex3f(-0.5f, 0.5f, -0.5f);

    // LEFT
    GL11.glTexCoord2f(calcTextureOffsetFor(SIDE.LEFT).x, calcTextureOffsetFor(SIDE.LEFT).y + 0.0624f);
    GL11.glVertex3f(-0.5f, -0.5f, -0.5f);
    GL11.glTexCoord2f(calcTextureOffsetFor(SIDE.LEFT).x + 0.0624f, calcTextureOffsetFor(SIDE.LEFT).y + 0.0624f);
    GL11.glVertex3f(-0.5f, -0.5f, 0.5f);
    GL11.glTexCoord2f(calcTextureOffsetFor(SIDE.LEFT).x + 0.0624f, calcTextureOffsetFor(SIDE.LEFT).y);
    GL11.glVertex3f(-0.5f, 0.5f, 0.5f);
    GL11.glTexCoord2f(calcTextureOffsetFor(SIDE.LEFT).x, calcTextureOffsetFor(SIDE.LEFT).y);
    GL11.glVertex3f(-0.5f, 0.5f, -0.5f);

    // BACK
    GL11.glTexCoord2f(calcTextureOffsetFor(SIDE.BACK).x, calcTextureOffsetFor(SIDE.BACK).y + 0.0624f);
    GL11.glVertex3f(-0.5f, -0.5f, 0.5f);
    GL11.glTexCoord2f(calcTextureOffsetFor(SIDE.BACK).x + 0.0624f, calcTextureOffsetFor(SIDE.BACK).y + 0.0624f);
    GL11.glVertex3f(0.5f, -0.5f, 0.5f);
    GL11.glTexCoord2f(calcTextureOffsetFor(SIDE.BACK).x + 0.0624f, calcTextureOffsetFor(SIDE.BACK).y);
    GL11.glVertex3f(0.5f, 0.5f, 0.5f);
    GL11.glTexCoord2f(calcTextureOffsetFor(SIDE.BACK).x, calcTextureOffsetFor(SIDE.BACK).y);
    GL11.glVertex3f(-0.5f, 0.5f, 0.5f);

    // RIGHT
    GL11.glTexCoord2f(calcTextureOffsetFor(SIDE.RIGHT).x, calcTextureOffsetFor(SIDE.RIGHT).y);
    GL11.glVertex3f(0.5f, 0.5f, -0.5f);
    GL11.glTexCoord2f(calcTextureOffsetFor(SIDE.RIGHT).x + 0.0624f, calcTextureOffsetFor(SIDE.RIGHT).y);
    GL11.glVertex3f(0.5f, 0.5f, 0.5f);
    GL11.glTexCoord2f(calcTextureOffsetFor(SIDE.RIGHT).x + 0.0624f,
            calcTextureOffsetFor(SIDE.RIGHT).y + 0.0624f);
    GL11.glVertex3f(0.5f, -0.5f, 0.5f);
    GL11.glTexCoord2f(calcTextureOffsetFor(SIDE.RIGHT).x, calcTextureOffsetFor(SIDE.RIGHT).y + 0.0624f);
    GL11.glVertex3f(0.5f, -0.5f, -0.5f);

    GL11.glColor3f(0.5f, 0.5f, 0.5f);

    // FRONT
    GL11.glTexCoord2f(calcTextureOffsetFor(SIDE.FRONT).x, calcTextureOffsetFor(SIDE.FRONT).y);
    GL11.glVertex3f(-0.5f, 0.5f, -0.5f);
    GL11.glTexCoord2f(calcTextureOffsetFor(SIDE.FRONT).x + 0.0624f, calcTextureOffsetFor(SIDE.FRONT).y);
    GL11.glVertex3f(0.5f, 0.5f, -0.5f);
    GL11.glTexCoord2f(calcTextureOffsetFor(SIDE.FRONT).x + 0.0624f,
            calcTextureOffsetFor(SIDE.FRONT).y + 0.0624f);
    GL11.glVertex3f(0.5f, -0.5f, -0.5f);
    GL11.glTexCoord2f(calcTextureOffsetFor(SIDE.FRONT).x, calcTextureOffsetFor(SIDE.FRONT).y + 0.0624f);
    GL11.glVertex3f(-0.5f, -0.5f, -0.5f);
    // BOTTOM
    GL11.glTexCoord2f(calcTextureOffsetFor(SIDE.BOTTOM).x, calcTextureOffsetFor(SIDE.BOTTOM).y);
    GL11.glVertex3f(-0.5f, -0.5f, -0.5f);
    GL11.glTexCoord2f(calcTextureOffsetFor(SIDE.BOTTOM).x + 0.0624f, calcTextureOffsetFor(SIDE.BOTTOM).y);
    GL11.glVertex3f(0.5f, -0.5f, -0.5f);
    GL11.glTexCoord2f(calcTextureOffsetFor(SIDE.BOTTOM).x + 0.0624f,
            calcTextureOffsetFor(SIDE.BOTTOM).y + 0.0624f);
    GL11.glVertex3f(0.5f, -0.5f, 0.5f);
    GL11.glTexCoord2f(calcTextureOffsetFor(SIDE.BOTTOM).x, calcTextureOffsetFor(SIDE.BOTTOM).y + 0.0624f);
    GL11.glVertex3f(-0.5f, -0.5f, 0.5f);

    GL11.glEnd();
    glEndList();

    return id;
}

From source file:com.github.begla.blockmania.world.characters.Slime.java

License:Apache License

public void render() {
    super.render();

    glPushMatrix();/*from w ww.j a v  a2  s. c o  m*/

    glTranslatef(getPosition().x, getPosition().y, getPosition().z);
    glRotatef((float) _yaw, 0f, 1f, 0f);

    glEnable(GL_TEXTURE_2D);
    TextureManager.getInstance().bindTexture("slime");

    float brightness = (float) Math.pow(0.84, 15.0 - _parent.getDaylight() * 15.0);

    glBegin(GL_QUADS);
    GL11.glColor3f(brightness, brightness, brightness);

    // TOP
    GL11.glTexCoord2f(0f / 64f, 28f / 32f);
    GL11.glVertex3f(-0.25f, 0.2f, 0.25f);
    GL11.glTexCoord2f(6f / 64f, 28f / 32f);
    GL11.glVertex3f(0.25f, 0.2f, 0.25f);
    GL11.glTexCoord2f(6f / 64f, 22f / 32f);
    GL11.glVertex3f(0.25f, 0.2f, -0.25f);
    GL11.glTexCoord2f(0f / 64f, 22f / 32f);
    GL11.glVertex3f(-0.25f, 0.2f, -0.25f);

    // LEFT
    GL11.glTexCoord2f(0f / 64f, 28f / 32f);
    GL11.glVertex3f(-0.25f, -0.2f, -0.25f);
    GL11.glTexCoord2f(6f / 64f, 28f / 32f);
    GL11.glVertex3f(-0.25f, -0.2f, 0.25f);
    GL11.glTexCoord2f(6f / 64f, 22f / 32f);
    GL11.glVertex3f(-0.25f, 0.2f, 0.25f);
    GL11.glTexCoord2f(0f / 64f, 22f / 32f);
    GL11.glVertex3f(-0.25f, 0.2f, -0.25f);

    // BACK
    GL11.glTexCoord2f(0f / 64f, 28f / 32f);
    GL11.glVertex3f(-0.25f, -0.2f, 0.25f);
    GL11.glTexCoord2f(6f / 64f, 28f / 32f);
    GL11.glVertex3f(0.25f, -0.2f, 0.25f);
    GL11.glTexCoord2f(6f / 64f, 22f / 32f);
    GL11.glVertex3f(0.25f, 0.2f, 0.25f);
    GL11.glTexCoord2f(0f / 64f, 22f / 32f);
    GL11.glVertex3f(-0.25f, 0.2f, 0.25f);

    // RIGHT
    GL11.glTexCoord2f(0f / 64f, 28f / 32f);
    GL11.glVertex3f(0.25f, 0.2f, -0.25f);
    GL11.glTexCoord2f(6f / 64f, 28f / 32f);
    GL11.glVertex3f(0.25f, 0.2f, 0.25f);
    GL11.glTexCoord2f(6f / 64f, 22f / 32f);
    GL11.glVertex3f(0.25f, -0.2f, 0.25f);
    GL11.glTexCoord2f(0f / 64f, 22f / 32f);
    GL11.glVertex3f(0.25f, -0.2f, -0.25f);

    GL11.glColor3f(brightness * 0.25f, brightness * 0.25f, brightness * 0.25f);

    // FRONT
    GL11.glTexCoord2f(0f / 64f, 28f / 32f);
    GL11.glVertex3f(-0.25f, 0.2f, -0.25f);
    GL11.glTexCoord2f(6f / 64f, 28f / 32f);
    GL11.glVertex3f(0.25f, 0.2f, -0.25f);
    GL11.glTexCoord2f(6f / 64f, 22f / 32f);
    GL11.glVertex3f(0.25f, -0.2f, -0.25f);
    GL11.glTexCoord2f(0f / 64f, 22f / 32f);
    GL11.glVertex3f(-0.25f, -0.2f, -0.25f);

    // BOTTOM
    GL11.glTexCoord2f(0f / 64f, 28f / 32f);
    GL11.glVertex3f(-0.25f, -0.2f, -0.25f);
    GL11.glTexCoord2f(6f / 64f, 28f / 32f);
    GL11.glVertex3f(0.25f, -0.2f, -0.25f);
    GL11.glTexCoord2f(6f / 64f, 22f / 32f);
    GL11.glVertex3f(0.25f, -0.2f, 0.25f);
    GL11.glTexCoord2f(0f / 64f, 22f / 32f);
    GL11.glVertex3f(-0.25f, -0.2f, 0.25f);

    GL11.glEnd();

    glDisable(GL11.GL_TEXTURE_2D);

    glPopMatrix();
}

From source file:com.golden.gamedev.engine.lwjgl.LWJGLGraphics.java

License:Open Source License

public void drawLine(int x1, int y1, int x2, int y2) {
    GL11.glDisable(GL11.GL_TEXTURE_2D);//  w w w .j a v  a2 s .  c om

    GL11.glColor4f((float) this.color.getRed() / 255f, (float) this.color.getGreen() / 255f,
            (float) this.color.getBlue() / 255f, (float) this.color.getAlpha() / 255f);
    GL11.glLineWidth(1.0f);

    GL11.glBegin(GL11.GL_LINES);
    GL11.glVertex2f(x1, y1);
    GL11.glVertex2f(x2, y2);
    GL11.glEnd();

    GL11.glColor3f(1.0f, 1.0f, 1.0f);

    GL11.glEnable(GL11.GL_TEXTURE_2D);
}

From source file:com.golden.gamedev.engine.lwjgl.LWJGLGraphics.java

License:Open Source License

private void endPainting() {
    if (this.composite != null) {
        GL11.glColor3f(1.0f, 1.0f, 1.0f);
    }
}

From source file:com.golden.gamedev.engine.lwjgl.LWJGLGraphics.java

License:Open Source License

private void drawRect(int x, int y, int width, int height, int type, Color col) {
    GL11.glDisable(GL11.GL_TEXTURE_2D);//from w  ww.  j ava2s . c o  m

    GL11.glColor4f((float) col.getRed() / 255f, (float) col.getGreen() / 255f, (float) col.getBlue() / 255f,
            (float) col.getAlpha() / 255f);
    GL11.glLineWidth(1.0f);

    GL11.glBegin(type);
    GL11.glVertex2f(x, y);
    GL11.glVertex2f(x + width, y);
    GL11.glVertex2f(x + width, y + height);
    GL11.glVertex2f(x, y + height);
    GL11.glEnd();

    GL11.glColor3f(1.0f, 1.0f, 1.0f);

    GL11.glEnable(GL11.GL_TEXTURE_2D);
}

From source file:com.irr310.i3d.scene.I3dCamera.java

License:Open Source License

public void display(float width, float height) {

    this.currentWidth = width;
    this.currentHeight = height;

    GL11.glMatrixMode(GL11.GL_PROJECTION);
    GL11.glLoadIdentity();/*from w w w . j  ava  2 s  .c  o  m*/
    GL11.glOrtho(0, width, 0, height, -2000.0, 2000.0);
    GL11.glMatrixMode(GL11.GL_MODELVIEW);
    GL11.glLoadIdentity();

    backgroundScene.display(this);

    GL11.glMatrixMode(GL11.GL_PROJECTION);
    GL11.glLoadIdentity();
    initPerspective();
    GL11.glMatrixMode(GL11.GL_MODELVIEW);
    GL11.glLoadIdentity();

    GL11.glPushMatrix();

    configureView(glu);

    if (!configured) {
        configured = true;
        if (cameraInitialisation != null) {
            cameraInitialisation.run();
            cameraInitialisation = null;
        }
    }

    GL11.glColor3f(1, 0, 0);
    GL11.glBegin(GL11.GL_LINES);
    GL11.glVertex3d(0, 0, 0);
    GL11.glVertex3d(100, 100, 100);
    GL11.glEnd();

    preDisplayScene();
    if (currentScene != null) {
        currentScene.display(this);
    }
    postDisplayScene();

    preDisplayGui();
    postDisplayGui();

    GL11.glMatrixMode(GL11.GL_PROJECTION);
    GL11.glLoadIdentity();
    GL11.glOrtho(0, width, 0, height, -2000.0, 2000.0);
    GL11.glMatrixMode(GL11.GL_MODELVIEW);
    GL11.glLoadIdentity();

    hudScene.display(this);

    GL11.glPopMatrix();

}

From source file:com.kegare.caveworld.util.CaveUtils.java

License:Minecraft Mod Public

@SideOnly(Side.CLIENT)
public static boolean renderItemStack(Minecraft mc, ItemStack itemstack, int x, int y, boolean overlay,
        String txt) {// w w w.j a  va 2s.  co  m
    GL11.glColor3f(1.0F, 1.0F, 1.0F);

    boolean isLightingEnabled = GL11.glIsEnabled(GL11.GL_LIGHTING);
    boolean rc = false;

    if (itemstack != null && itemstack.getItem() != null) {
        Block block = Block.getBlockFromItem(itemstack.getItem());

        if (GameRegistry.findUniqueIdentifierFor(block).modId.equals("EnderIO")
                && !block.renderAsNormalBlock()) {
            return false;
        }

        rc = true;
        boolean isRescaleNormalEnabled = GL11.glIsEnabled(GL12.GL_RESCALE_NORMAL);
        GL11.glPushMatrix();
        GL11.glTranslatef(0.0F, 0.0F, 32.0F);
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        GL11.glEnable(GL12.GL_RESCALE_NORMAL);
        GL11.glEnable(GL11.GL_LIGHTING);
        short short1 = 240;
        short short2 = 240;
        RenderHelper.enableGUIStandardItemLighting();
        OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, short1 / 1.0F, short2 / 1.0F);
        RenderItem itemRender = RenderItem.getInstance();

        itemRender.zLevel += 100.0F;
        boolean rendered;

        try {
            rendered = ForgeHooksClient.renderInventoryItem(RenderBlocks.getInstance(), mc.getTextureManager(),
                    itemstack, itemRender.renderWithColor, itemRender.zLevel, x, y);
        } catch (Throwable e) {
            rendered = false;
        }

        if (!rendered) {
            try {
                itemRender.renderItemIntoGUI(mc.fontRenderer, mc.getTextureManager(), itemstack, x, y, true);
            } catch (Throwable e) {
            }
        }

        if (overlay) {
            try {
                itemRender.renderItemOverlayIntoGUI(mc.fontRenderer, mc.getTextureManager(), itemstack, x, y,
                        txt);
            } catch (Throwable e) {
            }
        }

        itemRender.zLevel -= 100.0F;

        GL11.glPopMatrix();

        if (isRescaleNormalEnabled) {
            GL11.glEnable(GL12.GL_RESCALE_NORMAL);
        } else {
            GL11.glDisable(GL12.GL_RESCALE_NORMAL);
        }
    }

    if (isLightingEnabled) {
        GL11.glEnable(GL11.GL_LIGHTING);
    } else {
        GL11.glDisable(GL11.GL_LIGHTING);
    }

    return rc;
}

From source file:com.kegare.frozenland.client.renderer.RenderIceball.java

License:Minecraft Mod Public

@Override
public void doRender(Entity entity, double posX, double posY, double posZ, float yaw, float ticks) {
    IIcon icon = Items.snowball.getIconFromDamage(0);

    if (icon != null) {
        GL11.glPushMatrix();//from  ww w.  ja v  a 2 s.c o  m
        GL11.glTranslatef((float) posX, (float) posY, (float) posZ);
        GL11.glEnable(GL12.GL_RESCALE_NORMAL);
        GL11.glScalef(0.5F, 0.5F, 0.5F);
        bindEntityTexture(entity);
        Tessellator tessellator = Tessellator.instance;
        int i = 0x95CBE7;
        float r = (i >> 16 & 255) / 255.0F;
        float g = (i >> 8 & 255) / 255.0F;
        float b = (i & 255) / 255.0F;
        GL11.glColor3f(r, g, b);
        GL11.glPushMatrix();
        doRender(tessellator, icon);
        GL11.glPopMatrix();
        GL11.glColor3f(1.0F, 1.0F, 1.0F);
        GL11.glDisable(GL12.GL_RESCALE_NORMAL);
        GL11.glPopMatrix();
    }
}

From source file:com.mcgoodtime.productionline.client.RenderEntityThrowable.java

License:MIT License

/**
 * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
 * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
 * (Render<T extends Entity) and this method has signature public void func_76986_a(T entity, double d, double d1,
 * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
 *//* w  w w .ja v a2  s.  com*/
@Override
public void doRender(Entity entity, double d, double d1, double d2, float f, float f1) {

    IIcon iicon = entity.getDataWatcher().getWatchableObjectItemStack(23).getIconIndex();

    if (iicon != null) {
        GL11.glPushMatrix();
        GL11.glTranslatef((float) d, (float) d1, (float) d2);
        GL11.glEnable(GL12.GL_RESCALE_NORMAL);
        GL11.glScalef(0.5F, 0.5F, 0.5F);
        this.bindEntityTexture(entity);
        Tessellator tessellator = Tessellator.instance;

        if (iicon == ItemPotion.func_94589_d("bottle_splash")) {
            int i = PotionHelper.func_77915_a(((EntityPotion) entity).getPotionDamage(), false);
            float f2 = (float) (i >> 16 & 255) / 255.0F;
            float f3 = (float) (i >> 8 & 255) / 255.0F;
            float f4 = (float) (i & 255) / 255.0F;
            GL11.glColor3f(f2, f3, f4);
            GL11.glPushMatrix();
            this.draw(tessellator, ItemPotion.func_94589_d("overlay"));
            GL11.glPopMatrix();
            GL11.glColor3f(1.0F, 1.0F, 1.0F);
        }

        this.draw(tessellator, iicon);
        GL11.glDisable(GL12.GL_RESCALE_NORMAL);
        GL11.glPopMatrix();
    }
}

From source file:com.minestellar.moon.world.SkyRendererMoon.java

License:Open Source License

@Override
public void render(float partialTicks, WorldClient world, Minecraft mc) {
    WorldProviderMoon gcProvider = null;

    if (world.provider instanceof WorldProviderMoon) {
        gcProvider = (WorldProviderMoon) world.provider;
    }/*from  w  w w. j  av a  2s  .co  m*/

    GL11.glDisable(GL11.GL_TEXTURE_2D);
    GL11.glColor3f(1, 1, 1);
    final Tessellator var23 = Tessellator.instance;
    GL11.glDepthMask(false);
    GL11.glEnable(GL11.GL_FOG);
    GL11.glColor3f(0, 0, 0);
    GL11.glCallList(this.glSkyList);
    GL11.glDisable(GL11.GL_FOG);
    GL11.glDisable(GL11.GL_ALPHA_TEST);
    GL11.glEnable(GL11.GL_BLEND);
    GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
    RenderHelper.disableStandardItemLighting();
    float var10;
    float var11;
    float var12;

    float var20 = 0;

    if (gcProvider != null) {
        var20 = gcProvider.getStarBrightness(partialTicks);
    }

    if (var20 > 0.0F) {
        GL11.glColor4f(1.0F, 1.0F, 1.0F, var20);
        GL11.glCallList(this.starGLCallList);
    }

    GL11.glEnable(GL11.GL_TEXTURE_2D);
    GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
    GL11.glPushMatrix();

    GL11.glPopMatrix();

    GL11.glPushMatrix();

    // SUN:
    GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 5F);
    GL11.glRotatef(world.getCelestialAngle(partialTicks) * 360.0F, 1.0F, 0.0F, 0.0F);
    var12 = 30.0F;
    FMLClientHandler.instance().getClient().renderEngine.bindTexture(SkyRendererMoon.sunTexture);
    var23.startDrawingQuads();
    var23.addVertexWithUV(-var12, 150.0D, -var12, 0.0D, 0.0D);
    var23.addVertexWithUV(var12, 150.0D, -var12, 1.0D, 0.0D);
    var23.addVertexWithUV(var12, 150.0D, var12, 1.0D, 1.0D);
    var23.addVertexWithUV(-var12, 150.0D, var12, 0.0D, 1.0D);
    var23.draw();

    GL11.glPopMatrix();

    GL11.glPushMatrix();

    GL11.glDisable(GL11.GL_BLEND);

    // EARTH:
    var12 = 50.0F;
    final float earthRotation = (float) (world.getSpawnPoint().posZ - mc.thePlayer.posZ) * 0.01F;
    GL11.glScalef(0.6F, 0.6F, 0.6F);
    GL11.glRotatef(earthRotation, 1.0F, 0.0F, 0.0F);
    GL11.glRotatef(200F, 1.0F, 0.0F, 0.0F);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1F);
    FMLClientHandler.instance().getClient().renderEngine.bindTexture(SkyRendererMoon.earthTexture);
    world.getMoonPhase();
    var23.startDrawingQuads();
    var23.addVertexWithUV(-var12, -400.0D, var12, 0, 1);
    var23.addVertexWithUV(var12, -400.0D, var12, 1, 1);
    var23.addVertexWithUV(var12, -400.0D, -var12, 1, 0);
    var23.addVertexWithUV(-var12, -400.0D, -var12, 0, 0);
    var23.draw();

    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    GL11.glDisable(GL11.GL_BLEND);
    GL11.glEnable(GL11.GL_ALPHA_TEST);
    GL11.glEnable(GL11.GL_FOG);
    GL11.glPopMatrix();
    GL11.glDisable(GL11.GL_TEXTURE_2D);
    GL11.glColor3f(0.0F, 0.0F, 0.0F);
    final double var25 = mc.thePlayer.getPosition(partialTicks).yCoord - world.getHorizon();

    if (var25 < 0.0D) {
        GL11.glPushMatrix();
        GL11.glTranslatef(0.0F, 12.0F, 0.0F);
        GL11.glCallList(this.glSkyList2);
        GL11.glPopMatrix();
        var10 = 1.0F;
        var11 = -((float) (var25 + 65.0D));
        var12 = -var10;
        var23.startDrawingQuads();
        var23.setColorRGBA_I(0, 255);
        var23.addVertex(-var10, var11, var10);
        var23.addVertex(var10, var11, var10);
        var23.addVertex(var10, var12, var10);
        var23.addVertex(-var10, var12, var10);
        var23.addVertex(-var10, var12, -var10);
        var23.addVertex(var10, var12, -var10);
        var23.addVertex(var10, var11, -var10);
        var23.addVertex(-var10, var11, -var10);
        var23.addVertex(var10, var12, -var10);
        var23.addVertex(var10, var12, var10);
        var23.addVertex(var10, var11, var10);
        var23.addVertex(var10, var11, -var10);
        var23.addVertex(-var10, var11, -var10);
        var23.addVertex(-var10, var11, var10);
        var23.addVertex(-var10, var12, var10);
        var23.addVertex(-var10, var12, -var10);
        var23.addVertex(-var10, var12, -var10);
        var23.addVertex(-var10, var12, var10);
        var23.addVertex(var10, var12, var10);
        var23.addVertex(var10, var12, -var10);
        var23.draw();
    }

    GL11.glColor3f(70F / 256F, 70F / 256F, 70F / 256F);

    GL11.glPushMatrix();
    GL11.glTranslatef(0.0F, -((float) (var25 - 16.0D)), 0.0F);
    GL11.glCallList(this.glSkyList2);
    GL11.glPopMatrix();
    GL11.glEnable(GL11.GL_TEXTURE_2D);
    GL11.glDepthMask(true);
}