Исходник New targethud(s) [rich-client ready]

1
Пользователь
Статус
Оффлайн
Регистрация
22 Авг 2021
Сообщения
484
Реакции[?]
45
Поинты[?]
7K

Перед прочтением основного контента ниже, пожалуйста, обратите внимание на обновление внутри секции Майна на нашем форуме. У нас появились:

  • бесплатные читы для Майнкрафт — любое использование на свой страх и риск;
  • маркетплейс Майнкрафт — абсолютно любая коммерция, связанная с игрой, за исключением продажи читов (аккаунты, предоставления услуг, поиск кодеров читов и так далее);
  • приватные читы для Minecraft — в этом разделе только платные хаки для игры, покупайте группу "Продавец" и выставляйте на продажу свой софт;
  • обсуждения и гайды — всё тот же раздел с вопросами, но теперь модернизированный: поиск нужных хаков, пати с игроками-читерами и другая полезная информация.

Спасибо!

TargetHUD.java:
package dev.etc.client.feature.impl.hud;

import dev.etc.client.Baks;
import dev.etc.client.draggable.component.impl.DraggableTargetHUD;
import dev.etc.client.event.EventTarget;
import dev.etc.client.event.events.impl.render.EventRender2D;
import dev.etc.client.feature.Feature;
import dev.etc.client.feature.impl.FeatureCategory;
import dev.etc.client.feature.impl.combat.KillAura;
import dev.etc.client.feature.impl.misc.NameProtect;
import dev.etc.client.ui.settings.impl.BooleanSetting;
import dev.etc.client.ui.settings.impl.ColorSetting;
import dev.etc.client.ui.settings.impl.ListSetting;
import dev.etc.client.utils.math.AnimationHelper;
import dev.etc.client.utils.math.MathematicHelper;
import dev.etc.client.utils.math.TimerHelper;
import dev.etc.client.utils.other.Particles;
import dev.etc.client.utils.render.*;
import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.GuiChat;
import net.minecraft.client.network.NetworkPlayerInfo;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.EnumHand;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.MathHelper;
import org.lwjgl.opengl.GL11;

import java.awt.*;
import java.util.ArrayList;

