Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

TargetHUD dth = (TargetHUD)

Enormity.getINSTANCE().draggableHUD.getComponentByClass(TargetHUD.class);
float x = dth.getX();
float y = dth.getY();
dth.setWidth(130);
dth.setHeight(42 - 5);
if (Aura.target == null) {
if (mc.player != null && mc.currentScreen instanceof GuiChat) {
curTarget = mc.player;
scale = AnimHelper.animation((float) scale, (float) 1, (float)
(6 * Enormity.deltaTime()));
} else {
scale = AnimHelper.animation((float) scale, (float) 0, (float)
(6 * Enormity.deltaTime()));
}
} else {
curTarget = Aura.target;
scale = AnimHelper.animation((float) scale, (float) 1, (float) (6 *
Enormity.deltaTime()));
}
if (curTarget != null) {
try {
GlStateManager.pushMatrix();
GlStateManager.resetColor();
GL11.glTranslated(x + 36, y + 26, 0);
GL11.glScaled(scale, scale, 0);
GL11.glTranslated(-(x + 36), -(y + 26), 0);
double healthWid = (curTarget.getHealth() /
curTarget.getMaxHealth() * 100);
healthWid = MathHelper.clamp(healthWid, 0.0D, 100);
healthBarWidth = AnimationHelper.animation(healthBarWidth,
(float) healthWid, (float) (10 * Enormity.deltaTime()));
String health = "" +
MathematicHelper.round(curTarget.getHealth(), 1);
String distance = "" +
MathematicHelper.round(mc.player.getDistanceToEntity(curTarget), 1);
DrawHelper.drawBlurredShadow(x , y + 3, 102, 38, 10,
ClientHelper.getClientColor());
DrawHelper.drawRound(x , y + 3, 102, 38, 2, new Color(0, 0, 0,
255));
DrawHelper.drawRound(x + 1, y + 35, healthBarWidth, 5, 1,
PaletteHelper.getHealthColor(curTarget.getHealth(), curTarget.getMaxHealth()));

FontRender.mntsb_15.drawString(Enormity.instance.featureManager.getFeature(NickSpoo
f.class).isEnabled() && NickSpoof.otherName.getCurrentValue() ? "exos" :
curTarget.getName(), x + 32, y + 10, new Color(255, 255, 255, 255).getRGB());
healthBarWidth = AnimationHelper.animation((float)
healthBarWidth, (float) healthWid, (float) (10 * Enormity.deltaTime()));

ArrayList armor =
Lists.newArrayList(curTarget.getArmorInventoryList());
ItemStack[] items = new ItemStack[]{(ItemStack) armor.get(0),
(ItemStack) armor.get(1), (ItemStack) armor.get(2), (ItemStack) armor.get(3),
curTarget.getHeldItemOffhand()};
float xItemOffset = x + 31;
for (ItemStack itemStack : items) {
if (itemStack.isEmpty()) continue;
GL11.glPushMatrix();
GL11.glTranslated(xItemOffset, y + 19, 0);
GL11.glScaled(0.85, 0.85, 0.85);

DrawHelper.enableGUIStandardItemLighting();
mc.getRenderItem().renderItemAndEffectIntoGUI(mc.player,
itemStack, 0, 0);
mc.getRenderItem().renderItemOverlays(mc.fontRendererObj,
itemStack, 0, 0);
RenderHelper.disableStandardItemLighting();

GL11.glPopMatrix();
xItemOffset += 14;
}

for (NetworkPlayerInfo targetHead :


mc.player.connection.getPlayerInfoMap()) {
try {
if
(mc.world.getPlayerEntityByUUID(targetHead.getGameProfile().getId()) == curTarget
&& curTarget instanceof EntityPlayer) {

mc.getTextureManager().bindTexture(targetHead.getLocationSkin());
float hurtPercent = getHurtPercent(curTarget);
GL11.glPushMatrix();
GL11.glColor4f(1, 1 - hurtPercent, 1 - hurtPercent,
1);
DrawHelper.drawHead(curTarget, x + 1, y + 5, 28,
28, 12,Color.WHITE);
StencilUtil.uninitStencilBuffer();
GL11.glPopMatrix();
GlStateManager.bindTexture(0);
}
} catch (Exception exception) {
}
}
DrawHelper.drawRoundOutline(x + 1, y + 5, 28, 28, 12, 0.5F, new
Color(0,0,0,0), new Color(0,0,0,255));
} catch (Exception exception) {
} finally {
GlStateManager.popMatrix();
}

You might also like