@Override
 public void overlayBackground() {
   this.client.renderEngine.bindTexture(Gui.optionsBackground);
   GL11.glColor4f(0.25F, 0.25F, 0.25F, 1.0F);
   Gui.drawModalRectWithCustomSizedTexture(
       left - 10, top - slotHeight, 0, 0, listWidth + 20, slotHeight, 32, 32);
   Gui.drawModalRectWithCustomSizedTexture(
       left - 10,
       top + listHeight,
       0,
       listHeight + slotHeight,
       listWidth + 20,
       slotHeight,
       32,
       32);
 }
  public void drawEntry(
      int slotIndex,
      int x,
      int y,
      int listWidth,
      int slotHeight,
      int mouseX,
      int mouseY,
      boolean isSelected) {
    this.func_148313_c();
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    Gui.drawModalRectWithCustomSizedTexture(x, y, 0.0F, 0.0F, 32, 32, 32.0F, 32.0F);
    int var10;

    if ((this.field_148317_a.gameSettings.touchscreen || isSelected) && this.func_148310_d()) {
      this.field_148317_a.getTextureManager().bindTexture(field_148316_c);
      Gui.drawRect(x, y, x + 32, y + 32, -1601138544);
      GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
      int var9 = mouseX - x;
      var10 = mouseY - y;

      if (this.func_148309_e()) {
        if (var9 < 32) {
          Gui.drawModalRectWithCustomSizedTexture(x, y, 0.0F, 32.0F, 32, 32, 256.0F, 256.0F);
        } else {
          Gui.drawModalRectWithCustomSizedTexture(x, y, 0.0F, 0.0F, 32, 32, 256.0F, 256.0F);
        }
      } else {
        if (this.func_148308_f()) {
          if (var9 < 16) {
            Gui.drawModalRectWithCustomSizedTexture(x, y, 32.0F, 32.0F, 32, 32, 256.0F, 256.0F);
          } else {
            Gui.drawModalRectWithCustomSizedTexture(x, y, 32.0F, 0.0F, 32, 32, 256.0F, 256.0F);
          }
        }

        if (this.func_148314_g()) {
          if (var9 < 32 && var9 > 16 && var10 < 16) {
            Gui.drawModalRectWithCustomSizedTexture(x, y, 96.0F, 32.0F, 32, 32, 256.0F, 256.0F);
          } else {
            Gui.drawModalRectWithCustomSizedTexture(x, y, 96.0F, 0.0F, 32, 32, 256.0F, 256.0F);
          }
        }

        if (this.func_148307_h()) {
          if (var9 < 32 && var9 > 16 && var10 > 16) {
            Gui.drawModalRectWithCustomSizedTexture(x, y, 64.0F, 32.0F, 32, 32, 256.0F, 256.0F);
          } else {
            Gui.drawModalRectWithCustomSizedTexture(x, y, 64.0F, 0.0F, 32, 32, 256.0F, 256.0F);
          }
        }
      }
    }

    String var13 = this.func_148312_b();
    var10 = this.field_148317_a.fontRendererObj.getStringWidth(var13);

    if (var10 > 157) {
      var13 =
          this.field_148317_a.fontRendererObj.trimStringToWidth(
                  var13, 157 - this.field_148317_a.fontRendererObj.getStringWidth("..."))
              + "...";
    }

    this.field_148317_a.fontRendererObj.func_175063_a(
        var13, (float) (x + 32 + 2), (float) (y + 1), 16777215);
    List var11 =
        this.field_148317_a.fontRendererObj.listFormattedStringToWidth(this.func_148311_a(), 157);

    for (int var12 = 0; var12 < 2 && var12 < var11.size(); ++var12) {
      this.field_148317_a.fontRendererObj.func_175063_a(
          (String) var11.get(var12), (float) (x + 32 + 2), (float) (y + 12 + 10 * var12), 8421504);
    }
  }
 public void renderIcon(float p_178663_1_, int alpha) {
   Minecraft.getMinecraft().getTextureManager().bindTexture(GuiSpectator.SPECTATOR_WIDGETS);
   Gui.drawModalRectWithCustomSizedTexture(0, 0, 16.0F, 0.0F, 16, 16, 256.0F, 256.0F);
 }
  @Override
  protected void drawSlot(
      int slotIndex, int minX, int maxX, int minY, int maxY, Tessellator tesselator) {
    Update update = updateList.get(slotIndex);
    if (update != null && !update.oldVersion.matches(update.newVersion)) {
      this.parent
          .getFontRenderer()
          .drawString(
              this.parent.getFontRenderer().trimStringToWidth(update.displayName, listWidth - 10),
              minX + 5,
              minY + 4,
              0xFFFFFF);
      if (this.parent.getFontRenderer().getStringWidth(update.newVersion) >= (listWidth - 125)) {
        this.parent
            .getFontRenderer()
            .drawString(
                this.parent
                    .getFontRenderer()
                    .trimStringToWidth(update.oldVersion + " -> ", listWidth - 10),
                minX + 5,
                minY + 15,
                0xCCCCCC);
        this.parent
            .getFontRenderer()
            .drawString(
                this.parent
                    .getFontRenderer()
                    .trimStringToWidth("  " + update.newVersion, listWidth - 10),
                minX + 5,
                minY + 25,
                0xCCCCCC);
      } else {
        this.parent
            .getFontRenderer()
            .drawString(
                this.parent
                    .getFontRenderer()
                    .trimStringToWidth(
                        update.oldVersion + " -> " + update.newVersion, listWidth - 10),
                minX + 5,
                minY + 15,
                0xCCCCCC);
      }

      String info;

      GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
      Minecraft.getMinecraft().renderEngine.bindTexture(Resources.GUI_ICONS);

      if (DownloadThread.isUpdating(update)) {
        Gui.drawModalRectWithCustomSizedTexture(maxX - 30, minY + 8, 0, 0, 16, 16, 64, 32);

        info = StatCollector.translateToLocal(Strings.UPDATING);
      } else if (update.isDownloaded()) {
        Gui.drawModalRectWithCustomSizedTexture(maxX - 30, minY + 8, 16, 0, 16, 16, 64, 32);

        if (!update.MOD_ID.equalsIgnoreCase(Reference.MOD_ID)) {
          info = StatCollector.translateToLocal(Strings.IS_DOWNLOADED);
        } else {
          info = StatCollector.translateToLocal(Strings.UNABLE_TO_REMOVE_SELF);
        }
      } else if (update.isErrored()) {
        Gui.drawModalRectWithCustomSizedTexture(maxX - 30, minY + 8, 32, 0, 16, 16, 64, 32);

        info = StatCollector.translateToLocal(Strings.ERRORED);
      } else if (update.isDirectLink) {
        Gui.drawModalRectWithCustomSizedTexture(maxX - 30, minY + 8, 16, 16, 16, 16, 64, 32);

        info = StatCollector.translateToLocal(Strings.DL_AVAILABLE);
      } else if (update.updateURL != null) {
        Gui.drawModalRectWithCustomSizedTexture(maxX - 30, minY + 8, 0, 16, 16, 16, 64, 32);

        info = StatCollector.translateToLocal(Strings.LINK_TO_DL);
      } else {
        info = StatCollector.translateToLocal(Strings.CANNOT_UPDATE);
      }

      if (update.updateType == Update.UpdateType.NOT_ENOUGH_MODS) {
        Gui.drawModalRectWithCustomSizedTexture(maxX - 30, minY + 8, 32, 16, 16, 16, 64, 32);
      } else if (update.updateType == Update.UpdateType.CURSE) {
        Gui.drawModalRectWithCustomSizedTexture(maxX - 30, minY + 8, 48, 0, 16, 16, 64, 32);
      }

      this.parent
          .getFontRenderer()
          .drawString(
              this.parent.getFontRenderer().trimStringToWidth(info, listWidth - 10),
              minX + 5,
              minY + 35,
              0xCCCCCC);
    }
  }