public class TargetHUD
        extends Feature {
    private double scale = 0.0;
    private static EntityLivingBase curTarget = null;
    public static TimerHelper thudTimer = new TimerHelper();
    private float healthBarWidth;
    private ArrayList<Particles> particles = new ArrayList();
    public ListSetting targetHudMode = new ListSetting("TargetHUD Mode", "Default", () -> true, "Style", "New", "Default", "Minecraft", "Baks", "Modern");
    public static ListSetting thudColorMode = new ListSetting("TargetHUD Color", "Astolfo", () -> true, "Astolfo", "Rainbow", "Client", "Custom");
    public BooleanSetting particles2;
    public static ColorSetting targetHudColor = new ColorSetting("THUD Color", Color.PINK.getRGB(), () -> TargetHUD.thudColorMode.currentMode.equals("Custom"));
    public BooleanSetting shadowThud;
    public BooleanSetting blurThud;
    private /* synthetic */ Color gradientColor1;
    private /* synthetic */ Color gradientColor2;
    private /* synthetic */ Color gradientColor3;
    private /* synthetic */ Color gradientColor4;


    public TargetHUD() {
        super("TargetHUD", FeatureCategory.Hud);
        this.particles2 = new BooleanSetting("Particles", TargetHUD.thudColorMode.currentMode.equals("Custom"), () -> this.targetHudMode.currentMode.equals("Style") && TargetHUD.thudColorMode.currentMode.equals("Custom"));
        this.shadowThud = new BooleanSetting("Shadow", true, () -> true);
        this.blurThud = new BooleanSetting("Blur", true, () -> true);
        this.gradientColor1 = Color.WHITE;
        this.gradientColor2 = Color.WHITE;
        this.gradientColor3 = Color.WHITE;
        this.gradientColor4 = Color.WHITE;

        this.addSettings(this.targetHudMode, thudColorMode, this.particles2, targetHudColor, this.shadowThud, this.blurThud);
    }

    @EventTarget
    public void onRender2D(EventRender2D e2) {
        int i;


        if (this.targetHudMode.currentMode.equals("Style")) {
            DraggableTargetHUD dth = (DraggableTargetHUD) Baks.instance.draggableHUD.getDraggableComponentByClass(DraggableTargetHUD.class);
            float x = dth.getX();
            float y = dth.getY();
            dth.setWidth(130);
            dth.setHeight(37);
            if (KillAura.target != null) {
                curTarget = KillAura.target;
                this.scale = AnimationHelper.animation((float) this.scale, 1.0f, (float) (6.0 * Baks.deltaTime()));
            } else {
                this.scale = AnimationHelper.animation((float) this.scale, 0.0f, (float) (6.0 * Baks.deltaTime()));
            }
            EntityLivingBase target = KillAura.target;
            if (curTarget != null && curTarget instanceof EntityPlayer) {
                try {
                    try {
                        GlStateManager.pushMatrix();
                        GlStateManager.resetColor();
                        GL11.glTranslated(x + 36.0f, y + 26.0f, 0.0);
                        GL11.glScaled(this.scale, this.scale, 0.0);
                        GL11.glTranslated(-(x + 36.0f), -(y + 26.0f), 0.0);
                        if (this.blurThud.getBoolValue()) {
                            RenderUtils.drawBlur(8.0f, () -> RenderUtils.drawSmoothRect(x, y, x + (float) dth.getWidth(), y + (float) dth.getHeight(), new Color(0, 0, 0, 100).getRGB()));
                        }
                        if (this.shadowThud.getBoolValue()) {
                            RenderUtils.drawShadow(9.0f, 2.0f, () -> RenderUtils.drawSmoothRect(x, y, x + (float) dth.getWidth(), y + (float) dth.getHeight(), new Color(0, 0, 0, 100).getRGB()));
                        }
                        RenderUtils.drawSmoothRect(x, y, x + (float) dth.getWidth(), y + (float) dth.getHeight(), new Color(0, 0, 0, 100).getRGB());
                        TargetHUD.mc.rubik_18.drawString(Baks.instance.featureManager.getFeature(NameProtect.class).isEnabled() && NameProtect.otherName.getBoolValue() ? "Protected" : curTarget.getName(), x + 35.0f, y + 5.0f, -1);
                        TargetHUD.mc.rubik_17.drawString(String.valueOf((int) curTarget.getHealth()) + " HP - " + (int) TargetHUD.mc.player.getDistanceToEntity(curTarget) + "m", x + 35.0f, y + 5.0f + 10.0f, -1);
                        double healthWid = curTarget.getHealth() / curTarget.getMaxHealth() * 90.0f;
                        healthWid = MathHelper.clamp(healthWid, 0.0, 90.0);
                        this.healthBarWidth = AnimationHelper.animation(this.healthBarWidth, (float) healthWid, (float) (10.0 * Baks.deltaTime()));
                        RenderUtils.drawRect2(x + 36.0f, y + 25.0f, 90.0, 5.0, new Colors(Color.decode("#191f13")).setAlpha(180).getColor().getRGB());
                        RenderUtils.drawGradientRected(x + 36.0f, y + 25.0f, this.healthBarWidth, 5.0, ClientHelper.getTargetHudColor().darker().getRGB(), ClientHelper.getTargetHudColor().brighter().brighter().getRGB());
                        RenderUtils.drawBlurredShadow(x + 40.0f, y + 25.0f, this.healthBarWidth + 2.0f, 5.0f, 8, ClientHelper.getTargetHudColor().darker());
                        if (this.particles2.getBoolValue() && TargetHUD.thudColorMode.currentMode.equals("Custom")) {
                            for (Particles p : this.particles) {
                                if (!(p.opacity > 4.0)) continue;
                                p.render2D();
                            }
                            if (thudTimer.hasReached(15.0)) {
                                for (Particles p : this.particles) {
                                    p.updatePosition();
                                    if (!(p.opacity < 1.0)) continue;
                                    this.particles.remove(p);
                                }
                                thudTimer.reset();
                            }
                            if (TargetHUD.curTarget.hurtTime == 8) {
                                for (i = 0; i < 1; ++i) {
                                    Particles p = new Particles();
                                    p.init(x + 15.0f, y + 15.0f, (Math.random() - 0.5) * 2.0 * 1.9, (Math.random() - 0.5) * 2.0 * 1.4, (float) Math.random() * 1.0f, ClientHelper.getTargetHudColor());
                                    this.particles.add(p);
                                }
                            }
                        }
                        for (NetworkPlayerInfo targetHead : TargetHUD.mc.player.connection.getPlayerInfoMap()) {
                            try {
                                if (TargetHUD.mc.world.getPlayerEntityByUUID(targetHead.getGameProfile().getId()) != curTarget)
                                    continue;
                                mc.getTextureManager().bindTexture(targetHead.getLocationSkin());
                                int scaleOffset = (int) ((float) TargetHUD.curTarget.hurtTime * 0.55f);
                                float hurtPercent = TargetHUD.getHurtPercent(curTarget);
                                GL11.glPushMatrix();
                                GL11.glColor4f(1.0f, 1.0f - hurtPercent, 1.0f - hurtPercent, 1.0f);
                                Gui.drawScaledCustomSizeModalRect((float) ((int) x + 3), y + 3.0f, 8.0f, 8.0f, 8, 8, 30, 30, 64.0f, 64.0f);
                                GL11.glPopMatrix();
                                GlStateManager.bindTexture(0);
                            } catch (Exception scaleOffset) {
                                // empty catch block
                            }
                        }
                    } catch (Exception healthWid) {
                        GlStateManager.popMatrix();
                    }
                } finally {
                    GlStateManager.popMatrix();
                }
            }


        } else if (this.targetHudMode.currentMode.equals("Default")) {
            DraggableTargetHUD dth = (DraggableTargetHUD) Baks.instance.draggableHUD.getDraggableComponentByClass(DraggableTargetHUD.class);
            float x = dth.getX();
            float y = dth.getY();
            dth.setWidth(153);
            dth.setHeight(42);
            if (KillAura.target != null) {
                curTarget = KillAura.target;
                this.scale = AnimationHelper.animation((float) this.scale, 1.0f, (float) (6.0 * Baks.deltaTime()));
            } else {
                this.scale = AnimationHelper.animation((float) this.scale, 0.0f, (float) (6.0 * Baks.deltaTime()));
            }
            EntityLivingBase target = KillAura.target;
            if (curTarget != null && curTarget instanceof EntityPlayer) {
                try {
                    try {
                        GlStateManager.pushMatrix();
                        GlStateManager.resetColor();
                        GL11.glTranslated(x + 50.0f, y + 31.0f, 0.0);
                        GL11.glScaled(this.scale, this.scale, 0.0);
                        GL11.glTranslated(-(x + 50.0f), -(y + 31.0f), 0.0);
//                        if (this.blurThud.getBoolValue()) {
//                            RenderUtils.drawBlur(7.0f, () -> RenderUtils.drawSmoothRect(x, y, x + (float)dth.getWidth(), y + (float)dth.getHeight(), new Color(255, 255, 255, 0).getRGB()));
//                        }
//                        if (this.shadowThud.getBoolValue()) {
//                            RenderUtils.drawShadow(5.0f, 1.0f, () -> RenderUtils.drawSmoothRect(x, y, x + (float)dth.getWidth(), y + (float)dth.getHeight(), new Color(17, 17, 17, 0).getRGB()));
//                        }
                        RenderUtils.drawSmoothRect(x, y, x + (float) dth.getWidth(), y + (float) dth.getHeight(), new Color(0, 255, 208, 0).getRGB());
                        double healthWid = curTarget.getHealth() / curTarget.getMaxHealth() * 110.0f;
                        healthWid = MathHelper.clamp(healthWid, 0.0, 110.0);
                        this.healthBarWidth = AnimationHelper.animation(this.healthBarWidth, (float) healthWid, (float) (10.0 * Baks.deltaTime()));
                        String health = "" + MathematicHelper.round(curTarget.getHealth(), 1);
                        String distance = "" + MathematicHelper.round(TargetHUD.mc.player.getDistanceToEntity(curTarget), 1);
                        TargetHUD.mc.rubik_15.drawString("Name: " + curTarget.getName(), x + 38.0f, y + 19.0f, -1);
//                        TargetHUD.mc.rubik_15.drawString("Distance: " + distance, x + 42.0f, y + 15.0f, -1);
//                        TargetHUD.mc.rubik_14.drawString(curTarget.getHealth() >= 3.0f ? health : "", x + 24.0f + this.healthBarWidth, y + 26.5f, new Color(0, 255, 178, 0).getRGB());
                        RenderUtils.drawSmoothRect(x + 38.0f, y + 33.0f, x + 38.0f + this.healthBarWidth, y + 33.0f + 5.0f, ClientHelper.getTargetHudColor().darker().getRGB());
                        RenderUtils.drawBlurredShadow(x + 38.0f, y + 33.0f, this.healthBarWidth, 5.0f, 12, RenderUtils.injectAlpha(ClientHelper.getTargetHudColor(), 1000));
                        mc.getRenderItem().renderItemOverlays(TargetHUD.mc.rubik_13, curTarget.getHeldItem(EnumHand.OFF_HAND), (int) x + 132, (int) y + 7);
                        mc.getRenderItem().renderItemIntoGUI(curTarget.getHeldItem(EnumHand.OFF_HAND), (int) x + 135, (int) y + 1);
//                        for (NetworkPlayerInfo targetHead : TargetHUD.mc.player.connection.getPlayerInfoMap()) {
//                            try {
//                                if (TargetHUD.mc.world.getPlayerEntityByUUID(targetHead.getGameProfile().getId()) != curTarget) continue;
//                                mc.getTextureManager().bindTexture(targetHead.getLocationSkin());
//                                int scaleOffset = (int)((float)TargetHUD.curTarget.hurtTime * 0.55f);
//                                float hurtPercent = TargetHUD.getHurtPercent(curTarget);
//                                GL11.glPushMatrix();
//                                GL11.glColor4f(1.0f, 1.0f - hurtPercent, 1.0f - hurtPercent, 1.0f);
//                                Gui.drawScaledCustomSizeModalRect((float)((int)x + 3), y + 4.0f, 8.0f, 8.0f, 8, 8, 32, 35, 64.0f, 64.0f);
//                                GL11.glPopMatrix();
//                                GlStateManager.bindTexture(0);
//                            }
//                            catch (Exception exception) {
//                                // empty catch block
//                            }
//                        }
                    } catch (Exception exception) {
                        GlStateManager.popMatrix();
                    }
                } finally {
                    GlStateManager.popMatrix();
                }
            }


        } else if (this.targetHudMode.currentMode.equals("Minecraft")) {
            DraggableTargetHUD wwq = (DraggableTargetHUD) Baks.instance.draggableHUD.getDraggableComponentByClass(DraggableTargetHUD.class);
            float x = wwq.getX();
            float y = wwq.getY();
            wwq.setWidth(153);
            wwq.setHeight(42);
            if (KillAura.target != null) {
                curTarget = KillAura.target;
                this.scale = AnimationHelper.animation((float) this.scale, 1.0f, (float) (6.0 * Baks.deltaTime()));
            } else {
                this.scale = AnimationHelper.animation((float) this.scale, 0.0f, (float) (6.0 * Baks.deltaTime()));
            }
            try {
                try {
                    GlStateManager.pushMatrix();
                    GlStateManager.resetColor();
                    GL11.glTranslated(x + 50.0f, y + 31.0f, 0.0);
                    GL11.glScaled(this.scale, this.scale, 0.0);
                    GL11.glTranslated(-(x + 50.0f), -(y + 31.0f), 0.0);
                    if (this.blurThud.getBoolValue()) {
                        RenderUtils.drawBlur(7.0f, () -> RenderUtils.drawSmoothRect(x, y, x + (float) wwq.getWidth(), y + (float) wwq.getHeight(), new Color(0, 0, 0, 255).getRGB()));
                    }
                    if (this.shadowThud.getBoolValue()) {
                        RenderUtils.drawShadow(5.0f, 1.0f, () -> RenderUtils.drawSmoothRect(x, y, x + (float) wwq.getWidth(), y + (float) wwq.getHeight(), new Color(17, 17, 17, 200).getRGB()));
                    }
                    GlStateManager.pushMatrix();

                    GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
                    this.mc.fontRendererObj.drawStringWithShadow(curTarget.getName(), wwq.getX() + 38, wwq.getY() - -20, -1);
                    this.mc.getTextureManager().bindTexture(new ResourceLocation("textures/gui/icons.png"));
                    i = 0;
                    while ((float) i < curTarget.getMaxHealth() / 2.0f) {
                        this.mc.ingameGUI.drawTexturedModalRect((float) (wwq.getX() + 86) - curTarget.getMaxHealth() / 2.0f * 10.0f / 2.0f + (float) (i * 8), (float) (wwq.getY() + 9), 16, 0, 9, 9);
                        ++i;
                    }
                    i = 0;
                    while ((float) i < curTarget.getHealth() / 2.0f) {
                        this.mc.ingameGUI.drawTexturedModalRect((float) (wwq.getX() + 86) - curTarget.getMaxHealth() / 2.0f * 10.0f / 2.0f + (float) (i * 8), (float) (wwq.getY() + 9), 52, 0, 9, 9);
                        ++i;
                    }


                    RenderUtils.drawSmoothRect(x, y, x + (float) wwq.getWidth(), y + (float) wwq.getHeight(), new Color(255, 0, 0, 0).getRGB());
                    double healthWid = curTarget.getHealth() / curTarget.getMaxHealth() * 110.0f;
                    healthWid = MathHelper.clamp(healthWid, 0.0, 110.0);
                    this.healthBarWidth = AnimationHelper.animation(this.healthBarWidth, (float) healthWid, (float) (10.0 * Baks.deltaTime()));
                    String health = "" + MathematicHelper.round(curTarget.getHealth(), 1);
                    String distance = "" + MathematicHelper.round(TargetHUD.mc.player.getDistanceToEntity(curTarget), 1);
                    mc.getRenderItem().renderItemOverlays(TargetHUD.mc.rubik_13, curTarget.getHeldItem(EnumHand.OFF_HAND), (int) x + 132, (int) y + 7);
                    mc.getRenderItem().renderItemIntoGUI(curTarget.getHeldItem(EnumHand.OFF_HAND), (int) x + 135, (int) y + 1);


                    for (NetworkPlayerInfo targetHead : TargetHUD.mc.player.connection.getPlayerInfoMap()) {
                        try {
                            if (TargetHUD.mc.world.getPlayerEntityByUUID(targetHead.getGameProfile().getId()) != curTarget)
                                continue;
                            mc.getTextureManager().bindTexture(targetHead.getLocationSkin());
                            int scaleOffset = (int) ((float) TargetHUD.curTarget.hurtTime * 0.55f);
                            float hurtPercent = TargetHUD.getHurtPercent(curTarget);
                            GL11.glPushMatrix();
                            GL11.glColor4f(1.0f, 1.0f - hurtPercent, 1.0f - hurtPercent, 1.0f);
                            Gui.drawScaledCustomSizeModalRect((float) ((int) x + 3), y + 4.0f, 8.0f, 8.0f, 8, 8, 32, 35, 64.0f, 64.0f);
                            GL11.glPopMatrix();
                            GlStateManager.bindTexture(0);
                        } catch (Exception exception) {
                        }
                    }
                } catch (Exception exception) {
                    GlStateManager.popMatrix();
                }
            } finally {
                GlStateManager.popMatrix();
            }
        } else if (this.targetHudMode.currentMode.equals("Baks")) {
            DraggableTargetHUD dth = (DraggableTargetHUD) Baks.instance.draggableHUD.getDraggableComponentByClass(DraggableTargetHUD.class);
            float x = dth.getX();
            float y = dth.getY();
            dth.setWidth(80);
            dth.setHeight(80);
            if (KillAura.target != null) {
                curTarget = KillAura.target;
                this.scale = AnimationHelper.animation((float) this.scale, 1.0f, (float) (6.0 * Baks.deltaTime()));
            } else {
                this.scale = AnimationHelper.animation((float) this.scale, 0.0f, (float) (6.0 * Baks.deltaTime()));
            }
            EntityLivingBase target = KillAura.target;
            if (curTarget != null && curTarget instanceof EntityPlayer) {
                try {
                    try {
                        GlStateManager.pushMatrix();
                        GlStateManager.resetColor();
                        GL11.glTranslated(x + -50.0f, y + 70.0f, 0.0);
                        GL11.glScaled(this.scale, this.scale, 0.0);
                        GL11.glTranslated(-(x + -50.0f), -(y + 70.0f), 0.0);
                        if (this.blurThud.getBoolValue()) {
                            RenderUtils.drawBlur(8.0f, () -> RenderUtils.drawSmoothRect(x, y, x + (float) dth.getWidth(), y + (float) dth.getHeight(), new Color(0, 0, 0, 100).getRGB()));
                        }
                        if (this.shadowThud.getBoolValue()) {
                            RenderUtils.drawShadow(9.0f, 2.0f, () -> RenderUtils.drawSmoothRect(x, y, x + (float) dth.getWidth(), y + (float) dth.getHeight(), new Color(0, 0, 0, 100).getRGB()));
                        }
                        RenderUtils.drawSmoothRect(x, y, x + (float) 80, y + (float) 80, new Color(0, 0, 0, 100).getRGB());
                        TargetHUD.mc.rubik_18.drawString(Baks.instance.featureManager.getFeature(NameProtect.class).isEnabled() && NameProtect.otherName.getBoolValue() ? "Protected" : curTarget.getName(), x + 5.0f, y + 60.0f, -1);
//                        TargetHUD.mc.rubik_17.drawString(String.valueOf((int) curTarget.getHealth()) + " HP - " + (int) TargetHUD.mc.player.getDistanceToEntity(curTarget) + "m", x + 35.0f, y + 5.0f + 10.0f, -1);
                        double healthWid = curTarget.getHealth() / curTarget.getMaxHealth() * 70.0f;
                        healthWid = MathHelper.clamp(healthWid, 0.0, 70.0);
                        this.healthBarWidth = AnimationHelper.animation(this.healthBarWidth, (float) healthWid, (float) (10.0 * Baks.deltaTime()));
                        RenderUtils.drawRect2(x + 5.0f, y + 70.0f, 70.0, 5.0, new Colors(Color.decode("#191f13")).setAlpha(180).getColor().getRGB());
                        RenderUtils.drawGradientRected(x + 5.0f, y + 70.0f, this.healthBarWidth, 5.0, ClientHelper.getTargetHudColor().darker().getRGB(), ClientHelper.getTargetHudColor().brighter().brighter().getRGB());
                        RenderUtils.drawBlurredShadow(x + 5.0f, y + 70.0f, this.healthBarWidth + 2.0f, 5.0f, 8, ClientHelper.getTargetHudColor().darker());
                        if (this.particles2.getBoolValue() && TargetHUD.thudColorMode.currentMode.equals("Custom")) {
                            for (Particles p : this.particles) {
                                if (!(p.opacity > 4.0)) continue;
                                p.render2D();
                            }
                            if (thudTimer.hasReached(15.0)) {
                                for (Particles p : this.particles) {
                                    p.updatePosition();
                                    if (!(p.opacity < 1.0)) continue;
                                    this.particles.remove(p);
                                }
                                thudTimer.reset();
                            }
                            if (TargetHUD.curTarget.hurtTime == 8) {
                                for (i = 0; i < 1; ++i) {
                                    Particles p = new Particles();
                                    p.init(x + 15.0f, y + 5.0f, (Math.random() - 0.5) * 2.0 * 1.9, (Math.random() - 0.5) * 2.0 * 1.4, (float) Math.random() * 1.0f, ClientHelper.getTargetHudColor());
                                    this.particles.add(p);
                                }
                            }
                        }
                        for (NetworkPlayerInfo targetHead : TargetHUD.mc.player.connection.getPlayerInfoMap()) {
                            try {
                                if (TargetHUD.mc.world.getPlayerEntityByUUID(targetHead.getGameProfile().getId()) != curTarget)
                                    continue;
                                mc.getTextureManager().bindTexture(targetHead.getLocationSkin());
                                int scaleOffset = (int) ((float) TargetHUD.curTarget.hurtTime * 0.55f);
                                float hurtPercent = TargetHUD.getHurtPercent(curTarget);
                                GL11.glPushMatrix();
                                GL11.glColor4f(1.0f, 1.0f - hurtPercent, 1.0f - hurtPercent, 1.0f);
                                Gui.drawScaledCustomSizeModalRect((float) ((int) x + 15), y + 3.0f, 8.0f, 8.0f, 8, 8, 50, 50, 64.0f, 64.0f);
                                GL11.glPopMatrix();
                                GlStateManager.bindTexture(0);
                            } catch (Exception scaleOffset) {
                                // empty catch block
                            }
                        }
                    } catch (Exception healthWid) {
                        GlStateManager.popMatrix();
                    }
                } finally {
                    GlStateManager.popMatrix();
                }

            }
        }
    }




    public static float getRenderHurtTime(EntityLivingBase hurt) {
        return (float)hurt.hurtTime - (hurt.hurtTime != 0 ? TargetHUD.mc.timer.renderPartialTicks : 0.0f);
    }

    public static float getHurtPercent(EntityLivingBase hurt) {
        return TargetHUD.getRenderHurtTime(hurt) / 10.0f;
    }

    @Override
    public void onEnable() {
        if (TargetHUD.mc.gameSettings.ofFastRender) {
            TargetHUD.mc.gameSettings.ofFastRender = false;
        }
        super.onEnable();
    }
}
тут все паста..!
 
