Advertisement
Guest User

Untitled

a guest
Oct 17th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 42.48 KB | None | 0 0
  1. package net.minecraft.client.gui;
  2.  
  3. import com.darkmagician6.eventapi.EventManager;
  4. import com.google.common.collect.Iterables;
  5. import com.google.common.collect.Lists;
  6. import de.aggromc.aggroclient.clientbase.AggroClient;
  7. import de.aggromc.aggroclient.clientbase.events.Render2DEvent;
  8. import de.aggromc.aggroclient.clientbase.modules.modules.render.NoScoreboard;
  9. import de.aggromc.aggroclient.clientbase.utils.GLUtil;
  10. import net.minecraft.block.material.Material;
  11. import net.minecraft.client.Minecraft;
  12. import net.minecraft.client.renderer.GlStateManager;
  13. import net.minecraft.client.renderer.RenderHelper;
  14. import net.minecraft.client.renderer.Tessellator;
  15. import net.minecraft.client.renderer.WorldRenderer;
  16. import net.minecraft.client.renderer.entity.RenderItem;
  17. import net.minecraft.client.renderer.texture.TextureAtlasSprite;
  18. import net.minecraft.client.renderer.texture.TextureMap;
  19. import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
  20. import net.minecraft.client.resources.I18n;
  21. import net.minecraft.entity.Entity;
  22. import net.minecraft.entity.EntityLivingBase;
  23. import net.minecraft.entity.SharedMonsterAttributes;
  24. import net.minecraft.entity.ai.attributes.IAttributeInstance;
  25. import net.minecraft.entity.boss.BossStatus;
  26. import net.minecraft.entity.player.EntityPlayer;
  27. import net.minecraft.init.Blocks;
  28. import net.minecraft.inventory.IInventory;
  29. import net.minecraft.item.Item;
  30. import net.minecraft.item.ItemStack;
  31. import net.minecraft.potion.Potion;
  32. import net.minecraft.scoreboard.Score;
  33. import net.minecraft.scoreboard.ScoreObjective;
  34. import net.minecraft.scoreboard.ScorePlayerTeam;
  35. import net.minecraft.scoreboard.Scoreboard;
  36. import net.minecraft.util.*;
  37. import net.minecraft.world.border.WorldBorder;
  38. import optifine.Config;
  39. import optifine.CustomColors;
  40.  
  41. import java.awt.*;
  42. import java.util.ArrayList;
  43. import java.util.Collection;
  44. import java.util.Random;
  45. import java.util.stream.Collectors;
  46.  
  47. public class GuiIngame extends Gui {
  48.     private static final ResourceLocation vignetteTexPath = new ResourceLocation("textures/misc/vignette.png");
  49.     private static final ResourceLocation widgetsTexPath = new ResourceLocation("textures/gui/widgets.png");
  50.     private static final ResourceLocation pumpkinBlurTexPath = new ResourceLocation("textures/misc/pumpkinblur.png");
  51.     private static final String __OBFID = "CL_00000661";
  52.     private final Random rand = new Random();
  53.     private final Minecraft mc;
  54.     private final RenderItem itemRenderer;
  55.     /**
  56.      * ChatGUI instance that retains all previous chat data
  57.      */
  58.     private final GuiNewChat persistantChatGUI;
  59.     private final GuiStreamIndicator streamIndicator;
  60.     private final GuiOverlayDebug overlayDebug;
  61.     /**
  62.      * The spectator GUI for this in-game GUI instance
  63.      */
  64.     private final GuiSpectator spectatorGui;
  65.     private final GuiPlayerTabOverlay overlayPlayerList;
  66.     /**
  67.      * Previous frame vignette brightness (slowly changes by 1% each frame)
  68.      */
  69.     public float prevVignetteBrightness = 1.0F;
  70.     private int updateCounter;
  71.     /**
  72.      * The string specifying which record music is playing
  73.      */
  74.     private String recordPlaying = "";
  75.     /**
  76.      * How many ticks the record playing message will be displayed
  77.      */
  78.     private int recordPlayingUpFor;
  79.     private boolean recordIsPlaying;
  80.     /**
  81.      * Remaining ticks the item highlight should be visible
  82.      */
  83.     private int remainingHighlightTicks;
  84.     /**
  85.      * The ItemStack that is currently being highlighted
  86.      */
  87.     private ItemStack highlightingItemStack;
  88.     private int field_175195_w;
  89.     private String field_175201_x = "";
  90.     private String field_175200_y = "";
  91.     private int field_175199_z;
  92.     private int field_175192_A;
  93.     private int field_175193_B;
  94.     private int playerHealth = 0;
  95.     private int lastPlayerHealth = 0;
  96.     /**
  97.      * The last recorded system time
  98.      */
  99.     private long lastSystemTime = 0L;
  100.     /**
  101.      * Used with updateCounter to make the heart bar flash
  102.      */
  103.     private long healthUpdateCounter = 0L;
  104.  
  105.     public GuiIngame(Minecraft mcIn) {
  106.         this.mc = mcIn;
  107.         this.itemRenderer = mcIn.getRenderItem();
  108.         this.overlayDebug = new GuiOverlayDebug(mcIn);
  109.         this.spectatorGui = new GuiSpectator(mcIn);
  110.         this.persistantChatGUI = new GuiNewChat(mcIn);
  111.         this.streamIndicator = new GuiStreamIndicator(mcIn);
  112.         this.overlayPlayerList = new GuiPlayerTabOverlay(mcIn, this);
  113.         this.func_175177_a();
  114.     }
  115.  
  116.     public void func_175177_a() {
  117.         this.field_175199_z = 10;
  118.         this.field_175192_A = 70;
  119.         this.field_175193_B = 20;
  120.     }
  121.  
  122.     public void renderGameOverlay(float partialTicks) {
  123.         ScaledResolution scaledresolution = new ScaledResolution(this.mc);
  124.         int i = scaledresolution.getScaledWidth();
  125.         int j = scaledresolution.getScaledHeight();
  126.         this.mc.entityRenderer.setupOverlayRendering();
  127.         GlStateManager.enableBlend();
  128.  
  129.         if (Config.isVignetteEnabled()) {
  130.             this.renderVignette(this.mc.thePlayer.getBrightness(partialTicks), scaledresolution);
  131.         } else {
  132.             GlStateManager.enableDepth();
  133.             GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
  134.         }
  135.  
  136.         ItemStack itemstack = this.mc.thePlayer.inventory.armorItemInSlot(3);
  137.  
  138.         if (this.mc.gameSettings.thirdPersonView == 0 && itemstack != null && itemstack.getItem() == Item.getItemFromBlock(Blocks.pumpkin)) {
  139.             this.renderPumpkinOverlay(scaledresolution);
  140.         }
  141.  
  142.         if (!this.mc.thePlayer.isPotionActive(Potion.confusion)) {
  143.             float f = this.mc.thePlayer.prevTimeInPortal + (this.mc.thePlayer.timeInPortal - this.mc.thePlayer.prevTimeInPortal) * partialTicks;
  144.  
  145.             if (f > 0.0F) {
  146.                 this.func_180474_b(f, scaledresolution);
  147.             }
  148.         }
  149.  
  150.         if (this.mc.playerController.isSpectator()) {
  151.             this.spectatorGui.renderTooltip(scaledresolution, partialTicks);
  152.         } else {
  153.             this.renderTooltip(scaledresolution, partialTicks);
  154.         }
  155.  
  156.         GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
  157.         this.mc.getTextureManager().bindTexture(icons);
  158.         GlStateManager.enableBlend();
  159.  
  160.         if (this.showCrosshair() && this.mc.gameSettings.thirdPersonView < 1) {
  161.             GlStateManager.tryBlendFuncSeparate(775, 769, 1, 0);
  162.             GlStateManager.enableAlpha();
  163.             this.drawTexturedModalRect(i / 2 - 7, j / 2 - 7, 0, 0, 16, 16);
  164.         }
  165.  
  166.         GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
  167.         this.mc.mcProfiler.startSection("bossHealth");
  168.         this.renderBossHealth();
  169.         this.mc.mcProfiler.endSection();
  170.  
  171.         if (this.mc.playerController.shouldDrawHUD()) {
  172.             this.renderPlayerStats(scaledresolution);
  173.         }
  174.  
  175.         GlStateManager.disableBlend();
  176.  
  177.         if (this.mc.thePlayer.getSleepTimer() > 0) {
  178.             this.mc.mcProfiler.startSection("sleep");
  179.             GlStateManager.disableDepth();
  180.             GlStateManager.disableAlpha();
  181.             int l = this.mc.thePlayer.getSleepTimer();
  182.             float f2 = (float) l / 100.0F;
  183.  
  184.             if (f2 > 1.0F) {
  185.                 f2 = 1.0F - (float) (l - 100) / 10.0F;
  186.             }
  187.  
  188.             int k = (int) (220.0F * f2) << 24 | 1052704;
  189.             drawRect(0, 0, i, j, k);
  190.             GlStateManager.enableAlpha();
  191.             GlStateManager.enableDepth();
  192.             this.mc.mcProfiler.endSection();
  193.         }
  194.  
  195.         GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
  196.         int i2 = i / 2 - 91;
  197.  
  198.         if (this.mc.thePlayer.isRidingHorse()) {
  199.             this.renderHorseJumpBar(scaledresolution, i2);
  200.         } else if (this.mc.playerController.gameIsSurvivalOrAdventure()) {
  201.             this.renderExpBar(scaledresolution, i2);
  202.         }
  203.  
  204.         if (this.mc.gameSettings.heldItemTooltips && !this.mc.playerController.isSpectator()) {
  205.             this.func_181551_a(scaledresolution);
  206.         } else if (this.mc.thePlayer.isSpectator()) {
  207.             this.spectatorGui.func_175263_a(scaledresolution);
  208.         }
  209.  
  210.         if (this.mc.isDemo()) {
  211.             this.renderDemo(scaledresolution);
  212.         }
  213.  
  214.         if (this.mc.gameSettings.showDebugInfo) {
  215.             this.overlayDebug.renderDebugInfo(scaledresolution);
  216.         }
  217.  
  218.         if (this.recordPlayingUpFor > 0) {
  219.             this.mc.mcProfiler.startSection("overlayMessage");
  220.             float f3 = (float) this.recordPlayingUpFor - partialTicks;
  221.             int k1 = (int) (f3 * 255.0F / 20.0F);
  222.  
  223.             if (k1 > 255) {
  224.                 k1 = 255;
  225.             }
  226.  
  227.             if (k1 > 8) {
  228.                 GlStateManager.pushMatrix();
  229.                 GlStateManager.translate((float) (i / 2), (float) (j - 68), 0.0F);
  230.                 GlStateManager.enableBlend();
  231.                 GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
  232.                 int i1 = 16777215;
  233.  
  234.                 if (this.recordIsPlaying) {
  235.                     i1 = MathHelper.func_181758_c(f3 / 50.0F, 0.7F, 0.6F) & 16777215;
  236.                 }
  237.  
  238.                 this.getFontRenderer().drawString(this.recordPlaying, -this.getFontRenderer().getStringWidth(this.recordPlaying) / 2, -4, i1 + (k1 << 24 & -16777216));
  239.                 GlStateManager.disableBlend();
  240.                 GlStateManager.popMatrix();
  241.             }
  242.  
  243.             this.mc.mcProfiler.endSection();
  244.         }
  245.  
  246.         if (this.field_175195_w > 0) {
  247.             this.mc.mcProfiler.startSection("titleAndSubtitle");
  248.             float f4 = (float) this.field_175195_w - partialTicks;
  249.             int l1 = 255;
  250.  
  251.             if (this.field_175195_w > this.field_175193_B + this.field_175192_A) {
  252.                 float f1 = (float) (this.field_175199_z + this.field_175192_A + this.field_175193_B) - f4;
  253.                 l1 = (int) (f1 * 255.0F / (float) this.field_175199_z);
  254.             }
  255.  
  256.             if (this.field_175195_w <= this.field_175193_B) {
  257.                 l1 = (int) (f4 * 255.0F / (float) this.field_175193_B);
  258.             }
  259.  
  260.             l1 = MathHelper.clamp_int(l1, 0, 255);
  261.  
  262.             if (l1 > 8) {
  263.                 GlStateManager.pushMatrix();
  264.                 GlStateManager.translate((float) (i / 2), (float) (j / 2), 0.0F);
  265.                 GlStateManager.enableBlend();
  266.                 GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
  267.                 GlStateManager.pushMatrix();
  268.                 GlStateManager.scale(4.0F, 4.0F, 4.0F);
  269.                 int j2 = l1 << 24 & -16777216;
  270.                 this.getFontRenderer().drawString(this.field_175201_x, (float) (-this.getFontRenderer().getStringWidth(this.field_175201_x) / 2), -10.0F, 16777215 | j2, true);
  271.                 GlStateManager.popMatrix();
  272.                 GlStateManager.pushMatrix();
  273.                 GlStateManager.scale(2.0F, 2.0F, 2.0F);
  274.                 this.getFontRenderer().drawString(this.field_175200_y, (float) (-this.getFontRenderer().getStringWidth(this.field_175200_y) / 2), 5.0F, 16777215 | j2, true);
  275.                 GlStateManager.popMatrix();
  276.                 GlStateManager.disableBlend();
  277.                 GlStateManager.popMatrix();
  278.             }
  279.  
  280.             this.mc.mcProfiler.endSection();
  281.         }
  282.  
  283.         Scoreboard scoreboard = this.mc.theWorld.getScoreboard();
  284.         ScoreObjective scoreobjective = null;
  285.         ScorePlayerTeam scoreplayerteam = scoreboard.getPlayersTeam(this.mc.thePlayer.getName());
  286.  
  287.         if (scoreplayerteam != null) {
  288.             int j1 = scoreplayerteam.getChatFormat().getColorIndex();
  289.  
  290.             if (j1 >= 0) {
  291.                 scoreobjective = scoreboard.getObjectiveInDisplaySlot(3 + j1);
  292.             }
  293.         }
  294.  
  295.         ScoreObjective scoreobjective1 = scoreobjective != null ? scoreobjective : scoreboard.getObjectiveInDisplaySlot(1);
  296.  
  297.         if (scoreobjective1 != null) {
  298.             this.renderScoreboard(scoreobjective1, scaledresolution);
  299.         }
  300.  
  301.         GlStateManager.enableBlend();
  302.         GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
  303.         GlStateManager.disableAlpha();
  304.         GlStateManager.pushMatrix();
  305.         GlStateManager.translate(0.0F, (float) (j - 48), 0.0F);
  306.         this.mc.mcProfiler.startSection("chat");
  307.         this.persistantChatGUI.drawChat(this.updateCounter);
  308.         this.mc.mcProfiler.endSection();
  309.         GlStateManager.popMatrix();
  310.         scoreobjective1 = scoreboard.getObjectiveInDisplaySlot(0);
  311.  
  312.         if (!this.mc.gameSettings.keyBindPlayerList.isKeyDown() || this.mc.isIntegratedServerRunning() && this.mc.thePlayer.sendQueue.getPlayerInfoMap().size() <= 1 && scoreobjective1 == null) {
  313.             this.overlayPlayerList.updatePlayerList(false);
  314.         } else {
  315.             this.overlayPlayerList.updatePlayerList(true);
  316.             this.overlayPlayerList.renderPlayerlist(i, scoreboard, scoreobjective1);
  317.         }
  318.  
  319.         GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
  320.         GlStateManager.disableLighting();
  321.         GlStateManager.enableAlpha();
  322.     }
  323.  
  324.     protected void renderTooltip(ScaledResolution sr, float partialTicks) {
  325.         if (this.mc.getRenderViewEntity() instanceof EntityPlayer) {
  326.             GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
  327.             this.mc.getTextureManager().bindTexture(widgetsTexPath);
  328.             EntityPlayer entityplayer = (EntityPlayer) this.mc.getRenderViewEntity();
  329.             int i = sr.getScaledWidth() / 2;
  330.             float f = this.zLevel;
  331.             this.zLevel = -90.0F;
  332. //            this.drawTexturedModalRect(i - 91, sr.getScaledHeight() - 22, 0, 0, 182, 22);
  333.             drawRect(i - 91, sr.getScaledHeight() - 22, i + 91, sr.getScaledHeight(), GLUtil.toRGBA(new Color(50, 50, 50, 200)));
  334.             drawRect(i - 91 - 1 + entityplayer.inventory.currentItem * 20, sr.getScaledHeight() - 22, i - 91 - 1 + entityplayer.inventory.currentItem * 20 + 24, sr.getScaledHeight() - 22 + 22, -1);
  335.             this.zLevel = f;
  336.             GlStateManager.enableRescaleNormal();
  337.             GlStateManager.enableBlend();
  338.             GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
  339.             RenderHelper.enableGUIStandardItemLighting();
  340.  
  341.             for (int j = 0; j < 9; ++j) {
  342.                 int k = sr.getScaledWidth() / 2 - 90 + j * 20 + 2;
  343.                 int l = sr.getScaledHeight() - 16 - 3;
  344.                 this.renderHotbarItem(j, k, l, partialTicks, entityplayer);
  345.             }
  346.  
  347.             RenderHelper.disableStandardItemLighting();
  348.             GlStateManager.disableRescaleNormal();
  349.             GlStateManager.disableBlend();
  350.         }
  351.  
  352.         EventManager.call(new Render2DEvent());
  353.     }
  354.  
  355.     public void renderHorseJumpBar(ScaledResolution p_175186_1_, int p_175186_2_) {
  356.         this.mc.mcProfiler.startSection("jumpBar");
  357.         this.mc.getTextureManager().bindTexture(Gui.icons);
  358.         float f = this.mc.thePlayer.getHorseJumpPower();
  359.         short short1 = 182;
  360.         int i = (int) (f * (float) (short1 + 1));
  361.         int j = p_175186_1_.getScaledHeight() - 32 + 3;
  362.         this.drawTexturedModalRect(p_175186_2_, j, 0, 84, short1, 5);
  363.  
  364.         if (i > 0) {
  365.             this.drawTexturedModalRect(p_175186_2_, j, 0, 89, i, 5);
  366.         }
  367.  
  368.         this.mc.mcProfiler.endSection();
  369.     }
  370.  
  371.     public void renderExpBar(ScaledResolution p_175176_1_, int p_175176_2_) {
  372.         this.mc.mcProfiler.startSection("expBar");
  373.         this.mc.getTextureManager().bindTexture(Gui.icons);
  374.         int i = this.mc.thePlayer.xpBarCap();
  375.  
  376.         if (i > 0) {
  377.             short short1 = 182;
  378.             int k = (int) (this.mc.thePlayer.experience * (float) (short1 + 1));
  379.             int j = p_175176_1_.getScaledHeight() - 32 + 3;
  380.             this.drawTexturedModalRect(p_175176_2_, j, 0, 64, short1, 5);
  381.  
  382.             if (k > 0) {
  383.                 this.drawTexturedModalRect(p_175176_2_, j, 0, 69, k, 5);
  384.             }
  385.         }
  386.  
  387.         this.mc.mcProfiler.endSection();
  388.  
  389.         if (this.mc.thePlayer.experienceLevel > 0) {
  390.             this.mc.mcProfiler.startSection("expLevel");
  391.             int j1 = 8453920;
  392.  
  393.             if (Config.isCustomColors()) {
  394.                 j1 = CustomColors.getExpBarTextColor(j1);
  395.             }
  396.  
  397.             String s = "" + this.mc.thePlayer.experienceLevel;
  398.             int i1 = (p_175176_1_.getScaledWidth() - this.getFontRenderer().getStringWidth(s)) / 2;
  399.             int l = p_175176_1_.getScaledHeight() - 31 - 4;
  400.             boolean flag = false;
  401.             this.getFontRenderer().drawString(s, i1 + 1, l, 0);
  402.             this.getFontRenderer().drawString(s, i1 - 1, l, 0);
  403.             this.getFontRenderer().drawString(s, i1, l + 1, 0);
  404.             this.getFontRenderer().drawString(s, i1, l - 1, 0);
  405.             this.getFontRenderer().drawString(s, i1, l, j1);
  406.             this.mc.mcProfiler.endSection();
  407.         }
  408.     }
  409.  
  410.     public void func_181551_a(ScaledResolution p_181551_1_) {
  411.         this.mc.mcProfiler.startSection("selectedItemName");
  412.  
  413.         if (this.remainingHighlightTicks > 0 && this.highlightingItemStack != null) {
  414.             String s = this.highlightingItemStack.getDisplayName();
  415.  
  416.             if (this.highlightingItemStack.hasDisplayName()) {
  417.                 s = EnumChatFormatting.ITALIC + s;
  418.             }
  419.  
  420.             int i = (p_181551_1_.getScaledWidth() - this.getFontRenderer().getStringWidth(s)) / 2;
  421.             int j = p_181551_1_.getScaledHeight() - 59;
  422.  
  423.             if (!this.mc.playerController.shouldDrawHUD()) {
  424.                 j += 14;
  425.             }
  426.  
  427.             int k = (int) ((float) this.remainingHighlightTicks * 256.0F / 10.0F);
  428.  
  429.             if (k > 255) {
  430.                 k = 255;
  431.             }
  432.  
  433.             if (k > 0) {
  434.                 GlStateManager.pushMatrix();
  435.                 GlStateManager.enableBlend();
  436.                 GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
  437.                 this.getFontRenderer().drawStringWithShadow(s, (float) i, (float) j, 16777215 + (k << 24));
  438.                 GlStateManager.disableBlend();
  439.                 GlStateManager.popMatrix();
  440.             }
  441.         }
  442.  
  443.         this.mc.mcProfiler.endSection();
  444.     }
  445.  
  446.     public void renderDemo(ScaledResolution p_175185_1_) {
  447.         this.mc.mcProfiler.startSection("demo");
  448.         String s = "";
  449.  
  450.         if (this.mc.theWorld.getTotalWorldTime() >= 120500L) {
  451.             s = I18n.format("demo.demoExpired");
  452.         } else {
  453.             s = I18n.format("demo.remainingTime", StringUtils.ticksToElapsedTime((int) (120500L - this.mc.theWorld.getTotalWorldTime())));
  454.         }
  455.  
  456.         int i = this.getFontRenderer().getStringWidth(s);
  457.         this.getFontRenderer().drawStringWithShadow(s, (float) (p_175185_1_.getScaledWidth() - i - 10), 5.0F, 16777215);
  458.         this.mc.mcProfiler.endSection();
  459.     }
  460.  
  461.     protected boolean showCrosshair() {
  462.         if (this.mc.gameSettings.showDebugInfo && !this.mc.thePlayer.hasReducedDebug() && !this.mc.gameSettings.reducedDebugInfo) {
  463.             return false;
  464.         } else if (this.mc.playerController.isSpectator()) {
  465.             if (this.mc.pointedEntity != null) {
  466.                 return true;
  467.             } else {
  468.                 if (this.mc.objectMouseOver != null && this.mc.objectMouseOver.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
  469.                     BlockPos blockpos = this.mc.objectMouseOver.getBlockPos();
  470.  
  471.                     return this.mc.theWorld.getTileEntity(blockpos) instanceof IInventory;
  472.                 }
  473.  
  474.                 return false;
  475.             }
  476.         } else {
  477.             return true;
  478.         }
  479.     }
  480.  
  481.     public void renderStreamIndicator(ScaledResolution p_180478_1_) {
  482.         this.streamIndicator.render(p_180478_1_.getScaledWidth() - 10, 10);
  483.     }
  484.  
  485.     private void renderScoreboard(ScoreObjective p_180475_1_, ScaledResolution p_180475_2_) {
  486.         NoScoreboard noScoreboard = AggroClient.INSTANCE.moduleManager.getModule(NoScoreboard.class);
  487.  
  488.         if (noScoreboard.isScoreboardDisabled())
  489.             return;
  490.  
  491.         Scoreboard scoreboard = p_180475_1_.getScoreboard();
  492.         Collection<Score> collection = scoreboard.getSortedScores(p_180475_1_);
  493.         ArrayList arraylist = Lists.newArrayList(collection.stream().filter(p_apply_1_ -> p_apply_1_.getPlayerName() != null && !p_apply_1_.getPlayerName().startsWith("#")).collect(Collectors.toList()));
  494.         ArrayList arraylist1;
  495.  
  496.         if (arraylist.size() > 15) {
  497.             arraylist1 = Lists.newArrayList(Iterables.skip(arraylist, collection.size() - 15));
  498.         } else {
  499.             arraylist1 = arraylist;
  500.         }
  501.  
  502.         int i = this.getFontRenderer().getStringWidth(p_180475_1_.getDisplayName());
  503.  
  504.         for (Object score : arraylist1) {
  505.             ScorePlayerTeam scoreplayerteam = scoreboard.getPlayersTeam(((Score) score).getPlayerName());
  506.             String s = ScorePlayerTeam.formatPlayerName(scoreplayerteam, ((Score) score).getPlayerName()) + ": " + EnumChatFormatting.RED + ((Score) score).getScorePoints();
  507.             i = Math.max(i, this.getFontRenderer().getStringWidth(s));
  508.         }
  509.  
  510.         int j1 = arraylist1.size() * this.getFontRenderer().FONT_HEIGHT;
  511.         int k1 = (int) (p_180475_2_.getScaledHeight() / 2 * noScoreboard.getOffset() + j1 / 3);
  512.         byte b0 = 3;
  513.         int j = p_180475_2_.getScaledWidth() - i - b0;
  514.         int k = 0;
  515.  
  516.         for (Object score1 : arraylist1) {
  517.             ++k;
  518.             ScorePlayerTeam scoreplayerteam1 = scoreboard.getPlayersTeam(((Score) score1).getPlayerName());
  519.             String s1 = ScorePlayerTeam.formatPlayerName(scoreplayerteam1, ((Score) score1).getPlayerName());
  520.             String s2 = EnumChatFormatting.RED + "" + ((Score) score1).getScorePoints();
  521.             int l = k1 - k * this.getFontRenderer().FONT_HEIGHT;
  522.             int i1 = p_180475_2_.getScaledWidth() - b0 + 2;
  523.             drawRect(j - 2, l, i1, l + this.getFontRenderer().FONT_HEIGHT, 1342177280);
  524.             this.getFontRenderer().drawString(s1, j, l, 553648127);
  525.             this.getFontRenderer().drawString(s2, i1 - this.getFontRenderer().getStringWidth(s2), l, 553648127);
  526.  
  527.             if (k == arraylist1.size()) {
  528.                 String s3 = p_180475_1_.getDisplayName();
  529.                 drawRect(j - 2, l - this.getFontRenderer().FONT_HEIGHT - 1, i1, l - 1, 1610612736);
  530.                 drawRect(j - 2, l - 1, i1, l, 1342177280);
  531.                 this.getFontRenderer().drawString(s3, j + i / 2 - this.getFontRenderer().getStringWidth(s3) / 2, l - this.getFontRenderer().FONT_HEIGHT, 553648127);
  532.             }
  533.         }
  534.     }
  535.  
  536.     private void renderPlayerStats(ScaledResolution p_180477_1_) {
  537.         if (this.mc.getRenderViewEntity() instanceof EntityPlayer) {
  538.             EntityPlayer entityplayer = (EntityPlayer) this.mc.getRenderViewEntity();
  539.             int i = MathHelper.ceiling_float_int(entityplayer.getHealth());
  540.             boolean flag = this.healthUpdateCounter > (long) this.updateCounter && (this.healthUpdateCounter - (long) this.updateCounter) / 3L % 2L == 1L;
  541.  
  542.             if (i < this.playerHealth && entityplayer.hurtResistantTime > 0) {
  543.                 this.lastSystemTime = Minecraft.getSystemTime();
  544.                 this.healthUpdateCounter = this.updateCounter + 20;
  545.             } else if (i > this.playerHealth && entityplayer.hurtResistantTime > 0) {
  546.                 this.lastSystemTime = Minecraft.getSystemTime();
  547.                 this.healthUpdateCounter = this.updateCounter + 10;
  548.             }
  549.  
  550.             if (Minecraft.getSystemTime() - this.lastSystemTime > 1000L) {
  551.                 this.playerHealth = i;
  552.                 this.lastPlayerHealth = i;
  553.                 this.lastSystemTime = Minecraft.getSystemTime();
  554.             }
  555.  
  556.             this.playerHealth = i;
  557.             int j = this.lastPlayerHealth;
  558.             this.rand.setSeed(this.updateCounter * 312871);
  559.             boolean flag1 = false;
  560.             FoodStats foodstats = entityplayer.getFoodStats();
  561.             int k = foodstats.getFoodLevel();
  562.             int l = foodstats.getPrevFoodLevel();
  563.             IAttributeInstance iattributeinstance = entityplayer.getEntityAttribute(SharedMonsterAttributes.maxHealth);
  564.             int i1 = p_180477_1_.getScaledWidth() / 2 - 91;
  565.             int j1 = p_180477_1_.getScaledWidth() / 2 + 91;
  566.             int k1 = p_180477_1_.getScaledHeight() - 39;
  567.             float f = (float) iattributeinstance.getAttributeValue();
  568.             float f1 = entityplayer.getAbsorptionAmount();
  569.             int l1 = MathHelper.ceiling_float_int((f + f1) / 2.0F / 10.0F);
  570.             int i2 = Math.max(10 - (l1 - 2), 3);
  571.             int j2 = k1 - (l1 - 1) * i2 - 10;
  572.             float f2 = f1;
  573.             int k2 = entityplayer.getTotalArmorValue();
  574.             int l2 = -1;
  575.  
  576.             if (entityplayer.isPotionActive(Potion.regeneration)) {
  577.                 l2 = this.updateCounter % MathHelper.ceiling_float_int(f + 5.0F);
  578.             }
  579.  
  580.             this.mc.mcProfiler.startSection("armor");
  581.  
  582.             for (int i3 = 0; i3 < 10; ++i3) {
  583.                 if (k2 > 0) {
  584.                     int j3 = i1 + i3 * 8;
  585.  
  586.                     if (i3 * 2 + 1 < k2) {
  587.                         this.drawTexturedModalRect(j3, j2, 34, 9, 9, 9);
  588.                     }
  589.  
  590.                     if (i3 * 2 + 1 == k2) {
  591.                         this.drawTexturedModalRect(j3, j2, 25, 9, 9, 9);
  592.                     }
  593.  
  594.                     if (i3 * 2 + 1 > k2) {
  595.                         this.drawTexturedModalRect(j3, j2, 16, 9, 9, 9);
  596.                     }
  597.                 }
  598.             }
  599.  
  600.             this.mc.mcProfiler.endStartSection("health");
  601.  
  602.             for (int j5 = MathHelper.ceiling_float_int((f + f1) / 2.0F) - 1; j5 >= 0; --j5) {
  603.                 int k5 = 16;
  604.  
  605.                 if (entityplayer.isPotionActive(Potion.poison)) {
  606.                     k5 += 36;
  607.                 } else if (entityplayer.isPotionActive(Potion.wither)) {
  608.                     k5 += 72;
  609.                 }
  610.  
  611.                 byte b0 = 0;
  612.  
  613.                 if (flag) {
  614.                     b0 = 1;
  615.                 }
  616.  
  617.                 int k3 = MathHelper.ceiling_float_int((float) (j5 + 1) / 10.0F) - 1;
  618.                 int l3 = i1 + j5 % 10 * 8;
  619.                 int i4 = k1 - k3 * i2;
  620.  
  621.                 if (i <= 4) {
  622.                     i4 += this.rand.nextInt(2);
  623.                 }
  624.  
  625.                 if (j5 == l2) {
  626.                     i4 -= 2;
  627.                 }
  628.  
  629.                 byte b1 = 0;
  630.  
  631.                 if (entityplayer.worldObj.getWorldInfo().isHardcoreModeEnabled()) {
  632.                     b1 = 5;
  633.                 }
  634.  
  635.                 this.drawTexturedModalRect(l3, i4, 16 + b0 * 9, 9 * b1, 9, 9);
  636.  
  637.                 if (flag) {
  638.                     if (j5 * 2 + 1 < j) {
  639.                         this.drawTexturedModalRect(l3, i4, k5 + 54, 9 * b1, 9, 9);
  640.                     }
  641.  
  642.                     if (j5 * 2 + 1 == j) {
  643.                         this.drawTexturedModalRect(l3, i4, k5 + 63, 9 * b1, 9, 9);
  644.                     }
  645.                 }
  646.  
  647.                 if (f2 <= 0.0F) {
  648.                     if (j5 * 2 + 1 < i) {
  649.                         this.drawTexturedModalRect(l3, i4, k5 + 36, 9 * b1, 9, 9);
  650.                     }
  651.  
  652.                     if (j5 * 2 + 1 == i) {
  653.                         this.drawTexturedModalRect(l3, i4, k5 + 45, 9 * b1, 9, 9);
  654.                     }
  655.                 } else {
  656.                     if (f2 == f1 && f1 % 2.0F == 1.0F) {
  657.                         this.drawTexturedModalRect(l3, i4, k5 + 153, 9 * b1, 9, 9);
  658.                     } else {
  659.                         this.drawTexturedModalRect(l3, i4, k5 + 144, 9 * b1, 9, 9);
  660.                     }
  661.  
  662.                     f2 -= 2.0F;
  663.                 }
  664.             }
  665.  
  666.             Entity entity = entityplayer.ridingEntity;
  667.  
  668.             if (entity == null) {
  669.                 this.mc.mcProfiler.endStartSection("food");
  670.  
  671.                 for (int l5 = 0; l5 < 10; ++l5) {
  672.                     int i8 = k1;
  673.                     int j6 = 16;
  674.                     byte b4 = 0;
  675.  
  676.                     if (entityplayer.isPotionActive(Potion.hunger)) {
  677.                         j6 += 36;
  678.                         b4 = 13;
  679.                     }
  680.  
  681.                     if (entityplayer.getFoodStats().getSaturationLevel() <= 0.0F && this.updateCounter % (k * 3 + 1) == 0) {
  682.                         i8 = k1 + (this.rand.nextInt(3) - 1);
  683.                     }
  684.  
  685.                     if (flag1) {
  686.                         b4 = 1;
  687.                     }
  688.  
  689.                     int k7 = j1 - l5 * 8 - 9;
  690.                     this.drawTexturedModalRect(k7, i8, 16 + b4 * 9, 27, 9, 9);
  691.  
  692.                     if (flag1) {
  693.                         if (l5 * 2 + 1 < l) {
  694.                             this.drawTexturedModalRect(k7, i8, j6 + 54, 27, 9, 9);
  695.                         }
  696.  
  697.                         if (l5 * 2 + 1 == l) {
  698.                             this.drawTexturedModalRect(k7, i8, j6 + 63, 27, 9, 9);
  699.                         }
  700.                     }
  701.  
  702.                     if (l5 * 2 + 1 < k) {
  703.                         this.drawTexturedModalRect(k7, i8, j6 + 36, 27, 9, 9);
  704.                     }
  705.  
  706.                     if (l5 * 2 + 1 == k) {
  707.                         this.drawTexturedModalRect(k7, i8, j6 + 45, 27, 9, 9);
  708.                     }
  709.                 }
  710.             } else if (entity instanceof EntityLivingBase) {
  711.                 this.mc.mcProfiler.endStartSection("mountHealth");
  712.                 EntityLivingBase entitylivingbase = (EntityLivingBase) entity;
  713.                 int l7 = (int) Math.ceil(entitylivingbase.getHealth());
  714.                 float f3 = entitylivingbase.getMaxHealth();
  715.                 int l6 = (int) (f3 + 0.5F) / 2;
  716.  
  717.                 if (l6 > 30) {
  718.                     l6 = 30;
  719.                 }
  720.  
  721.                 int j7 = k1;
  722.  
  723.                 for (int j4 = 0; l6 > 0; j4 += 20) {
  724.                     int k4 = Math.min(l6, 10);
  725.                     l6 -= k4;
  726.  
  727.                     for (int l4 = 0; l4 < k4; ++l4) {
  728.                         byte b2 = 52;
  729.                         byte b3 = 0;
  730.  
  731.                         if (flag1) {
  732.                             b3 = 1;
  733.                         }
  734.  
  735.                         int i5 = j1 - l4 * 8 - 9;
  736.                         this.drawTexturedModalRect(i5, j7, b2 + b3 * 9, 9, 9, 9);
  737.  
  738.                         if (l4 * 2 + 1 + j4 < l7) {
  739.                             this.drawTexturedModalRect(i5, j7, b2 + 36, 9, 9, 9);
  740.                         }
  741.  
  742.                         if (l4 * 2 + 1 + j4 == l7) {
  743.                             this.drawTexturedModalRect(i5, j7, b2 + 45, 9, 9, 9);
  744.                         }
  745.                     }
  746.  
  747.                     j7 -= 10;
  748.                 }
  749.             }
  750.  
  751.             this.mc.mcProfiler.endStartSection("air");
  752.  
  753.             if (entityplayer.isInsideOfMaterial(Material.water)) {
  754.                 int i6 = this.mc.thePlayer.getAir();
  755.                 int j8 = MathHelper.ceiling_double_int((double) (i6 - 2) * 10.0D / 300.0D);
  756.                 int k6 = MathHelper.ceiling_double_int((double) i6 * 10.0D / 300.0D) - j8;
  757.  
  758.                 for (int i7 = 0; i7 < j8 + k6; ++i7) {
  759.                     if (i7 < j8) {
  760.                         this.drawTexturedModalRect(j1 - i7 * 8 - 9, j2, 16, 18, 9, 9);
  761.                     } else {
  762.                         this.drawTexturedModalRect(j1 - i7 * 8 - 9, j2, 25, 18, 9, 9);
  763.                     }
  764.                 }
  765.             }
  766.  
  767.             this.mc.mcProfiler.endSection();
  768.         }
  769.     }
  770.  
  771.     /**
  772.      * Renders dragon's (boss) health on the HUD
  773.      */
  774.     private void renderBossHealth() {
  775.         if (BossStatus.bossName != null && BossStatus.statusBarTime > 0) {
  776.             --BossStatus.statusBarTime;
  777.             FontRenderer fontrenderer = this.mc.fontRendererObj;
  778.             ScaledResolution scaledresolution = new ScaledResolution(this.mc);
  779.             int i = scaledresolution.getScaledWidth();
  780.             short short1 = 182;
  781.             int j = i / 2 - short1 / 2;
  782.             int k = (int) (BossStatus.healthScale * (float) (short1 + 1));
  783.             byte b0 = 12;
  784.             this.drawTexturedModalRect(j, b0, 0, 74, short1, 5);
  785.             this.drawTexturedModalRect(j, b0, 0, 74, short1, 5);
  786.  
  787.             if (k > 0) {
  788.                 this.drawTexturedModalRect(j, b0, 0, 79, k, 5);
  789.             }
  790.  
  791.             String s = BossStatus.bossName;
  792.             int l = 16777215;
  793.  
  794.             if (Config.isCustomColors()) {
  795.                 l = CustomColors.getBossTextColor(l);
  796.             }
  797.  
  798.             this.getFontRenderer().drawStringWithShadow(s, (float) (i / 2 - this.getFontRenderer().getStringWidth(s) / 2), (float) (b0 - 10), l);
  799.             GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
  800.             this.mc.getTextureManager().bindTexture(icons);
  801.         }
  802.     }
  803.  
  804.     private void renderPumpkinOverlay(ScaledResolution p_180476_1_) {
  805.         GlStateManager.disableDepth();
  806.         GlStateManager.depthMask(false);
  807.         GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
  808.         GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
  809.         GlStateManager.disableAlpha();
  810.         this.mc.getTextureManager().bindTexture(pumpkinBlurTexPath);
  811.         Tessellator tessellator = Tessellator.getInstance();
  812.         WorldRenderer worldrenderer = tessellator.getWorldRenderer();
  813.         worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX);
  814.         worldrenderer.pos(0.0D, p_180476_1_.getScaledHeight(), -90.0D).tex(0.0D, 1.0D).endVertex();
  815.         worldrenderer.pos(p_180476_1_.getScaledWidth(), p_180476_1_.getScaledHeight(), -90.0D).tex(1.0D, 1.0D).endVertex();
  816.         worldrenderer.pos(p_180476_1_.getScaledWidth(), 0.0D, -90.0D).tex(1.0D, 0.0D).endVertex();
  817.         worldrenderer.pos(0.0D, 0.0D, -90.0D).tex(0.0D, 0.0D).endVertex();
  818.         tessellator.draw();
  819.         GlStateManager.depthMask(true);
  820.         GlStateManager.enableDepth();
  821.         GlStateManager.enableAlpha();
  822.         GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
  823.     }
  824.  
  825.     /**
  826.      * Renders a Vignette arount the entire screen that changes with light level.
  827.      */
  828.     private void renderVignette(float p_180480_1_, ScaledResolution p_180480_2_) {
  829.         if (!Config.isVignetteEnabled()) {
  830.             GlStateManager.enableDepth();
  831.             GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
  832.         } else {
  833.             p_180480_1_ = 1.0F - p_180480_1_;
  834.             p_180480_1_ = MathHelper.clamp_float(p_180480_1_, 0.0F, 1.0F);
  835.             WorldBorder worldborder = this.mc.theWorld.getWorldBorder();
  836.             float f = (float) worldborder.getClosestDistance(this.mc.thePlayer);
  837.             double d0 = Math.min(worldborder.getResizeSpeed() * (double) worldborder.getWarningTime() * 1000.0D, Math.abs(worldborder.getTargetSize() - worldborder.getDiameter()));
  838.             double d1 = Math.max(worldborder.getWarningDistance(), d0);
  839.  
  840.             if ((double) f < d1) {
  841.                 f = 1.0F - (float) ((double) f / d1);
  842.             } else {
  843.                 f = 0.0F;
  844.             }
  845.  
  846.             this.prevVignetteBrightness = (float) ((double) this.prevVignetteBrightness + (double) (p_180480_1_ - this.prevVignetteBrightness) * 0.01D);
  847.             GlStateManager.disableDepth();
  848.             GlStateManager.depthMask(false);
  849.             GlStateManager.tryBlendFuncSeparate(0, 769, 1, 0);
  850.  
  851.             if (f > 0.0F) {
  852.                 GlStateManager.color(0.0F, f, f, 1.0F);
  853.             } else {
  854.                 GlStateManager.color(this.prevVignetteBrightness, this.prevVignetteBrightness, this.prevVignetteBrightness, 1.0F);
  855.             }
  856.  
  857.             this.mc.getTextureManager().bindTexture(vignetteTexPath);
  858.             Tessellator tessellator = Tessellator.getInstance();
  859.             WorldRenderer worldrenderer = tessellator.getWorldRenderer();
  860.             worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX);
  861.             worldrenderer.pos(0.0D, p_180480_2_.getScaledHeight(), -90.0D).tex(0.0D, 1.0D).endVertex();
  862.             worldrenderer.pos(p_180480_2_.getScaledWidth(), p_180480_2_.getScaledHeight(), -90.0D).tex(1.0D, 1.0D).endVertex();
  863.             worldrenderer.pos(p_180480_2_.getScaledWidth(), 0.0D, -90.0D).tex(1.0D, 0.0D).endVertex();
  864.             worldrenderer.pos(0.0D, 0.0D, -90.0D).tex(0.0D, 0.0D).endVertex();
  865.             tessellator.draw();
  866.             GlStateManager.depthMask(true);
  867.             GlStateManager.enableDepth();
  868.             GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
  869.             GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
  870.         }
  871.     }
  872.  
  873.     private void func_180474_b(float p_180474_1_, ScaledResolution p_180474_2_) {
  874.         if (p_180474_1_ < 1.0F) {
  875.             p_180474_1_ = p_180474_1_ * p_180474_1_;
  876.             p_180474_1_ = p_180474_1_ * p_180474_1_;
  877.             p_180474_1_ = p_180474_1_ * 0.8F + 0.2F;
  878.         }
  879.  
  880.         GlStateManager.disableAlpha();
  881.         GlStateManager.disableDepth();
  882.         GlStateManager.depthMask(false);
  883.         GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
  884.         GlStateManager.color(1.0F, 1.0F, 1.0F, p_180474_1_);
  885.         this.mc.getTextureManager().bindTexture(TextureMap.locationBlocksTexture);
  886.         TextureAtlasSprite textureatlassprite = this.mc.getBlockRendererDispatcher().getBlockModelShapes().getTexture(Blocks.portal.getDefaultState());
  887.         float f = textureatlassprite.getMinU();
  888.         float f1 = textureatlassprite.getMinV();
  889.         float f2 = textureatlassprite.getMaxU();
  890.         float f3 = textureatlassprite.getMaxV();
  891.         Tessellator tessellator = Tessellator.getInstance();
  892.         WorldRenderer worldrenderer = tessellator.getWorldRenderer();
  893.         worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX);
  894.         worldrenderer.pos(0.0D, p_180474_2_.getScaledHeight(), -90.0D).tex(f, f3).endVertex();
  895.         worldrenderer.pos(p_180474_2_.getScaledWidth(), p_180474_2_.getScaledHeight(), -90.0D).tex(f2, f3).endVertex();
  896.         worldrenderer.pos(p_180474_2_.getScaledWidth(), 0.0D, -90.0D).tex(f2, f1).endVertex();
  897.         worldrenderer.pos(0.0D, 0.0D, -90.0D).tex(f, f1).endVertex();
  898.         tessellator.draw();
  899.         GlStateManager.depthMask(true);
  900.         GlStateManager.enableDepth();
  901.         GlStateManager.enableAlpha();
  902.         GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
  903.     }
  904.  
  905.     private void renderHotbarItem(int index, int xPos, int yPos, float partialTicks, EntityPlayer p_175184_5_) {
  906.         ItemStack itemstack = p_175184_5_.inventory.mainInventory[index];
  907.  
  908.         if (itemstack != null) {
  909.             float f = (float) itemstack.animationsToGo - partialTicks;
  910.  
  911.             if (f > 0.0F) {
  912.                 GlStateManager.pushMatrix();
  913.                 float f1 = 1.0F + f / 5.0F;
  914.                 GlStateManager.translate((float) (xPos + 8), (float) (yPos + 12), 0.0F);
  915.                 GlStateManager.scale(1.0F / f1, (f1 + 1.0F) / 2.0F, 1.0F);
  916.                 GlStateManager.translate((float) (-(xPos + 8)), (float) (-(yPos + 12)), 0.0F);
  917.             }
  918.  
  919.             this.itemRenderer.renderItemAndEffectIntoGUI(itemstack, xPos, yPos);
  920.  
  921.             if (f > 0.0F) {
  922.                 GlStateManager.popMatrix();
  923.             }
  924.  
  925.             this.itemRenderer.renderItemOverlays(this.mc.fontRendererObj, itemstack, xPos, yPos);
  926.         }
  927.     }
  928.  
  929.     /**
  930.      * The update tick for the ingame UI
  931.      */
  932.     public void updateTick() {
  933.         if (this.recordPlayingUpFor > 0) {
  934.             --this.recordPlayingUpFor;
  935.         }
  936.  
  937.         if (this.field_175195_w > 0) {
  938.             --this.field_175195_w;
  939.  
  940.             if (this.field_175195_w <= 0) {
  941.                 this.field_175201_x = "";
  942.                 this.field_175200_y = "";
  943.             }
  944.         }
  945.  
  946.         ++this.updateCounter;
  947.         this.streamIndicator.func_152439_a();
  948.  
  949.         if (this.mc.thePlayer != null) {
  950.             ItemStack itemstack = this.mc.thePlayer.inventory.getCurrentItem();
  951.  
  952.             if (itemstack == null) {
  953.                 this.remainingHighlightTicks = 0;
  954.             } else if (this.highlightingItemStack != null && itemstack.getItem() == this.highlightingItemStack.getItem() && ItemStack.areItemStackTagsEqual(itemstack, this.highlightingItemStack) && (itemstack.isItemStackDamageable() || itemstack.getMetadata() == this.highlightingItemStack.getMetadata())) {
  955.                 if (this.remainingHighlightTicks > 0) {
  956.                     --this.remainingHighlightTicks;
  957.                 }
  958.             } else {
  959.                 this.remainingHighlightTicks = 40;
  960.             }
  961.  
  962.             this.highlightingItemStack = itemstack;
  963.         }
  964.     }
  965.  
  966.     public void setRecordPlayingMessage(String p_73833_1_) {
  967.         this.setRecordPlaying(I18n.format("record.nowPlaying", p_73833_1_), true);
  968.     }
  969.  
  970.     public void setRecordPlaying(String p_110326_1_, boolean p_110326_2_) {
  971.         this.recordPlaying = p_110326_1_;
  972.         this.recordPlayingUpFor = 60;
  973.         this.recordIsPlaying = p_110326_2_;
  974.     }
  975.  
  976.     public void displayTitle(String p_175178_1_, String p_175178_2_, int p_175178_3_, int p_175178_4_, int p_175178_5_) {
  977.         if (p_175178_1_ == null && p_175178_2_ == null && p_175178_3_ < 0 && p_175178_4_ < 0 && p_175178_5_ < 0) {
  978.             this.field_175201_x = "";
  979.             this.field_175200_y = "";
  980.             this.field_175195_w = 0;
  981.         } else if (p_175178_1_ != null) {
  982.             this.field_175201_x = p_175178_1_;
  983.             this.field_175195_w = this.field_175199_z + this.field_175192_A + this.field_175193_B;
  984.         } else if (p_175178_2_ != null) {
  985.             this.field_175200_y = p_175178_2_;
  986.         } else {
  987.             if (p_175178_3_ >= 0) {
  988.                 this.field_175199_z = p_175178_3_;
  989.             }
  990.  
  991.             if (p_175178_4_ >= 0) {
  992.                 this.field_175192_A = p_175178_4_;
  993.             }
  994.  
  995.             if (p_175178_5_ >= 0) {
  996.                 this.field_175193_B = p_175178_5_;
  997.             }
  998.  
  999.             if (this.field_175195_w > 0) {
  1000.                 this.field_175195_w = this.field_175199_z + this.field_175192_A + this.field_175193_B;
  1001.             }
  1002.         }
  1003.     }
  1004.  
  1005.     public void setRecordPlaying(IChatComponent p_175188_1_, boolean p_175188_2_) {
  1006.         this.setRecordPlaying(p_175188_1_.getUnformattedText(), p_175188_2_);
  1007.     }
  1008.  
  1009.     /**
  1010.      * returns a pointer to the persistant Chat GUI, containing all previous chat messages and such
  1011.      */
  1012.     public GuiNewChat getChatGUI() {
  1013.         return this.persistantChatGUI;
  1014.     }
  1015.  
  1016.     public int getUpdateCounter() {
  1017.         return this.updateCounter;
  1018.     }
  1019.  
  1020.     public FontRenderer getFontRenderer() {
  1021.         return this.mc.fontRendererObj;
  1022.     }
  1023.  
  1024.     public GuiSpectator getSpectatorGui() {
  1025.         return this.spectatorGui;
  1026.     }
  1027.  
  1028.     public GuiPlayerTabOverlay getTabList() {
  1029.         return this.overlayPlayerList;
  1030.     }
  1031.  
  1032.     public void func_181029_i() {
  1033.         this.overlayPlayerList.func_181030_a();
  1034.     }
  1035. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement