Exemplo n.º 1
0
  public void render(int x, int y, int width, int height) {
    MCRenderDelegate r = (MCRenderDelegate) SpoutClient.getInstance().getRenderDelegate();
    FontRenderer font = SpoutClient.getHandle().fontRenderer;

    String sResolution = resolution + "x";
    int sWidth = font.getStringWidth(sResolution);
    font.drawStringWithShadow(sResolution, x + width - sWidth - 2, y + 2, 0xffaaaaaa);

    String name = r.getFittingText(getName(), width - 29 - sWidth - 2 - x);
    font.drawStringWithShadow(name, x + 29, y + 2, 0xffffffff);

    String sStatus = "";
    if (size > 1024 * 1024 * 9000) {
      sStatus = ChatColor.RED + "It's over 9000! ";
    }
    if (size > 1024 * 1024) {
      sStatus += size / (1024 * 1024) + " MB";
    } else if (size > 1024) {
      sStatus = size / 1024 + " KB";
    } else {
      sStatus = size + " Bytes";
    }
    if (isDownloading()) {
      sStatus = "Downloading: " + ChatColor.WHITE + download.getProgress() + "%";
    }
    if (downloadFail != null) {
      sStatus = downloadFail;
    }
    if (installed) {
      sStatus = ChatColor.GREEN + "Installed";
    }
    if (sStatus != null) {
      sWidth = font.getStringWidth(sStatus);
      font.drawStringWithShadow(sStatus, x + width - sWidth - 2, y + 11, 0xffaaaaaa);
    }

    String author = "by " + ChatColor.WHITE + getAuthor();
    author = r.getFittingText(author, width - 29 - sWidth - 2 - x);
    font.drawStringWithShadow(author, x + 29, y + 11, 0xffaaaaaa);

    String desc = r.getFittingText(getDescription(), width - 2 - 29);
    font.drawStringWithShadow(desc, x + 29, y + 20, 0xffaaaaaa);

    String iconUrl = getIconUrl();
    Texture icon = CustomTextureManager.getTextureFromUrl(iconUrl);
    if (icon == null) {
      CustomTextureManager.downloadTexture(iconUrl, true);
    } else {
      GL11.glPushMatrix();
      GL11.glTranslated(x + 2, y + 2, 0);
      r.drawTexture(icon, 25, 25);
      GL11.glPopMatrix();
    }
  }
Exemplo n.º 2
0
  /** Renders dragon's (boss) health on the HUD */
  private void renderBossHealth() {
    if (RenderDragon.entityDragon != null) {
      EntityDragon var1 = RenderDragon.entityDragon;
      RenderDragon.entityDragon = null;
      FontRenderer var2 = this.mc.fontRenderer;
      ScaledResolution var3 =
          new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
      int var4 = var3.getScaledWidth();
      short var5 = 182;
      int var6 = var4 / 2 - var5 / 2;
      int var7 =
          (int) ((float) var1.getDragonHealth() / (float) var1.getMaxHealth() * (float) (var5 + 1));
      byte var8 = 12;
      this.drawTexturedModalRect(var6, var8, 0, 74, var5, 5);
      this.drawTexturedModalRect(var6, var8, 0, 74, var5, 5);

      if (var7 > 0) {
        this.drawTexturedModalRect(var6, var8, 0, 79, var7, 5);
      }

      String var9 = "Boss health";
      var2.drawStringWithShadow(
          var9, var4 / 2 - var2.getStringWidth(var9) / 2, var8 - 10, 16711935);
      GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
      GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.mc.renderEngine.getTexture("/gui/icons.png"));
    }
  }
Exemplo n.º 3
0
 private void renderBossHealth() {
   if (RenderDragon.field_41038_a == null) {
     return;
   }
   EntityDragon entitydragon = RenderDragon.field_41038_a;
   RenderDragon.field_41038_a = null;
   FontRenderer fontrenderer = mc.fontRenderer;
   ScaledResolution scaledresolution =
       new ScaledResolution(mc.gameSettings, mc.displayWidth, mc.displayHeight);
   int i = scaledresolution.getScaledWidth();
   char c = '\266';
   int j = i / 2 - c / 2;
   int k =
       (int)
           (((float) entitydragon.func_41010_ax() / (float) entitydragon.getMaxHealth())
               * (float) (c + 1));
   byte byte0 = 12;
   drawTexturedModalRect(j, byte0, 0, 74, c, 5);
   drawTexturedModalRect(j, byte0, 0, 74, c, 5);
   if (k > 0) {
     drawTexturedModalRect(j, byte0, 0, 79, k, 5);
   }
   String s = "Boss health";
   fontrenderer.drawStringWithShadow(
       s, i / 2 - fontrenderer.getStringWidth(s) / 2, byte0 - 10, 0xff00ff);
   GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
   GL11.glBindTexture(3553 /*GL_TEXTURE_2D*/, mc.renderEngine.getTexture("/gui/icons.png"));
 }
Exemplo n.º 4
0
 public void render() {
   FontRenderer font = BukkitContrib.getGameInstance().fontRenderer;
   String lines[] = getText().split("\\n");
   for (int i = 0; i < lines.length; i++) {
     font.drawStringWithShadow(
         lines[i],
         getUpperRightX() - (isCentered() ? font.getStringWidth(lines[i]) / 2 : 0),
         getUpperRightY() - (i * 10),
         getHexColor());
   }
 }
Exemplo n.º 5
0
  public void renderGameOverlay(float var1, boolean var2, int var3, int var4) {
    // Spout Start
    SpoutClient.getInstance().onTick();
    InGameHUD mainScreen = SpoutClient.getInstance().getActivePlayer().getMainScreen();
    // Spout End
    ScaledResolution var5 =
        new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
    int var6 = var5.getScaledWidth();
    int var7 = var5.getScaledHeight();
    FontRenderer var8 = this.mc.fontRenderer;
    this.mc.entityRenderer.func_905_b();
    GL11.glEnable(3042 /*GL_BLEND*/);
    if (Minecraft.isFancyGraphicsEnabled()) {
      this.renderVignette(this.mc.thePlayer.getEntityBrightness(var1), var6, var7);
    }

    ItemStack var9 = this.mc.thePlayer.inventory.armorItemInSlot(3);
    if (!this.mc.gameSettings.thirdPersonView
        && var9 != null
        && var9.itemID == Block.pumpkin.blockID) {
      this.renderPumpkinBlur(var6, var7);
    }

    float var10 =
        this.mc.thePlayer.prevTimeInPortal
            + (this.mc.thePlayer.timeInPortal - this.mc.thePlayer.prevTimeInPortal) * var1;
    if (var10 > 0.0F) {
      this.renderPortalOverlay(var10, var6, var7);
    }

    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    GL11.glBindTexture(3553 /*GL_TEXTURE_2D*/, this.mc.renderEngine.getTexture("/gui/gui.png"));
    InventoryPlayer var11 = this.mc.thePlayer.inventory;
    this.zLevel = -90.0F;
    this.drawTexturedModalRect(var6 / 2 - 91, var7 - 22, 0, 0, 182, 22);
    this.drawTexturedModalRect(
        var6 / 2 - 91 - 1 + var11.currentItem * 20, var7 - 22 - 1, 0, 22, 24, 22);
    GL11.glBindTexture(3553 /*GL_TEXTURE_2D*/, this.mc.renderEngine.getTexture("/gui/icons.png"));
    GL11.glEnable(3042 /*GL_BLEND*/);
    GL11.glBlendFunc(775, 769);
    this.drawTexturedModalRect(var6 / 2 - 7, var7 / 2 - 7, 0, 0, 16, 16);
    GL11.glDisable(3042 /*GL_BLEND*/);
    boolean var12 = this.mc.thePlayer.heartsLife / 3 % 2 == 1;
    if (this.mc.thePlayer.heartsLife < 10) {
      var12 = false;
    }

    int var13 = this.mc.thePlayer.health;
    int var14 = this.mc.thePlayer.prevHealth;
    this.rand.setSeed((long) (this.updateCounter * 312871));
    int var15;
    int var17;
    int var16;
    if (this.mc.playerController.shouldDrawHUD()) {
      var15 = this.mc.thePlayer.getPlayerArmorValue();

      int var18;
      for (var16 = 0; var16 < 10; ++var16) {
        var17 = var7 - 32;
        // Spout Start
        if (mainScreen.getArmorBar().isVisible()) {
          if (var15 > 0) {
            var18 = var6 / 2 + 91 - var16 * 8 - 9;
            if (var16 * 2 + 1 < var15) {
              this.drawTexturedModalRect(var18, var17, 34, 9, 9, 9);
            }

            if (var16 * 2 + 1 == var15) {
              this.drawTexturedModalRect(var18, var17, 25, 9, 9, 9);
            }

            if (var16 * 2 + 1 > var15) {
              this.drawTexturedModalRect(var18, var17, 16, 9, 9, 9);
            }
          }
        }
        // Spout End
        byte var31 = 0;
        if (var12) {
          var31 = 1;
        }

        int var19 = var6 / 2 - 91 + var16 * 8;
        if (var13 <= 4) {
          var17 += this.rand.nextInt(2);
        }
        // Spout Start
        if (mainScreen.getHealthBar().isVisible()) {
          this.drawTexturedModalRect(var19, var17, 16 + var31 * 9, 0, 9, 9);
          if (var12) {
            if (var16 * 2 + 1 < var14) {
              this.drawTexturedModalRect(var19, var17, 70, 0, 9, 9);
            }
            if (var16 * 2 + 1 == var14) {
              this.drawTexturedModalRect(var19, var17, 79, 0, 9, 9);
            }
          }

          if (var16 * 2 + 1 < var13) {
            this.drawTexturedModalRect(var19, var17, 52, 0, 9, 9);
          }

          if (var16 * 2 + 1 == var13) {
            this.drawTexturedModalRect(var19, var17, 61, 0, 9, 9);
          }
        }
        // Spout End
      }

      if (this.mc.thePlayer.isInsideOfMaterial(Material.water)) {
        // Spout Start
        var16 =
            (int) Math.ceil(((double) (mc.thePlayer.air - 2) * 10D) / (mc.thePlayer.maxAir * 1D));
        var17 =
            (int) Math.ceil(((double) mc.thePlayer.air * 10D) / (mc.thePlayer.maxAir * 1D)) - var16;
        if (mainScreen.getBubbleBar().isVisible()) {
          for (var18 = 0; var18 < var16 + var17; ++var18) {
            if (var18 < var16) {
              this.drawTexturedModalRect(var6 / 2 - 91 + var18 * 8, var7 - 32 - 9, 16, 18, 9, 9);
            } else {
              this.drawTexturedModalRect(var6 / 2 - 91 + var18 * 8, var7 - 32 - 9, 25, 18, 9, 9);
            }
          }
        }
        // Spout End
      }
    }

    GL11.glDisable(3042 /*GL_BLEND*/);
    GL11.glEnable('\u803a');
    GL11.glPushMatrix();
    GL11.glRotatef(120.0F, 1.0F, 0.0F, 0.0F);
    RenderHelper.enableStandardItemLighting();
    GL11.glPopMatrix();

    for (var15 = 0; var15 < 9; ++var15) {
      var16 = var6 / 2 - 90 + var15 * 20 + 2;
      var17 = var7 - 16 - 3;
      this.renderInventorySlot(var15, var16, var17, var1);
    }

    RenderHelper.disableStandardItemLighting();
    GL11.glDisable('\u803a');
    if (this.mc.thePlayer.func_22060_M() > 0) {
      GL11.glDisable(2929 /*GL_DEPTH_TEST*/);
      GL11.glDisable(3008 /*GL_ALPHA_TEST*/);
      var15 = this.mc.thePlayer.func_22060_M();
      float var26 = (float) var15 / 100.0F;
      if (var26 > 1.0F) {
        var26 = 1.0F - (float) (var15 - 100) / 10.0F;
      }

      var17 = (int) (220.0F * var26) << 24 | 1052704;
      this.drawRect(0, 0, var6, var7, var17);
      GL11.glEnable(3008 /*GL_ALPHA_TEST*/);
      GL11.glEnable(2929 /*GL_DEPTH_TEST*/);
    }
    // Spout Start
    mainScreen.render();
    // Spout End
    String var23;
    if (this.mc.gameSettings.showDebugInfo) {
      GL11.glPushMatrix();
      if (Minecraft.hasPaidCheckTime > 0L) {
        GL11.glTranslatef(0.0F, 32.0F, 0.0F);
      }

      var8.drawStringWithShadow("Minecraft Beta 1.7.3 (" + this.mc.debug + ")", 2, 2, 16777215);
      var8.drawStringWithShadow(this.mc.func_6241_m(), 2, 12, 16777215);
      var8.drawStringWithShadow(this.mc.func_6262_n(), 2, 22, 16777215);
      var8.drawStringWithShadow(this.mc.func_6245_o(), 2, 32, 16777215);
      var8.drawStringWithShadow(this.mc.func_21002_o(), 2, 42, 16777215);
      long var25 = Runtime.getRuntime().maxMemory();
      long var30 = Runtime.getRuntime().totalMemory();
      long var29 = Runtime.getRuntime().freeMemory();
      long var21 = var30 - var29;
      var23 =
          "Used memory: "
              + var21 * 100L / var25
              + "% ("
              + var21 / 1024L / 1024L
              + "MB) of "
              + var25 / 1024L / 1024L
              + "MB";
      this.drawString(var8, var23, var6 - var8.getStringWidth(var23) - 2, 2, 14737632);
      var23 = "Allocated memory: " + var30 * 100L / var25 + "% (" + var30 / 1024L / 1024L + "MB)";
      this.drawString(var8, var23, var6 - var8.getStringWidth(var23) - 2, 12, 14737632);
      // Spout Start
      // No Cheating!
      if (SpoutClient.getInstance().isCheatMode()) {
        this.drawString(var8, "x: " + this.mc.thePlayer.posX, 2, 64, 14737632);
        this.drawString(var8, "y: " + this.mc.thePlayer.posY, 2, 72, 14737632);
        this.drawString(var8, "z: " + this.mc.thePlayer.posZ, 2, 80, 14737632);
        this.drawString(
            var8,
            "f: "
                + (MathHelper.floor_double(
                        (double) (this.mc.thePlayer.rotationYaw * 4.0F / 360.0F) + 0.5D)
                    & 3),
            2,
            88,
            14737632);
      }
      // Spout End
      // Spout Start
      this.drawString(var8, "Map Data Info", 2, 64, 14737632);
      this.drawString(
          var8,
          "Average packet size: " + ChunkCache.averageChunkSize.get() + " bytes",
          2,
          72,
          14737632);
      this.drawString(
          var8, "Cache hit percent: " + ChunkCache.hitPercentage.get(), 2, 80, 14737632);
      // Spout end
      GL11.glPopMatrix();
    }

    if (this.recordPlayingUpFor > 0) {
      float var24 = (float) this.recordPlayingUpFor - var1;
      var16 = (int) (var24 * 256.0F / 20.0F);
      if (var16 > 255) {
        var16 = 255;
      }

      if (var16 > 0) {
        GL11.glPushMatrix();
        GL11.glTranslatef((float) (var6 / 2), (float) (var7 - 48), 0.0F);
        GL11.glEnable(3042 /*GL_BLEND*/);
        GL11.glBlendFunc(770, 771);
        var17 = 16777215;
        if (this.field_22065_l) {
          var17 = Color.HSBtoRGB(var24 / 50.0F, 0.7F, 0.6F) & 16777215;
        }

        var8.drawString(
            this.recordPlaying,
            -var8.getStringWidth(this.recordPlaying) / 2,
            -4,
            var17 + (var16 << 24));
        GL11.glDisable(3042 /*GL_BLEND*/);
        GL11.glPopMatrix();
      }
    }

    byte var27 = 10;
    boolean var28 = false;
    // Spout Start
    if (mainScreen.getChatBar().isVisible()) {
      if (mc.currentScreen instanceof GuiChat) {
        var27 = 20;
        var28 = true;
      }
    }
    boolean chatOpen = var28;
    int lines =
        chatOpen
            ? mainScreen.getChatTextBox().getNumVisibleChatLines()
            : mainScreen.getChatTextBox().getNumVisibleLines();
    // Spout End

    GL11.glEnable(3042 /*GL_BLEND*/);
    GL11.glBlendFunc(770, 771);
    GL11.glDisable(3008 /*GL_ALPHA_TEST*/);
    GL11.glPushMatrix();
    GL11.glTranslatef(0.0F, (float) (var7 - 48), 0.0F);

    // Spout Start

    if (mainScreen.getChatTextBox().isVisible()) {
      Math.max(
          0,
          chatMessageList.size()
              - SpoutClient.getInstance().getChatManager().chatScroll
              - 1
              - var27);
      int viewedLine = 0;

      for (int line = SpoutClient.getInstance().getChatManager().chatScroll;
          line
              < Math.min(
                  chatMessageList.size() - 1,
                  (lines + SpoutClient.getInstance().getChatManager().chatScroll));
          line++) {
        if (chatOpen || chatMessageList.get(line).updateCounter < 250) {
          double opacity = 1.0D - chatMessageList.get(line).updateCounter / 250D;
          opacity *= 10D;
          if (opacity < 0.0D) {
            opacity = 0.0D;
          }
          if (opacity > 1.0D) {
            opacity = 1.0D;
          }
          opacity *= opacity;
          int color = chatOpen ? 255 : (int) (255D * opacity);
          if (color > 0) {
            int height = 2;
            int width = -viewedLine * 9;
            String chat = chatMessageList.get(line).message;
            chat = SpoutClient.getInstance().getChatManager().formatChatColors(chat);
            chat = ChatManager.formatUrl(chat);
            // TODO add support for opening URL in browser if clicked?
            drawRect(height, width - 1, height + 320, width + 8, color / 2 << 24);
            GL11.glEnable(3042 /*GL_BLEND*/);
            var8.drawStringWithShadow(chat, height, width, 0xffffff + (color << 24));
          }
          viewedLine++;
        }
      }
    }
    // Spout End

    GL11.glPopMatrix();
    GL11.glEnable(3008 /*GL_ALPHA_TEST*/);
    GL11.glDisable(3042 /*GL_BLEND*/);
  }
Exemplo n.º 6
0
 /** Renders the specified text to the screen, center-aligned. */
 public void drawCenteredString(
     FontRenderer par1FontRenderer, String par2Str, int par3, int par4, int par5) {
   par1FontRenderer.drawStringWithShadow(
       par2Str, par3 - par1FontRenderer.getStringWidth(par2Str) / 2, par4, par5);
 }
Exemplo n.º 7
0
 /** Renders the specified text to the screen. */
 public void drawString(
     FontRenderer par1FontRenderer, String par2Str, int par3, int par4, int par5) {
   par1FontRenderer.drawStringWithShadow(par2Str, par3, par4, par5);
 }
Exemplo n.º 8
0
  /** Render the ingame overlay with quick icon bar, ... */
  public void renderGameOverlay(float par1, boolean par2, int par3, int par4) {
    ScaledResolution var5 =
        new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
    AxiomWrapper.scaledGui = var5;
    int var6 = var5.getScaledWidth();
    int var7 = var5.getScaledHeight();
    FontRenderer var8 = this.mc.fontRenderer;
    this.mc.entityRenderer.setupOverlayRendering();
    GL11.glEnable(GL11.GL_BLEND);

    if (Minecraft.isFancyGraphicsEnabled()) {
      this.renderVignette(this.mc.thePlayer.getBrightness(par1), var6, var7);
    } else {
      GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
    }

    ItemStack var9 = this.mc.thePlayer.inventory.armorItemInSlot(3);

    if (this.mc.gameSettings.thirdPersonView == 0
        && var9 != null
        && var9.itemID == Block.pumpkin.blockID) {
      this.renderPumpkinBlur(var6, var7);
    }

    if (!this.mc.thePlayer.isPotionActive(Potion.confusion)) {
      float var10 =
          this.mc.thePlayer.prevTimeInPortal
              + (this.mc.thePlayer.timeInPortal - this.mc.thePlayer.prevTimeInPortal) * par1;

      if (var10 > 0.0F) {
        this.renderPortalOverlay(var10, var6, var7);
      }
    }

    int var11;
    int var12;
    int var13;
    int var14;
    int var15;
    int var17;
    int var16;
    int var19;
    int var18;
    byte var30;
    boolean var33;

    if (!this.mc.playerController.func_78747_a()) {
      GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
      GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.mc.renderEngine.getTexture("/gui/gui.png"));
      InventoryPlayer var20 = this.mc.thePlayer.inventory;
      this.zLevel = -90.0F;
      this.drawTexturedModalRect(var6 / 2 - 91, var7 - 22, 0, 0, 182, 22);
      this.drawTexturedModalRect(
          var6 / 2 - 91 - 1 + var20.currentItem * 20, var7 - 22 - 1, 0, 22, 24, 22);
      GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.mc.renderEngine.getTexture("/gui/icons.png"));
      GL11.glEnable(GL11.GL_BLEND);
      GL11.glBlendFunc(GL11.GL_ONE_MINUS_DST_COLOR, GL11.GL_ONE_MINUS_SRC_COLOR);
      this.drawTexturedModalRect(var6 / 2 - 7, var7 / 2 - 7, 0, 0, 16, 16);
      GL11.glDisable(GL11.GL_BLEND);
      var33 = this.mc.thePlayer.hurtResistantTime / 3 % 2 == 1;

      if (this.mc.thePlayer.hurtResistantTime < 10) {
        var33 = false;
      }

      var11 = this.mc.thePlayer.getHealth();
      var12 = this.mc.thePlayer.prevHealth;
      this.rand.setSeed((long) (this.updateCounter * 312871));
      boolean var21 = false;
      FoodStats var22 = this.mc.thePlayer.getFoodStats();
      var14 = var22.getFoodLevel();
      var13 = var22.getPrevFoodLevel();
      this.mc.mcProfiler.startSection("bossHealth");
      this.renderBossHealth();
      this.mc.mcProfiler.endSection();
      int var23;

      if (this.mc.playerController.shouldDrawHUD()) {
        var23 = var6 / 2 - 91;
        var15 = var6 / 2 + 91;
        this.mc.mcProfiler.startSection("expBar");
        var16 = this.mc.thePlayer.xpBarCap();

        if (var16 > 0) {
          short var24 = 182;
          var18 = (int) (this.mc.thePlayer.experience * (float) (var24 + 1));
          var17 = var7 - 32 + 3;
          this.drawTexturedModalRect(var23, var17, 0, 64, var24, 5);

          if (var18 > 0) {
            this.drawTexturedModalRect(var23, var17, 0, 69, var18, 5);
          }
        }

        var19 = var7 - 39;
        var18 = var19 - 10;
        var17 = this.mc.thePlayer.getTotalArmorValue();
        int var41 = -1;

        if (this.mc.thePlayer.isPotionActive(Potion.regeneration)) {
          var41 = this.updateCounter % 25;
        }

        this.mc.mcProfiler.endStartSection("healthArmor");
        int var25;
        int var27;
        int var26;
        int var28;

        for (var25 = 0; var25 < 10; ++var25) {
          if (var17 > 0) {
            var26 = var23 + var25 * 8;

            if (var25 * 2 + 1 < var17) {
              this.drawTexturedModalRect(var26, var18, 34, 9, 9, 9);
            }

            if (var25 * 2 + 1 == var17) {
              this.drawTexturedModalRect(var26, var18, 25, 9, 9, 9);
            }

            if (var25 * 2 + 1 > var17) {
              this.drawTexturedModalRect(var26, var18, 16, 9, 9, 9);
            }
          }

          var26 = 16;

          if (this.mc.thePlayer.isPotionActive(Potion.poison)) {
            var26 += 36;
          }

          byte var29 = 0;

          if (var33) {
            var29 = 1;
          }

          var28 = var23 + var25 * 8;
          var27 = var19;

          if (var11 <= 4) {
            var27 = var19 + this.rand.nextInt(2);
          }

          if (var25 == var41) {
            var27 -= 2;
          }

          var30 = 0;

          if (this.mc.theWorld.getWorldInfo().isHardcoreModeEnabled()) {
            var30 = 5;
          }

          this.drawTexturedModalRect(var28, var27, 16 + var29 * 9, 9 * var30, 9, 9);

          if (var33) {
            if (var25 * 2 + 1 < var12) {
              this.drawTexturedModalRect(var28, var27, var26 + 54, 9 * var30, 9, 9);
            }

            if (var25 * 2 + 1 == var12) {
              this.drawTexturedModalRect(var28, var27, var26 + 63, 9 * var30, 9, 9);
            }
          }

          if (var25 * 2 + 1 < var11) {
            this.drawTexturedModalRect(var28, var27, var26 + 36, 9 * var30, 9, 9);
          }

          if (var25 * 2 + 1 == var11) {
            this.drawTexturedModalRect(var28, var27, var26 + 45, 9 * var30, 9, 9);
          }
        }

        this.mc.mcProfiler.endStartSection("food");
        int var47;

        for (var25 = 0; var25 < 10; ++var25) {
          var26 = var19;
          var47 = 16;
          var30 = 0;

          if (this.mc.thePlayer.isPotionActive(Potion.hunger)) {
            var47 += 36;
            var30 = 13;
          }

          if (this.mc.thePlayer.getFoodStats().getSaturationLevel() <= 0.0F
              && this.updateCounter % (var14 * 3 + 1) == 0) {
            var26 = var19 + (this.rand.nextInt(3) - 1);
          }

          if (var21) {
            var30 = 1;
          }

          var27 = var15 - var25 * 8 - 9;
          this.drawTexturedModalRect(var27, var26, 16 + var30 * 9, 27, 9, 9);

          if (var21) {
            if (var25 * 2 + 1 < var13) {
              this.drawTexturedModalRect(var27, var26, var47 + 54, 27, 9, 9);
            }

            if (var25 * 2 + 1 == var13) {
              this.drawTexturedModalRect(var27, var26, var47 + 63, 27, 9, 9);
            }
          }

          if (var25 * 2 + 1 < var14) {
            this.drawTexturedModalRect(var27, var26, var47 + 36, 27, 9, 9);
          }

          if (var25 * 2 + 1 == var14) {
            this.drawTexturedModalRect(var27, var26, var47 + 45, 27, 9, 9);
          }
        }

        this.mc.mcProfiler.endStartSection("air");

        if (this.mc.thePlayer.isInsideOfMaterial(Material.water)) {
          var25 = this.mc.thePlayer.getAir();
          var26 = MathHelper.ceiling_double_int((double) (var25 - 2) * 10.0D / 300.0D);
          var47 = MathHelper.ceiling_double_int((double) var25 * 10.0D / 300.0D) - var26;

          for (var28 = 0; var28 < var26 + var47; ++var28) {
            if (var28 < var26) {
              this.drawTexturedModalRect(var15 - var28 * 8 - 9, var18, 16, 18, 9, 9);
            } else {
              this.drawTexturedModalRect(var15 - var28 * 8 - 9, var18, 25, 18, 9, 9);
            }
          }
        }

        this.mc.mcProfiler.endSection();
      }

      GL11.glDisable(GL11.GL_BLEND);
      this.mc.mcProfiler.startSection("actionBar");
      GL11.glEnable(GL12.GL_RESCALE_NORMAL);
      RenderHelper.enableGUIStandardItemLighting();

      for (var23 = 0; var23 < 9; ++var23) {
        var15 = var6 / 2 - 90 + var23 * 20 + 2;
        var16 = var7 - 16 - 3;
        this.renderInventorySlot(var23, var15, var16, par1);
      }

      RenderHelper.disableStandardItemLighting();
      GL11.glDisable(GL12.GL_RESCALE_NORMAL);
      this.mc.mcProfiler.endSection();
    }

    float var34;
    int var36;

    if (this.mc.thePlayer.getSleepTimer() > 0) {
      this.mc.mcProfiler.startSection("sleep");
      GL11.glDisable(GL11.GL_DEPTH_TEST);
      GL11.glDisable(GL11.GL_ALPHA_TEST);
      var36 = this.mc.thePlayer.getSleepTimer();
      var34 = (float) var36 / 100.0F;

      if (var34 > 1.0F) {
        var34 = 1.0F - (float) (var36 - 100) / 10.0F;
      }

      var11 = (int) (220.0F * var34) << 24 | 1052704;
      drawRect(0, 0, var6, var7, var11);
      GL11.glEnable(GL11.GL_ALPHA_TEST);
      GL11.glEnable(GL11.GL_DEPTH_TEST);
      this.mc.mcProfiler.endSection();
    }

    int var35;
    String var40;

    if (this.mc.playerController.func_78763_f() && this.mc.thePlayer.experienceLevel > 0) {
      this.mc.mcProfiler.startSection("expLevel");
      var33 = false;
      var11 = var33 ? 16777215 : 8453920;
      var40 = "" + this.mc.thePlayer.experienceLevel;
      var35 = (var6 - var8.getStringWidth(var40)) / 2;
      var36 = var7 - 31 - 4;
      var8.drawString(var40, var35 + 1, var36, 0);
      var8.drawString(var40, var35 - 1, var36, 0);
      var8.drawString(var40, var35, var36 + 1, 0);
      var8.drawString(var40, var35, var36 - 1, 0);
      var8.drawString(var40, var35, var36, var11);
      this.mc.mcProfiler.endSection();
    }

    if (this.mc.isDemo()) {
      this.mc.mcProfiler.startSection("demo");
      var40 = "";

      if (this.mc.theWorld.getWorldTime() >= 120500L) {
        var40 = StatCollector.translateToLocal("demo.demoExpired");
      } else {
        var40 =
            String.format(
                StatCollector.translateToLocal("demo.remainingTime"),
                new Object[] {
                  StringUtils.ticksToElapsedTime((int) (120500L - this.mc.theWorld.getWorldTime()))
                });
      }

      var11 = var8.getStringWidth(var40);
      var8.drawStringWithShadow(var40, var6 - var11 - 10, 5, 16777215);
      this.mc.mcProfiler.endSection();
    }

    if (this.mc.gameSettings.showDebugInfo) {
      this.mc.mcProfiler.startSection("debug");
      GL11.glPushMatrix();
      var8.drawStringWithShadow("Minecraft 1.3.2 (" + this.mc.debug + ")", 2, 2, 16777215);
      var8.drawStringWithShadow(this.mc.debugInfoRenders(), 2, 12, 16777215);
      var8.drawStringWithShadow(this.mc.getEntityDebug(), 2, 22, 16777215);
      var8.drawStringWithShadow(this.mc.debugInfoEntities(), 2, 32, 16777215);
      var8.drawStringWithShadow(this.mc.getWorldProviderName(), 2, 42, 16777215);
      long var38 = Runtime.getRuntime().maxMemory();
      long var42 = Runtime.getRuntime().totalMemory();
      long var45 = Runtime.getRuntime().freeMemory();
      long var49 = var42 - var45;
      String var31 =
          "Used memory: "
              + var49 * 100L / var38
              + "% ("
              + var49 / 1024L / 1024L
              + "MB) of "
              + var38 / 1024L / 1024L
              + "MB";
      this.drawString(var8, var31, var6 - var8.getStringWidth(var31) - 2, 2, 14737632);
      var31 = "Allocated memory: " + var42 * 100L / var38 + "% (" + var42 / 1024L / 1024L + "MB)";
      this.drawString(var8, var31, var6 - var8.getStringWidth(var31) - 2, 12, 14737632);
      this.drawString(
          var8,
          String.format("x: %.5f", new Object[] {Double.valueOf(this.mc.thePlayer.posX)}),
          2,
          64,
          14737632);
      this.drawString(
          var8,
          String.format(
              "y: %.3f (feet pos, %.3f eyes pos)",
              new Object[] {
                Double.valueOf(this.mc.thePlayer.boundingBox.minY),
                Double.valueOf(this.mc.thePlayer.posY)
              }),
          2,
          72,
          14737632);
      this.drawString(
          var8,
          String.format("z: %.5f", new Object[] {Double.valueOf(this.mc.thePlayer.posZ)}),
          2,
          80,
          14737632);
      this.drawString(
          var8,
          "f: "
              + (MathHelper.floor_double(
                      (double) (this.mc.thePlayer.rotationYaw * 4.0F / 360.0F) + 0.5D)
                  & 3),
          2,
          88,
          14737632);
      var19 = MathHelper.floor_double(this.mc.thePlayer.posX);
      var18 = MathHelper.floor_double(this.mc.thePlayer.posY);
      var17 = MathHelper.floor_double(this.mc.thePlayer.posZ);

      if (this.mc.theWorld != null && this.mc.theWorld.blockExists(var19, var18, var17)) {
        Chunk var32 = this.mc.theWorld.getChunkFromBlockCoords(var19, var17);
        this.drawString(
            var8,
            "lc: "
                + (var32.getTopFilledSegment() + 15)
                + " b: "
                + var32.getBiomeGenForWorldCoords(
                        var19 & 15, var17 & 15, this.mc.theWorld.getWorldChunkManager())
                    .biomeName
                + " bl: "
                + var32.getSavedLightValue(EnumSkyBlock.Block, var19 & 15, var18, var17 & 15)
                + " sl: "
                + var32.getSavedLightValue(EnumSkyBlock.Sky, var19 & 15, var18, var17 & 15)
                + " rl: "
                + var32.getBlockLightValue(var19 & 15, var18, var17 & 15, 0),
            2,
            96,
            14737632);
      }

      this.drawString(
          var8,
          String.format(
              "ws: %.3f, fs: %.3f, g: %b",
              new Object[] {
                Float.valueOf(this.mc.thePlayer.capabilities.getWalkSpeed()),
                Float.valueOf(this.mc.thePlayer.capabilities.getFlySpeed()),
                Boolean.valueOf(this.mc.thePlayer.onGround)
              }),
          2,
          104,
          14737632);
      GL11.glPopMatrix();
      this.mc.mcProfiler.endSection();
    } else {
      AxiomSetup.renderIGGUI();
    }

    if (this.recordPlayingUpFor > 0) {
      this.mc.mcProfiler.startSection("overlayMessage");
      var34 = (float) this.recordPlayingUpFor - par1;
      var11 = (int) (var34 * 256.0F / 20.0F);

      if (var11 > 255) {
        var11 = 255;
      }

      if (var11 > 0) {
        GL11.glPushMatrix();
        GL11.glTranslatef((float) (var6 / 2), (float) (var7 - 48), 0.0F);
        GL11.glEnable(GL11.GL_BLEND);
        GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
        var12 = 16777215;

        if (this.recordIsPlaying) {
          var12 = Color.HSBtoRGB(var34 / 50.0F, 0.7F, 0.6F) & 16777215;
        }

        var8.drawString(
            this.recordPlaying,
            -var8.getStringWidth(this.recordPlaying) / 2,
            -4,
            var12 + (var11 << 24));
        GL11.glDisable(GL11.GL_BLEND);
        GL11.glPopMatrix();
      }

      this.mc.mcProfiler.endSection();
    }

    GL11.glEnable(GL11.GL_BLEND);
    GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
    GL11.glDisable(GL11.GL_ALPHA_TEST);
    GL11.glPushMatrix();
    GL11.glTranslatef(0.0F, (float) (var7 - 48), 0.0F);
    this.mc.mcProfiler.startSection("chat");
    this.persistantChatGUI.func_73762_a(this.updateCounter);
    this.mc.mcProfiler.endSection();
    GL11.glPopMatrix();

    if (this.mc.gameSettings.keyBindPlayerList.pressed
        && (!this.mc.isIntegratedServerRunning()
            || this.mc.thePlayer.sendQueue.playerInfoList.size() > 1)) {
      this.mc.mcProfiler.startSection("playerList");
      NetClientHandler var39 = this.mc.thePlayer.sendQueue;
      List var37 = var39.playerInfoList;
      var12 = var39.currentServerMaxPlayers;
      var35 = var12;

      for (var36 = 1; var35 > 20; var35 = (var12 + var36 - 1) / var36) {
        ++var36;
      }

      var14 = 300 / var36;

      if (var14 > 150) {
        var14 = 150;
      }

      var13 = (var6 - var36 * var14) / 2;
      byte var43 = 10;
      drawRect(var13 - 1, var43 - 1, var13 + var14 * var36, var43 + 9 * var35, Integer.MIN_VALUE);

      for (var15 = 0; var15 < var12; ++var15) {
        var16 = var13 + var15 % var36 * var14;
        var19 = var43 + var15 / var36 * 9;
        drawRect(var16, var19, var16 + var14 - 1, var19 + 8, 553648127);
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        GL11.glEnable(GL11.GL_ALPHA_TEST);

        if (var15 < var37.size()) {
          GuiPlayerInfo var48 = (GuiPlayerInfo) var37.get(var15);
          String var44 = AxiomHook.tabListNameSetHook(var48.name);
          var8.drawStringWithShadow(var44, var16, var19, 16777215);
          this.mc.renderEngine.bindTexture(this.mc.renderEngine.getTexture("/gui/icons.png"));
          byte var46 = 0;
          boolean var50 = false;

          if (var48.responseTime < 0) {
            var30 = 5;
          } else if (var48.responseTime < 150) {
            var30 = 0;
          } else if (var48.responseTime < 300) {
            var30 = 1;
          } else if (var48.responseTime < 600) {
            var30 = 2;
          } else if (var48.responseTime < 1000) {
            var30 = 3;
          } else {
            var30 = 4;
          }

          this.zLevel += 100.0F;
          this.drawTexturedModalRect(
              var16 + var14 - 12, var19, 0 + var46 * 10, 176 + var30 * 8, 10, 8);
          this.zLevel -= 100.0F;
        }
      }
    }

    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    GL11.glDisable(GL11.GL_LIGHTING);
    GL11.glEnable(GL11.GL_ALPHA_TEST);
  }
