Advertisement
Olivki

Swag

Feb 9th, 2013
298
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.99 KB | None | 0 0
  1.      protected void renderLivingLabel(EntityLiving par1EntityLiving, String par2Str, double par3, double par5, double par7, int par9)
  2.      {
  3.          double var10 = par1EntityLiving.getDistanceSqToEntity(this.renderManager.livingPlayer);
  4.  
  5.          if(var10 <= (double)(par9 * par9)) {
  6.              FontRenderer var12 = this.getFontRendererFromRenderManager();
  7.              float var13 = 4F;
  8.              float var14 = 0.016666668F * var13;
  9.              GL11.glPushMatrix();
  10.              GL11.glTranslatef((float)par3 + 0.0F, (float)par5 + 2.3F, (float)par7);
  11.              GL11.glNormal3f(0.0F, 1.0F, 0.0F);
  12.              GL11.glRotatef(-this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
  13.              GL11.glRotatef(this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
  14.              GL11.glScalef(-var14, -var14, var14);
  15.              GL11.glDisable(GL11.GL_LIGHTING);
  16.              GL11.glDepthMask(false);
  17.              GL11.glDisable(GL11.GL_DEPTH_TEST);
  18.              GL11.glEnable(GL11.GL_BLEND);
  19.              GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
  20.              Tessellator var15 = Tessellator.instance;
  21.              byte var16 = 0;
  22.  
  23.              if(par2Str.equals("deadmau5")) {
  24.                  var16 = -10;
  25.              }
  26.  
  27.              GL11.glDisable(GL11.GL_TEXTURE_2D);
  28.              var15.startDrawingQuads();
  29.              int var17 = var12.getStringWidth(par2Str) / 2;
  30.              var15.setColorRGBA_F(0.0F, 0.0F, 0.0F, 0.25F);
  31.              var15.addVertex((double)(-var17 - 1), (double)(-1 + var16), 0.0D);
  32.              var15.addVertex((double)(-var17 - 1), (double)(8 + var16), 0.0D);
  33.              var15.addVertex((double)(var17 + 1), (double)(8 + var16), 0.0D);
  34.              var15.addVertex((double)(var17 + 1), (double)(-1 + var16), 0.0D);
  35.              var15.draw();
  36.              GL11.glEnable(GL11.GL_TEXTURE_2D);
  37.              var12.drawStringWithShadow(par2Str, -var12.getStringWidth(par2Str) / 2 - 1, var16 - 1, 0xFFFFFFFF);
  38.              GL11.glEnable(GL11.GL_DEPTH_TEST);
  39.              GL11.glDepthMask(true);
  40.              var12.drawStringWithShadow(par2Str, -var12.getStringWidth(par2Str) / 2 - 1, var16 - 1, 0xFFFFFFFF);
  41.              GL11.glEnable(GL11.GL_LIGHTING);
  42.              GL11.glDisable(GL11.GL_BLEND);
  43.              GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
  44.              GL11.glPopMatrix();
  45.          }
  46.      }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement