var82.fogBlue += (var117 - var82.fogBlue) * var29;
var82.fogGreen += (var32 - var82.fogGreen) * var29;
var82.fogRed *= var82.fogColorMultiplier;
var82.fogBlue *= var82.fogColorMultiplier;
var82.fogGreen *= var82.fogColorMultiplier;
Block var73;
if((var73 = Block.blocks[var26.getTile((int)var28.x, (int)(var28.y + 0.12F), (int)var28.z)]) != null && var73.getLiquidType() != LiquidType.NOT_LIQUID) {
LiquidType var79;
if((var79 = var73.getLiquidType()) == LiquidType.WATER) {
var82.fogRed = 0.02F;
var82.fogBlue = 0.02F;
var82.fogGreen = 0.2F;
} else if(var79 == LiquidType.LAVA) {
var82.fogRed = 0.6F;
var82.fogBlue = 0.1F;
var82.fogGreen = 0.0F;
}
}
if(var82.minecraft.settings.anaglyph) {
var74 = (var82.fogRed * 30.0F + var82.fogBlue * 59.0F + var82.fogGreen * 11.0F) / 100.0F;
var33 = (var82.fogRed * 30.0F + var82.fogBlue * 70.0F) / 100.0F;
var34 = (var82.fogRed * 30.0F + var82.fogGreen * 70.0F) / 100.0F;
var82.fogRed = var74;
var82.fogBlue = var33;
var82.fogGreen = var34;
}
GL11.glClearColor(var82.fogRed, var82.fogBlue, var82.fogGreen, 0.0F);
GL11.glClear(16640);
var82.fogColorMultiplier = 1.0F;
GL11.glEnable(2884);
var82.fogEnd = (float)(512 >> (var82.minecraft.settings.viewDistance << 1));
GL11.glMatrixMode(5889);
GL11.glLoadIdentity();
var29 = 0.07F;
if(var82.minecraft.settings.anaglyph) {
GL11.glTranslatef((float)(-((var77 << 1) - 1)) * var29, 0.0F, 0.0F);
}
Player var116 = var82.minecraft.player;
var69 = 70.0F;
if(var116.health <= 0) {
var74 = (float)var116.deathTime + var80;
var69 /= (1.0F - 500.0F / (var74 + 500.0F)) * 2.0F + 1.0F;
}
GLU.gluPerspective(var69, (float)var82.minecraft.width / (float)var82.minecraft.height, 0.05F, var82.fogEnd);
GL11.glMatrixMode(5888);
GL11.glLoadIdentity();
if(var82.minecraft.settings.anaglyph) {
GL11.glTranslatef((float)((var77 << 1) - 1) * 0.1F, 0.0F, 0.0F);
}
var82.hurtEffect(var80);
if(var82.minecraft.settings.viewBobbing) {
var82.applyBobbing(var80);
}
var116 = var82.minecraft.player;
GL11.glTranslatef(0.0F, 0.0F, -0.1F);
GL11.glRotatef(var116.xRotO + (var116.xRot - var116.xRotO) * var80, 1.0F, 0.0F, 0.0F);
GL11.glRotatef(var116.yRotO + (var116.yRot - var116.yRotO) * var80, 0.0F, 1.0F, 0.0F);
var69 = var116.xo + (var116.x - var116.xo) * var80;
var74 = var116.yo + (var116.y - var116.yo) * var80;
var33 = var116.zo + (var116.z - var116.zo) * var80;
GL11.glTranslatef(-var69, -var74, -var33);
Frustrum var76 = FrustrumImpl.update();
Frustrum var100 = var76;
LevelRenderer var101 = var82.minecraft.levelRenderer;
int var98;
for(var98 = 0; var98 < var101.chunkCache.length; ++var98) {
var101.chunkCache[var98].clip(var100);
}
var101 = var82.minecraft.levelRenderer;
Collections.sort(var82.minecraft.levelRenderer.chunks, new ChunkDirtyDistanceComparator(var126));
var98 = var101.chunks.size() - 1;
int var105;
if((var105 = var101.chunks.size()) > 3) {
var105 = 3;
}
int var104;
for(var104 = 0; var104 < var105; ++var104) {
Chunk var118;
(var118 = (Chunk)var101.chunks.remove(var98 - var104)).update();
var118.loaded = false;
}
var82.updateFog();
GL11.glEnable(2912);
var89.sortChunks(var126, 0);
int var83;
int var110;
ShapeRenderer var115;
int var114;
int var125;
int var122;
int var120;
if(var119.isSolid(var126.x, var126.y, var126.z, 0.1F)) {
var120 = (int)var126.x;
var83 = (int)var126.y;
var110 = (int)var126.z;
for(var122 = var120 - 1; var122 <= var120 + 1; ++var122) {
for(var125 = var83 - 1; var125 <= var83 + 1; ++var125) {
for(int var38 = var110 - 1; var38 <= var110 + 1; ++var38) {
var105 = var38;
var98 = var125;
int var99 = var122;
if((var104 = var89.level.getTile(var122, var125, var38)) != 0 && Block.blocks[var104].isSolid()) {
GL11.glColor4f(0.2F, 0.2F, 0.2F, 1.0F);
GL11.glDepthFunc(513);
var115 = ShapeRenderer.instance;
ShapeRenderer.instance.begin();
for(var114 = 0; var114 < 6; ++var114) {
Block.blocks[var104].renderInside(var115, var99, var98, var105, var114);
}
var115.end();
GL11.glCullFace(1028);
var115.begin();
for(var114 = 0; var114 < 6; ++var114) {
Block.blocks[var104].renderInside(var115, var99, var98, var105, var114);
}
var115.end();
GL11.glCullFace(1029);
GL11.glDepthFunc(515);
}
}
}
}
}
var82.setLighting(true);
Vec3D var103 = var82.getPlayerVector(var80);
var89.level.blockMap.render(var103, var76, var89.textureManager, var80);
var82.setLighting(false);
var82.updateFog();
float var107 = var80;
ParticleManager var96 = var93;
var29 = -MathHelper.cos(var126.yRot * 3.1415927F / 180.0F);
var117 = -(var30 = -MathHelper.sin(var126.yRot * 3.1415927F / 180.0F)) * MathHelper.sin(var126.xRot * 3.1415927F / 180.0F);
var32 = var29 * MathHelper.sin(var126.xRot * 3.1415927F / 180.0F);
var69 = MathHelper.cos(var126.xRot * 3.1415927F / 180.0F);
for(var83 = 0; var83 < 2; ++var83) {
if(var96.particles[var83].size() != 0) {
var110 = 0;
if(var83 == 0) {
var110 = var96.textureManager.load("/particles.png");
}
if(var83 == 1) {
var110 = var96.textureManager.load("/terrain.png");
}
GL11.glBindTexture(3553, var110);
ShapeRenderer var121 = ShapeRenderer.instance;
ShapeRenderer.instance.begin();
for(var120 = 0; var120 < var96.particles[var83].size(); ++var120) {
((Particle)var96.particles[var83].get(var120)).render(var121, var107, var29, var69, var30, var117, var32);
}
var121.end();
}
}
GL11.glBindTexture(3553, var89.textureManager.load("/rock.png"));
GL11.glEnable(3553);
GL11.glCallList(var89.listId);
var82.updateFog();
var101 = var89;
GL11.glBindTexture(3553, var89.textureManager.load("/clouds.png"));
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
var107 = (float)(var89.level.cloudColor >> 16 & 255) / 255.0F;
var29 = (float)(var89.level.cloudColor >> 8 & 255) / 255.0F;
var30 = (float)(var89.level.cloudColor & 255) / 255.0F;
if(var89.minecraft.settings.anaglyph) {
var117 = (var107 * 30.0F + var29 * 59.0F + var30 * 11.0F) / 100.0F;
var32 = (var107 * 30.0F + var29 * 70.0F) / 100.0F;
var69 = (var107 * 30.0F + var30 * 70.0F) / 100.0F;
var107 = var117;
var29 = var32;
var30 = var69;
}
var115 = ShapeRenderer.instance;
var74 = 0.0F;
var33 = 4.8828125E-4F;
var74 = (float)(var89.level.depth + 2);
var34 = ((float)var89.ticks + var80) * var33 * 0.03F;
var35 = 0.0F;
var115.begin();
var115.color(var107, var29, var30);
for(var86 = -2048; var86 < var101.level.width + 2048; var86 += 512) {
for(var125 = -2048; var125 < var101.level.height + 2048; var125 += 512) {
var115.vertexUV((float)var86, var74, (float)(var125 + 512), (float)var86 * var33 + var34, (float)(var125 + 512) * var33);
var115.vertexUV((float)(var86 + 512), var74, (float)(var125 + 512), (float)(var86 + 512) * var33 + var34, (float)(var125 + 512) * var33);
var115.vertexUV((float)(var86 + 512), var74, (float)var125, (float)(var86 + 512) * var33 + var34, (float)var125 * var33);
var115.vertexUV((float)var86, var74, (float)var125, (float)var86 * var33 + var34, (float)var125 * var33);
var115.vertexUV((float)var86, var74, (float)var125, (float)var86 * var33 + var34, (float)var125 * var33);
var115.vertexUV((float)(var86 + 512), var74, (float)var125, (float)(var86 + 512) * var33 + var34, (float)var125 * var33);
var115.vertexUV((float)(var86 + 512), var74, (float)(var125 + 512), (float)(var86 + 512) * var33 + var34, (float)(var125 + 512) * var33);
var115.vertexUV((float)var86, var74, (float)(var125 + 512), (float)var86 * var33 + var34, (float)(var125 + 512) * var33);
}
}
var115.end();
GL11.glDisable(3553);
var115.begin();
var34 = (float)(var101.level.skyColor >> 16 & 255) / 255.0F;
var35 = (float)(var101.level.skyColor >> 8 & 255) / 255.0F;
var87 = (float)(var101.level.skyColor & 255) / 255.0F;
if(var101.minecraft.settings.anaglyph) {
var36 = (var34 * 30.0F + var35 * 59.0F + var87 * 11.0F) / 100.0F;
var69 = (var34 * 30.0F + var35 * 70.0F) / 100.0F;
var74 = (var34 * 30.0F + var87 * 70.0F) / 100.0F;
var34 = var36;
var35 = var69;
var87 = var74;
}
var115.color(var34, var35, var87);
var74 = (float)(var101.level.depth + 10);
for(var125 = -2048; var125 < var101.level.width + 2048; var125 += 512) {
for(var68 = -2048; var68 < var101.level.height + 2048; var68 += 512) {
var115.vertex((float)var125, var74, (float)var68);
var115.vertex((float)(var125 + 512), var74, (float)var68);
var115.vertex((float)(var125 + 512), var74, (float)(var68 + 512));
var115.vertex((float)var125, var74, (float)(var68 + 512));
}
}
var115.end();
GL11.glEnable(3553);
var82.updateFog();
int var108;
if(var82.minecraft.selected != null) {
GL11.glDisable(3008);
MovingObjectPosition var10001 = var82.minecraft.selected;
var105 = var126.inventory.getSelected();
boolean var106 = false;
MovingObjectPosition var102 = var10001;
var101 = var89;
ShapeRenderer var113 = ShapeRenderer.instance;
GL11.glEnable(3042);
GL11.glEnable(3008);
GL11.glBlendFunc(770, 1);
GL11.glColor4f(1.0F, 1.0F, 1.0F, (MathHelper.sin((float)System.currentTimeMillis() / 100.0F) * 0.2F + 0.4F) * 0.5F);
if(var89.cracks > 0.0F) {
GL11.glBlendFunc(774, 768);
var108 = var89.textureManager.load("/terrain.png");
GL11.glBindTexture(3553, var108);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.5F);
GL11.glPushMatrix();
Block var10000 = (var114 = var89.level.getTile(var102.x, var102.y, var102.z)) > 0?Block.blocks[var114]:null;
var73 = var10000;
var74 = (var10000.x1 + var73.x2) / 2.0F;
var33 = (var73.y1 + var73.y2) / 2.0F;
var34 = (var73.z1 + var73.z2) / 2.0F;
GL11.glTranslatef((float)var102.x + var74, (float)var102.y + var33, (float)var102.z + var34);