Advertisement
clem73

pbl couleur

Feb 20th, 2017
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 50.45 KB | None | 0 0
  1. package net.minecraft.client.gui;
  2.  
  3. import java.awt.Color;
  4. import java.util.Collection;
  5. import java.util.Iterator;
  6. import java.util.List;
  7. import java.util.Random;
  8. import net.minecraft.block.material.Material;
  9. import net.minecraft.client.Minecraft;
  10. import net.minecraft.client.network.NetHandlerPlayClient;
  11. import net.minecraft.client.renderer.OpenGlHelper;
  12. import net.minecraft.client.renderer.RenderHelper;
  13. import net.minecraft.client.renderer.Tessellator;
  14. import net.minecraft.client.renderer.entity.RenderItem;
  15. import net.minecraft.client.renderer.texture.TextureMap;
  16. import net.minecraft.client.resources.I18n;
  17. import net.minecraft.entity.Entity;
  18. import net.minecraft.entity.EntityLivingBase;
  19. import net.minecraft.entity.SharedMonsterAttributes;
  20. import net.minecraft.entity.ai.attributes.IAttributeInstance;
  21. import net.minecraft.entity.boss.BossStatus;
  22. import net.minecraft.entity.player.InventoryPlayer;
  23. import net.minecraft.init.Blocks;
  24. import net.minecraft.init.Items;
  25. import net.minecraft.item.Item;
  26. import net.minecraft.item.ItemArmor;
  27. import net.minecraft.item.ItemStack;
  28. import net.minecraft.potion.Potion;
  29. import net.minecraft.potion.PotionEffect;
  30. import net.minecraft.scoreboard.Score;
  31. import net.minecraft.scoreboard.ScoreObjective;
  32. import net.minecraft.scoreboard.ScorePlayerTeam;
  33. import net.minecraft.scoreboard.Scoreboard;
  34. import net.minecraft.util.Direction;
  35. import net.minecraft.util.EnumChatFormatting;
  36. import net.minecraft.util.FoodStats;
  37. import net.minecraft.util.IIcon;
  38. import net.minecraft.util.MathHelper;
  39. import net.minecraft.util.ResourceLocation;
  40. import net.minecraft.util.StringUtils;
  41. import net.minecraft.world.EnumSkyBlock;
  42. import net.minecraft.world.chunk.Chunk;
  43. import org.lwjgl.opengl.GL11;
  44. import org.lwjgl.opengl.GL12;
  45.  
  46. public class GuiIngame extends Gui
  47. {
  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.     protected static final ResourceLocation inventory = new ResourceLocation("textures/gui/container/inventory.png");
  52.     private static final RenderItem itemRenderer = new RenderItem();
  53.     private final Random rand = new Random();
  54.     private final Minecraft mc;
  55.    
  56.     private static long lastInfo = System.currentTimeMillis();
  57.     private static int last = 0;
  58.  
  59.     /** ChatGUI instance that retains all previous chat data */
  60.     private final GuiNewChat persistantChatGUI;
  61.     private final GuiStreamIndicator field_152127_m;
  62.     private int updateCounter;
  63.  
  64.     /** The string specifying which record music is playing */
  65.     private String recordPlaying = "";
  66.  
  67.     /** How many ticks the record playing message will be displayed */
  68.     private int recordPlayingUpFor;
  69.     private boolean recordIsPlaying;
  70.  
  71.     /** Previous frame vignette brightness (slowly changes by 1% each frame) */
  72.     public float prevVignetteBrightness = 1.0F;
  73.  
  74.    
  75.    
  76.    
  77.   //Fixoria
  78.   //clear lagg
  79.     private String displayedCenterMessage = null;
  80.     private int centerMessageTimer = 0;
  81.     public void showCenterMessage(String formattedText)
  82.     {
  83.         displayedCenterMessage = formattedText;
  84.         centerMessageTimer = 3 * 20;
  85.         }
  86.   //clear lagg
  87.    
  88.   //clear lagg1
  89.  
  90.    
  91.     private String DisplayedClearLaggTemps = null;
  92.     private int ClearLaggTempsTimer = 0;
  93.     public void ShowClearLaggtemps(String formattedText)
  94.     {
  95.         DisplayedClearLaggTemps = formattedText;
  96.         ClearLaggTempsTimer = 99999 * 20;
  97.         }
  98.    
  99.   //clear lagg1
  100.    
  101.   //combat
  102.  
  103.     private String DisplayedCombat = null;
  104.     private int CombatTimer = 0;
  105.     public void ShowCombat(String formattedText)
  106.     {
  107.         DisplayedCombat = formattedText;
  108.         CombatTimer = 99999 * 20;
  109.         }
  110.    
  111.   //combat
  112.    
  113.   //claim
  114.  
  115.     private String DisplayedClaim = null;
  116.     private int ClaimTimer = 0;
  117.     public void ShowClaim(String formattedText)
  118.     {
  119.         DisplayedClaim = formattedText;
  120.         ClaimTimer = 99999 * 20;
  121.         }
  122.    
  123.   //claim
  124.  
  125.   //Fixoria
  126.    
  127.    
  128.    
  129.     /** Remaining ticks the item highlight should be visible */
  130.     private int remainingHighlightTicks;
  131.  
  132.     /** The ItemStack that is currently being highlighted */
  133.     private ItemStack highlightingItemStack;
  134.     private static final String __OBFID = "CL_00000661";
  135.  
  136.     public GuiIngame(Minecraft p_i46379_1_)
  137.     {
  138.         this.mc = p_i46379_1_;
  139.         this.persistantChatGUI = new GuiNewChat(p_i46379_1_);
  140.         this.field_152127_m = new GuiStreamIndicator(this.mc);
  141.     }
  142.  
  143.     //*fixoria*//
  144.     private void drawItemInToScreen(ItemStack is, int x, int y, float par3, boolean overlay) // On demande au jeu d'afficher l'item sur l'écran
  145.     {
  146.         if (is != null)
  147.         {
  148.             float an = (float)is.animationsToGo - par3; //On lui dit d'effectuer toute animation par rapport à l'item
  149.             if (an > 0.0F)
  150.             {
  151.                 GL11.glPushMatrix();
  152.                 float dec = 1.0F + an / 5.0F;
  153.                 GL11.glTranslatef((float)(x + 8), (float)(y + 12), 0.0F);
  154.                 GL11.glScalef(1.0F / dec, (dec + 1.0F) / 2.0F, 1.0F);
  155.                 GL11.glTranslatef((float)(-(x + 8)), (float)(-(y + 12)), 0.0F);
  156.             }
  157.             itemRenderer.renderItemAndEffectIntoGUI(this.mc.fontRenderer, this.mc.getTextureManager(), is, x, y); //On lui dit de prendre la texture de l'item et de l'afficher sur l'écran
  158.             if (an > 0.0F)
  159.                 GL11.glPopMatrix();
  160.         }
  161.     }
  162.    
  163.    
  164.    
  165.     //*fixoria*//
  166.    
  167.     public void renderGameOverlay(float p_73830_1_, boolean p_73830_2_, int p_73830_3_, int p_73830_4_)
  168.     {
  169.        
  170.        
  171.         ScaledResolution var5 = new ScaledResolution(this.mc, this.mc.displayWidth, this.mc.displayHeight);
  172.         int var6 = var5.getScaledWidth();
  173.         int var7 = var5.getScaledHeight();
  174.         FontRenderer var8 = this.mc.fontRenderer;
  175.         this.mc.entityRenderer.setupOverlayRendering();
  176.         GL11.glEnable(GL11.GL_BLEND);
  177.  
  178.        
  179.        
  180.         if (Minecraft.isFancyGraphicsEnabled())
  181.         {
  182.             this.renderVignette(this.mc.thePlayer.getBrightness(p_73830_1_), var6, var7);
  183.         }
  184.         else
  185.         {
  186.             OpenGlHelper.glBlendFunc(770, 771, 1, 0);
  187.         }
  188.  
  189.         ItemStack var9 = this.mc.thePlayer.inventory.armorItemInSlot(3);
  190.  
  191.         if (this.mc.gameSettings.thirdPersonView == 0 && var9 != null && var9.getItem() == Item.getItemFromBlock(Blocks.pumpkin))
  192.         {
  193.             this.renderPumpkinBlur(var6, var7);
  194.         }
  195.  
  196.         if (!this.mc.thePlayer.isPotionActive(Potion.confusion))
  197.         {
  198.             float var10 = this.mc.thePlayer.prevTimeInPortal + (this.mc.thePlayer.timeInPortal - this.mc.thePlayer.prevTimeInPortal) * p_73830_1_;
  199.  
  200.             if (var10 > 0.0F)
  201.             {
  202.                 this.func_130015_b(var10, var6, var7);
  203.             }
  204.         }
  205.  
  206.         int var11;
  207.         int var12;
  208.         int var13;
  209.         //*fixoria*//
  210.        
  211.         int var1 = 0;
  212.         int var2 = 0;
  213.         int ph2 = 22;
  214.         Collection ph1 = this.mc.thePlayer.getActivePotionEffects();
  215.  
  216.             if (ph1.size() > 15)
  217.             {
  218.                 ph2 = 132 / (ph1.size() - 1);
  219.             }
  220.             for (Iterator ph3 = this.mc.thePlayer.getActivePotionEffects().iterator(); ph3.hasNext(); var2 += ph2)
  221.             {
  222.                 PotionEffect ph4 = (PotionEffect)ph3.next();
  223.                 Potion ph5 = Potion.potionTypes[ph4.getPotionID()];
  224.                 GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
  225.                 this.mc.getTextureManager().bindTexture(inventory);
  226.                 if (ph5.hasStatusIcon())
  227.                 {
  228.                     int ph6 = ph5.getStatusIconIndex();
  229.                     this.drawTexturedModalRect(var1 + var6 - 20, var2 + 23, 0 + ph6 % 8 * 18, 198 + ph6 / 8 * 18, 18, 18);
  230.                 }
  231.                 String ph7 = I18n.format(ph5.getName(), new Object[0]);
  232.                 if (ph4.getAmplifier() == 1)
  233.                 {
  234.                     ph7 = ph7 + " II" ;
  235.                 }
  236.                 else if (ph4.getAmplifier() == 2)
  237.                 {
  238.                     ph7 = ph7 + " III";
  239.                 }
  240.                 else if (ph4.getAmplifier() == 3)
  241.                 {
  242.                     ph7 = ph7 + " IV";
  243.                 }
  244.                 this.drawString(var8, ph7, var6 - var8.getStringWidth(ph7) - 20,  var2 + 22, 14737632);
  245.  
  246.                 this.mc.fontRenderer.drawStringWithShadow(Potion.getDurationString(ph4), var1 + var6 - 20 - 10 - 18, var2 + 22 + 10, 8355711);
  247.             }
  248.         //*fixoria*//
  249.        
  250.  
  251.             if (!this.mc.playerController.enableEverythingIsScrewedUpMode())
  252.             {
  253.                    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
  254.                    this.mc.getTextureManager().bindTexture(widgetsTexPath);
  255.                    InventoryPlayer var31 = this.mc.thePlayer.inventory;
  256.                    this.zLevel = -90.0F;
  257.                    this.drawTexturedModalRect(var6 / 2 - 91, var7 - 22, 0, 0, 182, 22);
  258.                    this.drawTexturedModalRect(var6 / 2 - 91 - 1 + var31.currentItem * 20, var7 - 22 - 1, 0, 22, 24, 22);
  259.                    this.mc.getTextureManager().bindTexture(icons);
  260.                    GL11.glEnable(GL11.GL_BLEND);
  261.                    OpenGlHelper.glBlendFunc(775, 769, 1, 0);
  262.                    this.drawTexturedModalRect(var6 / 2 - 7, var7 / 2 - 7, 0, 0, 16, 16);
  263.                    OpenGlHelper.glBlendFunc(770, 771, 1, 0);
  264.                    this.mc.mcProfiler.startSection("bossHealth");
  265.                    this.renderBossHealth();
  266.                    this.mc.mcProfiler.endSection();
  267.  
  268.                    if (this.mc.playerController.shouldDrawHUD())
  269.                    {
  270.                        this.func_110327_a(var6, var7);
  271.                    }
  272.  
  273.                    this.mc.mcProfiler.startSection("actionBar");
  274.                    GL11.glEnable(GL12.GL_RESCALE_NORMAL);
  275.                    RenderHelper.enableGUIStandardItemLighting();
  276.  
  277.                    for (var11 = 0; var11 < 9; ++var11)
  278.                    {
  279.                        var12 = var6 / 2 - 90 + var11 * 20 + 2;
  280.                        var13 = var7 - 16 - 3;
  281.                        this.renderInventorySlot(var11, var12, var13, p_73830_1_);
  282.                    }
  283.                 ItemStack is;
  284.               //render itemArmor
  285.                 for (int i = 0; i < 4; ++i)
  286.                 {
  287.                      is = this.mc.thePlayer.inventory.armorItemInSlot(4 - i - 1);
  288.                      if (is == null)
  289.                      continue;
  290.                      int nombre = ( 100 * (is.getMaxDamage() - is.getItemDamageForDisplay()) / is.getMaxDamage());
  291.                          drawItemInToScreen(is, 0, i * 17 + 25, p_73830_1_, true);
  292.                          
  293.                          if(nombre > 50){
  294.                              this.mc.fontRenderer.drawString("§2" + nombre + " %", 18, i * 17 + 30, 0);
  295.                          }
  296.                          else if(nombre > 35 && nombre <= 50){
  297.                              this.mc.fontRenderer.drawString("§e" + nombre + " %", 18, i * 17 + 30, 0);
  298.                          }
  299.                          else if(nombre > 15 && nombre <= 35){
  300.                              this.mc.fontRenderer.drawString("§6" + nombre + " %", 18, i * 17 + 30, 0);
  301.                          }
  302.                          else if(nombre > 5 && nombre <= 15){
  303.                              this.mc.fontRenderer.drawString("§c" + nombre + " %", 18, i * 17 + 30, 0);
  304.                          }
  305.                          else if(nombre <= 5){
  306.                              this.mc.fontRenderer.drawString("§4" + nombre + " %", 18, i * 17 + 30, 0);
  307.                          }
  308.                      
  309.                      } 
  310.               //render itemInHand
  311.                 is = this.mc.thePlayer.inventory.getCurrentItem();
  312.                 if (is != null)
  313.                 {
  314.                     Item i = is.getItem();
  315.                     boolean outils = i instanceof Item;
  316.                     if (!i.isItemTool(is) || outils && !(i instanceof ItemArmor))
  317.                     {
  318.                      drawItemInToScreen(is, 0, 1 * 5 + 86, p_73830_1_, false);
  319.                 GL11.glDisable(GL11.GL_BLEND);
  320.                 if(i == Items.diamond_sword || i == Items.diamond_axe ||i == Items.diamond_hoe || i == Items.diamond_pickaxe || i == Items.diamond_shovel){
  321.                     this.mc.fontRenderer.drawString((is.getMaxDamage() - is.getItemDamageForDisplay()) + "", 18, 1 * 5 + 92, 553648127);
  322.                 }
  323.                 else if(i == Items.wooden_axe || i == Items.wooden_axe ||i == Items.wooden_hoe || i == Items.wooden_pickaxe || i == Items.wooden_shovel){
  324.                     this.mc.fontRenderer.drawString((is.getMaxDamage() - is.getItemDamageForDisplay()) + "", 18, 1 * 5 + 92, 553648127);
  325.                 }
  326.                 else if(i == Items.stone_sword || i == Items.stone_axe ||i == Items.stone_hoe || i == Items.stone_pickaxe || i == Items.stone_shovel){
  327.                     this.mc.fontRenderer.drawString((is.getMaxDamage() - is.getItemDamageForDisplay()) + "", 18, 1 * 5 + 92, 553648127);
  328.                 }
  329.                 else if(i == Items.golden_sword || i == Items.golden_axe ||i == Items.golden_hoe || i == Items.golden_pickaxe || i == Items.golden_shovel){
  330.                     this.mc.fontRenderer.drawString((is.getMaxDamage() - is.getItemDamageForDisplay()) + "", 18, 1 * 5 + 92, 553648127);
  331.                 }
  332.                 else if(i == Items.opale_sword || i == Items.opale_axe ||i == Items.opale_hoe || i == Items.opale_pickaxe || i == Items.opale_shovel){
  333.                     this.mc.fontRenderer.drawString((is.getMaxDamage() - is.getItemDamageForDisplay()) + "", 18, 1 * 5 + 92, 553648127);
  334.                 }
  335.                 else if(i == Items.onyx_sword || i == Items.onyx_axe ||i == Items.onyx_hoe || i == Items.onyx_pickaxe || i == Items.onyx_shovel){
  336.                     this.mc.fontRenderer.drawString((is.getMaxDamage() - is.getItemDamageForDisplay()) + "", 18, 1 * 5 + 92, 553648127);
  337.                 }
  338.                 else if(i == Items.grenat_sword || i == Items.grenat_axe ||i == Items.grenat_hoe || i == Items.grenat_pickaxe || i == Items.grenat_shovel){
  339.                     this.mc.fontRenderer.drawString((is.getMaxDamage() - is.getItemDamageForDisplay()) + "", 18, 1 * 5 + 92, 553648127);
  340.                 }
  341.                 else if(i == Items.fixorium_sword || i == Items.fixorium_axe ||i == Items.fixorium_hoe || i == Items.fixorium_pickaxe || i == Items.fixorium_shovel || i == Items.sabre){
  342.                     this.mc.fontRenderer.drawString((is.getMaxDamage() - is.getItemDamageForDisplay()) + "", 18, 1 * 5 + 92, 553648127);
  343.                 }
  344.                     }
  345.                 }
  346.                 RenderHelper.disableStandardItemLighting();
  347.                 GL11.glDisable(GL12.GL_RESCALE_NORMAL);
  348.                 this.mc.mcProfiler.endSection();
  349.                 GL11.glDisable(GL11.GL_BLEND);
  350.                        
  351.    
  352.            
  353.             //Fixoria
  354.             if(this.mc.gameSettings.showDebugInfo){
  355.                 this.mc.fontRenderer.drawString("", 0, 0, 0);
  356.             }
  357.             else {
  358.                 var8.drawStringWithShadow("§6Fixoria V1", 2, 2, 16777215);
  359.                 var8.drawStringWithShadow("§6"+ this.mc.debug, 8, 12, 16777215);
  360.                 }
  361.            
  362.             }
  363.            
  364.             //clear lagg
  365.             if(this.mc.gameSettings.showDebugInfo){
  366.                 this.mc.fontRenderer.drawString("", 0, 0, 0);
  367.             }
  368.             else {
  369.                 if (displayedCenterMessage != null)
  370.                 {
  371.                     GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
  372.  
  373.                     int alpha = centerMessageTimer < 10 ? ((int) (centerMessageTimer * 25)) : 255;
  374.                    
  375.                     int color = 0xffffff | ((alpha & 255) << 24);
  376.  
  377.                     this.mc.fontRenderer.drawString(displayedCenterMessage, (var6 - this.mc.fontRenderer.getStringWidth(displayedCenterMessage))/ 2, var7 /4, color);
  378.                 }
  379.                 //clear lagg
  380.            
  381.                 //clear lagg1
  382.                 if (DisplayedClearLaggTemps != null)
  383.                 {
  384.                     GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
  385.  
  386.                     int alpha = ClearLaggTempsTimer < 10 ? ((int) (ClearLaggTempsTimer * 25)) : 255;
  387.  
  388.                     int color = 0xffffff | ((alpha & 255) << 24);
  389.  
  390.                     this.mc.fontRenderer.drawString(DisplayedClearLaggTemps, (var6 - this.mc.fontRenderer.getStringWidth(DisplayedClearLaggTemps)), var7 - 22, color);
  391.                 }
  392.                 //clear lagg1
  393.            
  394.                 //Combat
  395.                 if (DisplayedCombat != null)
  396.                 {
  397.                     GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
  398.  
  399.                     int alpha = CombatTimer < 10 ? ((int) (CombatTimer * 25)) : 255;
  400.  
  401.                     int color = 0xffffff | ((alpha & 255) << 24);
  402.  
  403.                     this.drawString(var8, DisplayedCombat, var6 - var8.getStringWidth(DisplayedCombat) - 2, 2, 14737632);
  404.                 }
  405.                 //Combat
  406.            
  407.                 //Claim
  408.                 if (DisplayedClaim != null)
  409.                 {
  410.                     GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
  411.  
  412.                     int alpha = ClaimTimer < 10 ? ((int) (ClaimTimer * 25)) : 255;
  413.  
  414.                     int color = 0xffffff | ((alpha & 255) << 24);
  415.  
  416.                     this.drawString(var8, DisplayedClaim, var6 - var8.getStringWidth(DisplayedClaim) - 2, 14, 14737632);
  417.                 }
  418.            
  419.    
  420.        
  421.                 //Claim
  422.                
  423.                
  424.                 //Fixoria
  425.            
  426.            
  427.            
  428.            
  429.         }
  430.  
  431.         int var32;
  432.  
  433.         if (this.mc.thePlayer.getSleepTimer() > 0)
  434.         {
  435.             this.mc.mcProfiler.startSection("sleep");
  436.             GL11.glDisable(GL11.GL_DEPTH_TEST);
  437.             GL11.glDisable(GL11.GL_ALPHA_TEST);
  438.             var32 = this.mc.thePlayer.getSleepTimer();
  439.             float var33 = (float)var32 / 100.0F;
  440.  
  441.             if (var33 > 1.0F)
  442.             {
  443.                 var33 = 1.0F - (float)(var32 - 100) / 10.0F;
  444.             }
  445.  
  446.             var12 = (int)(220.0F * var33) << 24 | 1052704;
  447.             drawRect(0, 0, var6, var7, var12);
  448.             GL11.glEnable(GL11.GL_ALPHA_TEST);
  449.             GL11.glEnable(GL11.GL_DEPTH_TEST);
  450.             this.mc.mcProfiler.endSection();
  451.         }
  452.  
  453.         var32 = 16777215;
  454.         GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
  455.         var11 = var6 / 2 - 91;
  456.         int var14;
  457.         int var15;
  458.         int var16;
  459.         int var17;
  460.         float var34;
  461.         short var38;
  462.  
  463.         if (this.mc.thePlayer.isRidingHorse())
  464.         {
  465.             this.mc.mcProfiler.startSection("jumpBar");
  466.             this.mc.getTextureManager().bindTexture(Gui.icons);
  467.             var34 = this.mc.thePlayer.getHorseJumpPower();
  468.             var38 = 182;
  469.             var14 = (int)(var34 * (float)(var38 + 1));
  470.             var15 = var7 - 32 + 3;
  471.             this.drawTexturedModalRect(var11, var15, 0, 84, var38, 5);
  472.  
  473.             if (var14 > 0)
  474.             {
  475.                 this.drawTexturedModalRect(var11, var15, 0, 89, var14, 5);
  476.             }
  477.  
  478.             this.mc.mcProfiler.endSection();
  479.         }
  480.         else if (this.mc.playerController.gameIsSurvivalOrAdventure())
  481.         {
  482.             this.mc.mcProfiler.startSection("expBar");
  483.             this.mc.getTextureManager().bindTexture(Gui.icons);
  484.             var12 = this.mc.thePlayer.xpBarCap();
  485.  
  486.             if (var12 > 0)
  487.             {
  488.                 var38 = 182;
  489.                 var14 = (int)(this.mc.thePlayer.experience * (float)(var38 + 1));
  490.                 var15 = var7 - 32 + 3;
  491.                 this.drawTexturedModalRect(var11, var15, 0, 64, var38, 5);
  492.  
  493.                 if (var14 > 0)
  494.                 {
  495.                     this.drawTexturedModalRect(var11, var15, 0, 69, var14, 5);
  496.                 }
  497.             }
  498.  
  499.             this.mc.mcProfiler.endSection();
  500.  
  501.             if (this.mc.thePlayer.experienceLevel > 0)
  502.             {
  503.                 this.mc.mcProfiler.startSection("expLevel");
  504.                 boolean var39 = false;
  505.                 var14 = var39 ? 16777215 : 8453920;
  506.                 String var43 = "" + this.mc.thePlayer.experienceLevel;
  507.                 var16 = (var6 - var8.getStringWidth(var43)) / 2;
  508.                 var17 = var7 - 31 - 4;
  509.                 boolean var18 = false;
  510.                 var8.drawString(var43, var16 + 1, var17, 0);
  511.                 var8.drawString(var43, var16 - 1, var17, 0);
  512.                 var8.drawString(var43, var16, var17 + 1, 0);
  513.                 var8.drawString(var43, var16, var17 - 1, 0);
  514.                 var8.drawString(var43, var16, var17, var14);
  515.                 this.mc.mcProfiler.endSection();
  516.             }
  517.         }
  518.  
  519.         String var35;
  520.  
  521.         if (this.mc.gameSettings.heldItemTooltips)
  522.         {
  523.             this.mc.mcProfiler.startSection("toolHighlight");
  524.  
  525.             if (this.remainingHighlightTicks > 0 && this.highlightingItemStack != null)
  526.             {
  527.                 var35 = this.highlightingItemStack.getDisplayName();
  528.                 var13 = (var6 - var8.getStringWidth(var35)) / 2;
  529.                 var14 = var7 - 59;
  530.  
  531.                 if (!this.mc.playerController.shouldDrawHUD())
  532.                 {
  533.                     var14 += 14;
  534.                 }
  535.  
  536.                 var15 = (int)((float)this.remainingHighlightTicks * 256.0F / 10.0F);
  537.  
  538.                 if (var15 > 255)
  539.                 {
  540.                     var15 = 255;
  541.                 }
  542.  
  543.                 if (var15 > 0)
  544.                 {
  545.                     GL11.glPushMatrix();
  546.                     GL11.glEnable(GL11.GL_BLEND);
  547.                     OpenGlHelper.glBlendFunc(770, 771, 1, 0);
  548.                     var8.drawStringWithShadow(var35, var13, var14, 16777215 + (var15 << 24));
  549.                     GL11.glDisable(GL11.GL_BLEND);
  550.                     GL11.glPopMatrix();
  551.                 }
  552.             }
  553.  
  554.             this.mc.mcProfiler.endSection();
  555.         }
  556.  
  557.         if (this.mc.isDemo())
  558.         {
  559.             this.mc.mcProfiler.startSection("demo");
  560.             var35 = "";
  561.  
  562.             if (this.mc.theWorld.getTotalWorldTime() >= 120500L)
  563.             {
  564.                 var35 = I18n.format("demo.demoExpired", new Object[0]);
  565.             }
  566.             else
  567.             {
  568.                 var35 = I18n.format("demo.remainingTime", new Object[] {StringUtils.ticksToElapsedTime((int)(120500L - this.mc.theWorld.getTotalWorldTime()))});
  569.             }
  570.  
  571.             var13 = var8.getStringWidth(var35);
  572.             var8.drawStringWithShadow(var35, var6 - var13 - 10, 5, 16777215);
  573.             this.mc.mcProfiler.endSection();
  574.         }
  575.  
  576.         int var21;
  577.         int var22;
  578.         int var23;
  579.  
  580.         if (this.mc.gameSettings.showDebugInfo)
  581.         {
  582.             this.mc.mcProfiler.startSection("debug");
  583.             GL11.glPushMatrix();
  584.             var8.drawStringWithShadow("§6Fixoria V1 " + this.mc.debug, 2, 2, 16777215);
  585.             long var36 = Runtime.getRuntime().maxMemory();
  586.             long var41 = Runtime.getRuntime().totalMemory();
  587.             long var44 = Runtime.getRuntime().freeMemory();
  588.             long var45 = var41 - var44;
  589.             String var20 = "§6Mémoire§e: §6" + var45 * 100L / var36 + "% §e[§6" + var45 / 1024L / 1024L + "§e/§6" + var36 / 1024L / 1024L + "MB§e]";
  590.             var21 = 14737632;
  591.             this.drawString(var8, var20, var6 - var8.getStringWidth(var20) - 2, 2, 14737632);
  592.             var22 = MathHelper.floor_double(this.mc.thePlayer.posX);
  593.             var23 = MathHelper.floor_double(this.mc.thePlayer.posY);
  594.             int var24 = MathHelper.floor_double(this.mc.thePlayer.posZ);
  595.             this.drawString(var8, String.format("§6X§e: §6%.0f", new Object[] {Double.valueOf(this.mc.thePlayer.posX), Integer.valueOf(var22), Integer.valueOf(var22 >> 4), Integer.valueOf(var22 & 15)}), 2, 16, 14737632);
  596.             this.drawString(var8, String.format("§6Y§e: §6%.0f", new Object[] {Double.valueOf(this.mc.thePlayer.boundingBox.minY), Double.valueOf(this.mc.thePlayer.posY)}), 2, 28, 14737632);
  597.             this.drawString(var8, String.format("§6Z§e: §6%.0f", new Object[] {Double.valueOf(this.mc.thePlayer.posZ), Integer.valueOf(var24), Integer.valueOf(var24 >> 4), Integer.valueOf(var24 & 15)}), 2, 40, 14737632);
  598.             int var25 = MathHelper.floor_double((double)(this.mc.thePlayer.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
  599.             this.drawString(var8, "§6Direction§e: §6" + Direction.directions[var25], 2, 56, 14737632);
  600.  
  601.             if (this.mc.theWorld != null && this.mc.theWorld.blockExists(var22, var23, var24))
  602.             {
  603.                 Chunk var26 = this.mc.theWorld.getChunkFromBlockCoords(var22, var24);
  604.                 this.drawString(var8, "§6Biome§e: §6" + var26.getBiomeGenForWorldCoords(var22 & 15, var24 & 15, this.mc.theWorld.getWorldChunkManager()).biomeName, 2, 68, 14737632);
  605.             }
  606.  
  607.             if (this.mc.entityRenderer != null && this.mc.entityRenderer.isShaderActive())
  608.             {
  609.                 this.drawString(var8, String.format("shader: %s", new Object[] {this.mc.entityRenderer.getShaderGroup().getShaderGroupName()}), 2, 56, 14737632);
  610.             }
  611.  
  612.             GL11.glPopMatrix();
  613.             this.mc.mcProfiler.endSection();
  614.         }
  615.  
  616.         if (this.recordPlayingUpFor > 0)
  617.         {
  618.             this.mc.mcProfiler.startSection("overlayMessage");
  619.             var34 = (float)this.recordPlayingUpFor - p_73830_1_;
  620.             var13 = (int)(var34 * 255.0F / 20.0F);
  621.  
  622.             if (var13 > 255)
  623.             {
  624.                 var13 = 255;
  625.             }
  626.  
  627.             if (var13 > 8)
  628.             {
  629.                 GL11.glPushMatrix();
  630.                 GL11.glTranslatef((float)(var6 / 2), (float)(var7 - 68), 0.0F);
  631.                 GL11.glEnable(GL11.GL_BLEND);
  632.                 OpenGlHelper.glBlendFunc(770, 771, 1, 0);
  633.                 var14 = 16777215;
  634.  
  635.                 if (this.recordIsPlaying)
  636.                 {
  637.                     var14 = Color.HSBtoRGB(var34 / 50.0F, 0.7F, 0.6F) & 16777215;
  638.                 }
  639.  
  640.                 var8.drawString(this.recordPlaying, -var8.getStringWidth(this.recordPlaying) / 2, -4, var14 + (var13 << 24 & -16777216));
  641.                 GL11.glDisable(GL11.GL_BLEND);
  642.                 GL11.glPopMatrix();
  643.             }
  644.  
  645.             this.mc.mcProfiler.endSection();
  646.         }
  647.  
  648.         ScoreObjective var37 = this.mc.theWorld.getScoreboard().func_96539_a(1);
  649.  
  650.         if (var37 != null)
  651.         {
  652.             this.func_96136_a(var37, var7, var6, var8);
  653.         }
  654.  
  655.         GL11.glEnable(GL11.GL_BLEND);
  656.         OpenGlHelper.glBlendFunc(770, 771, 1, 0);
  657.         GL11.glDisable(GL11.GL_ALPHA_TEST);
  658.         GL11.glPushMatrix();
  659.         GL11.glTranslatef(0.0F, (float)(var7 - 48), 0.0F);
  660.         this.mc.mcProfiler.startSection("chat");
  661.         this.persistantChatGUI.func_146230_a(this.updateCounter);
  662.         this.mc.mcProfiler.endSection();
  663.         GL11.glPopMatrix();
  664.         var37 = this.mc.theWorld.getScoreboard().func_96539_a(0);
  665.  
  666.         if (this.mc.gameSettings.keyBindPlayerList.getIsKeyPressed() && (!this.mc.isIntegratedServerRunning() || this.mc.thePlayer.sendQueue.playerInfoList.size() > 1 || var37 != null))
  667.         {
  668.             this.mc.mcProfiler.startSection("playerList");
  669.             NetHandlerPlayClient var40 = this.mc.thePlayer.sendQueue;
  670.             List var42 = var40.playerInfoList;
  671.             var15 = var40.currentServerMaxPlayers;
  672.             var16 = var15;
  673.  
  674.             for (var17 = 1; var16 > 20; var16 = (var15 + var17 - 1) / var17)
  675.             {
  676.                 ++var17;
  677.             }
  678.  
  679.             int var46 = 300 / var17;
  680.  
  681.             if (var46 > 150)
  682.             {
  683.                 var46 = 150;
  684.             }
  685.  
  686.             int var19 = (var6 - var17 * var46) / 2;
  687.             byte var47 = 10;
  688.             drawRect(var19 - 1, var47 - 1, var19 + var46 * var17, var47 + 9 * var16, Integer.MIN_VALUE);
  689.  
  690.             for (var21 = 0; var21 < var15; ++var21)
  691.             {
  692.                 var22 = var19 + var21 % var17 * var46;
  693.                 var23 = var47 + var21 / var17 * 9;
  694.                 drawRect(var22, var23, var22 + var46 - 1, var23 + 8, 553648127);
  695.                 GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
  696.                 GL11.glEnable(GL11.GL_ALPHA_TEST);
  697.  
  698.                 if (var21 < var42.size())
  699.                 {
  700.                     GuiPlayerInfo var48 = (GuiPlayerInfo)var42.get(var21);
  701.                     ScorePlayerTeam var49 = this.mc.theWorld.getScoreboard().getPlayersTeam(var48.name);
  702.                     String var50 = ScorePlayerTeam.formatPlayerName(var49, var48.name);
  703.                     var8.drawStringWithShadow(var50, var22, var23, 16777215);
  704.  
  705.                     if (var37 != null)
  706.                     {
  707.                         int var27 = var22 + var8.getStringWidth(var50) + 5;
  708.                         int var28 = var22 + var46 - 12 - 5;
  709.  
  710.                         if (var28 - var27 > 5)
  711.                         {
  712.                             Score var29 = var37.getScoreboard().func_96529_a(var48.name, var37);
  713.                             String var30 = EnumChatFormatting.YELLOW + "" + var29.getScorePoints();
  714.                             var8.drawStringWithShadow(var30, var28 - var8.getStringWidth(var30), var23, 16777215);
  715.                         }
  716.                     }
  717.  
  718.                     GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
  719.                     this.mc.getTextureManager().bindTexture(icons);
  720.                     byte var51 = 0;
  721.                     boolean var52 = false;
  722.                     byte var53;
  723.  
  724.                     if (var48.responseTime < 0)
  725.                     {
  726.                         var53 = 5;
  727.                     }
  728.                     else if (var48.responseTime < 150)
  729.                     {
  730.                         var53 = 0;
  731.                     }
  732.                     else if (var48.responseTime < 300)
  733.                     {
  734.                         var53 = 1;
  735.                     }
  736.                     else if (var48.responseTime < 600)
  737.                     {
  738.                         var53 = 2;
  739.                     }
  740.                     else if (var48.responseTime < 1000)
  741.                     {
  742.                         var53 = 3;
  743.                     }
  744.                     else
  745.                     {
  746.                         var53 = 4;
  747.                     }
  748.  
  749.                     this.zLevel += 100.0F;
  750.                     this.drawTexturedModalRect(var22 + var46 - 12, var23, 0 + var51 * 10, 176 + var53 * 8, 10, 8);
  751.                     this.zLevel -= 100.0F;
  752.                 }
  753.             }
  754.         }
  755.  
  756.         GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
  757.         GL11.glDisable(GL11.GL_LIGHTING);
  758.         GL11.glEnable(GL11.GL_ALPHA_TEST);
  759.     }
  760.  
  761.     public void func_152126_a(float p_152126_1_, float p_152126_2_)
  762.     {
  763.         this.field_152127_m.func_152437_a((int)(p_152126_1_ - 10.0F), 10);
  764.     }
  765.  
  766.     private void func_96136_a(ScoreObjective p_96136_1_, int p_96136_2_, int p_96136_3_, FontRenderer p_96136_4_)
  767.     {
  768.         Scoreboard var5 = p_96136_1_.getScoreboard();
  769.         Collection var6 = var5.func_96534_i(p_96136_1_);
  770.  
  771.         if (var6.size() <= 15)
  772.         {
  773.             int var7 = p_96136_4_.getStringWidth(p_96136_1_.getDisplayName());
  774.             String var11;
  775.  
  776.             for (Iterator var8 = var6.iterator(); var8.hasNext(); var7 = Math.max(var7, p_96136_4_.getStringWidth(var11)))
  777.             {
  778.                 Score var9 = (Score)var8.next();
  779.                 ScorePlayerTeam var10 = var5.getPlayersTeam(var9.getPlayerName());
  780.                 var11 = ScorePlayerTeam.formatPlayerName(var10, var9.getPlayerName()) + ": " + EnumChatFormatting.RED + var9.getScorePoints();
  781.             }
  782.  
  783.             int var22 = var6.size() * p_96136_4_.FONT_HEIGHT;
  784.             int var23 = p_96136_2_ / 2 + var22 / 3;
  785.             byte var24 = 3;
  786.             int var25 = p_96136_3_ - var7 - var24;
  787.             int var12 = 0;
  788.             Iterator var13 = var6.iterator();
  789.  
  790.             while (var13.hasNext())
  791.             {
  792.                 Score var14 = (Score)var13.next();
  793.                 ++var12;
  794.                 ScorePlayerTeam var15 = var5.getPlayersTeam(var14.getPlayerName());
  795.                 String var16 = ScorePlayerTeam.formatPlayerName(var15, var14.getPlayerName());
  796.                 String var17 = EnumChatFormatting.RED + "" + var14.getScorePoints();
  797.                 int var19 = var23 - var12 * p_96136_4_.FONT_HEIGHT;
  798.                 int var20 = p_96136_3_ - var24 + 2;
  799.                 drawRect(var25 - 2, var19, var20, var19 + p_96136_4_.FONT_HEIGHT, 1342177280);
  800.                 p_96136_4_.drawString(var16, var25, var19, 553648127);
  801.                 p_96136_4_.drawString(var17, var20 - p_96136_4_.getStringWidth(var17), var19, 553648127);
  802.  
  803.                 if (var12 == var6.size())
  804.                 {
  805.                     String var21 = p_96136_1_.getDisplayName();
  806.                     drawRect(var25 - 2, var19 - p_96136_4_.FONT_HEIGHT - 1, var20, var19 - 1, 1610612736);
  807.                     drawRect(var25 - 2, var19 - 1, var20, var19, 1342177280);
  808.                     p_96136_4_.drawString(var21, var25 + var7 / 2 - p_96136_4_.getStringWidth(var21) / 2, var19 - p_96136_4_.FONT_HEIGHT, 553648127);
  809.                 }
  810.             }
  811.         }
  812.     }
  813.  
  814.     private void func_110327_a(int p_110327_1_, int p_110327_2_)
  815.     {
  816.         boolean var3 = this.mc.thePlayer.hurtResistantTime / 3 % 2 == 1;
  817.  
  818.         if (this.mc.thePlayer.hurtResistantTime < 10)
  819.         {
  820.             var3 = false;
  821.         }
  822.  
  823.         int var4 = MathHelper.ceiling_float_int(this.mc.thePlayer.getHealth());
  824.         int var5 = MathHelper.ceiling_float_int(this.mc.thePlayer.prevHealth);
  825.         this.rand.setSeed((long)(this.updateCounter * 312871));
  826.         boolean var6 = false;
  827.         FoodStats var7 = this.mc.thePlayer.getFoodStats();
  828.         int var8 = var7.getFoodLevel();
  829.         int var9 = var7.getPrevFoodLevel();
  830.         IAttributeInstance var10 = this.mc.thePlayer.getEntityAttribute(SharedMonsterAttributes.maxHealth);
  831.         int var11 = p_110327_1_ / 2 - 91;
  832.         int var12 = p_110327_1_ / 2 + 91;
  833.         int var13 = p_110327_2_ - 39;
  834.         float var14 = (float)var10.getAttributeValue();
  835.         float var15 = this.mc.thePlayer.getAbsorptionAmount();
  836.         int var16 = MathHelper.ceiling_float_int((var14 + var15) / 2.0F / 10.0F);
  837.         int var17 = Math.max(10 - (var16 - 2), 3);
  838.         int var18 = var13 - (var16 - 1) * var17 - 10;
  839.         float var19 = var15;
  840.         int var20 = this.mc.thePlayer.getTotalArmorValue();
  841.         int var21 = -1;
  842.  
  843.         if (this.mc.thePlayer.isPotionActive(Potion.regeneration))
  844.         {
  845.             var21 = this.updateCounter % MathHelper.ceiling_float_int(var14 + 5.0F);
  846.         }
  847.  
  848.         this.mc.mcProfiler.startSection("armor");
  849.         int var22;
  850.         int var23;
  851.  
  852.         for (var22 = 0; var22 < 10; ++var22)
  853.         {
  854.             if (var20 > 0)
  855.             {
  856.                 var23 = var11 + var22 * 8;
  857.  
  858.                 if (var22 * 2 + 1 < var20)
  859.                 {
  860.                     this.drawTexturedModalRect(var23, var18, 34, 9, 9, 9);
  861.                 }
  862.  
  863.                 if (var22 * 2 + 1 == var20)
  864.                 {
  865.                     this.drawTexturedModalRect(var23, var18, 25, 9, 9, 9);
  866.                 }
  867.  
  868.                 if (var22 * 2 + 1 > var20)
  869.                 {
  870.                     this.drawTexturedModalRect(var23, var18, 16, 9, 9, 9);
  871.                 }
  872.             }
  873.         }
  874.  
  875.         this.mc.mcProfiler.endStartSection("health");
  876.         int var25;
  877.         int var26;
  878.         int var27;
  879.  
  880.         for (var22 = MathHelper.ceiling_float_int((var14 + var15) / 2.0F) - 1; var22 >= 0; --var22)
  881.         {
  882.             var23 = 16;
  883.  
  884.             if (this.mc.thePlayer.isPotionActive(Potion.poison))
  885.             {
  886.                 var23 += 36;
  887.             }
  888.             else if (this.mc.thePlayer.isPotionActive(Potion.wither))
  889.             {
  890.                 var23 += 72;
  891.             }
  892.  
  893.             byte var24 = 0;
  894.  
  895.             if (var3)
  896.             {
  897.                 var24 = 1;
  898.             }
  899.  
  900.             var25 = MathHelper.ceiling_float_int((float)(var22 + 1) / 10.0F) - 1;
  901.             var26 = var11 + var22 % 10 * 8;
  902.             var27 = var13 - var25 * var17;
  903.  
  904.             if (var4 <= 4)
  905.             {
  906.                 var27 += this.rand.nextInt(2);
  907.             }
  908.  
  909.             if (var22 == var21)
  910.             {
  911.                 var27 -= 2;
  912.             }
  913.  
  914.             byte var28 = 0;
  915.  
  916.             if (this.mc.theWorld.getWorldInfo().isHardcoreModeEnabled())
  917.             {
  918.                 var28 = 5;
  919.             }
  920.  
  921.             this.drawTexturedModalRect(var26, var27, 16 + var24 * 9, 9 * var28, 9, 9);
  922.  
  923.             if (var3)
  924.             {
  925.                 if (var22 * 2 + 1 < var5)
  926.                 {
  927.                     this.drawTexturedModalRect(var26, var27, var23 + 54, 9 * var28, 9, 9);
  928.                 }
  929.  
  930.                 if (var22 * 2 + 1 == var5)
  931.                 {
  932.                     this.drawTexturedModalRect(var26, var27, var23 + 63, 9 * var28, 9, 9);
  933.                 }
  934.             }
  935.  
  936.             if (var19 > 0.0F)
  937.             {
  938.                 if (var19 == var15 && var15 % 2.0F == 1.0F)
  939.                 {
  940.                     this.drawTexturedModalRect(var26, var27, var23 + 153, 9 * var28, 9, 9);
  941.                 }
  942.                 else
  943.                 {
  944.                     this.drawTexturedModalRect(var26, var27, var23 + 144, 9 * var28, 9, 9);
  945.                 }
  946.  
  947.                 var19 -= 2.0F;
  948.             }
  949.             else
  950.             {
  951.                 if (var22 * 2 + 1 < var4)
  952.                 {
  953.                     this.drawTexturedModalRect(var26, var27, var23 + 36, 9 * var28, 9, 9);
  954.                 }
  955.  
  956.                 if (var22 * 2 + 1 == var4)
  957.                 {
  958.                     this.drawTexturedModalRect(var26, var27, var23 + 45, 9 * var28, 9, 9);
  959.                 }
  960.             }
  961.         }
  962.  
  963.         Entity var34 = this.mc.thePlayer.ridingEntity;
  964.         int var36;
  965.  
  966.         if (var34 == null)
  967.         {
  968.             this.mc.mcProfiler.endStartSection("food");
  969.  
  970.             for (var23 = 0; var23 < 10; ++var23)
  971.             {
  972.                 var36 = var13;
  973.                 var25 = 16;
  974.                 byte var38 = 0;
  975.  
  976.                 if (this.mc.thePlayer.isPotionActive(Potion.hunger))
  977.                 {
  978.                     var25 += 36;
  979.                     var38 = 13;
  980.                 }
  981.  
  982.                 if (this.mc.thePlayer.getFoodStats().getSaturationLevel() <= 0.0F && this.updateCounter % (var8 * 3 + 1) == 0)
  983.                 {
  984.                     var36 = var13 + (this.rand.nextInt(3) - 1);
  985.                 }
  986.  
  987.                 if (var6)
  988.                 {
  989.                     var38 = 1;
  990.                 }
  991.  
  992.                 var27 = var12 - var23 * 8 - 9;
  993.                 this.drawTexturedModalRect(var27, var36, 16 + var38 * 9, 27, 9, 9);
  994.  
  995.                 if (var6)
  996.                 {
  997.                     if (var23 * 2 + 1 < var9)
  998.                     {
  999.                         this.drawTexturedModalRect(var27, var36, var25 + 54, 27, 9, 9);
  1000.                     }
  1001.  
  1002.                     if (var23 * 2 + 1 == var9)
  1003.                     {
  1004.                         this.drawTexturedModalRect(var27, var36, var25 + 63, 27, 9, 9);
  1005.                     }
  1006.                 }
  1007.  
  1008.                 if (var23 * 2 + 1 < var8)
  1009.                 {
  1010.                     this.drawTexturedModalRect(var27, var36, var25 + 36, 27, 9, 9);
  1011.                 }
  1012.  
  1013.                 if (var23 * 2 + 1 == var8)
  1014.                 {
  1015.                     this.drawTexturedModalRect(var27, var36, var25 + 45, 27, 9, 9);
  1016.                 }
  1017.             }
  1018.         }
  1019.         else if (var34 instanceof EntityLivingBase)
  1020.         {
  1021.             this.mc.mcProfiler.endStartSection("mountHealth");
  1022.             EntityLivingBase var35 = (EntityLivingBase)var34;
  1023.             var36 = (int)Math.ceil((double)var35.getHealth());
  1024.             float var37 = var35.getMaxHealth();
  1025.             var26 = (int)(var37 + 0.5F) / 2;
  1026.  
  1027.             if (var26 > 30)
  1028.             {
  1029.                 var26 = 30;
  1030.             }
  1031.  
  1032.             var27 = var13;
  1033.  
  1034.             for (int var39 = 0; var26 > 0; var39 += 20)
  1035.             {
  1036.                 int var29 = Math.min(var26, 10);
  1037.                 var26 -= var29;
  1038.  
  1039.                 for (int var30 = 0; var30 < var29; ++var30)
  1040.                 {
  1041.                     byte var31 = 52;
  1042.                     byte var32 = 0;
  1043.  
  1044.                     if (var6)
  1045.                     {
  1046.                         var32 = 1;
  1047.                     }
  1048.  
  1049.                     int var33 = var12 - var30 * 8 - 9;
  1050.                     this.drawTexturedModalRect(var33, var27, var31 + var32 * 9, 9, 9, 9);
  1051.  
  1052.                     if (var30 * 2 + 1 + var39 < var36)
  1053.                     {
  1054.                         this.drawTexturedModalRect(var33, var27, var31 + 36, 9, 9, 9);
  1055.                     }
  1056.  
  1057.                     if (var30 * 2 + 1 + var39 == var36)
  1058.                     {
  1059.                         this.drawTexturedModalRect(var33, var27, var31 + 45, 9, 9, 9);
  1060.                     }
  1061.                 }
  1062.  
  1063.                 var27 -= 10;
  1064.             }
  1065.         }
  1066.  
  1067.         this.mc.mcProfiler.endStartSection("air");
  1068.  
  1069.         if (this.mc.thePlayer.isInsideOfMaterial(Material.water))
  1070.         {
  1071.             var23 = this.mc.thePlayer.getAir();
  1072.             var36 = MathHelper.ceiling_double_int((double)(var23 - 2) * 10.0D / 300.0D);
  1073.             var25 = MathHelper.ceiling_double_int((double)var23 * 10.0D / 300.0D) - var36;
  1074.  
  1075.             for (var26 = 0; var26 < var36 + var25; ++var26)
  1076.             {
  1077.                 if (var26 < var36)
  1078.                 {
  1079.                     this.drawTexturedModalRect(var12 - var26 * 8 - 9, var18, 16, 18, 9, 9);
  1080.                 }
  1081.                 else
  1082.                 {
  1083.                     this.drawTexturedModalRect(var12 - var26 * 8 - 9, var18, 25, 18, 9, 9);
  1084.                 }
  1085.             }
  1086.         }
  1087.  
  1088.         this.mc.mcProfiler.endSection();
  1089.     }
  1090.  
  1091.     /**
  1092.      * Renders dragon's (boss) health on the HUD
  1093.      */
  1094.     private void renderBossHealth()
  1095.     {
  1096.         if (BossStatus.bossName != null && BossStatus.statusBarTime > 0)
  1097.         {
  1098.             --BossStatus.statusBarTime;
  1099.             FontRenderer var1 = this.mc.fontRenderer;
  1100.             ScaledResolution var2 = new ScaledResolution(this.mc, this.mc.displayWidth, this.mc.displayHeight);
  1101.             int var3 = var2.getScaledWidth();
  1102.             short var4 = 182;
  1103.             int var5 = var3 / 2 - var4 / 2;
  1104.             int var6 = (int)(BossStatus.healthScale * (float)(var4 + 1));
  1105.             byte var7 = 12;
  1106.             this.drawTexturedModalRect(var5, var7, 0, 74, var4, 5);
  1107.             this.drawTexturedModalRect(var5, var7, 0, 74, var4, 5);
  1108.  
  1109.             if (var6 > 0)
  1110.             {
  1111.                 this.drawTexturedModalRect(var5, var7, 0, 79, var6, 5);
  1112.             }
  1113.  
  1114.             String var8 = BossStatus.bossName;
  1115.             var1.drawStringWithShadow(var8, var3 / 2 - var1.getStringWidth(var8) / 2, var7 - 10, 16777215);
  1116.             GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
  1117.             this.mc.getTextureManager().bindTexture(icons);
  1118.         }
  1119.     }
  1120.  
  1121.     private void renderPumpkinBlur(int p_73836_1_, int p_73836_2_)
  1122.     {
  1123.         GL11.glDisable(GL11.GL_DEPTH_TEST);
  1124.         GL11.glDepthMask(false);
  1125.         OpenGlHelper.glBlendFunc(770, 771, 1, 0);
  1126.         GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
  1127.         GL11.glDisable(GL11.GL_ALPHA_TEST);
  1128.         this.mc.getTextureManager().bindTexture(pumpkinBlurTexPath);
  1129.         Tessellator var3 = Tessellator.instance;
  1130.         var3.startDrawingQuads();
  1131.         var3.addVertexWithUV(0.0D, (double)p_73836_2_, -90.0D, 0.0D, 1.0D);
  1132.         var3.addVertexWithUV((double)p_73836_1_, (double)p_73836_2_, -90.0D, 1.0D, 1.0D);
  1133.         var3.addVertexWithUV((double)p_73836_1_, 0.0D, -90.0D, 1.0D, 0.0D);
  1134.         var3.addVertexWithUV(0.0D, 0.0D, -90.0D, 0.0D, 0.0D);
  1135.         var3.draw();
  1136.         GL11.glDepthMask(true);
  1137.         GL11.glEnable(GL11.GL_DEPTH_TEST);
  1138.         GL11.glEnable(GL11.GL_ALPHA_TEST);
  1139.         GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
  1140.     }
  1141.  
  1142.     /**
  1143.      * Renders the vignette. Args: vignetteBrightness, width, height
  1144.      */
  1145.     private void renderVignette(float p_73829_1_, int p_73829_2_, int p_73829_3_)
  1146.     {
  1147.         p_73829_1_ = 1.0F - p_73829_1_;
  1148.  
  1149.         if (p_73829_1_ < 0.0F)
  1150.         {
  1151.             p_73829_1_ = 0.0F;
  1152.         }
  1153.  
  1154.         if (p_73829_1_ > 1.0F)
  1155.         {
  1156.             p_73829_1_ = 1.0F;
  1157.         }
  1158.  
  1159.         this.prevVignetteBrightness = (float)((double)this.prevVignetteBrightness + (double)(p_73829_1_ - this.prevVignetteBrightness) * 0.01D);
  1160.         GL11.glDisable(GL11.GL_DEPTH_TEST);
  1161.         GL11.glDepthMask(false);
  1162.         OpenGlHelper.glBlendFunc(0, 769, 1, 0);
  1163.         GL11.glColor4f(this.prevVignetteBrightness, this.prevVignetteBrightness, this.prevVignetteBrightness, 1.0F);
  1164.         this.mc.getTextureManager().bindTexture(vignetteTexPath);
  1165.         Tessellator var4 = Tessellator.instance;
  1166.         var4.startDrawingQuads();
  1167.         var4.addVertexWithUV(0.0D, (double)p_73829_3_, -90.0D, 0.0D, 1.0D);
  1168.         var4.addVertexWithUV((double)p_73829_2_, (double)p_73829_3_, -90.0D, 1.0D, 1.0D);
  1169.         var4.addVertexWithUV((double)p_73829_2_, 0.0D, -90.0D, 1.0D, 0.0D);
  1170.         var4.addVertexWithUV(0.0D, 0.0D, -90.0D, 0.0D, 0.0D);
  1171.         var4.draw();
  1172.         GL11.glDepthMask(true);
  1173.         GL11.glEnable(GL11.GL_DEPTH_TEST);
  1174.         GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
  1175.         OpenGlHelper.glBlendFunc(770, 771, 1, 0);
  1176.     }
  1177.  
  1178.     private void func_130015_b(float p_130015_1_, int p_130015_2_, int p_130015_3_)
  1179.     {
  1180.         if (p_130015_1_ < 1.0F)
  1181.         {
  1182.             p_130015_1_ *= p_130015_1_;
  1183.             p_130015_1_ *= p_130015_1_;
  1184.             p_130015_1_ = p_130015_1_ * 0.8F + 0.2F;
  1185.         }
  1186.  
  1187.         GL11.glDisable(GL11.GL_ALPHA_TEST);
  1188.         GL11.glDisable(GL11.GL_DEPTH_TEST);
  1189.         GL11.glDepthMask(false);
  1190.         OpenGlHelper.glBlendFunc(770, 771, 1, 0);
  1191.         GL11.glColor4f(1.0F, 1.0F, 1.0F, p_130015_1_);
  1192.         IIcon var4 = Blocks.portal.getBlockTextureFromSide(1);
  1193.         this.mc.getTextureManager().bindTexture(TextureMap.locationBlocksTexture);
  1194.         float var5 = var4.getMinU();
  1195.         float var6 = var4.getMinV();
  1196.         float var7 = var4.getMaxU();
  1197.         float var8 = var4.getMaxV();
  1198.         Tessellator var9 = Tessellator.instance;
  1199.         var9.startDrawingQuads();
  1200.         var9.addVertexWithUV(0.0D, (double)p_130015_3_, -90.0D, (double)var5, (double)var8);
  1201.         var9.addVertexWithUV((double)p_130015_2_, (double)p_130015_3_, -90.0D, (double)var7, (double)var8);
  1202.         var9.addVertexWithUV((double)p_130015_2_, 0.0D, -90.0D, (double)var7, (double)var6);
  1203.         var9.addVertexWithUV(0.0D, 0.0D, -90.0D, (double)var5, (double)var6);
  1204.         var9.draw();
  1205.         GL11.glDepthMask(true);
  1206.         GL11.glEnable(GL11.GL_DEPTH_TEST);
  1207.         GL11.glEnable(GL11.GL_ALPHA_TEST);
  1208.         GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
  1209.     }
  1210.  
  1211.     /**
  1212.      * Renders the specified item of the inventory slot at the specified location. Args: slot, x, y, partialTick
  1213.      */
  1214.     private void renderInventorySlot(int p_73832_1_, int p_73832_2_, int p_73832_3_, float p_73832_4_)
  1215.     {
  1216.         ItemStack var5 = this.mc.thePlayer.inventory.mainInventory[p_73832_1_];
  1217.  
  1218.         if (var5 != null)
  1219.         {
  1220.             float var6 = (float)var5.animationsToGo - p_73832_4_;
  1221.  
  1222.             if (var6 > 0.0F)
  1223.             {
  1224.                 GL11.glPushMatrix();
  1225.                 float var7 = 1.0F + var6 / 5.0F;
  1226.                 GL11.glTranslatef((float)(p_73832_2_ + 8), (float)(p_73832_3_ + 12), 0.0F);
  1227.                 GL11.glScalef(1.0F / var7, (var7 + 1.0F) / 2.0F, 1.0F);
  1228.                 GL11.glTranslatef((float)(-(p_73832_2_ + 8)), (float)(-(p_73832_3_ + 12)), 0.0F);
  1229.             }
  1230.  
  1231.             itemRenderer.renderItemAndEffectIntoGUI(this.mc.fontRenderer, this.mc.getTextureManager(), var5, p_73832_2_, p_73832_3_);
  1232.  
  1233.             if (var6 > 0.0F)
  1234.             {
  1235.                 GL11.glPopMatrix();
  1236.             }
  1237.  
  1238.             itemRenderer.renderItemOverlayIntoGUI(this.mc.fontRenderer, this.mc.getTextureManager(), var5, p_73832_2_, p_73832_3_);
  1239.         }
  1240.     }
  1241.  
  1242.     /**
  1243.      * The update tick for the ingame UI
  1244.      */
  1245.     public void updateTick()
  1246.     {
  1247.         if (this.recordPlayingUpFor > 0)
  1248.         {
  1249.             --this.recordPlayingUpFor;
  1250.         }
  1251.        
  1252.         //Fixoria
  1253.       //clear lagg
  1254.         if (this.centerMessageTimer > 0)
  1255.         {
  1256.             this.centerMessageTimer--;
  1257.             if (this.centerMessageTimer == 0)
  1258.             {
  1259.                 displayedCenterMessage = null;
  1260.             }
  1261.         }
  1262.       //clear lagg
  1263.          
  1264.       //clear lagg 1
  1265.         if (this.ClearLaggTempsTimer > 0)
  1266.         {
  1267.             this.ClearLaggTempsTimer--;
  1268.             if (this.ClearLaggTempsTimer == 0)
  1269.             {
  1270.                 DisplayedClearLaggTemps = null;
  1271.             }
  1272.         }
  1273.       //clear lagg 1
  1274.        
  1275.      //Combat
  1276.        if (this.CombatTimer > 0)
  1277.        {
  1278.         this.CombatTimer--;
  1279.         if (this.CombatTimer == 0)
  1280.         {
  1281.             DisplayedCombat = null;
  1282.         }
  1283.        }
  1284.      //Combat
  1285.        
  1286.     //Claim
  1287.       if (this.ClaimTimer > 0)
  1288.       {
  1289.         this.ClaimTimer--;
  1290.         if (this.ClaimTimer == 0)
  1291.         {
  1292.             DisplayedClaim = null;
  1293.         }
  1294.       }
  1295.         //Fixoria
  1296.        
  1297.        
  1298.        
  1299.        
  1300.         ++this.updateCounter;
  1301.         this.field_152127_m.func_152439_a();
  1302.  
  1303.         if (this.mc.thePlayer != null)
  1304.         {
  1305.             ItemStack var1 = this.mc.thePlayer.inventory.getCurrentItem();
  1306.  
  1307.             if (var1 == null)
  1308.             {
  1309.                 this.remainingHighlightTicks = 0;
  1310.             }
  1311.             else if (this.highlightingItemStack != null && var1.getItem() == this.highlightingItemStack.getItem() && ItemStack.areItemStackTagsEqual(var1, this.highlightingItemStack) && (var1.isItemStackDamageable() || var1.getItemDamage() == this.highlightingItemStack.getItemDamage()))
  1312.             {
  1313.                 if (this.remainingHighlightTicks > 0)
  1314.                 {
  1315.                     --this.remainingHighlightTicks;
  1316.                 }
  1317.             }
  1318.             else
  1319.             {
  1320.                 this.remainingHighlightTicks = 40;
  1321.             }
  1322.  
  1323.             this.highlightingItemStack = var1;
  1324.         }
  1325.     }
  1326.  
  1327.     public void setRecordPlayingMessage(String p_73833_1_)
  1328.     {
  1329.         this.func_110326_a(I18n.format("record.nowPlaying", new Object[] {p_73833_1_}), true);
  1330.     }
  1331.  
  1332.     public void func_110326_a(String p_110326_1_, boolean p_110326_2_)
  1333.     {
  1334.         this.recordPlaying = p_110326_1_;
  1335.         this.recordPlayingUpFor = 60;
  1336.         this.recordIsPlaying = p_110326_2_;
  1337.     }
  1338.  
  1339.     public GuiNewChat getChatGUI()
  1340.     {
  1341.         return this.persistantChatGUI;
  1342.     }
  1343.  
  1344.     public int getUpdateCounter()
  1345.     {
  1346.         return this.updateCounter;
  1347.     }
  1348. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement