You are on page 1of 2

function processTargetHUD()

local dth =
Enormity.getINSTANCE().draggableHUD.getComponentByClass(TargetHUD.class)
local x = dth.getX()
local y = dth.getY()
dth.setWidth(130)
dth.setHeight(42 - 5)

if Aura.target == nil then


if mc.player ~= nil and mc.currentScreen:isInstanceOf(GuiChat) then
curTarget = mc.player
scale = AnimHelper.animation(scale, 1, 6 * Enormity.deltaTime())
else
scale = AnimHelper.animation(scale, 0, 6 * Enormity.deltaTime())
end
else
curTarget = Aura.target
scale = AnimHelper.animation(scale, 1, 6 * Enormity.deltaTime())
end

if curTarget ~= nil then


try
GlStateManager.pushMatrix()
GlStateManager.resetColor()
GL11.glTranslated(x + 36, y + 26, 0)
GL11.glScaled(scale, scale, 0)
GL11.glTranslated(-(x + 36), -(y + 26), 0)
local healthWid = (curTarget.getHealth() / curTarget.getMaxHealth() *
100)
healthWid = math.clamp(healthWid, 0.0, 100)
healthBarWidth = AnimationHelper.animation(healthBarWidth, healthWid,
10 * Enormity.deltaTime())
local health = tostring(MathematicHelper.round(curTarget.getHealth(),
1))
local distance =
tostring(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, 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() and NickSpoof.otherName.getCurrentValue() and "exos" or
curTarget.getName(), x + 32, y + 10, Color(255, 255, 255, 255).getRGB())
healthBarWidth = AnimationHelper.animation(healthBarWidth, healthWid,
10 * Enormity.deltaTime())

local armor = Lists.newArrayList(curTarget.getArmorInventoryList())


local items = {armor[0], armor[1], armor[2], armor[3],
curTarget.getHeldItemOffhand()}
local xItemOffset = x + 31
for _, itemStack in ipairs(items) do
if not itemStack.isEmpty() then
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 = xItemOffset + 14
end
end

for _, targetHead in ipairs(mc.player.connection.getPlayerInfoMap()) do


try
if
mc.world.getPlayerEntityByUUID(targetHead.getGameProfile().getId()) == curTarget
and curTarget:isInstanceOf(EntityPlayer) then

mc.getTextureManager().bindTexture(targetHead.getLocationSkin())
local 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)
end
catch (exception) {
}
end
DrawHelper.drawRoundOutline(x + 1, y + 5, 28, 28, 12, 0.5, Color(0, 0,
0, 0), Color(0, 0, 0, 255))
catch (exception) {
} finally
GlStateManager.popMatrix()
end
end
end

You might also like