Exemplo n.º 9
0
  public void renderGameOverlay(float f, boolean flag, int i, int j) {
    ScaledResolution scaledresolution =
        new ScaledResolution(mc.gameSettings, mc.displayWidth, mc.displayHeight);
    int k = scaledresolution.getScaledWidth();
    int l = scaledresolution.getScaledHeight();
    FontRenderer fontrenderer = mc.fontRenderer;
    mc.entityRenderer.setupOverlayRendering();
    GL11.glEnable(3042 /*GL_BLEND*/);
    if (Minecraft.isFancyGraphicsEnabled()) {
      renderVignette(mc.thePlayer.getEntityBrightness(f), k, l);
    } else {
      GL11.glBlendFunc(770, 771);
    }
    ItemStack itemstack = mc.thePlayer.inventory.armorItemInSlot(3);
    if (mc.gameSettings.thirdPersonView == 0
        && itemstack != null
        && itemstack.itemID == Block.pumpkin.blockID) {
      renderPumpkinBlur(k, l);
    }
    if (!mc.thePlayer.isPotionActive(Potion.confusion)) {
      float f1 =
          mc.thePlayer.prevTimeInPortal
              + (mc.thePlayer.timeInPortal - mc.thePlayer.prevTimeInPortal) * f;
      if (f1 > 0.0F) {
        renderPortalOverlay(f1, k, l);
      }
    }
    if (!mc.playerController.func_35643_e()) {
      GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
      GL11.glBindTexture(3553 /*GL_TEXTURE_2D*/, mc.renderEngine.getTexture("/gui/gui.png"));
      InventoryPlayer inventoryplayer = mc.thePlayer.inventory;
      zLevel = -90F;
      drawTexturedModalRect(k / 2 - 91, l - 22, 0, 0, 182, 22);
      drawTexturedModalRect(
          (k / 2 - 91 - 1) + inventoryplayer.currentItem * 20, l - 22 - 1, 0, 22, 24, 22);
      GL11.glBindTexture(3553 /*GL_TEXTURE_2D*/, mc.renderEngine.getTexture("/gui/icons.png"));
      GL11.glEnable(3042 /*GL_BLEND*/);
      GL11.glBlendFunc(775, 769);
      drawTexturedModalRect(k / 2 - 7, l / 2 - 7, 0, 0, 16, 16);
      GL11.glDisable(3042 /*GL_BLEND*/);
      boolean flag2 = (mc.thePlayer.heartsLife / 3) % 2 == 1;
      if (mc.thePlayer.heartsLife < 10) {
        flag2 = false;
      }
      int i2 = mc.thePlayer.getEntityHealth();
      int j3 = mc.thePlayer.prevHealth;
      rand.setSeed(updateCounter * 0x4c627);
      boolean flag4 = false;
      FoodStats foodstats = mc.thePlayer.getFoodStats();
      int i5 = foodstats.getFoodLevel();
      int k5 = foodstats.getPrevFoodLevel();
      renderBossHealth();
      if (mc.playerController.shouldDrawHUD()) {
        int k6 = k / 2 - 91;
        int j7 = k / 2 + 91;
        int l7 = mc.thePlayer.xpBarCap();
        if (l7 > 0) {
          char c = '\266';
          int i9 = (int) (mc.thePlayer.currentXP * (float) (c + 1));
          int l9 = (l - 32) + 3;
          drawTexturedModalRect(k6, l9, 0, 64, c, 5);
          if (i9 > 0) {
            drawTexturedModalRect(k6, l9, 0, 69, i9, 5);
          }
        }
        int k8 = l - 39;
        int j9 = k8 - 10;
        int i10 = mc.thePlayer.getPlayerArmorValue();
        int j10 = -1;
        if (mc.thePlayer.isPotionActive(Potion.regeneration)) {
          j10 = updateCounter % 25;
        }
        for (int l10 = 0; l10 < 10; l10++) {
          if (i10 > 0) {
            int k11 = k6 + l10 * 8;
            if (l10 * 2 + 1 < i10) {
              drawTexturedModalRect(k11, j9, 34, 9, 9, 9);
            }
            if (l10 * 2 + 1 == i10) {
              drawTexturedModalRect(k11, j9, 25, 9, 9, 9);
            }
            if (l10 * 2 + 1 > i10) {
              drawTexturedModalRect(k11, j9, 16, 9, 9, 9);
            }
          }
          int l11 = 16;
          if (mc.thePlayer.isPotionActive(Potion.poison)) {
            l11 += 36;
          }
          int k12 = 0;
          if (flag2) {
            k12 = 1;
          }
          int j13 = k6 + l10 * 8;
          int k13 = k8;
          if (i2 <= 4) {
            k13 += rand.nextInt(2);
          }
          if (l10 == j10) {
            k13 -= 2;
          }
          byte byte5 = 0;
          if (mc.theWorld.getWorldInfo().isHardcoreModeEnabled()) {
            byte5 = 5;
          }
          drawTexturedModalRect(j13, k13, 16 + k12 * 9, 9 * byte5, 9, 9);
          if (flag2) {
            if (l10 * 2 + 1 < j3) {
              drawTexturedModalRect(j13, k13, l11 + 54, 9 * byte5, 9, 9);
            }
            if (l10 * 2 + 1 == j3) {
              drawTexturedModalRect(j13, k13, l11 + 63, 9 * byte5, 9, 9);
            }
          }
          if (l10 * 2 + 1 < i2) {
            drawTexturedModalRect(j13, k13, l11 + 36, 9 * byte5, 9, 9);
          }
          if (l10 * 2 + 1 == i2) {
            drawTexturedModalRect(j13, k13, l11 + 45, 9 * byte5, 9, 9);
          }
        }

        for (int i11 = 0; i11 < 10; i11++) {
          int i12 = k8;
          int l12 = 16;
          byte byte4 = 0;
          if (mc.thePlayer.isPotionActive(Potion.hunger)) {
            l12 += 36;
            byte4 = 13;
          }
          if (mc.thePlayer.getFoodStats().getFoodSaturationLevel() <= 0.0F
              && updateCounter % (i5 * 3 + 1) == 0) {
            i12 += rand.nextInt(3) - 1;
          }
          if (flag4) {
            byte4 = 1;
          }
          int l13 = j7 - i11 * 8 - 9;
          drawTexturedModalRect(l13, i12, 16 + byte4 * 9, 27, 9, 9);
          if (flag4) {
            if (i11 * 2 + 1 < k5) {
              drawTexturedModalRect(l13, i12, l12 + 54, 27, 9, 9);
            }
            if (i11 * 2 + 1 == k5) {
              drawTexturedModalRect(l13, i12, l12 + 63, 27, 9, 9);
            }
          }
          if (i11 * 2 + 1 < i5) {
            drawTexturedModalRect(l13, i12, l12 + 36, 27, 9, 9);
          }
          if (i11 * 2 + 1 == i5) {
            drawTexturedModalRect(l13, i12, l12 + 45, 27, 9, 9);
          }
        }

        if (mc.thePlayer.isInsideOfMaterial(Material.water)) {
          int j11 = (int) Math.ceil(((double) (mc.thePlayer.getAir() - 2) * 10D) / 300D);
          int j12 = (int) Math.ceil(((double) mc.thePlayer.getAir() * 10D) / 300D) - j11;
          for (int i13 = 0; i13 < j11 + j12; i13++) {
            if (i13 < j11) {
              drawTexturedModalRect(j7 - i13 * 8 - 9, j9, 16, 18, 9, 9);
            } else {
              drawTexturedModalRect(j7 - i13 * 8 - 9, j9, 25, 18, 9, 9);
            }
          }
        }
      }
      GL11.glDisable(3042 /*GL_BLEND*/);
      GL11.glEnable(32826 /*GL_RESCALE_NORMAL_EXT*/);
      RenderHelper.func_41089_c();
      for (int l6 = 0; l6 < 9; l6++) {
        int k7 = (k / 2 - 90) + l6 * 20 + 2;
        int i8 = l - 16 - 3;
        renderInventorySlot(l6, k7, i8, f);
      }

      RenderHelper.disableStandardItemLighting();
      GL11.glDisable(32826 /*GL_RESCALE_NORMAL_EXT*/);
    }
    if (mc.thePlayer.getSleepTimer() > 0) {
      GL11.glDisable(2929 /*GL_DEPTH_TEST*/);
      GL11.glDisable(3008 /*GL_ALPHA_TEST*/);
      int i1 = mc.thePlayer.getSleepTimer();
      float f3 = (float) i1 / 100F;
      if (f3 > 1.0F) {
        f3 = 1.0F - (float) (i1 - 100) / 10F;
      }
      int j2 = (int) (220F * f3) << 24 | 0x101020;
      drawRect(0, 0, k, l, j2);
      GL11.glEnable(3008 /*GL_ALPHA_TEST*/);
      GL11.glEnable(2929 /*GL_DEPTH_TEST*/);
    }
    if (mc.playerController.func_35642_f() && mc.thePlayer.playerLevel > 0) {
      boolean flag1 = false;
      int j1 = flag1 ? 0xffffff : 0x80ff20;
      String s = (new StringBuilder()).append("").append(mc.thePlayer.playerLevel).toString();
      int k3 = (k - fontrenderer.getStringWidth(s)) / 2;
      int l3 = l - 31 - 4;
      fontrenderer.drawString(s, k3 + 1, l3, 0);
      fontrenderer.drawString(s, k3 - 1, l3, 0);
      fontrenderer.drawString(s, k3, l3 + 1, 0);
      fontrenderer.drawString(s, k3, l3 - 1, 0);
      fontrenderer.drawString(s, k3, l3, j1);
    }
    if (mc.gameSettings.showDebugInfo) {
      GL11.glPushMatrix();
      if (Minecraft.hasPaidCheckTime > 0L) {
        GL11.glTranslatef(0.0F, 32F, 0.0F);
      }
      fontrenderer.drawStringWithShadow(
          (new StringBuilder()).append("Minecraft 1.0.0 (").append(mc.debug).append(")").toString(),
          2,
          2,
          0xffffff);
      fontrenderer.drawStringWithShadow(mc.debugInfoRenders(), 2, 12, 0xffffff);
      fontrenderer.drawStringWithShadow(mc.func_6262_n(), 2, 22, 0xffffff);
      fontrenderer.drawStringWithShadow(mc.debugInfoEntities(), 2, 32, 0xffffff);
      fontrenderer.drawStringWithShadow(mc.func_21002_o(), 2, 42, 0xffffff);
      long l1 = Runtime.getRuntime().maxMemory();
      long l2 = Runtime.getRuntime().totalMemory();
      long l4 = Runtime.getRuntime().freeMemory();
      long l5 = l2 - l4;
      String s1 =
          (new StringBuilder())
              .append("Used memory: ")
              .append((l5 * 100L) / l1)
              .append("% (")
              .append(l5 / 1024L / 1024L)
              .append("MB) of ")
              .append(l1 / 1024L / 1024L)
              .append("MB")
              .toString();
      drawString(fontrenderer, s1, k - fontrenderer.getStringWidth(s1) - 2, 2, 0xe0e0e0);
      s1 =
          (new StringBuilder())
              .append("Allocated memory: ")
              .append((l2 * 100L) / l1)
              .append("% (")
              .append(l2 / 1024L / 1024L)
              .append("MB)")
              .toString();
      drawString(fontrenderer, s1, k - fontrenderer.getStringWidth(s1) - 2, 12, 0xe0e0e0);
      drawString(
          fontrenderer,
          (new StringBuilder()).append("x: ").append(mc.thePlayer.posX).toString(),
          2,
          64,
          0xe0e0e0);
      drawString(
          fontrenderer,
          (new StringBuilder()).append("y: ").append(mc.thePlayer.posY).toString(),
          2,
          72,
          0xe0e0e0);
      drawString(
          fontrenderer,
          (new StringBuilder()).append("z: ").append(mc.thePlayer.posZ).toString(),
          2,
          80,
          0xe0e0e0);
      drawString(
          fontrenderer,
          (new StringBuilder())
              .append("f: ")
              .append(
                  MathHelper.floor_double((double) ((mc.thePlayer.rotationYaw * 4F) / 360F) + 0.5D)
                      & 3)
              .toString(),
          2,
          88,
          0xe0e0e0);
      drawString(
          fontrenderer,
          (new StringBuilder()).append("Seed: ").append(mc.theWorld.getWorldSeed()).toString(),
          2,
          104,
          0xe0e0e0);
      GL11.glPopMatrix();
    }
    if (recordPlayingUpFor > 0) {
      float f2 = (float) recordPlayingUpFor - f;
      int k1 = (int) ((f2 * 256F) / 20F);
      if (k1 > 255) {
        k1 = 255;
      }
      if (k1 > 0) {
        GL11.glPushMatrix();
        GL11.glTranslatef(k / 2, l - 48, 0.0F);
        GL11.glEnable(3042 /*GL_BLEND*/);
        GL11.glBlendFunc(770, 771);
        int k2 = 0xffffff;
        if (recordIsPlaying) {
          k2 = Color.HSBtoRGB(f2 / 50F, 0.7F, 0.6F) & 0xffffff;
        }
        fontrenderer.drawString(
            recordPlaying, -fontrenderer.getStringWidth(recordPlaying) / 2, -4, k2 + (k1 << 24));
        GL11.glDisable(3042 /*GL_BLEND*/);
        GL11.glPopMatrix();
      }
    }
    byte byte0 = 10;
    boolean flag3 = false;
    if (mc.currentScreen instanceof GuiChat) {
      byte0 = 20;
      flag3 = true;
    }
    GL11.glEnable(3042 /*GL_BLEND*/);
    GL11.glBlendFunc(770, 771);
    GL11.glDisable(3008 /*GL_ALPHA_TEST*/);
    GL11.glPushMatrix();
    GL11.glTranslatef(0.0F, l - 48, 0.0F);
    for (int i3 = 0; i3 < chatMessageList.size() && i3 < byte0; i3++) {
      if (((ChatLine) chatMessageList.get(i3)).updateCounter >= 200 && !flag3) {
        continue;
      }
      double d = (double) ((ChatLine) chatMessageList.get(i3)).updateCounter / 200D;
      d = 1.0D - d;
      d *= 10D;
      if (d < 0.0D) {
        d = 0.0D;
      }
      if (d > 1.0D) {
        d = 1.0D;
      }
      d *= d;
      int j4 = (int) (255D * d);
      if (flag3) {
        j4 = 255;
      }
      if (j4 > 0) {
        byte byte1 = 2;
        int i6 = -i3 * 9;
        String s2 = ((ChatLine) chatMessageList.get(i3)).message;
        drawRect(byte1, i6 - 1, byte1 + 320, i6 + 8, j4 / 2 << 24);
        GL11.glEnable(3042 /*GL_BLEND*/);
        fontrenderer.drawStringWithShadow(s2, byte1, i6, 0xffffff + (j4 << 24));
      }
    }

    GL11.glPopMatrix();
    if ((mc.thePlayer instanceof EntityClientPlayerMP)
        && mc.gameSettings.keyBindPlayerList.pressed) {
      NetClientHandler netclienthandler = ((EntityClientPlayerMP) mc.thePlayer).sendQueue;
      java.util.List list = netclienthandler.playerNames;
      int i4 = netclienthandler.currentServerMaxPlayers;
      int k4 = i4;
      int j5 = 1;
      for (; k4 > 20; k4 = ((i4 + j5) - 1) / j5) {
        j5++;
      }

      int j6 = 300 / j5;
      if (j6 > 150) {
        j6 = 150;
      }
      int i7 = (k - j5 * j6) / 2;
      byte byte2 = 10;
      drawRect(i7 - 1, byte2 - 1, i7 + j6 * j5, byte2 + 9 * k4, 0x80000000);
      for (int j8 = 0; j8 < i4; j8++) {
        int l8 = i7 + (j8 % j5) * j6;
        int k9 = byte2 + (j8 / j5) * 9;
        drawRect(l8, k9, (l8 + j6) - 1, k9 + 8, 0x20ffffff);
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        GL11.glEnable(3008 /*GL_ALPHA_TEST*/);
        if (j8 >= list.size()) {
          continue;
        }
        GuiSavingLevelString guisavinglevelstring = (GuiSavingLevelString) list.get(j8);
        fontrenderer.drawStringWithShadow(guisavinglevelstring.stringValue, l8, k9, 0xffffff);
        mc.renderEngine.bindTexture(mc.renderEngine.getTexture("/gui/icons.png"));
        int k10 = 0;
        byte byte3 = 0;
        k10 = 0;
        byte3 = 0;
        if (guisavinglevelstring.responseTime < 0) {
          byte3 = 5;
        } else if (guisavinglevelstring.responseTime < 150) {
          byte3 = 0;
        } else if (guisavinglevelstring.responseTime < 300) {
          byte3 = 1;
        } else if (guisavinglevelstring.responseTime < 600) {
          byte3 = 2;
        } else if (guisavinglevelstring.responseTime < 1000) {
          byte3 = 3;
        } else {
          byte3 = 4;
        }
        zLevel += 100F;
        drawTexturedModalRect((l8 + j6) - 12, k9, 0 + k10 * 10, 176 + byte3 * 8, 10, 8);
        zLevel -= 100F;
      }
    }
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    GL11.glDisable(2896 /*GL_LIGHTING*/);
    GL11.glEnable(3008 /*GL_ALPHA_TEST*/);
  }