Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected void renderLivingLabel(EntityLiving par1EntityLiving, String par2Str, double par3, double par5, double par7, int par9)
- {
- double var10 = par1EntityLiving.getDistanceSqToEntity(this.renderManager.livingPlayer);
- if(var10 <= (double)(par9 * par9)) {
- FontRenderer var12 = this.getFontRendererFromRenderManager();
- float var13 = 4F;
- float var14 = 0.016666668F * var13;
- GL11.glPushMatrix();
- GL11.glTranslatef((float)par3 + 0.0F, (float)par5 + 2.3F, (float)par7);
- GL11.glNormal3f(0.0F, 1.0F, 0.0F);
- GL11.glRotatef(-this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
- GL11.glRotatef(this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
- GL11.glScalef(-var14, -var14, var14);
- GL11.glDisable(GL11.GL_LIGHTING);
- GL11.glDepthMask(false);
- GL11.glDisable(GL11.GL_DEPTH_TEST);
- GL11.glEnable(GL11.GL_BLEND);
- GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
- Tessellator var15 = Tessellator.instance;
- byte var16 = 0;
- if(par2Str.equals("deadmau5")) {
- var16 = -10;
- }
- GL11.glDisable(GL11.GL_TEXTURE_2D);
- var15.startDrawingQuads();
- int var17 = var12.getStringWidth(par2Str) / 2;
- var15.setColorRGBA_F(0.0F, 0.0F, 0.0F, 0.25F);
- var15.addVertex((double)(-var17 - 1), (double)(-1 + var16), 0.0D);
- var15.addVertex((double)(-var17 - 1), (double)(8 + var16), 0.0D);
- var15.addVertex((double)(var17 + 1), (double)(8 + var16), 0.0D);
- var15.addVertex((double)(var17 + 1), (double)(-1 + var16), 0.0D);
- var15.draw();
- GL11.glEnable(GL11.GL_TEXTURE_2D);
- var12.drawStringWithShadow(par2Str, -var12.getStringWidth(par2Str) / 2 - 1, var16 - 1, 0xFFFFFFFF);
- GL11.glEnable(GL11.GL_DEPTH_TEST);
- GL11.glDepthMask(true);
- var12.drawStringWithShadow(par2Str, -var12.getStringWidth(par2Str) / 2 - 1, var16 - 1, 0xFFFFFFFF);
- GL11.glEnable(GL11.GL_LIGHTING);
- GL11.glDisable(GL11.GL_BLEND);
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
- GL11.glPopMatrix();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement