}
this.bindAmountScrolled();
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_FOG);
Tessellator var18 = Tessellator.instance;
GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.mc.renderEngine.getTexture("/gui/background.png"));
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
float var17 = 32.0F;
var18.startDrawingQuads();
var18.setColorOpaque_I(2105376);
var18.addVertexWithUV((double)this.left, (double)this.bottom, 0.0D, (double)((float)this.left / var17), (double)((float)(this.bottom + (int)this.amountScrolled) / var17));
var18.addVertexWithUV((double)this.right, (double)this.bottom, 0.0D, (double)((float)this.right / var17), (double)((float)(this.bottom + (int)this.amountScrolled) / var17));
var18.addVertexWithUV((double)this.right, (double)this.top, 0.0D, (double)((float)this.right / var17), (double)((float)(this.top + (int)this.amountScrolled) / var17));
var18.addVertexWithUV((double)this.left, (double)this.top, 0.0D, (double)((float)this.left / var17), (double)((float)(this.top + (int)this.amountScrolled) / var17));
var18.draw();
var9 = this.width / 2 - 92 - 16;
var10 = this.top + 4 - (int)this.amountScrolled;
int var14;
for (var11 = 0; var11 < var4; ++var11)
{
var19 = var10 + var11 * this.slotHeight + this.field_27261_r;
var13 = this.slotHeight - 4;
if (var19 <= this.bottom && var19 + var13 >= this.top)
{
if (this.field_25123_p && this.isSelected(var11))
{
var14 = this.width / 2 - 110;
int var15 = this.width / 2 + 110;
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glDisable(GL11.GL_TEXTURE_2D);
var18.startDrawingQuads();
var18.setColorOpaque_I(8421504);
var18.addVertexWithUV((double)var14, (double)(var19 + var13 + 2), 0.0D, 0.0D, 1.0D);
var18.addVertexWithUV((double)var15, (double)(var19 + var13 + 2), 0.0D, 1.0D, 1.0D);
var18.addVertexWithUV((double)var15, (double)(var19 - 2), 0.0D, 1.0D, 0.0D);
var18.addVertexWithUV((double)var14, (double)(var19 - 2), 0.0D, 0.0D, 0.0D);
var18.setColorOpaque_I(0);
var18.addVertexWithUV((double)(var14 + 1), (double)(var19 + var13 + 1), 0.0D, 0.0D, 1.0D);
var18.addVertexWithUV((double)(var15 - 1), (double)(var19 + var13 + 1), 0.0D, 1.0D, 1.0D);
var18.addVertexWithUV((double)(var15 - 1), (double)(var19 - 1), 0.0D, 1.0D, 0.0D);
var18.addVertexWithUV((double)(var14 + 1), (double)(var19 - 1), 0.0D, 0.0D, 0.0D);
var18.draw();
GL11.glEnable(GL11.GL_TEXTURE_2D);
}
this.drawSlot(var11, var9, var19, var13, var18);
}
}
GL11.glDisable(GL11.GL_DEPTH_TEST);
byte var20 = 4;
this.overlayBackground(0, this.top, 255, 255);
this.overlayBackground(this.bottom, this.height, 255, 255);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glDisable(GL11.GL_ALPHA_TEST);
GL11.glShadeModel(GL11.GL_SMOOTH);
GL11.glDisable(GL11.GL_TEXTURE_2D);
var18.startDrawingQuads();
var18.setColorRGBA_I(0, 0);
var18.addVertexWithUV((double)this.left, (double)(this.top + var20), 0.0D, 0.0D, 1.0D);
var18.addVertexWithUV((double)this.right, (double)(this.top + var20), 0.0D, 1.0D, 1.0D);
var18.setColorRGBA_I(0, 255);
var18.addVertexWithUV((double)this.right, (double)this.top, 0.0D, 1.0D, 0.0D);
var18.addVertexWithUV((double)this.left, (double)this.top, 0.0D, 0.0D, 0.0D);
var18.draw();
var18.startDrawingQuads();
var18.setColorRGBA_I(0, 255);
var18.addVertexWithUV((double)this.left, (double)this.bottom, 0.0D, 0.0D, 1.0D);
var18.addVertexWithUV((double)this.right, (double)this.bottom, 0.0D, 1.0D, 1.0D);
var18.setColorRGBA_I(0, 0);
var18.addVertexWithUV((double)this.right, (double)(this.bottom - var20), 0.0D, 1.0D, 0.0D);
var18.addVertexWithUV((double)this.left, (double)(this.bottom - var20), 0.0D, 0.0D, 0.0D);
var18.draw();
var19 = this.getContentHeight() - (this.bottom - this.top - 4);
if (var19 > 0)
{
var13 = (this.bottom - this.top) * (this.bottom - this.top) / this.getContentHeight();
if (var13 < 32)
var13 = 32;
if (var13 > this.bottom - this.top - 8)
var13 = this.bottom - this.top - 8;
var14 = (int)this.amountScrolled * (this.bottom - this.top - var13) / var19 + this.top;
if (var14 < this.top)
var14 = this.top;
var18.startDrawingQuads();
var18.setColorRGBA_I(0, 255);
var18.addVertexWithUV((double)var5, (double)this.bottom, 0.0D, 0.0D, 1.0D);
var18.addVertexWithUV((double)var6, (double)this.bottom, 0.0D, 1.0D, 1.0D);
var18.addVertexWithUV((double)var6, (double)this.top, 0.0D, 1.0D, 0.0D);
var18.addVertexWithUV((double)var5, (double)this.top, 0.0D, 0.0D, 0.0D);
var18.draw();
var18.startDrawingQuads();
var18.setColorRGBA_I(8421504, 255);
var18.addVertexWithUV((double)var5, (double)(var14 + var13), 0.0D, 0.0D, 1.0D);
var18.addVertexWithUV((double)var6, (double)(var14 + var13), 0.0D, 1.0D, 1.0D);
var18.addVertexWithUV((double)var6, (double)var14, 0.0D, 1.0D, 0.0D);
var18.addVertexWithUV((double)var5, (double)var14, 0.0D, 0.0D, 0.0D);
var18.draw();
var18.startDrawingQuads();
var18.setColorRGBA_I(12632256, 255);
var18.addVertexWithUV((double)var5, (double)(var14 + var13 - 1), 0.0D, 0.0D, 1.0D);
var18.addVertexWithUV((double)(var6 - 1), (double)(var14 + var13 - 1), 0.0D, 1.0D, 1.0D);
var18.addVertexWithUV((double)(var6 - 1), (double)var14, 0.0D, 1.0D, 0.0D);
var18.addVertexWithUV((double)var5, (double)var14, 0.0D, 0.0D, 0.0D);
var18.draw();
}
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glEnable(GL11.GL_ALPHA_TEST);
GL11.glDisable(GL11.GL_BLEND);