/** Draw the background layer for the GuiContainer (everything behind the items) */
  protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    RenderHelper.enableGUIStandardItemLighting();
    int var4 = this.mc.renderEngine.getTexture("/gui/allitems.png");
    CreativeTabs var5 = CreativeTabs.creativeTabArray[selectedTabIndex];
    int var6 =
        this.mc.renderEngine.getTexture("/gui/creative_inv/" + var5.getBackgroundImageName());
    CreativeTabs[] var7 = CreativeTabs.creativeTabArray;
    int var8 = var7.length;
    int var9;

    for (var9 = 0; var9 < var8; ++var9) {
      CreativeTabs var10 = var7[var9];
      this.mc.renderEngine.bindTexture(var4);

      if (var10.getTabIndex() != selectedTabIndex) {
        this.renderCreativeTab(var10);
      }
    }

    this.mc.renderEngine.bindTexture(var6);
    this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize);
    this.searchField.drawTextBox();
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    int var11 = this.guiLeft + 175;
    var8 = this.guiTop + 18;
    var9 = var8 + 112;
    this.mc.renderEngine.bindTexture(var4);

    if (var5.shouldHidePlayerInventory()) {
      this.drawTexturedModalRect(
          var11,
          var8 + (int) ((float) (var9 - var8 - 17) * this.currentScroll),
          232 + (this.needsScrollBars() ? 0 : 12),
          0,
          12,
          15);
    }

    this.renderCreativeTab(var5);

    if (var5 == CreativeTabs.tabInventory) {
      GuiInventory.func_74223_a(
          this.mc,
          this.guiLeft + 43,
          this.guiTop + 45,
          20,
          (float) (this.guiLeft + 43 - par2),
          (float) (this.guiTop + 45 - 30 - par3));
    }
  }
  /** Args : renderPartialTicks, mouseX, mouseY */
  protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) {
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    this.mc.getTextureManager().bindTexture(horseGuiTextures);
    int var4 = (this.width - this.xSize) / 2;
    int var5 = (this.height - this.ySize) / 2;
    this.drawTexturedModalRect(var4, var5, 0, 0, this.xSize, this.ySize);

    if (this.field_147034_x.isChested()) {
      this.drawTexturedModalRect(var4 + 79, var5 + 17, 0, this.ySize, 90, 54);
    }

    if (this.field_147034_x.canWearArmor()) {
      this.drawTexturedModalRect(var4 + 7, var5 + 35, 0, this.ySize + 54, 18, 18);
    }

    GuiInventory.drawEntityOnScreen(
        var4 + 51,
        var5 + 60,
        17,
        (float) (var4 + 51) - this.field_147033_y,
        (float) (var5 + 75 - 50) - this.field_147032_z,
        this.field_147034_x);
  }