minced client
Read Only
Статус
Оффлайн
Регистрация
8 Май 2022
Сообщения
616
Реакции[?]
61
Поинты[?]
2K
TargetHUD.java:
package dev.etc.client.feature.impl.hud;

import dev.etc.client.Baks;
import dev.etc.client.draggable.component.impl.DraggableTargetHUD;
import dev.etc.client.event.EventTarget;
import dev.etc.client.event.events.impl.render.EventRender2D;
import dev.etc.client.feature.Feature;
import dev.etc.client.feature.impl.FeatureCategory;
import dev.etc.client.feature.impl.combat.KillAura;
import dev.etc.client.feature.impl.misc.NameProtect;
import dev.etc.client.ui.settings.impl.BooleanSetting;
import dev.etc.client.ui.settings.impl.ColorSetting;
import dev.etc.client.ui.settings.impl.ListSetting;
import dev.etc.client.utils.math.AnimationHelper;
import dev.etc.client.utils.math.MathematicHelper;
import dev.etc.client.utils.math.TimerHelper;
import dev.etc.client.utils.other.Particles;
import dev.etc.client.utils.render.*;
import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.GuiChat;
import net.minecraft.client.network.NetworkPlayerInfo;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.EnumHand;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.MathHelper;
import org.lwjgl.opengl.GL11;

import java.awt.*;
import java.util.ArrayList;

public class TargetHUD
        extends Feature {
    private double scale = 0.0;
    private static EntityLivingBase curTarget = null;
    public static TimerHelper thudTimer = new TimerHelper();
    private float healthBarWidth;
    private ArrayList<Particles> particles = new ArrayList();
    public ListSetting targetHudMode = new ListSetting("TargetHUD Mode", "Default", () -> true, "Style", "New", "Default", "Minecraft", "Baks", "Modern");
    public static ListSetting thudColorMode = new ListSetting("TargetHUD Color", "Astolfo", () -> true, "Astolfo", "Rainbow", "Client", "Custom");
    public BooleanSetting particles2;
    public static ColorSetting targetHudColor = new ColorSetting("THUD Color", Color.PINK.getRGB(), () -> TargetHUD.thudColorMode.currentMode.equals("Custom"));
    public BooleanSetting shadowThud;
    public BooleanSetting blurThud;
    private /* synthetic */ Color gradientColor1;
    private /* synthetic */ Color gradientColor2;
    private /* synthetic */ Color gradientColor3;
    private /* synthetic */ Color gradientColor4;


    public TargetHUD() {
        super("TargetHUD", FeatureCategory.Hud);
        this.particles2 = new BooleanSetting("Particles", TargetHUD.thudColorMode.currentMode.equals("Custom"), () -> this.targetHudMode.currentMode.equals("Style") && TargetHUD.thudColorMode.currentMode.equals("Custom"));
        this.shadowThud = new BooleanSetting("Shadow", true, () -> true);
        this.blurThud = new BooleanSetting("Blur", true, () -> true);
        this.gradientColor1 = Color.WHITE;
        this.gradientColor2 = Color.WHITE;
        this.gradientColor3 = Color.WHITE;
        this.gradientColor4 = Color.WHITE;

        this.addSettings(this.targetHudMode, thudColorMode, this.particles2, targetHudColor, this.shadowThud, this.blurThud);
    }

    @EventTarget
    public void onRender2D(EventRender2D e2) {
        int i;


        if (this.targetHudMode.currentMode.equals("Style")) {
            DraggableTargetHUD dth = (DraggableTargetHUD) Baks.instance.draggableHUD.getDraggableComponentByClass(DraggableTargetHUD.class);
            float x = dth.getX();
            float y = dth.getY();
            dth.setWidth(130);
            dth.setHeight(37);
            if (KillAura.target != null) {
                curTarget = KillAura.target;
                this.scale = AnimationHelper.animation((float) this.scale, 1.0f, (float) (6.0 * Baks.deltaTime()));
            } else {
                this.scale = AnimationHelper.animation((float) this.scale, 0.0f, (float) (6.0 * Baks.deltaTime()));
            }
            EntityLivingBase target = KillAura.target;
            if (curTarget != null && curTarget instanceof EntityPlayer) {
                try {
                    try {
                        GlStateManager.pushMatrix();
                        GlStateManager.resetColor();
                        GL11.glTranslated(x + 36.0f, y + 26.0f, 0.0);
                        GL11.glScaled(this.scale, this.scale, 0.0);
                        GL11.glTranslated(-(x + 36.0f), -(y + 26.0f), 0.0);
                        if (this.blurThud.getBoolValue()) {
                            RenderUtils.drawBlur(8.0f, () -> RenderUtils.drawSmoothRect(x, y, x + (float) dth.getWidth(), y + (float) dth.getHeight(), new Color(0, 0, 0, 100).getRGB()));
                        }
                        if (this.shadowThud.getBoolValue()) {
                            RenderUtils.drawShadow(9.0f, 2.0f, () -> RenderUtils.drawSmoothRect(x, y, x + (float) dth.getWidth(), y + (float) dth.getHeight(), new Color(0, 0, 0, 100).getRGB()));
                        }
                        RenderUtils.drawSmoothRect(x, y, x + (float) dth.getWidth(), y + (float) dth.getHeight(), new Color(0, 0, 0, 100).getRGB());
                        TargetHUD.mc.rubik_18.drawString(Baks.instance.featureManager.getFeature(NameProtect.class).isEnabled() && NameProtect.otherName.getBoolValue() ? "Protected" : curTarget.getName(), x + 35.0f, y + 5.0f, -1);
                        TargetHUD.mc.rubik_17.drawString(String.valueOf((int) curTarget.getHealth()) + " HP - " + (int) TargetHUD.mc.player.getDistanceToEntity(curTarget) + "m", x + 35.0f, y + 5.0f + 10.0f, -1);
                        double healthWid = curTarget.getHealth() / curTarget.getMaxHealth() * 90.0f;
                        healthWid = MathHelper.clamp(healthWid, 0.0, 90.0);
                        this.healthBarWidth = AnimationHelper.animation(this.healthBarWidth, (float) healthWid, (float) (10.0 * Baks.deltaTime()));
                        RenderUtils.drawRect2(x + 36.0f, y + 25.0f, 90.0, 5.0, new Colors(Color.decode("#191f13")).setAlpha(180).getColor().getRGB());
                        RenderUtils.drawGradientRected(x + 36.0f, y + 25.0f, this.healthBarWidth, 5.0, ClientHelper.getTargetHudColor().darker().getRGB(), ClientHelper.getTargetHudColor().brighter().brighter().getRGB());
                        RenderUtils.drawBlurredShadow(x + 40.0f, y + 25.0f, this.healthBarWidth + 2.0f, 5.0f, 8, ClientHelper.getTargetHudColor().darker());
                        if (this.particles2.getBoolValue() && TargetHUD.thudColorMode.currentMode.equals("Custom")) {
                            for (Particles p : this.particles) {
                                if (!(p.opacity > 4.0)) continue;
                                p.render2D();
                            }
                            if (thudTimer.hasReached(15.0)) {
                                for (Particles p : this.particles) {
                                    p.updatePosition();
                                    if (!(p.opacity < 1.0)) continue;
                                    this.particles.remove(p);
                                }
                                thudTimer.reset();
                            }
                            if (TargetHUD.curTarget.hurtTime == 8) {
                                for (i = 0; i < 1; ++i) {
                                    Particles p = new Particles();
                                    p.init(x + 15.0f, y + 15.0f, (Math.random() - 0.5) * 2.0 * 1.9, (Math.random() - 0.5) * 2.0 * 1.4, (float) Math.random() * 1.0f, ClientHelper.getTargetHudColor());
                                    this.particles.add(p);
                                }
                            }
                        }
                        for (NetworkPlayerInfo targetHead : TargetHUD.mc.player.connection.getPlayerInfoMap()) {
                            try {
                                if (TargetHUD.mc.world.getPlayerEntityByUUID(targetHead.getGameProfile().getId()) != curTarget)
                                    continue;
                                mc.getTextureManager().bindTexture(targetHead.getLocationSkin());
                                int scaleOffset = (int) ((float) TargetHUD.curTarget.hurtTime * 0.55f);
                                float hurtPercent = TargetHUD.getHurtPercent(curTarget);
                                GL11.glPushMatrix();
                                GL11.glColor4f(1.0f, 1.0f - hurtPercent, 1.0f - hurtPercent, 1.0f);
                                Gui.drawScaledCustomSizeModalRect((float) ((int) x + 3), y + 3.0f, 8.0f, 8.0f, 8, 8, 30, 30, 64.0f, 64.0f);
                                GL11.glPopMatrix();
                                GlStateManager.bindTexture(0);
                            } catch (Exception scaleOffset) {
                                // empty catch block
                            }
                        }
                    } catch (Exception healthWid) {
                        GlStateManager.popMatrix();
                    }
                } finally {
                    GlStateManager.popMatrix();
                }
            }


        } else if (this.targetHudMode.currentMode.equals("Default")) {
            DraggableTargetHUD dth = (DraggableTargetHUD) Baks.instance.draggableHUD.getDraggableComponentByClass(DraggableTargetHUD.class);
            float x = dth.getX();
            float y = dth.getY();
            dth.setWidth(153);
            dth.setHeight(42);
            if (KillAura.target != null) {
                curTarget = KillAura.target;
                this.scale = AnimationHelper.animation((float) this.scale, 1.0f, (float) (6.0 * Baks.deltaTime()));
            } else {
                this.scale = AnimationHelper.animation((float) this.scale, 0.0f, (float) (6.0 * Baks.deltaTime()));
            }
            EntityLivingBase target = KillAura.target;
            if (curTarget != null && curTarget instanceof EntityPlayer) {
                try {
                    try {
                        GlStateManager.pushMatrix();
                        GlStateManager.resetColor();
                        GL11.glTranslated(x + 50.0f, y + 31.0f, 0.0);
                        GL11.glScaled(this.scale, this.scale, 0.0);
                        GL11.glTranslated(-(x + 50.0f), -(y + 31.0f), 0.0);
//                        if (this.blurThud.getBoolValue()) {
//                            RenderUtils.drawBlur(7.0f, () -> RenderUtils.drawSmoothRect(x, y, x + (float)dth.getWidth(), y + (float)dth.getHeight(), new Color(255, 255, 255, 0).getRGB()));
//                        }
//                        if (this.shadowThud.getBoolValue()) {
//                            RenderUtils.drawShadow(5.0f, 1.0f, () -> RenderUtils.drawSmoothRect(x, y, x + (float)dth.getWidth(), y + (float)dth.getHeight(), new Color(17, 17, 17, 0).getRGB()));
//                        }
                        RenderUtils.drawSmoothRect(x, y, x + (float) dth.getWidth(), y + (float) dth.getHeight(), new Color(0, 255, 208, 0).getRGB());
                        double healthWid = curTarget.getHealth() / curTarget.getMaxHealth() * 110.0f;
                        healthWid = MathHelper.clamp(healthWid, 0.0, 110.0);
                        this.healthBarWidth = AnimationHelper.animation(this.healthBarWidth, (float) healthWid, (float) (10.0 * Baks.deltaTime()));
                        String health = "" + MathematicHelper.round(curTarget.getHealth(), 1);
                        String distance = "" + MathematicHelper.round(TargetHUD.mc.player.getDistanceToEntity(curTarget), 1);
                        TargetHUD.mc.rubik_15.drawString("Name: " + curTarget.getName(), x + 38.0f, y + 19.0f, -1);
//                        TargetHUD.mc.rubik_15.drawString("Distance: " + distance, x + 42.0f, y + 15.0f, -1);
//                        TargetHUD.mc.rubik_14.drawString(curTarget.getHealth() >= 3.0f ? health : "", x + 24.0f + this.healthBarWidth, y + 26.5f, new Color(0, 255, 178, 0).getRGB());
                        RenderUtils.drawSmoothRect(x + 38.0f, y + 33.0f, x + 38.0f + this.healthBarWidth, y + 33.0f + 5.0f, ClientHelper.getTargetHudColor().darker().getRGB());
                        RenderUtils.drawBlurredShadow(x + 38.0f, y + 33.0f, this.healthBarWidth, 5.0f, 12, RenderUtils.injectAlpha(ClientHelper.getTargetHudColor(), 1000));
                        mc.getRenderItem().renderItemOverlays(TargetHUD.mc.rubik_13, curTarget.getHeldItem(EnumHand.OFF_HAND), (int) x + 132, (int) y + 7);
                        mc.getRenderItem().renderItemIntoGUI(curTarget.getHeldItem(EnumHand.OFF_HAND), (int) x + 135, (int) y + 1);
//                        for (NetworkPlayerInfo targetHead : TargetHUD.mc.player.connection.getPlayerInfoMap()) {
//                            try {
//                                if (TargetHUD.mc.world.getPlayerEntityByUUID(targetHead.getGameProfile().getId()) != curTarget) continue;
//                                mc.getTextureManager().bindTexture(targetHead.getLocationSkin());
//                                int scaleOffset = (int)((float)TargetHUD.curTarget.hurtTime * 0.55f);
//                                float hurtPercent = TargetHUD.getHurtPercent(curTarget);
//                                GL11.glPushMatrix();
//                                GL11.glColor4f(1.0f, 1.0f - hurtPercent, 1.0f - hurtPercent, 1.0f);
//                                Gui.drawScaledCustomSizeModalRect((float)((int)x + 3), y + 4.0f, 8.0f, 8.0f, 8, 8, 32, 35, 64.0f, 64.0f);
//                                GL11.glPopMatrix();
//                                GlStateManager.bindTexture(0);
//                            }
//                            catch (Exception exception) {
//                                // empty catch block
//                            }
//                        }
                    } catch (Exception exception) {
                        GlStateManager.popMatrix();
                    }
                } finally {
                    GlStateManager.popMatrix();
                }
            }


        } else if (this.targetHudMode.currentMode.equals("Minecraft")) {
            DraggableTargetHUD wwq = (DraggableTargetHUD) Baks.instance.draggableHUD.getDraggableComponentByClass(DraggableTargetHUD.class);
            float x = wwq.getX();
            float y = wwq.getY();
            wwq.setWidth(153);
            wwq.setHeight(42);
            if (KillAura.target != null) {
                curTarget = KillAura.target;
                this.scale = AnimationHelper.animation((float) this.scale, 1.0f, (float) (6.0 * Baks.deltaTime()));
            } else {
                this.scale = AnimationHelper.animation((float) this.scale, 0.0f, (float) (6.0 * Baks.deltaTime()));
            }
            try {
                try {
                    GlStateManager.pushMatrix();
                    GlStateManager.resetColor();
                    GL11.glTranslated(x + 50.0f, y + 31.0f, 0.0);
                    GL11.glScaled(this.scale, this.scale, 0.0);
                    GL11.glTranslated(-(x + 50.0f), -(y + 31.0f), 0.0);
                    if (this.blurThud.getBoolValue()) {
                        RenderUtils.drawBlur(7.0f, () -> RenderUtils.drawSmoothRect(x, y, x + (float) wwq.getWidth(), y + (float) wwq.getHeight(), new Color(0, 0, 0, 255).getRGB()));
                    }
                    if (this.shadowThud.getBoolValue()) {
                        RenderUtils.drawShadow(5.0f, 1.0f, () -> RenderUtils.drawSmoothRect(x, y, x + (float) wwq.getWidth(), y + (float) wwq.getHeight(), new Color(17, 17, 17, 200).getRGB()));
                    }
                    GlStateManager.pushMatrix();

                    GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
                    this.mc.fontRendererObj.drawStringWithShadow(curTarget.getName(), wwq.getX() + 38, wwq.getY() - -20, -1);
                    this.mc.getTextureManager().bindTexture(new ResourceLocation("textures/gui/icons.png"));
                    i = 0;
                    while ((float) i < curTarget.getMaxHealth() / 2.0f) {
                        this.mc.ingameGUI.drawTexturedModalRect((float) (wwq.getX() + 86) - curTarget.getMaxHealth() / 2.0f * 10.0f / 2.0f + (float) (i * 8), (float) (wwq.getY() + 9), 16, 0, 9, 9);
                        ++i;
                    }
                    i = 0;
                    while ((float) i < curTarget.getHealth() / 2.0f) {
                        this.mc.ingameGUI.drawTexturedModalRect((float) (wwq.getX() + 86) - curTarget.getMaxHealth() / 2.0f * 10.0f / 2.0f + (float) (i * 8), (float) (wwq.getY() + 9), 52, 0, 9, 9);
                        ++i;
                    }


                    RenderUtils.drawSmoothRect(x, y, x + (float) wwq.getWidth(), y + (float) wwq.getHeight(), new Color(255, 0, 0, 0).getRGB());
                    double healthWid = curTarget.getHealth() / curTarget.getMaxHealth() * 110.0f;
                    healthWid = MathHelper.clamp(healthWid, 0.0, 110.0);
                    this.healthBarWidth = AnimationHelper.animation(this.healthBarWidth, (float) healthWid, (float) (10.0 * Baks.deltaTime()));
                    String health = "" + MathematicHelper.round(curTarget.getHealth(), 1);
                    String distance = "" + MathematicHelper.round(TargetHUD.mc.player.getDistanceToEntity(curTarget), 1);
                    mc.getRenderItem().renderItemOverlays(TargetHUD.mc.rubik_13, curTarget.getHeldItem(EnumHand.OFF_HAND), (int) x + 132, (int) y + 7);
                    mc.getRenderItem().renderItemIntoGUI(curTarget.getHeldItem(EnumHand.OFF_HAND), (int) x + 135, (int) y + 1);


                    for (NetworkPlayerInfo targetHead : TargetHUD.mc.player.connection.getPlayerInfoMap()) {
                        try {
                            if (TargetHUD.mc.world.getPlayerEntityByUUID(targetHead.getGameProfile().getId()) != curTarget)
                                continue;
                            mc.getTextureManager().bindTexture(targetHead.getLocationSkin());
                            int scaleOffset = (int) ((float) TargetHUD.curTarget.hurtTime * 0.55f);
                            float hurtPercent = TargetHUD.getHurtPercent(curTarget);
                            GL11.glPushMatrix();
                            GL11.glColor4f(1.0f, 1.0f - hurtPercent, 1.0f - hurtPercent, 1.0f);
                            Gui.drawScaledCustomSizeModalRect((float) ((int) x + 3), y + 4.0f, 8.0f, 8.0f, 8, 8, 32, 35, 64.0f, 64.0f);
                            GL11.glPopMatrix();
                            GlStateManager.bindTexture(0);
                        } catch (Exception exception) {
                        }
                    }
                } catch (Exception exception) {
                    GlStateManager.popMatrix();
                }
            } finally {
                GlStateManager.popMatrix();
            }
        } else if (this.targetHudMode.currentMode.equals("Baks")) {
            DraggableTargetHUD dth = (DraggableTargetHUD) Baks.instance.draggableHUD.getDraggableComponentByClass(DraggableTargetHUD.class);
            float x = dth.getX();
            float y = dth.getY();
            dth.setWidth(80);
            dth.setHeight(80);
            if (KillAura.target != null) {
                curTarget = KillAura.target;
                this.scale = AnimationHelper.animation((float) this.scale, 1.0f, (float) (6.0 * Baks.deltaTime()));
            } else {
                this.scale = AnimationHelper.animation((float) this.scale, 0.0f, (float) (6.0 * Baks.deltaTime()));
            }
            EntityLivingBase target = KillAura.target;
            if (curTarget != null && curTarget instanceof EntityPlayer) {
                try {
                    try {
                        GlStateManager.pushMatrix();
                        GlStateManager.resetColor();
                        GL11.glTranslated(x + -50.0f, y + 70.0f, 0.0);
                        GL11.glScaled(this.scale, this.scale, 0.0);
                        GL11.glTranslated(-(x + -50.0f), -(y + 70.0f), 0.0);
                        if (this.blurThud.getBoolValue()) {
                            RenderUtils.drawBlur(8.0f, () -> RenderUtils.drawSmoothRect(x, y, x + (float) dth.getWidth(), y + (float) dth.getHeight(), new Color(0, 0, 0, 100).getRGB()));
                        }
                        if (this.shadowThud.getBoolValue()) {
                            RenderUtils.drawShadow(9.0f, 2.0f, () -> RenderUtils.drawSmoothRect(x, y, x + (float) dth.getWidth(), y + (float) dth.getHeight(), new Color(0, 0, 0, 100).getRGB()));
                        }
                        RenderUtils.drawSmoothRect(x, y, x + (float) 80, y + (float) 80, new Color(0, 0, 0, 100).getRGB());
                        TargetHUD.mc.rubik_18.drawString(Baks.instance.featureManager.getFeature(NameProtect.class).isEnabled() && NameProtect.otherName.getBoolValue() ? "Protected" : curTarget.getName(), x + 5.0f, y + 60.0f, -1);
//                        TargetHUD.mc.rubik_17.drawString(String.valueOf((int) curTarget.getHealth()) + " HP - " + (int) TargetHUD.mc.player.getDistanceToEntity(curTarget) + "m", x + 35.0f, y + 5.0f + 10.0f, -1);
                        double healthWid = curTarget.getHealth() / curTarget.getMaxHealth() * 70.0f;
                        healthWid = MathHelper.clamp(healthWid, 0.0, 70.0);
                        this.healthBarWidth = AnimationHelper.animation(this.healthBarWidth, (float) healthWid, (float) (10.0 * Baks.deltaTime()));
                        RenderUtils.drawRect2(x + 5.0f, y + 70.0f, 70.0, 5.0, new Colors(Color.decode("#191f13")).setAlpha(180).getColor().getRGB());
                        RenderUtils.drawGradientRected(x + 5.0f, y + 70.0f, this.healthBarWidth, 5.0, ClientHelper.getTargetHudColor().darker().getRGB(), ClientHelper.getTargetHudColor().brighter().brighter().getRGB());
                        RenderUtils.drawBlurredShadow(x + 5.0f, y + 70.0f, this.healthBarWidth + 2.0f, 5.0f, 8, ClientHelper.getTargetHudColor().darker());
                        if (this.particles2.getBoolValue() && TargetHUD.thudColorMode.currentMode.equals("Custom")) {
                            for (Particles p : this.particles) {
                                if (!(p.opacity > 4.0)) continue;
                                p.render2D();
                            }
                            if (thudTimer.hasReached(15.0)) {
                                for (Particles p : this.particles) {
                                    p.updatePosition();
                                    if (!(p.opacity < 1.0)) continue;
                                    this.particles.remove(p);
                                }
                                thudTimer.reset();
                            }
                            if (TargetHUD.curTarget.hurtTime == 8) {
                                for (i = 0; i < 1; ++i) {
                                    Particles p = new Particles();
                                    p.init(x + 15.0f, y + 5.0f, (Math.random() - 0.5) * 2.0 * 1.9, (Math.random() - 0.5) * 2.0 * 1.4, (float) Math.random() * 1.0f, ClientHelper.getTargetHudColor());
                                    this.particles.add(p);
                                }
                            }
                        }
                        for (NetworkPlayerInfo targetHead : TargetHUD.mc.player.connection.getPlayerInfoMap()) {
                            try {
                                if (TargetHUD.mc.world.getPlayerEntityByUUID(targetHead.getGameProfile().getId()) != curTarget)
                                    continue;
                                mc.getTextureManager().bindTexture(targetHead.getLocationSkin());
                                int scaleOffset = (int) ((float) TargetHUD.curTarget.hurtTime * 0.55f);
                                float hurtPercent = TargetHUD.getHurtPercent(curTarget);
                                GL11.glPushMatrix();
                                GL11.glColor4f(1.0f, 1.0f - hurtPercent, 1.0f - hurtPercent, 1.0f);
                                Gui.drawScaledCustomSizeModalRect((float) ((int) x + 15), y + 3.0f, 8.0f, 8.0f, 8, 8, 50, 50, 64.0f, 64.0f);
                                GL11.glPopMatrix();
                                GlStateManager.bindTexture(0);
                            } catch (Exception scaleOffset) {
                                // empty catch block
                            }
                        }
                    } catch (Exception healthWid) {
                        GlStateManager.popMatrix();
                    }
                } finally {
                    GlStateManager.popMatrix();
                }

            }
        }
    }




    public static float getRenderHurtTime(EntityLivingBase hurt) {
        return (float)hurt.hurtTime - (hurt.hurtTime != 0 ? TargetHUD.mc.timer.renderPartialTicks : 0.0f);
    }

    public static float getHurtPercent(EntityLivingBase hurt) {
        return TargetHUD.getRenderHurtTime(hurt) / 10.0f;
    }

    @Override
    public void onEnable() {
        if (TargetHUD.mc.gameSettings.ofFastRender) {
            TargetHUD.mc.gameSettings.ofFastRender = false;
        }
        super.onEnable();
    }
}
тут все паста..!
Это из сурсов юнити таргет худы и они все баганные, ну хотя для пастеров может быть сойдет.
 
Начинающий
Статус
Оффлайн
Регистрация
7 Ноя 2020
Сообщения
34
Реакции[?]
0
Поинты[?]
0
TargetHUD.java:
package dev.etc.client.feature.impl.hud;

import dev.etc.client.Baks;
import dev.etc.client.draggable.component.impl.DraggableTargetHUD;
import dev.etc.client.event.EventTarget;
import dev.etc.client.event.events.impl.render.EventRender2D;
import dev.etc.client.feature.Feature;
import dev.etc.client.feature.impl.FeatureCategory;
import dev.etc.client.feature.impl.combat.KillAura;
import dev.etc.client.feature.impl.misc.NameProtect;
import dev.etc.client.ui.settings.impl.BooleanSetting;
import dev.etc.client.ui.settings.impl.ColorSetting;
import dev.etc.client.ui.settings.impl.ListSetting;
import dev.etc.client.utils.math.AnimationHelper;
import dev.etc.client.utils.math.MathematicHelper;
import dev.etc.client.utils.math.TimerHelper;
import dev.etc.client.utils.other.Particles;
import dev.etc.client.utils.render.*;
import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.GuiChat;
import net.minecraft.client.network.NetworkPlayerInfo;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.EnumHand;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.MathHelper;
import org.lwjgl.opengl.GL11;

import java.awt.*;
import java.util.ArrayList;

public class TargetHUD
        extends Feature {
    private double scale = 0.0;
    private static EntityLivingBase curTarget = null;
    public static TimerHelper thudTimer = new TimerHelper();
    private float healthBarWidth;
    private ArrayList<Particles> particles = new ArrayList();
    public ListSetting targetHudMode = new ListSetting("TargetHUD Mode", "Default", () -> true, "Style", "New", "Default", "Minecraft", "Baks", "Modern");
    public static ListSetting thudColorMode = new ListSetting("TargetHUD Color", "Astolfo", () -> true, "Astolfo", "Rainbow", "Client", "Custom");
    public BooleanSetting particles2;
    public static ColorSetting targetHudColor = new ColorSetting("THUD Color", Color.PINK.getRGB(), () -> TargetHUD.thudColorMode.currentMode.equals("Custom"));
    public BooleanSetting shadowThud;
    public BooleanSetting blurThud;
    private /* synthetic */ Color gradientColor1;
    private /* synthetic */ Color gradientColor2;
    private /* synthetic */ Color gradientColor3;
    private /* synthetic */ Color gradientColor4;


    public TargetHUD() {
        super("TargetHUD", FeatureCategory.Hud);
        this.particles2 = new BooleanSetting("Particles", TargetHUD.thudColorMode.currentMode.equals("Custom"), () -> this.targetHudMode.currentMode.equals("Style") && TargetHUD.thudColorMode.currentMode.equals("Custom"));
        this.shadowThud = new BooleanSetting("Shadow", true, () -> true);
        this.blurThud = new BooleanSetting("Blur", true, () -> true);
        this.gradientColor1 = Color.WHITE;
        this.gradientColor2 = Color.WHITE;
        this.gradientColor3 = Color.WHITE;
        this.gradientColor4 = Color.WHITE;

        this.addSettings(this.targetHudMode, thudColorMode, this.particles2, targetHudColor, this.shadowThud, this.blurThud);
    }

    @EventTarget
    public void onRender2D(EventRender2D e2) {
        int i;


        if (this.targetHudMode.currentMode.equals("Style")) {
            DraggableTargetHUD dth = (DraggableTargetHUD) Baks.instance.draggableHUD.getDraggableComponentByClass(DraggableTargetHUD.class);
            float x = dth.getX();
            float y = dth.getY();
            dth.setWidth(130);
            dth.setHeight(37);
            if (KillAura.target != null) {
                curTarget = KillAura.target;
                this.scale = AnimationHelper.animation((float) this.scale, 1.0f, (float) (6.0 * Baks.deltaTime()));
            } else {
                this.scale = AnimationHelper.animation((float) this.scale, 0.0f, (float) (6.0 * Baks.deltaTime()));
            }
            EntityLivingBase target = KillAura.target;
            if (curTarget != null && curTarget instanceof EntityPlayer) {
                try {
                    try {
                        GlStateManager.pushMatrix();
                        GlStateManager.resetColor();
                        GL11.glTranslated(x + 36.0f, y + 26.0f, 0.0);
                        GL11.glScaled(this.scale, this.scale, 0.0);
                        GL11.glTranslated(-(x + 36.0f), -(y + 26.0f), 0.0);
                        if (this.blurThud.getBoolValue()) {
                            RenderUtils.drawBlur(8.0f, () -> RenderUtils.drawSmoothRect(x, y, x + (float) dth.getWidth(), y + (float) dth.getHeight(), new Color(0, 0, 0, 100).getRGB()));
                        }
                        if (this.shadowThud.getBoolValue()) {
                            RenderUtils.drawShadow(9.0f, 2.0f, () -> RenderUtils.drawSmoothRect(x, y, x + (float) dth.getWidth(), y + (float) dth.getHeight(), new Color(0, 0, 0, 100).getRGB()));
                        }
                        RenderUtils.drawSmoothRect(x, y, x + (float) dth.getWidth(), y + (float) dth.getHeight(), new Color(0, 0, 0, 100).getRGB());
                        TargetHUD.mc.rubik_18.drawString(Baks.instance.featureManager.getFeature(NameProtect.class).isEnabled() && NameProtect.otherName.getBoolValue() ? "Protected" : curTarget.getName(), x + 35.0f, y + 5.0f, -1);
                        TargetHUD.mc.rubik_17.drawString(String.valueOf((int) curTarget.getHealth()) + " HP - " + (int) TargetHUD.mc.player.getDistanceToEntity(curTarget) + "m", x + 35.0f, y + 5.0f + 10.0f, -1);
                        double healthWid = curTarget.getHealth() / curTarget.getMaxHealth() * 90.0f;
                        healthWid = MathHelper.clamp(healthWid, 0.0, 90.0);
                        this.healthBarWidth = AnimationHelper.animation(this.healthBarWidth, (float) healthWid, (float) (10.0 * Baks.deltaTime()));
                        RenderUtils.drawRect2(x + 36.0f, y + 25.0f, 90.0, 5.0, new Colors(Color.decode("#191f13")).setAlpha(180).getColor().getRGB());
                        RenderUtils.drawGradientRected(x + 36.0f, y + 25.0f, this.healthBarWidth, 5.0, ClientHelper.getTargetHudColor().darker().getRGB(), ClientHelper.getTargetHudColor().brighter().brighter().getRGB());
                        RenderUtils.drawBlurredShadow(x + 40.0f, y + 25.0f, this.healthBarWidth + 2.0f, 5.0f, 8, ClientHelper.getTargetHudColor().darker());
                        if (this.particles2.getBoolValue() && TargetHUD.thudColorMode.currentMode.equals("Custom")) {
                            for (Particles p : this.particles) {
                                if (!(p.opacity > 4.0)) continue;
                                p.render2D();
                            }
                            if (thudTimer.hasReached(15.0)) {
                                for (Particles p : this.particles) {
                                    p.updatePosition();
                                    if (!(p.opacity < 1.0)) continue;
                                    this.particles.remove(p);
                                }
                                thudTimer.reset();
                            }
                            if (TargetHUD.curTarget.hurtTime == 8) {
                                for (i = 0; i < 1; ++i) {
                                    Particles p = new Particles();
                                    p.init(x + 15.0f, y + 15.0f, (Math.random() - 0.5) * 2.0 * 1.9, (Math.random() - 0.5) * 2.0 * 1.4, (float) Math.random() * 1.0f, ClientHelper.getTargetHudColor());
                                    this.particles.add(p);
                                }
                            }
                        }
                        for (NetworkPlayerInfo targetHead : TargetHUD.mc.player.connection.getPlayerInfoMap()) {
                            try {
                                if (TargetHUD.mc.world.getPlayerEntityByUUID(targetHead.getGameProfile().getId()) != curTarget)
                                    continue;
                                mc.getTextureManager().bindTexture(targetHead.getLocationSkin());
                                int scaleOffset = (int) ((float) TargetHUD.curTarget.hurtTime * 0.55f);
                                float hurtPercent = TargetHUD.getHurtPercent(curTarget);
                                GL11.glPushMatrix();
                                GL11.glColor4f(1.0f, 1.0f - hurtPercent, 1.0f - hurtPercent, 1.0f);
                                Gui.drawScaledCustomSizeModalRect((float) ((int) x + 3), y + 3.0f, 8.0f, 8.0f, 8, 8, 30, 30, 64.0f, 64.0f);
                                GL11.glPopMatrix();
                                GlStateManager.bindTexture(0);
                            } catch (Exception scaleOffset) {
                                // empty catch block
                            }
                        }
                    } catch (Exception healthWid) {
                        GlStateManager.popMatrix();
                    }
                } finally {
                    GlStateManager.popMatrix();
                }
            }


        } else if (this.targetHudMode.currentMode.equals("Default")) {
            DraggableTargetHUD dth = (DraggableTargetHUD) Baks.instance.draggableHUD.getDraggableComponentByClass(DraggableTargetHUD.class);
            float x = dth.getX();
            float y = dth.getY();
            dth.setWidth(153);
            dth.setHeight(42);
            if (KillAura.target != null) {
                curTarget = KillAura.target;
                this.scale = AnimationHelper.animation((float) this.scale, 1.0f, (float) (6.0 * Baks.deltaTime()));
            } else {
                this.scale = AnimationHelper.animation((float) this.scale, 0.0f, (float) (6.0 * Baks.deltaTime()));
            }
            EntityLivingBase target = KillAura.target;
            if (curTarget != null && curTarget instanceof EntityPlayer) {
                try {
                    try {
                        GlStateManager.pushMatrix();
                        GlStateManager.resetColor();
                        GL11.glTranslated(x + 50.0f, y + 31.0f, 0.0);
                        GL11.glScaled(this.scale, this.scale, 0.0);
                        GL11.glTranslated(-(x + 50.0f), -(y + 31.0f), 0.0);
//                        if (this.blurThud.getBoolValue()) {
//                            RenderUtils.drawBlur(7.0f, () -> RenderUtils.drawSmoothRect(x, y, x + (float)dth.getWidth(), y + (float)dth.getHeight(), new Color(255, 255, 255, 0).getRGB()));
//                        }
//                        if (this.shadowThud.getBoolValue()) {
//                            RenderUtils.drawShadow(5.0f, 1.0f, () -> RenderUtils.drawSmoothRect(x, y, x + (float)dth.getWidth(), y + (float)dth.getHeight(), new Color(17, 17, 17, 0).getRGB()));
//                        }
                        RenderUtils.drawSmoothRect(x, y, x + (float) dth.getWidth(), y + (float) dth.getHeight(), new Color(0, 255, 208, 0).getRGB());
                        double healthWid = curTarget.getHealth() / curTarget.getMaxHealth() * 110.0f;
                        healthWid = MathHelper.clamp(healthWid, 0.0, 110.0);
                        this.healthBarWidth = AnimationHelper.animation(this.healthBarWidth, (float) healthWid, (float) (10.0 * Baks.deltaTime()));
                        String health = "" + MathematicHelper.round(curTarget.getHealth(), 1);
                        String distance = "" + MathematicHelper.round(TargetHUD.mc.player.getDistanceToEntity(curTarget), 1);
                        TargetHUD.mc.rubik_15.drawString("Name: " + curTarget.getName(), x + 38.0f, y + 19.0f, -1);
//                        TargetHUD.mc.rubik_15.drawString("Distance: " + distance, x + 42.0f, y + 15.0f, -1);
//                        TargetHUD.mc.rubik_14.drawString(curTarget.getHealth() >= 3.0f ? health : "", x + 24.0f + this.healthBarWidth, y + 26.5f, new Color(0, 255, 178, 0).getRGB());
                        RenderUtils.drawSmoothRect(x + 38.0f, y + 33.0f, x + 38.0f + this.healthBarWidth, y + 33.0f + 5.0f, ClientHelper.getTargetHudColor().darker().getRGB());
                        RenderUtils.drawBlurredShadow(x + 38.0f, y + 33.0f, this.healthBarWidth, 5.0f, 12, RenderUtils.injectAlpha(ClientHelper.getTargetHudColor(), 1000));
                        mc.getRenderItem().renderItemOverlays(TargetHUD.mc.rubik_13, curTarget.getHeldItem(EnumHand.OFF_HAND), (int) x + 132, (int) y + 7);
                        mc.getRenderItem().renderItemIntoGUI(curTarget.getHeldItem(EnumHand.OFF_HAND), (int) x + 135, (int) y + 1);
//                        for (NetworkPlayerInfo targetHead : TargetHUD.mc.player.connection.getPlayerInfoMap()) {
//                            try {
//                                if (TargetHUD.mc.world.getPlayerEntityByUUID(targetHead.getGameProfile().getId()) != curTarget) continue;
//                                mc.getTextureManager().bindTexture(targetHead.getLocationSkin());
//                                int scaleOffset = (int)((float)TargetHUD.curTarget.hurtTime * 0.55f);
//                                float hurtPercent = TargetHUD.getHurtPercent(curTarget);
//                                GL11.glPushMatrix();
//                                GL11.glColor4f(1.0f, 1.0f - hurtPercent, 1.0f - hurtPercent, 1.0f);
//                                Gui.drawScaledCustomSizeModalRect((float)((int)x + 3), y + 4.0f, 8.0f, 8.0f, 8, 8, 32, 35, 64.0f, 64.0f);
//                                GL11.glPopMatrix();
//                                GlStateManager.bindTexture(0);
//                            }
//                            catch (Exception exception) {
//                                // empty catch block
//                            }
//                        }
                    } catch (Exception exception) {
                        GlStateManager.popMatrix();
                    }
                } finally {
                    GlStateManager.popMatrix();
                }
            }


        } else if (this.targetHudMode.currentMode.equals("Minecraft")) {
            DraggableTargetHUD wwq = (DraggableTargetHUD) Baks.instance.draggableHUD.getDraggableComponentByClass(DraggableTargetHUD.class);
            float x = wwq.getX();
            float y = wwq.getY();
            wwq.setWidth(153);
            wwq.setHeight(42);
            if (KillAura.target != null) {
                curTarget = KillAura.target;
                this.scale = AnimationHelper.animation((float) this.scale, 1.0f, (float) (6.0 * Baks.deltaTime()));
            } else {
                this.scale = AnimationHelper.animation((float) this.scale, 0.0f, (float) (6.0 * Baks.deltaTime()));
            }
            try {
                try {
                    GlStateManager.pushMatrix();
                    GlStateManager.resetColor();
                    GL11.glTranslated(x + 50.0f, y + 31.0f, 0.0);
                    GL11.glScaled(this.scale, this.scale, 0.0);
                    GL11.glTranslated(-(x + 50.0f), -(y + 31.0f), 0.0);
                    if (this.blurThud.getBoolValue()) {
                        RenderUtils.drawBlur(7.0f, () -> RenderUtils.drawSmoothRect(x, y, x + (float) wwq.getWidth(), y + (float) wwq.getHeight(), new Color(0, 0, 0, 255).getRGB()));
                    }
                    if (this.shadowThud.getBoolValue()) {
                        RenderUtils.drawShadow(5.0f, 1.0f, () -> RenderUtils.drawSmoothRect(x, y, x + (float) wwq.getWidth(), y + (float) wwq.getHeight(), new Color(17, 17, 17, 200).getRGB()));
                    }
                    GlStateManager.pushMatrix();

                    GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
                    this.mc.fontRendererObj.drawStringWithShadow(curTarget.getName(), wwq.getX() + 38, wwq.getY() - -20, -1);
                    this.mc.getTextureManager().bindTexture(new ResourceLocation("textures/gui/icons.png"));
                    i = 0;
                    while ((float) i < curTarget.getMaxHealth() / 2.0f) {
                        this.mc.ingameGUI.drawTexturedModalRect((float) (wwq.getX() + 86) - curTarget.getMaxHealth() / 2.0f * 10.0f / 2.0f + (float) (i * 8), (float) (wwq.getY() + 9), 16, 0, 9, 9);
                        ++i;
                    }
                    i = 0;
                    while ((float) i < curTarget.getHealth() / 2.0f) {
                        this.mc.ingameGUI.drawTexturedModalRect((float) (wwq.getX() + 86) - curTarget.getMaxHealth() / 2.0f * 10.0f / 2.0f + (float) (i * 8), (float) (wwq.getY() + 9), 52, 0, 9, 9);
                        ++i;
                    }


                    RenderUtils.drawSmoothRect(x, y, x + (float) wwq.getWidth(), y + (float) wwq.getHeight(), new Color(255, 0, 0, 0).getRGB());
                    double healthWid = curTarget.getHealth() / curTarget.getMaxHealth() * 110.0f;
                    healthWid = MathHelper.clamp(healthWid, 0.0, 110.0);
                    this.healthBarWidth = AnimationHelper.animation(this.healthBarWidth, (float) healthWid, (float) (10.0 * Baks.deltaTime()));
                    String health = "" + MathematicHelper.round(curTarget.getHealth(), 1);
                    String distance = "" + MathematicHelper.round(TargetHUD.mc.player.getDistanceToEntity(curTarget), 1);
                    mc.getRenderItem().renderItemOverlays(TargetHUD.mc.rubik_13, curTarget.getHeldItem(EnumHand.OFF_HAND), (int) x + 132, (int) y + 7);
                    mc.getRenderItem().renderItemIntoGUI(curTarget.getHeldItem(EnumHand.OFF_HAND), (int) x + 135, (int) y + 1);


                    for (NetworkPlayerInfo targetHead : TargetHUD.mc.player.connection.getPlayerInfoMap()) {
                        try {
                            if (TargetHUD.mc.world.getPlayerEntityByUUID(targetHead.getGameProfile().getId()) != curTarget)
                                continue;
                            mc.getTextureManager().bindTexture(targetHead.getLocationSkin());
                            int scaleOffset = (int) ((float) TargetHUD.curTarget.hurtTime * 0.55f);
                            float hurtPercent = TargetHUD.getHurtPercent(curTarget);
                            GL11.glPushMatrix();
                            GL11.glColor4f(1.0f, 1.0f - hurtPercent, 1.0f - hurtPercent, 1.0f);
                            Gui.drawScaledCustomSizeModalRect((float) ((int) x + 3), y + 4.0f, 8.0f, 8.0f, 8, 8, 32, 35, 64.0f, 64.0f);
                            GL11.glPopMatrix();
                            GlStateManager.bindTexture(0);
                        } catch (Exception exception) {
                        }
                    }
                } catch (Exception exception) {
                    GlStateManager.popMatrix();
                }
            } finally {
                GlStateManager.popMatrix();
            }
        } else if (this.targetHudMode.currentMode.equals("Baks")) {
            DraggableTargetHUD dth = (DraggableTargetHUD) Baks.instance.draggableHUD.getDraggableComponentByClass(DraggableTargetHUD.class);
            float x = dth.getX();
            float y = dth.getY();
            dth.setWidth(80);
            dth.setHeight(80);
            if (KillAura.target != null) {
                curTarget = KillAura.target;
                this.scale = AnimationHelper.animation((float) this.scale, 1.0f, (float) (6.0 * Baks.deltaTime()));
            } else {
                this.scale = AnimationHelper.animation((float) this.scale, 0.0f, (float) (6.0 * Baks.deltaTime()));
            }
            EntityLivingBase target = KillAura.target;
            if (curTarget != null && curTarget instanceof EntityPlayer) {
                try {
                    try {
                        GlStateManager.pushMatrix();
                        GlStateManager.resetColor();
                        GL11.glTranslated(x + -50.0f, y + 70.0f, 0.0);
                        GL11.glScaled(this.scale, this.scale, 0.0);
                        GL11.glTranslated(-(x + -50.0f), -(y + 70.0f), 0.0);
                        if (this.blurThud.getBoolValue()) {
                            RenderUtils.drawBlur(8.0f, () -> RenderUtils.drawSmoothRect(x, y, x + (float) dth.getWidth(), y + (float) dth.getHeight(), new Color(0, 0, 0, 100).getRGB()));
                        }
                        if (this.shadowThud.getBoolValue()) {
                            RenderUtils.drawShadow(9.0f, 2.0f, () -> RenderUtils.drawSmoothRect(x, y, x + (float) dth.getWidth(), y + (float) dth.getHeight(), new Color(0, 0, 0, 100).getRGB()));
                        }
                        RenderUtils.drawSmoothRect(x, y, x + (float) 80, y + (float) 80, new Color(0, 0, 0, 100).getRGB());
                        TargetHUD.mc.rubik_18.drawString(Baks.instance.featureManager.getFeature(NameProtect.class).isEnabled() && NameProtect.otherName.getBoolValue() ? "Protected" : curTarget.getName(), x + 5.0f, y + 60.0f, -1);
//                        TargetHUD.mc.rubik_17.drawString(String.valueOf((int) curTarget.getHealth()) + " HP - " + (int) TargetHUD.mc.player.getDistanceToEntity(curTarget) + "m", x + 35.0f, y + 5.0f + 10.0f, -1);
                        double healthWid = curTarget.getHealth() / curTarget.getMaxHealth() * 70.0f;
                        healthWid = MathHelper.clamp(healthWid, 0.0, 70.0);
                        this.healthBarWidth = AnimationHelper.animation(this.healthBarWidth, (float) healthWid, (float) (10.0 * Baks.deltaTime()));
                        RenderUtils.drawRect2(x + 5.0f, y + 70.0f, 70.0, 5.0, new Colors(Color.decode("#191f13")).setAlpha(180).getColor().getRGB());
                        RenderUtils.drawGradientRected(x + 5.0f, y + 70.0f, this.healthBarWidth, 5.0, ClientHelper.getTargetHudColor().darker().getRGB(), ClientHelper.getTargetHudColor().brighter().brighter().getRGB());
                        RenderUtils.drawBlurredShadow(x + 5.0f, y + 70.0f, this.healthBarWidth + 2.0f, 5.0f, 8, ClientHelper.getTargetHudColor().darker());
                        if (this.particles2.getBoolValue() && TargetHUD.thudColorMode.currentMode.equals("Custom")) {
                            for (Particles p : this.particles) {
                                if (!(p.opacity > 4.0)) continue;
                                p.render2D();
                            }
                            if (thudTimer.hasReached(15.0)) {
                                for (Particles p : this.particles) {
                                    p.updatePosition();
                                    if (!(p.opacity < 1.0)) continue;
                                    this.particles.remove(p);
                                }
                                thudTimer.reset();
                            }
                            if (TargetHUD.curTarget.hurtTime == 8) {
                                for (i = 0; i < 1; ++i) {
                                    Particles p = new Particles();
                                    p.init(x + 15.0f, y + 5.0f, (Math.random() - 0.5) * 2.0 * 1.9, (Math.random() - 0.5) * 2.0 * 1.4, (float) Math.random() * 1.0f, ClientHelper.getTargetHudColor());
                                    this.particles.add(p);
                                }
                            }
                        }
                        for (NetworkPlayerInfo targetHead : TargetHUD.mc.player.connection.getPlayerInfoMap()) {
                            try {
                                if (TargetHUD.mc.world.getPlayerEntityByUUID(targetHead.getGameProfile().getId()) != curTarget)
                                    continue;
                                mc.getTextureManager().bindTexture(targetHead.getLocationSkin());
                                int scaleOffset = (int) ((float) TargetHUD.curTarget.hurtTime * 0.55f);
                                float hurtPercent = TargetHUD.getHurtPercent(curTarget);
                                GL11.glPushMatrix();
                                GL11.glColor4f(1.0f, 1.0f - hurtPercent, 1.0f - hurtPercent, 1.0f);
                                Gui.drawScaledCustomSizeModalRect((float) ((int) x + 15), y + 3.0f, 8.0f, 8.0f, 8, 8, 50, 50, 64.0f, 64.0f);
                                GL11.glPopMatrix();
                                GlStateManager.bindTexture(0);
                            } catch (Exception scaleOffset) {
                                // empty catch block
                            }
                        }
                    } catch (Exception healthWid) {
                        GlStateManager.popMatrix();
                    }
                } finally {
                    GlStateManager.popMatrix();
                }

            }
        }
    }




    public static float getRenderHurtTime(EntityLivingBase hurt) {
        return (float)hurt.hurtTime - (hurt.hurtTime != 0 ? TargetHUD.mc.timer.renderPartialTicks : 0.0f);
    }

    public static float getHurtPercent(EntityLivingBase hurt) {
        return TargetHUD.getRenderHurtTime(hurt) / 10.0f;
    }

    @Override
    public void onEnable() {
        if (TargetHUD.mc.gameSettings.ofFastRender) {
            TargetHUD.mc.gameSettings.ofFastRender = false;
        }
        super.onEnable();
    }
}
тут все паста..!
го еще кликгуи и аррай лист
 
Забаненный
Статус
Оффлайн
Регистрация
23 Июл 2022
Сообщения
99
Реакции[?]
2
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Забаненный
Статус
Оффлайн
Регистрация
30 Дек 2022
Сообщения
23
Реакции[?]
0
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
SS
 
Забаненный
Статус
Оффлайн
Регистрация
20 Янв 2023
Сообщения
22
Реакции[?]
0
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
по "[rich-client ready]" уже понятно, что хуйня)
 
Забаненный
Статус
Оффлайн
Регистрация
21 Дек 2021
Сообщения
110
Реакции[?]
3
Поинты[?]
2K
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
TargetHUD.java:
package dev.etc.client.feature.impl.hud;

import dev.etc.client.Baks;
import dev.etc.client.draggable.component.impl.DraggableTargetHUD;
import dev.etc.client.event.EventTarget;
import dev.etc.client.event.events.impl.render.EventRender2D;
import dev.etc.client.feature.Feature;
import dev.etc.client.feature.impl.FeatureCategory;
import dev.etc.client.feature.impl.combat.KillAura;
import dev.etc.client.feature.impl.misc.NameProtect;
import dev.etc.client.ui.settings.impl.BooleanSetting;
import dev.etc.client.ui.settings.impl.ColorSetting;
import dev.etc.client.ui.settings.impl.ListSetting;
import dev.etc.client.utils.math.AnimationHelper;
import dev.etc.client.utils.math.MathematicHelper;
import dev.etc.client.utils.math.TimerHelper;
import dev.etc.client.utils.other.Particles;
import dev.etc.client.utils.render.*;
import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.GuiChat;
import net.minecraft.client.network.NetworkPlayerInfo;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.EnumHand;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.MathHelper;
import org.lwjgl.opengl.GL11;

import java.awt.*;
import java.util.ArrayList;

