RenderUtils2.scaleStart(this.targetHudDraggable.getX() + 77, this.targetHudDraggable.getY() + 27, this.animation.getOutput());
RenderUtils2.drawRoundedRect((float) this.targetHudDraggable.getX() + 0.5f, (float) this.targetHudDraggable.getY() + 0.5f, 148.0f, 53.0f, 0.0f, new Color(40, 40, 40, 255).getRGB());
RenderUtils2.drawRoundedRect(this.targetHudDraggable.getX() + 5, (float) this.targetHudDraggable.getY() + 4.5f, 139.0f, 45.0f, 0.0f, new Color(14, 14, 14, 255).getRGB());
RenderUtils2.drawRoundedRect(this.targetHudDraggable.getX() + 10, (float) this.targetHudDraggable.getY() + 8.9f, 37.0f, 36.5f, 0.0f, new Color(40, 40, 40, 255).getRGB());
RenderUtils2.drawRoundedRect(this.targetHudDraggable.getX() + 11, (float) this.targetHudDraggable.getY() + 9.9f, 35.0f, 34.5f, 0.0f, new Color(22, 22, 22, 255).getRGB());
if (animation.getDirection() == Direction.FORWARDS)
Fonts.th16.drawSubstring(TextFormatting.getTextWithoutFormattingCodes(this.currentTarget.getName().toLowerCase()), (float) this.targetHudDraggable.getX() + 49.5f, this.targetHudDraggable.getY() + 12, Color.WHITE.getRGB(), 75);
}
if (animation.getDirection() == Direction.FORWARDS) {
itemOffset = 36;
for (ItemStack itemStack : this.currentTarget.getArmorInventoryList()) {
if (!itemStack.isEmpty()) {
GlStateManager.pushMatrix();
GlStateManager.translate(this.targetHudDraggable.getX() + itemOffset + 12, this.targetHudDraggable.getY() + 35, 0.0f);
GlStateManager.scale(0.9, 0.9, 0.8);
drawItemStack(itemStack, 0, 0);
GlStateManager.popMatrix();
}
itemOffset -= -13;
}
itemOffset = 36;
for (ItemStack itemStack : this.currentTarget.getHeldEquipment()) {
if (!itemStack.isEmpty()) {
GlStateManager.pushMatrix();
GlStateManager.translate(this.targetHudDraggable.getX() + itemOffset + 68, this.targetHudDraggable.getY() + 34.5f, 0.0f);
GlStateManager.scale(0.9, 0.9, 0.8);
drawItemStack(itemStack, 0, 0);
GlStateManager.popMatrix();
}
itemOffset -= -22;
}
}
this.hp = MathUtils.clamp(MathUtils.lerp(this.hp, this.currentTarget.getHealth() / this.currentTarget.getMaxHealth(), (float) (25.0 * AnimationMath.deltaTime())), 0.0f, 1.0f);
Color health1 = Color.GREEN;
if (this.currentTarget.getHealth() >= 16.0f) {
health1 = Color.GREEN;
} else if (this.currentTarget.getHealth() >= 8.0f && this.currentTarget.getHealth() <= 13.0f) {
health1 = Color.YELLOW;
} else if (this.currentTarget.getHealth() > 0.0f && this.currentTarget.getHealth() <= 8.0f) {
health1 = Color.RED;
} else if (this.currentTarget != null && this.currentTarget.getHealth() <= 0.0f) {
health1 = Color.RED;
}
if (animation.getDirection() == Direction.FORWARDS) {
RenderUtils2.drawRect(this.targetHudDraggable.getX() + 50, (float) this.targetHudDraggable.getY() + 22.5f, 79.0f, 4.5f, Color.BLACK.getRGB());
RenderUtils2.drawRect(this.targetHudDraggable.getX() + 50, (float) this.targetHudDraggable.getY() + 22.5f, 79.0f, 4.5f, Color.BLACK.getRGB());
RenderUtils2.drawRect(this.targetHudDraggable.getX() + 50, (float) this.targetHudDraggable.getY() + 22.5f, 79.0f, 4.5f, Color.BLACK.getRGB());
RenderUtils2.drawRect(this.targetHudDraggable.getX() + 50, (float) this.targetHudDraggable.getY() + 22.5f, 79.0f, 4.5f, Color.BLACK.getRGB());
RenderUtils2.drawRect(this.targetHudDraggable.getX() + 50, (float) this.targetHudDraggable.getY() + 22.5f, 79.0f * this.hp, 4.5f, health1.getRGB());
}
if (glow.get()) {
if (animation.getDirection() == Direction.FORWARDS) {
RenderUtils2.drawGlow(this.targetHudDraggable.getX() + 50, (float) this.targetHudDraggable.getY() + 22.5f, 79.0f * this.hp, 4.5f, 15, health1);
}
}
Color darkest = ColorUtils1.applyOpacity(new Color(10, 10, 10), 255);
for (int i = 1; i <= 9; ++i) {
if (animation.getDirection() == Direction.FORWARDS) {
RenderUtils2.drawRect(this.targetHudDraggable.getX() + (i * 8 + 49), (float) this.targetHudDraggable.getY() + 22.5f, 0.5f, 4.5f, darkest.getRGB());
}
}
FontRenderer render = Fonts.test12;
int hp1 = (int) MathUtils.round(this.hp * 20.0f + this.currentTarget.getAbsorptionAmount(), 1.0);
if (animation.getDirection() == Direction.FORWARDS) {
render.drawStringWithShadow("HP: " + hp1 + " | Dist: " + (int) Hude.mc.player.getDistance(this.currentTarget), (float) this.targetHudDraggable.getX() + 49.5f, (float) this.targetHudDraggable.getY() + 31.0f,-1);
}
if (animation.getDirection() == Direction.FORWARDS) {
RenderUtils2.drawEntityOnScreen(this.targetHudDraggable.getX() + 28, this.targetHudDraggable.getY() + 44, 17, this.currentTarget.rotationYaw, this.currentTarget.rotationPitch, this.currentTarget);
}
}
RenderUtils2.scaleEnd();
}
}