public class TargetHUD
        extends Feature {
    private double scale = 0.0;
    private static EntityLivingBase curTarget = null;
    public static TimerHelper thudTimer = new TimerHelper();
    private float healthBarWidth;
    private ArrayList<Particles> particles = new ArrayList();
    public ListSetting targetHudMode = new ListSetting("TargetHUD Mode", "Default", () -> true, "Style", "New", "Default", "Minecraft", "Baks", "Modern");
    public static ListSetting thudColorMode = new ListSetting("TargetHUD Color", "Astolfo", () -> true, "Astolfo", "Rainbow", "Client", "Custom");
    public BooleanSetting particles2;
    public static ColorSetting targetHudColor = new ColorSetting("THUD Color", Color.PINK.getRGB(), () -> TargetHUD.thudColorMode.currentMode.equals("Custom"));
    public BooleanSetting shadowThud;
    public BooleanSetting blurThud;
    private /* synthetic */ Color gradientColor1;
    private /* synthetic */ Color gradientColor2;
    private /* synthetic */ Color gradientColor3;
    private /* synthetic */ Color gradientColor4;


    public TargetHUD() {
        super("TargetHUD", FeatureCategory.Hud);
        this.particles2 = new BooleanSetting("Particles", TargetHUD.thudColorMode.currentMode.equals("Custom"), () -> this.targetHudMode.currentMode.equals("Style") && TargetHUD.thudColorMode.currentMode.equals("Custom"));
        this.shadowThud = new BooleanSetting("Shadow", true, () -> true);
        this.blurThud = new BooleanSetting("Blur", true, () -> true);
        this.gradientColor1 = Color.WHITE;
        this.gradientColor2 = Color.WHITE;
        this.gradientColor3 = Color.WHITE;
        this.gradientColor4 = Color.WHITE;

        this.addSettings(this.targetHudMode, thudColorMode, this.particles2, targetHudColor, this.shadowThud, this.blurThud);
    }

    @EventTarget
    public void onRender2D(EventRender2D e2) {
        int i;


        if (this.targetHudMode.currentMode.equals("Style")) {
            DraggableTargetHUD dth = (DraggableTargetHUD) Baks.instance.draggableHUD.getDraggableComponentByClass(DraggableTargetHUD.class);
            float x = dth.getX();
            float y = dth.getY();
            dth.setWidth(130);
            dth.setHeight(37);
            if (KillAura.target != null) {
                curTarget = KillAura.target;
                this.scale = AnimationHelper.animation((float) this.scale, 1.0f, (float) (6.0 * Baks.deltaTime()));
            } else {
                this.scale = AnimationHelper.animation((float) this.scale, 0.0f, (float) (6.0 * Baks.deltaTime()));
            }
            EntityLivingBase target = KillAura.target;
            if (curTarget != null && curTarget instanceof EntityPlayer) {
                try {
                    try {
                        GlStateManager.pushMatrix();
                        GlStateManager.resetColor();
                        GL11.glTranslated(x + 36.0f, y + 26.0f, 0.0);
                        GL11.glScaled(this.scale, this.scale, 0.0);
                        GL11.glTranslated(-(x + 36.0f), -(y + 26.0f), 0.0);
                        if (this.blurThud.getBoolValue()) {
                            RenderUtils.drawBlur(8.0f, () -> RenderUtils.drawSmoothRect(x, y, x + (float) dth.getWidth(), y + (float) dth.getHeight(), new Color(0, 0, 0, 100).getRGB()));
                        }
                        if (this.shadowThud.getBoolValue()) {
                            RenderUtils.drawShadow(9.0f, 2.0f, () -> RenderUtils.drawSmoothRect(x, y, x + (float) dth.getWidth(), y + (float) dth.getHeight(), new Color(0, 0, 0, 100).getRGB()));
                        }
                        RenderUtils.drawSmoothRect(x, y, x + (float) dth.getWidth(), y + (float) dth.getHeight(), new Color(0, 0, 0, 100).getRGB());
                        TargetHUD.mc.rubik_18.drawString(Baks.instance.featureManager.getFeature(NameProtect.class).isEnabled() && NameProtect.otherName.getBoolValue() ? "Protected" : curTarget.getName(), x + 35.0f, y + 5.0f, -1);
                        TargetHUD.mc.rubik_17.drawString(String.valueOf((int) curTarget.getHealth()) + " HP - " + (int) TargetHUD.mc.player.getDistanceToEntity(curTarget) + "m", x + 35.0f, y + 5.0f + 10.0f, -1);
                        double healthWid = curTarget.getHealth() / curTarget.getMaxHealth() * 90.0f;
                        healthWid = MathHelper.clamp(healthWid, 0.0, 90.0);
                        this.healthBarWidth = AnimationHelper.animation(this.healthBarWidth, (float) healthWid, (float) (10.0 * Baks.deltaTime()));
                        RenderUtils.drawRect2(x + 36.0f, y + 25.0f, 90.0, 5.0, new Colors(Color.decode("#191f13")).setAlpha(180).getColor().getRGB());
                        RenderUtils.drawGradientRected(x + 36.0f, y + 25.0f, this.healthBarWidth, 5.0, ClientHelper.getTargetHudColor().darker().getRGB(), ClientHelper.getTargetHudColor().brighter().brighter().getRGB());
                        RenderUtils.drawBlurredShadow(x + 40.0f, y + 25.0f, this.healthBarWidth + 2.0f, 5.0f, 8, ClientHelper.getTargetHudColor().darker());
                        if (this.particles2.getBoolValue() && TargetHUD.thudColorMode.currentMode.equals("Custom")) {
                            for (Particles p : this.particles) {
                                if (!(p.opacity > 4.0)) continue;
                                p.render2D();
                            }
                            if (thudTimer.hasReached(15.0)) {
                                for (Particles p : this.particles) {
                                    p.updatePosition();
                                    if (!(p.opacity < 1.0)) continue;
                                    this.particles.remove(p);
                                }
                                thudTimer.reset();
                            }
                            if (TargetHUD.curTarget.hurtTime == 8) {
                                for (i = 0; i < 1; ++i) {
                                    Particles p = new Particles();
                                    p.init(x + 15.0f, y + 15.0f, (Math.random() - 0.5) * 2.0 * 1.9, (Math.random() - 0.5) * 2.0 * 1.4, (float) Math.random() * 1.0f, ClientHelper.getTargetHudColor());
                                    this.particles.add(p);
                                }
                            }
                        }
                        for (NetworkPlayerInfo targetHead : TargetHUD.mc.player.connection.getPlayerInfoMap()) {
                            try {
                                if (TargetHUD.mc.world.getPlayerEntityByUUID(targetHead.getGameProfile().getId()) != curTarget)
                                    continue;
                                mc.getTextureManager().bindTexture(targetHead.getLocationSkin());
                                int scaleOffset = (int) ((float) TargetHUD.curTarget.hurtTime * 0.55f);
                                float hurtPercent = TargetHUD.getHurtPercent(curTarget);
                                GL11.glPushMatrix();
                                GL11.glColor4f(1.0f, 1.0f - hurtPercent, 1.0f - hurtPercent, 1.0f);
                                Gui.drawScaledCustomSizeModalRect((float) ((int) x + 3), y + 3.0f, 8.0f, 8.0f, 8, 8, 30, 30, 64.0f, 64.0f);
                                GL11.glPopMatrix();
                                GlStateManager.bindTexture(0);
                            } catch (Exception scaleOffset) {
                                // empty catch block
                            }
                        }
                    } catch (Exception healthWid) {
                        GlStateManager.popMatrix();
                    }
                } finally {
                    GlStateManager.popMatrix();
                }
            }


        } else if (this.targetHudMode.currentMode.equals("Default")) {
            DraggableTargetHUD dth = (DraggableTargetHUD) Baks.instance.draggableHUD.getDraggableComponentByClass(DraggableTargetHUD.class);
            float x = dth.getX();
            float y = dth.getY();
            dth.setWidth(153);
            dth.setHeight(42);
            if (KillAura.target != null) {
                curTarget = KillAura.target;
                this.scale = AnimationHelper.animation((float) this.scale, 1.0f, (float) (6.0 * Baks.deltaTime()));
            } else {
                this.scale = AnimationHelper.animation((float) this.scale, 0.0f, (float) (6.0 * Baks.deltaTime()));
            }
            EntityLivingBase target = KillAura.target;
            if (curTarget != null && curTarget instanceof EntityPlayer) {
                try {
                    try {
                        GlStateManager.pushMatrix();
                        GlStateManager.resetColor();
                        GL11.glTranslated(x + 50.0f, y + 31.0f, 0.0);
                        GL11.glScaled(this.scale, this.scale, 0.0);
                        GL11.glTranslated(-(x + 50.0f), -(y + 31.0f), 0.0);
//                        if (this.blurThud.getBoolValue()) {
//                            RenderUtils.drawBlur(7.0f, () -> RenderUtils.drawSmoothRect(x, y, x + (float)dth.getWidth(), y + (float)dth.getHeight(), new Color(255, 255, 255, 0).getRGB()));
//                        }
//                        if (this.shadowThud.getBoolValue()) {
//                            RenderUtils.drawShadow(5.0f, 1.0f, () -> RenderUtils.drawSmoothRect(x, y, x + (float)dth.getWidth(), y + (float)dth.getHeight(), new Color(17, 17, 17, 0).getRGB()));
//                        }
                        RenderUtils.drawSmoothRect(x, y, x + (float) dth.getWidth(), y + (float) dth.getHeight(), new Color(0, 255, 208, 0).getRGB());
                        double healthWid = curTarget.getHealth() / curTarget.getMaxHealth() * 110.0f;
                        healthWid = MathHelper.clamp(healthWid, 0.0, 110.0);
                        this.healthBarWidth = AnimationHelper.animation(this.healthBarWidth, (float) healthWid, (float) (10.0 * Baks.deltaTime()));
                        String health = "" + MathematicHelper.round(curTarget.getHealth(), 1);
                        String distance = "" + MathematicHelper.round(TargetHUD.mc.player.getDistanceToEntity(curTarget), 1);
                        TargetHUD.mc.rubik_15.drawString("Name: " + curTarget.getName(), x + 38.0f, y + 19.0f, -1);
//                        TargetHUD.mc.rubik_15.drawString("Distance: " + distance, x + 42.0f, y + 15.0f, -1);
//                        TargetHUD.mc.rubik_14.drawString(curTarget.getHealth() >= 3.0f ? health : "", x + 24.0f + this.healthBarWidth, y + 26.5f, new Color(0, 255, 178, 0).getRGB());
                        RenderUtils.drawSmoothRect(x + 38.0f, y + 33.0f, x + 38.0f + this.healthBarWidth, y + 33.0f + 5.0f, ClientHelper.getTargetHudColor().darker().getRGB());
                        RenderUtils.drawBlurredShadow(x + 38.0f, y + 33.0f, this.healthBarWidth, 5.0f, 12, RenderUtils.injectAlpha(ClientHelper.getTargetHudColor(), 1000));
                        mc.getRenderItem().renderItemOverlays(TargetHUD.mc.rubik_13, curTarget.getHeldItem(EnumHand.OFF_HAND), (int) x + 132, (int) y + 7);
                        mc.getRenderItem().renderItemIntoGUI(curTarget.getHeldItem(EnumHand.OFF_HAND), (int) x + 135, (int) y + 1);
//                        for (NetworkPlayerInfo targetHead : TargetHUD.mc.player.connection.getPlayerInfoMap()) {
//                            try {
//                                if (TargetHUD.mc.world.getPlayerEntityByUUID(targetHead.getGameProfile().getId()) != curTarget) continue;
//                                mc.getTextureManager().bindTexture(targetHead.getLocationSkin());
//                                int scaleOffset = (int)((float)TargetHUD.curTarget.hurtTime * 0.55f);
//                                float hurtPercent = TargetHUD.getHurtPercent(curTarget);
//                                GL11.glPushMatrix();
//                                GL11.glColor4f(1.0f, 1.0f - hurtPercent, 1.0f - hurtPercent, 1.0f);
//                                Gui.drawScaledCustomSizeModalRect((float)((int)x + 3), y + 4.0f, 8.0f, 8.0f, 8, 8, 32, 35, 64.0f, 64.0f);
//                                GL11.glPopMatrix();
//                                GlStateManager.bindTexture(0);
//                            }
//                            catch (Exception exception) {
//                                // empty catch block
//                            }
//                        }
                    } catch (Exception exception) {
                        GlStateManager.popMatrix();
                    }
                } finally {
                    GlStateManager.popMatrix();
                }
            }


        } else if (this.targetHudMode.currentMode.equals("Minecraft")) {
            DraggableTargetHUD wwq = (DraggableTargetHUD) Baks.instance.draggableHUD.getDraggableComponentByClass(DraggableTargetHUD.class);
            float x = wwq.getX();
            float y = wwq.getY();
            wwq.setWidth(153);
            wwq.setHeight(42);
            if (KillAura.target != null) {
                curTarget = KillAura.target;
                this.scale = AnimationHelper.animation((float) this.scale, 1.0f, (float) (6.0 * Baks.deltaTime()));
            } else {
                this.scale = AnimationHelper.animation((float) this.scale, 0.0f, (float) (6.0 * Baks.deltaTime()));
            }
            try {
                try {
                    GlStateManager.pushMatrix();
                    GlStateManager.resetColor();
                    GL11.glTranslated(x + 50.0f, y + 31.0f, 0.0);
                    GL11.glScaled(this.scale, this.scale, 0.0);
                    GL11.glTranslated(-(x + 50.0f), -(y + 31.0f), 0.0);
                    if (this.blurThud.getBoolValue()) {
                        RenderUtils.drawBlur(7.0f, () -> RenderUtils.drawSmoothRect(x, y, x + (float) wwq.getWidth(), y + (float) wwq.getHeight(), new Color(0, 0, 0, 255).getRGB()));
                    }
                    if (this.shadowThud.getBoolValue()) {
                        RenderUtils.drawShadow(5.0f, 1.0f, () -> RenderUtils.drawSmoothRect(x, y, x + (float) wwq.getWidth(), y + (float) wwq.getHeight(), new Color(17, 17, 17, 200).getRGB()));
                    }
                    GlStateManager.pushMatrix();

                    GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
                    this.mc.fontRendererObj.drawStringWithShadow(curTarget.getName(), wwq.getX() + 38, wwq.getY() - -20, -1);
                    this.mc.getTextureManager().bindTexture(new ResourceLocation("textures/gui/icons.png"));
                    i = 0;
                    while ((float) i < curTarget.getMaxHealth() / 2.0f) {
                        this.mc.ingameGUI.drawTexturedModalRect((float) (wwq.getX() + 86) - curTarget.getMaxHealth() / 2.0f * 10.0f / 2.0f + (float) (i * 8), (float) (wwq.getY() + 9), 16, 0, 9, 9);
                        ++i;
                    }
                    i = 0;
                    while ((float) i < curTarget.getHealth() / 2.0f) {
                        this.mc.ingameGUI.drawTexturedModalRect((float) (wwq.getX() + 86) - curTarget.getMaxHealth() / 2.0f * 10.0f / 2.0f + (float) (i * 8), (float) (wwq.getY() + 9), 52, 0, 9, 9);
                        ++i;
                    }


                    RenderUtils.drawSmoothRect(x, y, x + (float) wwq.getWidth(), y + (float) wwq.getHeight(), new Color(255, 0, 0, 0).getRGB());
                    double healthWid = curTarget.getHealth() / curTarget.getMaxHealth() * 110.0f;
                    healthWid = MathHelper.clamp(healthWid, 0.0, 110.0);
                    this.healthBarWidth = AnimationHelper.animation(this.healthBarWidth, (float) healthWid, (float) (10.0 * Baks.deltaTime()));
                    String health = "" + MathematicHelper.round(curTarget.getHealth(), 1);
                    String distance = "" + MathematicHelper.round(TargetHUD.mc.player.getDistanceToEntity(curTarget), 1);
                    mc.getRenderItem().renderItemOverlays(TargetHUD.mc.rubik_13, curTarget.getHeldItem(EnumHand.OFF_HAND), (int) x + 132, (int) y + 7);
                    mc.getRenderItem().renderItemIntoGUI(curTarget.getHeldItem(EnumHand.OFF_HAND), (int) x + 135, (int) y + 1);


                    for (NetworkPlayerInfo targetHead : TargetHUD.mc.player.connection.getPlayerInfoMap()) {
                        try {
                            if (TargetHUD.mc.world.getPlayerEntityByUUID(targetHead.getGameProfile().getId()) != curTarget)
                                continue;
                            mc.getTextureManager().bindTexture(targetHead.getLocationSkin());
                            int scaleOffset = (int) ((float) TargetHUD.curTarget.hurtTime * 0.55f);
                            float hurtPercent = TargetHUD.getHurtPercent(curTarget);
                            GL11.glPushMatrix();
                            GL11.glColor4f(1.0f, 1.0f - hurtPercent, 1.0f - hurtPercent, 1.0f);
                            Gui.drawScaledCustomSizeModalRect((float) ((int) x + 3), y + 4.0f, 8.0f, 8.0f, 8, 8, 32, 35, 64.0f, 64.0f);
                            GL11.glPopMatrix();
                            GlStateManager.bindTexture(0);
                        } catch (Exception exception) {
                        }
                    }
                } catch (Exception exception) {
                    GlStateManager.popMatrix();
                }
            } finally {
                GlStateManager.popMatrix();
            }
        } else if (this.targetHudMode.currentMode.equals("Baks")) {
            DraggableTargetHUD dth = (DraggableTargetHUD) Baks.instance.draggableHUD.getDraggableComponentByClass(DraggableTargetHUD.class);
            float x = dth.getX();
            float y = dth.getY();
            dth.setWidth(80);
            dth.setHeight(80);
            if (KillAura.target != null) {
                curTarget = KillAura.target;
                this.scale = AnimationHelper.animation((float) this.scale, 1.0f, (float) (6.0 * Baks.deltaTime()));
            } else {
                this.scale = AnimationHelper.animation((float) this.scale, 0.0f, (float) (6.0 * Baks.deltaTime()));
            }
            EntityLivingBase target = KillAura.target;
            if (curTarget != null && curTarget instanceof EntityPlayer) {
                try {
                    try {
                        GlStateManager.pushMatrix();
                        GlStateManager.resetColor();
                        GL11.glTranslated(x + -50.0f, y + 70.0f, 0.0);
                        GL11.glScaled(this.scale, this.scale, 0.0);
                        GL11.glTranslated(-(x + -50.0f), -(y + 70.0f), 0.0);
                        if (this.blurThud.getBoolValue()) {
                            RenderUtils.drawBlur(8.0f, () -> RenderUtils.drawSmoothRect(x, y, x + (float) dth.getWidth(), y + (float) dth.getHeight(), new Color(0, 0, 0, 100).getRGB()));
                        }
                        if (this.shadowThud.getBoolValue()) {
                            RenderUtils.drawShadow(9.0f, 2.0f, () -> RenderUtils.drawSmoothRect(x, y, x + (float) dth.getWidth(), y + (float) dth.getHeight(), new Color(0, 0, 0, 100).getRGB()));
                        }
                        RenderUtils.drawSmoothRect(x, y, x + (float) 80, y + (float) 80, new Color(0, 0, 0, 100).getRGB());
                        TargetHUD.mc.rubik_18.drawString(Baks.instance.featureManager.getFeature(NameProtect.class).isEnabled() && NameProtect.otherName.getBoolValue() ? "Protected" : curTarget.getName(), x + 5.0f, y + 60.0f, -1);
//                        TargetHUD.mc.rubik_17.drawString(String.valueOf((int) curTarget.getHealth()) + " HP - " + (int) TargetHUD.mc.player.getDistanceToEntity(curTarget) + "m", x + 35.0f, y + 5.0f + 10.0f, -1);
                        double healthWid = curTarget.getHealth() / curTarget.getMaxHealth() * 70.0f;
                        healthWid = MathHelper.clamp(healthWid, 0.0, 70.0);
                        this.healthBarWidth = AnimationHelper.animation(this.healthBarWidth, (float) healthWid, (float) (10.0 * Baks.deltaTime()));
                        RenderUtils.drawRect2(x + 5.0f, y + 70.0f, 70.0, 5.0, new Colors(Color.decode("#191f13")).setAlpha(180).getColor().getRGB());
                        RenderUtils.drawGradientRected(x + 5.0f, y + 70.0f, this.healthBarWidth, 5.0, ClientHelper.getTargetHudColor().darker().getRGB(), ClientHelper.getTargetHudColor().brighter().brighter().getRGB());
                        RenderUtils.drawBlurredShadow(x + 5.0f, y + 70.0f, this.healthBarWidth + 2.0f, 5.0f, 8, ClientHelper.getTargetHudColor().darker());
                        if (this.particles2.getBoolValue() && TargetHUD.thudColorMode.currentMode.equals("Custom")) {
                            for (Particles p : this.particles) {
                                if (!(p.opacity > 4.0)) continue;
                                p.render2D();
                            }
                            if (thudTimer.hasReached(15.0)) {
                                for (Particles p : this.particles) {
                                    p.updatePosition();
                                    if (!(p.opacity < 1.0)) continue;
                                    this.particles.remove(p);
                                }
                                thudTimer.reset();
                            }
                            if (TargetHUD.curTarget.hurtTime == 8) {
                                for (i = 0; i < 1; ++i) {
                                    Particles p = new Particles();
                                    p.init(x + 15.0f, y + 5.0f, (Math.random() - 0.5) * 2.0 * 1.9, (Math.random() - 0.5) * 2.0 * 1.4, (float) Math.random() * 1.0f, ClientHelper.getTargetHudColor());
                                    this.particles.add(p);
                                }
                            }
                        }
                        for (NetworkPlayerInfo targetHead : TargetHUD.mc.player.connection.getPlayerInfoMap()) {
                            try {
                                if (TargetHUD.mc.world.getPlayerEntityByUUID(targetHead.getGameProfile().getId()) != curTarget)
                                    continue;
                                mc.getTextureManager().bindTexture(targetHead.getLocationSkin());
                                int scaleOffset = (int) ((float) TargetHUD.curTarget.hurtTime * 0.55f);
                                float hurtPercent = TargetHUD.getHurtPercent(curTarget);
                                GL11.glPushMatrix();
                                GL11.glColor4f(1.0f, 1.0f - hurtPercent, 1.0f - hurtPercent, 1.0f);
                                Gui.drawScaledCustomSizeModalRect((float) ((int) x + 15), y + 3.0f, 8.0f, 8.0f, 8, 8, 50, 50, 64.0f, 64.0f);
                                GL11.glPopMatrix();
                                GlStateManager.bindTexture(0);
                            } catch (Exception scaleOffset) {
                                // empty catch block
                            }
                        }
                    } catch (Exception healthWid) {
                        GlStateManager.popMatrix();
                    }
                } finally {
                    GlStateManager.popMatrix();
                }

            }
        }
    }




    public static float getRenderHurtTime(EntityLivingBase hurt) {
        return (float)hurt.hurtTime - (hurt.hurtTime != 0 ? TargetHUD.mc.timer.renderPartialTicks : 0.0f);
    }

    public static float getHurtPercent(EntityLivingBase hurt) {
        return TargetHUD.getRenderHurtTime(hurt) / 10.0f;
    }

    @Override
    public void onEnable() {
        if (TargetHUD.mc.gameSettings.ofFastRender) {
            TargetHUD.mc.gameSettings.ofFastRender = false;
        }
        super.onEnable();
    }
}
тут все паста..!
SS
 
Начинающий
Статус
Оффлайн
Регистрация
1 Сен 2022
Сообщения
46
Реакции[?]
0
Поинты[?]
0
Сверху Снизу