Подпишитесь на наш Telegram-канал, чтобы всегда быть в курсе важных обновлений! Перейти

Обход античита Очень хорошая ротация (Не снапы)

Начинающий
Начинающий
Статус
Оффлайн
Регистрация
19 Янв 2023
Сообщения
31
Реакции
1
Выберите загрузчик игры
  1. Vanilla
  2. Прочие моды
Эта ротация была сделана +- за 5 минут (60 строчек), обходит куча серверов где ач Intave, по типу gulpvp, prostotrainer
желательно ставьте 65 и 40 скорость
ss:
rotation!:
Expand Collapse Copy
public class MetaRotation extends RotationMode {

    Slider speedX = new Slider(this, "Скорость X").min(45).max(80).inc(1).set(65);
    Slider speedY = new Slider(this, "Скорость Y").min(40).max(60).inc(1).set(40);

    CheckBox falling = new CheckBox(this, "Ускорять, если падаешь");

    public MetaRotation(Mode parent) {
        super(parent, "Новая");
    }

    RotationAnimation interp = new RotationAnimation();

    @Override
    public void update(LivingEntity target) {
        Aura aura = Modules.get(Aura.class);

        interp.easing(Easing.SMOOTH_STEP);

        Vector3d pos = mc.player.getEyePosition(0).add(aura.getOffX() * 0.05, -aura.getOffY() * 0.05, 0);

        Vector3d multipoint = new Vector3d(
                MathHelper.clamp(pos.x, target.getBoundingBox().minX, target.getBoundingBox().maxX),
                MathHelper.clamp(pos.y, target.getBoundingBox().minY, target.getBoundingBox().maxY),
                MathHelper.clamp(pos.z, target.getBoundingBox().minZ, target.getBoundingBox().maxZ)
        );

        Vector2f base = Rotation.get(aura.getMPoints() ? multipoint : target.getEyePosition(0).add(aura.getOffX() * 0.05, -aura.getOffY() * 0.05, 0));

        float yaw = interp.getYaw() + Rotation.shorten(base.x, interp.getYaw()),
                speed = AuraUtil.getSens(MathUtil.random(0.6f, 0.9f)),
                test = AuraUtil.getSens(MathUtil.random(100, 135));

        float baseSpeed = (170 - speedX.get()) * speed;
        boolean check = Player.collide(target) && (Player.silent(target)
                || Player.getBlock(0, 2, 0) != Blocks.AIR && Player.getBlock(0, -1, 0)
                != Blocks.AIR && Player.getBlock(0, 2, 0) != Blocks.WATER && Player.getBlock(0, -1, 0) != Blocks.WATER),
                look = MathUtil.rayTraceWithBlock(aura.range.get() - 1, interp.getYaw(), interp.getPitch(), mc.player, target, false);

        // Ускорения
        if (!look) baseSpeed *= 0.87f;

        // Поворачиваем на центр, если падаем
        if (falling.get()) yaw += mc.player.fallDistance * MathHelper.wrapDegrees(base.x - rotation.x) * 3.5f;

        Vector2f angles = new Vector2f(yaw, base.y);
        if (angles.y > 0) angles.y += MathUtil.random(-0.826f, 0.459f);

        float rayCaster = look ? 2.7f : 1f;

        // Замедления
        if (Player.collide(target, -0.4f)) {
            baseSpeed *= 1.4f;
            angles.y = 85; // Смотрим вниз, ведь мы уже в цели
        }

        // Замедляем, если цель в блоках
        if (check) baseSpeed *= 1.35f;

        rotation = interp.animate(angles, (int) (baseSpeed) - 35, ((int) (test - speedY.get()) * (int) rayCaster) - 35);
    }
}

дальше идут утилиты которые юзались в мейнкоде ->
AuraUtil.java:
Expand Collapse Copy
public class AuraUtil {
    public static float getSens(float rotation) {
        return getDeltaMouse(rotation) * Rotation.getGCD();
    }

    public static float getDeltaMouse(float delta) {
        return Math.round(delta / Rotation.getGCD());
    }
}
Player:
Expand Collapse Copy
public class Player {
public static Block getBlock() {
return getBlock(0, 0, 0);
}
public static Block getBlock(double x, double y, double z) {
return mc.world.getBlockState(mc.player.getPosition().add(x, y, z)).getBlock();
}
    public static boolean silent(LivingEntity target) {
        Vector3d pos = target.getPositionVec();
        AxisAlignedBB hitbox = target.getBoundingBox();

        float off = 0.05f;

        return !isAir(hitbox.minX-off, pos.y, hitbox.minZ-off)
                || !isAir(hitbox.maxX+off, pos.y, hitbox.minZ-off)
                || !isAir(hitbox.minX-off, pos.y, hitbox.maxZ+off)
                || !isAir(hitbox.maxX+off, pos.y, hitbox.maxZ+off);
    }

    public static boolean isAir(double x, double y, double z) { return mc.world.getBlockState(new BlockPos(x, y, z)).getBlock() == Blocks.AIR; }
}
    public static boolean collide(LivingEntity entity) {
        return collide(entity, 0);
    }

    public static boolean collide(LivingEntity entity, float grow) {
        AxisAlignedBB box = mc.player.getBoundingBox();
        AxisAlignedBB targetbox = entity.getBoundingBox().grow(grow, 0, grow);

        if (box.maxX > targetbox.minX
                && box.maxY > targetbox.minY && box.maxZ > targetbox.minZ
                && box.minX < targetbox.maxX && box.minY < targetbox.maxY
                && box.minZ < targetbox.maxZ) return true;

        return false;
    }
RotationUtil:
Expand Collapse Copy
public class Rotation {
    public static Vector2f vector(Vector3d vec) {
        Vector3d eyesPos = mc.player.getEyePosition(1.0f);
        double diffX = vec != null ? vec.x - eyesPos.x : 0;
        double diffY = vec != null ? vec.y - (mc.player.getPosY() + (double) mc.player.getEyeHeight() + 0.5) : 0;
        double diffZ = vec != null ? vec.z - eyesPos.z : 0;

        double diffXZ = Math.sqrt(diffX * diffX + diffZ * diffZ);
        float yaw = (float) (Math.toDegrees(Math.atan2(diffZ, diffX)) - 90.0);
        float pitch = (float) (-Math.toDegrees(Math.atan2(diffY, diffXZ)));
        yaw = mc.player.rotationYaw + MathHelper.wrapDegrees(yaw - mc.player.rotationYaw);
        pitch = mc.player.rotationPitch + MathHelper.wrapDegrees(pitch - mc.player.rotationPitch);
        pitch = MathHelper.clamp(pitch, -90.0f, 90.0f);

        return new Vector2f(yaw, pitch);
    }

    public static float shorten(float degree) {
        return (float) (((((mc.player.rotationYaw - degree) % 360) + 540) % 360) - 180);
    }

    public static float shorten(float degree1, float degree2) {
        return (float) (((((degree1 - degree2) % 360) + 540) % 360) - 180);
    }

    public static Vector2f get(Vector3d target) {
        Vector3d eyesPos = new Vector3d(mc.player.getPosX(), mc.player.getPosY() + mc.player.getEyeHeight(), mc.player.getPosZ());
        double diffX = target.x - eyesPos.x;
        double diffY = target.y - eyesPos.y;
        double diffZ = target.z - eyesPos.z;
        double diffXZ = MathHelper.sqrt(diffX * diffX + diffZ * diffZ);
        float yaw = (float) MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(diffZ, diffX)) - 90.0f);
        float pitch = (float) MathHelper.clamp(-Math.toDegrees(Math.atan2(diffY, diffXZ)), -89, 89);

        float sens = (float) (Math.pow(mc.gameSettings.mouseSensitivity, 1.5) * 0.05f + 0.1f);
        float pow = sens * sens * sens * 1.2F;
        yaw -= yaw % pow;
        pitch -= pitch % (pow * sens);

        return new Vector2f(yaw, pitch);
    }

    public static Vector2f gcd(float yaw, float pitch) {
        float gcd = getGCD();
        yaw -= yaw % gcd;
        pitch -= pitch % gcd;

        return new Vector2f(yaw, pitch);
    }

    public static float getGCD() {
        double realGcd = mc.gameSettings.mouseSensitivity;
        double d4 = realGcd * (double) 0.6F + (double) 0.2F;
        return (float) (d4 * d4 * d4 * 8.0D * 0.15);
    }
}
 
Последнее редактирование модератором:
Эта ротация была сделана +- за 5 минут (60 строчек), обходит куча серверов где ач Intave, по типу gulpvp, prostotrainer
желательно ставьте 65 и 40 скорость
ss:
rotation!:
Expand Collapse Copy
public class MetaRotation extends RotationMode {

    Slider speedX = new Slider(this, "Скорость X").min(45).max(80).inc(1).set(65);
    Slider speedY = new Slider(this, "Скорость Y").min(40).max(60).inc(1).set(40);

    CheckBox falling = new CheckBox(this, "Ускорять, если падаешь");

    public MetaRotation(Mode parent) {
        super(parent, "Новая");
    }

    RotationAnimation interp = new RotationAnimation();

    @Override
    public void update(LivingEntity target) {
        Aura aura = Modules.get(Aura.class);

        interp.easing(Easing.SMOOTH_STEP);

        Vector3d pos = mc.player.getEyePosition(0).add(aura.getOffX() * 0.05, -aura.getOffY() * 0.05, 0);

        Vector3d multipoint = new Vector3d(
                MathHelper.clamp(pos.x, target.getBoundingBox().minX, target.getBoundingBox().maxX),
                MathHelper.clamp(pos.y, target.getBoundingBox().minY, target.getBoundingBox().maxY),
                MathHelper.clamp(pos.z, target.getBoundingBox().minZ, target.getBoundingBox().maxZ)
        );

        Vector2f base = Rotation.get(aura.getMPoints() ? multipoint : target.getEyePosition(0).add(aura.getOffX() * 0.05, -aura.getOffY() * 0.05, 0));

        float yaw = interp.getYaw() + Rotation.shorten(base.x, interp.getYaw()),
                speed = AuraUtil.getSens(MathUtil.random(0.6f, 0.9f)),
                test = AuraUtil.getSens(MathUtil.random(100, 135));

        float baseSpeed = (170 - speedX.get()) * speed;
        boolean check = Player.collide(target) && (Player.silent(target)
                || Player.getBlock(0, 2, 0) != Blocks.AIR && Player.getBlock(0, -1, 0)
                != Blocks.AIR && Player.getBlock(0, 2, 0) != Blocks.WATER && Player.getBlock(0, -1, 0) != Blocks.WATER),
                look = MathUtil.rayTraceWithBlock(aura.range.get() - 1, interp.getYaw(), interp.getPitch(), mc.player, target, false);

        // Ускорения
        if (!look) baseSpeed *= 0.87f;

        // Поворачиваем на центр, если падаем
        if (falling.get()) yaw += mc.player.fallDistance * MathHelper.wrapDegrees(base.x - rotation.x) * 3.5f;

        Vector2f angles = new Vector2f(yaw, base.y);
        if (angles.y > 0) angles.y += MathUtil.random(-0.826f, 0.459f);

        float rayCaster = look ? 2.7f : 1f;

        // Замедления
        if (Player.collide(target, -0.4f)) {
            baseSpeed *= 1.4f;
            angles.y = 85; // Смотрим вниз, ведь мы уже в цели
        }

        // Замедляем, если цель в блоках
        if (check) baseSpeed *= 1.35f;

        rotation = interp.animate(angles, (int) (baseSpeed) - 35, ((int) (test - speedY.get()) * (int) rayCaster) - 35);
    }
}

дальше идут утилиты которые юзались в мейнкоде ->
AuraUtil.java:
Expand Collapse Copy
public class AuraUtil {
    public static float getSens(float rotation) {
        return getDeltaMouse(rotation) * Rotation.getGCD();
    }

    public static float getDeltaMouse(float delta) {
        return Math.round(delta / Rotation.getGCD());
    }
}
Player:
Expand Collapse Copy
public class Player {
public static Block getBlock() {
return getBlock(0, 0, 0);
}
public static Block getBlock(double x, double y, double z) {
return mc.world.getBlockState(mc.player.getPosition().add(x, y, z)).getBlock();
}
    public static boolean silent(LivingEntity target) {
        Vector3d pos = target.getPositionVec();
        AxisAlignedBB hitbox = target.getBoundingBox();

        float off = 0.05f;

        return !isAir(hitbox.minX-off, pos.y, hitbox.minZ-off)
                || !isAir(hitbox.maxX+off, pos.y, hitbox.minZ-off)
                || !isAir(hitbox.minX-off, pos.y, hitbox.maxZ+off)
                || !isAir(hitbox.maxX+off, pos.y, hitbox.maxZ+off);
    }

    public static boolean isAir(double x, double y, double z) { return mc.world.getBlockState(new BlockPos(x, y, z)).getBlock() == Blocks.AIR; }
}
    public static boolean collide(LivingEntity entity) {
        return collide(entity, 0);
    }

    public static boolean collide(LivingEntity entity, float grow) {
        AxisAlignedBB box = mc.player.getBoundingBox();
        AxisAlignedBB targetbox = entity.getBoundingBox().grow(grow, 0, grow);

        if (box.maxX > targetbox.minX
                && box.maxY > targetbox.minY && box.maxZ > targetbox.minZ
                && box.minX < targetbox.maxX && box.minY < targetbox.maxY
                && box.minZ < targetbox.maxZ) return true;

        return false;
    }
RotationUtil:
Expand Collapse Copy
public class Rotation {
    public static Vector2f vector(Vector3d vec) {
        Vector3d eyesPos = mc.player.getEyePosition(1.0f);
        double diffX = vec != null ? vec.x - eyesPos.x : 0;
        double diffY = vec != null ? vec.y - (mc.player.getPosY() + (double) mc.player.getEyeHeight() + 0.5) : 0;
        double diffZ = vec != null ? vec.z - eyesPos.z : 0;

        double diffXZ = Math.sqrt(diffX * diffX + diffZ * diffZ);
        float yaw = (float) (Math.toDegrees(Math.atan2(diffZ, diffX)) - 90.0);
        float pitch = (float) (-Math.toDegrees(Math.atan2(diffY, diffXZ)));
        yaw = mc.player.rotationYaw + MathHelper.wrapDegrees(yaw - mc.player.rotationYaw);
        pitch = mc.player.rotationPitch + MathHelper.wrapDegrees(pitch - mc.player.rotationPitch);
        pitch = MathHelper.clamp(pitch, -90.0f, 90.0f);

        return new Vector2f(yaw, pitch);
    }

    public static float shorten(float degree) {
        return (float) (((((mc.player.rotationYaw - degree) % 360) + 540) % 360) - 180);
    }

    public static float shorten(float degree1, float degree2) {
        return (float) (((((degree1 - degree2) % 360) + 540) % 360) - 180);
    }

    public static Vector2f get(Vector3d target) {
        Vector3d eyesPos = new Vector3d(mc.player.getPosX(), mc.player.getPosY() + mc.player.getEyeHeight(), mc.player.getPosZ());
        double diffX = target.x - eyesPos.x;
        double diffY = target.y - eyesPos.y;
        double diffZ = target.z - eyesPos.z;
        double diffXZ = MathHelper.sqrt(diffX * diffX + diffZ * diffZ);
        float yaw = (float) MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(diffZ, diffX)) - 90.0f);
        float pitch = (float) MathHelper.clamp(-Math.toDegrees(Math.atan2(diffY, diffXZ)), -89, 89);

        float sens = (float) (Math.pow(mc.gameSettings.mouseSensitivity, 1.5) * 0.05f + 0.1f);
        float pow = sens * sens * sens * 1.2F;
        yaw -= yaw % pow;
        pitch -= pitch % (pow * sens);

        return new Vector2f(yaw, pitch);
    }

    public static Vector2f gcd(float yaw, float pitch) {
        float gcd = getGCD();
        yaw -= yaw % gcd;
        pitch -= pitch % gcd;

        return new Vector2f(yaw, pitch);
    }

    public static float getGCD() {
        double realGcd = mc.gameSettings.mouseSensitivity;
        double d4 = realGcd * (double) 0.6F + (double) 0.2F;
        return (float) (d4 * d4 * d4 * 8.0D * 0.15);
    }
}
скинь фулл срц клиента своего, по братски
 
Эта ротация была сделана +- за 5 минут (60 строчек), обходит куча серверов где ач Intave, по типу gulpvp, prostotrainer
желательно ставьте 65 и 40 скорость
ss:
rotation!:
Expand Collapse Copy
public class MetaRotation extends RotationMode {

    Slider speedX = new Slider(this, "Скорость X").min(45).max(80).inc(1).set(65);
    Slider speedY = new Slider(this, "Скорость Y").min(40).max(60).inc(1).set(40);

    CheckBox falling = new CheckBox(this, "Ускорять, если падаешь");

    public MetaRotation(Mode parent) {
        super(parent, "Новая");
    }

    RotationAnimation interp = new RotationAnimation();

    @Override
    public void update(LivingEntity target) {
        Aura aura = Modules.get(Aura.class);

        interp.easing(Easing.SMOOTH_STEP);

        Vector3d pos = mc.player.getEyePosition(0).add(aura.getOffX() * 0.05, -aura.getOffY() * 0.05, 0);

        Vector3d multipoint = new Vector3d(
                MathHelper.clamp(pos.x, target.getBoundingBox().minX, target.getBoundingBox().maxX),
                MathHelper.clamp(pos.y, target.getBoundingBox().minY, target.getBoundingBox().maxY),
                MathHelper.clamp(pos.z, target.getBoundingBox().minZ, target.getBoundingBox().maxZ)
        );

        Vector2f base = Rotation.get(aura.getMPoints() ? multipoint : target.getEyePosition(0).add(aura.getOffX() * 0.05, -aura.getOffY() * 0.05, 0));

        float yaw = interp.getYaw() + Rotation.shorten(base.x, interp.getYaw()),
                speed = AuraUtil.getSens(MathUtil.random(0.6f, 0.9f)),
                test = AuraUtil.getSens(MathUtil.random(100, 135));

        float baseSpeed = (170 - speedX.get()) * speed;
        boolean check = Player.collide(target) && (Player.silent(target)
                || Player.getBlock(0, 2, 0) != Blocks.AIR && Player.getBlock(0, -1, 0)
                != Blocks.AIR && Player.getBlock(0, 2, 0) != Blocks.WATER && Player.getBlock(0, -1, 0) != Blocks.WATER),
                look = MathUtil.rayTraceWithBlock(aura.range.get() - 1, interp.getYaw(), interp.getPitch(), mc.player, target, false);

        // Ускорения
        if (!look) baseSpeed *= 0.87f;

        // Поворачиваем на центр, если падаем
        if (falling.get()) yaw += mc.player.fallDistance * MathHelper.wrapDegrees(base.x - rotation.x) * 3.5f;

        Vector2f angles = new Vector2f(yaw, base.y);
        if (angles.y > 0) angles.y += MathUtil.random(-0.826f, 0.459f);

        float rayCaster = look ? 2.7f : 1f;

        // Замедления
        if (Player.collide(target, -0.4f)) {
            baseSpeed *= 1.4f;
            angles.y = 85; // Смотрим вниз, ведь мы уже в цели
        }

        // Замедляем, если цель в блоках
        if (check) baseSpeed *= 1.35f;

        rotation = interp.animate(angles, (int) (baseSpeed) - 35, ((int) (test - speedY.get()) * (int) rayCaster) - 35);
    }
}

дальше идут утилиты которые юзались в мейнкоде ->
AuraUtil.java:
Expand Collapse Copy
public class AuraUtil {
    public static float getSens(float rotation) {
        return getDeltaMouse(rotation) * Rotation.getGCD();
    }

    public static float getDeltaMouse(float delta) {
        return Math.round(delta / Rotation.getGCD());
    }
}
Player:
Expand Collapse Copy
public class Player {
public static Block getBlock() {
return getBlock(0, 0, 0);
}
public static Block getBlock(double x, double y, double z) {
return mc.world.getBlockState(mc.player.getPosition().add(x, y, z)).getBlock();
}
    public static boolean silent(LivingEntity target) {
        Vector3d pos = target.getPositionVec();
        AxisAlignedBB hitbox = target.getBoundingBox();

        float off = 0.05f;

        return !isAir(hitbox.minX-off, pos.y, hitbox.minZ-off)
                || !isAir(hitbox.maxX+off, pos.y, hitbox.minZ-off)
                || !isAir(hitbox.minX-off, pos.y, hitbox.maxZ+off)
                || !isAir(hitbox.maxX+off, pos.y, hitbox.maxZ+off);
    }

    public static boolean isAir(double x, double y, double z) { return mc.world.getBlockState(new BlockPos(x, y, z)).getBlock() == Blocks.AIR; }
}
    public static boolean collide(LivingEntity entity) {
        return collide(entity, 0);
    }

    public static boolean collide(LivingEntity entity, float grow) {
        AxisAlignedBB box = mc.player.getBoundingBox();
        AxisAlignedBB targetbox = entity.getBoundingBox().grow(grow, 0, grow);

        if (box.maxX > targetbox.minX
                && box.maxY > targetbox.minY && box.maxZ > targetbox.minZ
                && box.minX < targetbox.maxX && box.minY < targetbox.maxY
                && box.minZ < targetbox.maxZ) return true;

        return false;
    }
RotationUtil:
Expand Collapse Copy
public class Rotation {
    public static Vector2f vector(Vector3d vec) {
        Vector3d eyesPos = mc.player.getEyePosition(1.0f);
        double diffX = vec != null ? vec.x - eyesPos.x : 0;
        double diffY = vec != null ? vec.y - (mc.player.getPosY() + (double) mc.player.getEyeHeight() + 0.5) : 0;
        double diffZ = vec != null ? vec.z - eyesPos.z : 0;

        double diffXZ = Math.sqrt(diffX * diffX + diffZ * diffZ);
        float yaw = (float) (Math.toDegrees(Math.atan2(diffZ, diffX)) - 90.0);
        float pitch = (float) (-Math.toDegrees(Math.atan2(diffY, diffXZ)));
        yaw = mc.player.rotationYaw + MathHelper.wrapDegrees(yaw - mc.player.rotationYaw);
        pitch = mc.player.rotationPitch + MathHelper.wrapDegrees(pitch - mc.player.rotationPitch);
        pitch = MathHelper.clamp(pitch, -90.0f, 90.0f);

        return new Vector2f(yaw, pitch);
    }

    public static float shorten(float degree) {
        return (float) (((((mc.player.rotationYaw - degree) % 360) + 540) % 360) - 180);
    }

    public static float shorten(float degree1, float degree2) {
        return (float) (((((degree1 - degree2) % 360) + 540) % 360) - 180);
    }

    public static Vector2f get(Vector3d target) {
        Vector3d eyesPos = new Vector3d(mc.player.getPosX(), mc.player.getPosY() + mc.player.getEyeHeight(), mc.player.getPosZ());
        double diffX = target.x - eyesPos.x;
        double diffY = target.y - eyesPos.y;
        double diffZ = target.z - eyesPos.z;
        double diffXZ = MathHelper.sqrt(diffX * diffX + diffZ * diffZ);
        float yaw = (float) MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(diffZ, diffX)) - 90.0f);
        float pitch = (float) MathHelper.clamp(-Math.toDegrees(Math.atan2(diffY, diffXZ)), -89, 89);

        float sens = (float) (Math.pow(mc.gameSettings.mouseSensitivity, 1.5) * 0.05f + 0.1f);
        float pow = sens * sens * sens * 1.2F;
        yaw -= yaw % pow;
        pitch -= pitch % (pow * sens);

        return new Vector2f(yaw, pitch);
    }

    public static Vector2f gcd(float yaw, float pitch) {
        float gcd = getGCD();
        yaw -= yaw % gcd;
        pitch -= pitch % gcd;

        return new Vector2f(yaw, pitch);
    }

    public static float getGCD() {
        double realGcd = mc.gameSettings.mouseSensitivity;
        double d4 = realGcd * (double) 0.6F + (double) 0.2F;
        return (float) (d4 * d4 * d4 * 8.0D * 0.15);
    }
}
прикольно:pepepopcorn:
 
нет, но 50 / 50, только утилки оттуда брал, все остальное свое (рендер, и тд)
даже могу доказать если хочешь
ну видно же что худ 1 в 1 с рокстара, я не поверю что ты специально сам сидел писал этот рендер, повторял их ректы и тд
 
ну видно же что худ 1 в 1 с рокстара, я не поверю что ты специально сам сидел писал этот рендер, повторял их ректы и тд
так я топ 1 скиддер если что
rockstar:
Expand Collapse Copy
public class TargetHud extends UIElement {
    private final Animation size = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(300);
    private final Animation showing = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(300);
    private final Animation waiting = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(800);
    
    private final Animation hoverNickAnim = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(300);
    private final Animation copiedAnim = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(300);
    private final Animation healthHide = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(300);
    private final Animation goldenHide = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(300);

    private final Animation killing = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(500);
    private final Animation killingWait = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(1000);
    
    private final Animation hurt = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(300);

    private final CheckBox magnet = new CheckBox(this, "Привязка к цели").onEnable(() -> {
        TargetESP targetESP = rock.getModules().get(TargetESP.class);
        if (targetESP.get()) {
            targetESP.set(false);
            rock.getAlertHandler().alert("TargetESP выключен", AlertType.INFO);
        }
    });
    
    private final CheckBox particles = new CheckBox(this, "Частицы").set(true).hide(() -> magnet.get());
    private final InfinityAnimation unitAnim = new InfinityAnimation();
    private final InfinityAnimation healthAnim = new InfinityAnimation();
    private final InfinityAnimation gappleAnim = new InfinityAnimation();
    private final InfinityAnimation silentHealthAnim = new InfinityAnimation();
    
    private final CheckBox additions = new CheckBox(this, "Обводка/Свечение").set(true).hide(() -> !Interface.outline() && !Interface.glow());
    
    private final Mode mode = new Mode(this, "Режим здоровья");
    private final Mode.Element circle = new Mode.Element(mode, "Круг");
    private final Mode.Element circle2 = new Mode.Element(mode, "Круг 2");
    private final Mode.Element bar = new Mode.Element(mode, "Полоска");
    private final Mode.Element none = new Mode.Element(mode, "Ничего");
    
    private final Mode healthMode = new Mode(this, "Отображение здоровья в..").hide(() -> circle.get() || none.get());
    private final Mode.Element percents = new Mode.Element(healthMode, "Процентах").set();
    private final Mode.Element value = new Mode.Element(healthMode, "Единицах");
    
    private final CheckBox rayTrace = new CheckBox(this, "Показывать при наводке");
    private final CheckBox copy = new CheckBox(this, "Копирование никнейма").set(true);
    
    private final CheckBox healthcolor = new CheckBox(this, "Цвет от хп");
    
    private ParticleEngine particleEngine = new ParticleEngine();
    @Getter
    private LivingEntity target, lastTarget;
    
    private boolean killed;
    @Setter
    private int mouseX, mouseY;
    
    private Rect nickname;
    private boolean copied;
    
    private float healthRw = -1;
    @NativeInclude
    public TargetHud(Interface ui, Select select) {
        super(select, "Цель", new Rect(200,200,0,0));
        
        this.set(true);
    }
    
    public void onEvent(Event event) {
        if (event instanceof EventRender2D e)
            renderTargetHud(e);
        
        if (event instanceof EventKill e && e.getTarget() == this.target)
            this.killed = true;
        
        if (event instanceof EventTotemBreak e && e.getEntity() == this.target)
            this.killed = true;
        
        super.onEvent(event);
    }
    
    private void renderTargetHud(EventRender2D event) {
        MatrixStack ms = event.getMatrixStack();
        
        if (!(mc.currentScreen instanceof ChatScreen)) {
            this.mouseX = 0;
            this.mouseY = 0;
        }

        if (nickname != null && !Hover.isHovered(nickname, mouseX, mouseY)) {
            this.copied = false;
        }
        
        float width = mode.is(circle) || mode.is(none) ? 112 : 138;
        float height = 38;
        
        float x = this.draggable.getX(), y = this.draggable.getY();
        
        Aura aura = rock.getModules().get(Aura.class);
        target = Stream.of(
                rock.getModules().get(Aura.class).getTarget(),
                rock.getModules().get(AimAssist.class).getTarget(),
                rock.getModules().get(AimBot.class).getTarget()
        ).filter(Objects::nonNull).findFirst().orElse(null);
        
        if (rock.getModules().containsKey(Aura.class) && target == null) {
            target = rock.getModules().get(Aura.class).getTarget();
        }
        
        
        RayTraceResult traceResult = mc.objectMouseOver;
        
        if (rayTrace.get() && target == null && traceResult != null && traceResult.getType() == RayTraceResult.Type.ENTITY) {
            Entity entity = ((EntityRayTraceResult) traceResult).getEntity();
            
            if (!(entity instanceof LivingEntity)) return;
            
            target = (LivingEntity) entity;
        }
        
        if (this.target == null && mc.currentScreen instanceof ChatScreen)
            this.target = mc.player;
        
        

        
        { // Расчитываем анимации
            if (!super.showing.isForward() || !this.get()) {
                this.waiting.setForward(false);

                this.size.setForward(false);
                this.showing.setForward(false);
                
                if (this.target != null && this.target.getHealth() <= 0) this.killed = true;
                
                this.killing.setForward(false);
                this.killingWait.setForward(false);
                
                if (this.killing.finished()) this.killed = false;
            } else {
                this.waiting.setForward((!(mc.currentScreen instanceof ChatScreen) && this.target == null) || !this.killing.finished(false));
                
                this.size.setForward(this.target != null || !this.showing.finished(false) || !this.killing.finished(false));
                this.showing.setForward(this.size.finished() && (this.target != null || !waiting.finished()) || !this.killing.finished(false));
                
                if (this.target != null && this.target.getHealth() <= 0) this.killed = true;
                
                this.killing.setForward(this.killed || !this.killingWait.finished(false));
                this.killingWait.setForward(this.killed);
                
                if (this.killing.finished()) this.killed = false;
            }
        }
        
        if (this.target == null) {
            this.killed = false;
            this.target = this.lastTarget == null ? mc.player : this.lastTarget;
        }
        
        if (target != null && magnet.get() && !(mc.currentScreen instanceof ChatScreen) && !target.isDead() && mc.world.getAllEntities().contains(target)) {
            float posx = (float) (target.lastTickPosX + (target.getPosX() - target.lastTickPosX) * mc.getRenderPartialTicks());
            float posy = (float) (target.lastTickPosY + (target.getPosY() - target.lastTickPosY) * mc.getRenderPartialTicks());
            float posz = (float) (target.lastTickPosZ + (target.getPosZ() - target.lastTickPosZ) * mc.getRenderPartialTicks());

            double[] pos = Render.worldToScreen(posx, posy + target.getHeight()/2f, posz);
            if (pos == null) return;
            
            if (PositionTracker.isInView(target)) {
                x = (float) pos[0] - width/2F;
                y = (float) pos[1] - height/2F;
            }
        }
        Rect rect = new Rect(x,y,width,height);

        if (!this.size.finished(false)) { // Рендеринг
            // Анимация на здоровье
            int start = 270;
            float max = target.getMaxHealth();
            float unit = target == null ? 20 : (Server.isServerForHPFix() ? target.getRealHealth() : (target.getHealth()+target.getAbsorptionAmount()));
            float health = target == null ? 1 : Math.max(0, Math.min(1, (Server.isServerForHPFix() ? target.getRealHealth() / 20F : (target.getHealth()-target.getAbsorptionAmount()) / (target.getMaxHealth()))));
            float silentHealth = target == null ? 1 : Math.max(0, Math.min(1, (Server.isServerForHPFix() ? target.getRealHealth() / 20F : (target.getHealth()) / (target.getMaxHealth()))));
            float gapple = target == null ? 1 : Math.max(0, Math.min(1, (Server.isServerForHPFix() ? 0 : (target.getAbsorptionAmount() / max))));
            this.healthAnim.animate(health, 100);
            gappleAnim.animate(gapple, 100);
            silentHealthAnim.animate(silentHealth, 100);
            unitAnim.animate(unit, 100);
            
            // Анимация на размер гуишки (открытие/закрытие)
            Render.scale(x + width / 2, y + height / 2, this.size.get());
            
            float alpha = this.size.get();
            float glowAlpha = this.showing.get();
            
            FixColor upLeft = Style.getOutlinePoint(0).alpha(alpha);
            FixColor upRight = Style.getOutlinePoint(45).alpha(alpha);
            FixColor downRight = Style.getOutlinePoint(90).alpha(alpha);
            FixColor downLeft = Style.getOutlinePoint(135).alpha(alpha);
            
            if (!this.killing.finished(false)) {
                //Glow.draw(ms, new Rect(this.draggable.getX()+5,this.draggable.getY()+4,this.draggable.getWidth()-10,this.draggable.getHeight()-8), (rock.getThemes().getCurrent() == rock.getThemes().getLightTheme() ? 5 : 7) + 5 * this.killing.get(), 9.5f + 10 * this.killing.get(), upLeft, upRight, downLeft, downRight);
                Round.draw(ms, rect, 4, rock.getThemes().getFirstColor().alpha(alpha*(1-this.killing.get()*0.2f)));
                float offset = 10 * killing.get();
                Glow.draw(ms, rect, offset, 0.7f * killing.get(), 10 + offset, upLeft, upRight, downLeft, downRight);

                float off = 0.5f;
                //Round.draw(ms, new Rect(this.draggable.getX()-off,this.draggable.getY()-off,this.draggable.getWidth()+off*2,this.draggable.getHeight()+off*2), 5+off, upLeft, upRight, downLeft, downRight);
            }
            
            Round.draw(ms, rect, 4, rock.getThemes().getFirstColor().move(FixColor.WHITE, hover()).alpha(alpha*(1-this.killing.get()*0.2f)));
            
            if (additions.get()) {
                Render.glow(ms, rect, showing.get());
            }
            
            if (additions.get()) {
                Render.outline(ms, rect, showing.get());
            }
            
            if (!magnet.get()) {
                GL11.glEnable(GL11.GL_SCISSOR_TEST);
                Render.scissor(x, y, draggable.getWidth(), draggable.getHeight());
            }
            
            float size = 27;
            float animPromotion = magnet.get() ? 0 : this.showing.get() * height - height;
            
            Round.draw(ms, new Rect(x + height / 2 - size/2 + animPromotion, y + height / 2 - size/2, size, size), size / 2, rock.getThemes().getSecondColor().alpha(this.showing.get() * 0.8f));
            
            Stencil.init();
            size = 26;
            Round.draw(ms, new Rect(x + height / 2 - size/2 + animPromotion, y + height / 2 - size/2, size, size), size / 2, rock.getThemes().getSecondColor().alpha(this.showing.get()));
            Stencil.read(1);

            RenderSystem.disableDepthTest();
            InventoryScreen.drawEntityOnScreen((int) (x + height / 2 + animPromotion), (int) (y + height / 2 + 5 + target.getHeight() * 20 - (rock.getModules().get(Cosmetics.class).getModel(target) == 1 ? 10 : 0)), 25, -20, 10, target);
            RenderSystem.enableDepthTest();
            
            Stencil.finish();
            size = 27;

            Render.drawCircle(x + height / 2 + animPromotion, y + height / 2, size/2, start, start+360, rock.getThemes().getThirdColor().alpha(this.showing.get()));
            
            if (mode.is(circle) && !mode.is(none)) {
                if (healthcolor.get()) {
                    FixColor color = (healthAnim.get() > 0.5f ? FixColor.ORANGE.move(FixColor.GREEN, (healthAnim.get()-0.5f) * 2) : FixColor.RED.move(FixColor.ORANGE, healthAnim.get() * 2));
                    Render.drawCircle(x + height / 2 + animPromotion, y + height / 2, size/2, start, start + (int) (361 * this.healthAnim.get()), color.alpha(this.showing.get()));
                } else {
                    Render.drawUICircle(x + height / 2 + animPromotion, y + height / 2, size/2, start, start + (int) (361 * this.healthAnim.get()), 1.5f, this.showing.get());
                }
                
                if (gappleAnim.get() > 0 && !Server.isFT()) {
                    Render.drawCircle(x + height / 2 + animPromotion, y + height / 2, size/2, start - (int) (gappleAnim.get() * 360), start, FixColor.YELLOW.alpha(this.showing.get()));
                }
            } else if (mode.is(circle2) && !mode.is(none)) {
                Render.drawCircle(x + width - size/2 - 5, y + height / 2, size/2, start, start+360, rock.getThemes().getThirdColor().alpha(this.showing.get()));
                
                if (healthcolor.get()) {
                    FixColor color = (healthAnim.get() > 0.5f ? FixColor.ORANGE.move(FixColor.GREEN, (healthAnim.get()-0.5f) * 2) : FixColor.RED.move(FixColor.ORANGE, healthAnim.get() * 2));
                    Render.drawCircle(x + width - size/2 - 5, y + height / 2, size/2, start, start + (int) (361 * this.healthAnim.get()), 4.5f, color.alpha(this.showing.get()));

                } else {
                    Render.drawUICircle(x + width - size/2 - 5, y + height / 2, size/2, start, start + (int) (361 * this.healthAnim.get()), 4.5f, this.showing.get());
                }
                
                if (gappleAnim.get() > 0 && !Server.isFT()) {
                    Render.drawCircle(x + width - size/2 - 5, y + height / 2, size/2, start - (int) (gappleAnim.get() * 360), start, 4.5f, FixColor.YELLOW.alpha(this.showing.get()));
                }
                String text = percents.get() ? Math.round((silentHealthAnim.get() + gappleAnim.get()) * 100F) + "%" : Math.round(unitAnim.get()) + "";
                if (percents.get()) {
                    this.bold.get(14).draw(ms, text, x + width - size/2 - 5.5f - bold.get(14).getWidth(text)/2, y + height / 2 - 5, rock.getThemes().getTextFirstColor().alpha(this.showing.get()));
                 } else {
                     this.semibold.get(17).draw(ms, text, x + width - size/2 - 5.5f - semibold.get(17).getWidth(text)/2, y + height / 2 - 6, rock.getThemes().getTextFirstColor().alpha(this.showing.get()));
                 }
            }
            
            
            Stencil.init();
            Round.draw(ms, new Rect(x + height / 2 + animPromotion + 17, y + 5, 112 / 2 + 10, 12), 2, rock.getThemes().getSecondColor().alpha(this.showing.get()));
            Stencil.read(1);
            if (copied || !this.copiedAnim.finished(false)) {
                this.bold.get(16).draw(ms, NameProtect.correct(target.getName().getString()), x + height, y + 7 + animPromotion + 12 * this.copiedAnim.get(), rock.getThemes().getTextFirstColor().alpha(this.showing.get() * (1-this.copiedAnim.get())));
                this.bold.get(16).draw(ms, "Скопировано", x + height, y + 7 + animPromotion - 12 + 12 * this.copiedAnim.get(), rock.getThemes().getTextFirstColor().alpha(this.showing.get() * this.copiedAnim.get()));
            } else {
                nickname = this.bold.get(16).draw(ms, NameProtect.correct(target.getName().getString()), x + height, y + 7 + animPromotion, rock.getThemes().getTextFirstColor().alpha(this.showing.get()));
            }
            this.hoverNickAnim.setForward(Hover.isHovered(nickname, mouseX, mouseY) && copy.get());
            Stencil.finish();
            
            Round.draw(ms, new Rect(x + height + animPromotion + 55 - 20 * this.hoverNickAnim.get(), y + 7, 10 + 20 * this.hoverNickAnim.get(), 10), 2, rock.getThemes().getFirstColor().move(FixColor.WHITE, hover()).alpha(0), rock.getThemes().getFirstColor().move(FixColor.WHITE, hover()).alpha(this.showing.get()), rock.getThemes().getFirstColor().move(FixColor.WHITE, hover()).alpha(0), rock.getThemes().getFirstColor().move(FixColor.WHITE, hover()).alpha(this.showing.get()));
            
            this.copiedAnim.setForward(copied);
            Stencil.init();
            Round.draw(ms, new Rect(Math.min(x + height + nickname.getWidth(), x + 112 - 16), y + 7 + .5f, 10, 9), 0, FixColor.RED);
            Stencil.read(1);
            Render.image("icons/copy.png", Math.min(x + height + nickname.getWidth() + 1, x + 112 - 15), y + 7 + 1.5f + 12 * this.copiedAnim.get(), 7, 7, rock.getThemes().getTextSecondColor().alpha(this.showing.get() * this.hoverNickAnim.get() * (1-this.copiedAnim.get())));
            Stencil.finish();
            Render.image("icons/yes.png", Math.min(x + height + bold.get(16).getWidth("Скопировано") + 2, x + 112 - 15), y + 7 + 1.9f - 12 + 12 * this.copiedAnim.get(), 7, 7, FixColor.GREEN.alpha(this.showing.get() * this.hoverNickAnim.get() * this.copiedAnim.get()));

            if (mode.is(bar) && !mode.is(none)) {
                boolean gold = gappleAnim.get() > 0.1f;
                float sum = MathHelper.clamp(healthAnim.get() + gappleAnim.get(), 0, 1);
                healthHide.setForward(sum > 0.3f);
                goldenHide.setForward(gold);
                hurt.setForward(target.hurtTime >= 5);
                float barY = y + height - 17 - animPromotion;
                float barWidth = (width - height*2F + 3);
                String text = percents.get() ? Math.round((silentHealthAnim.get() + gappleAnim.get()) * 100F) + "%" : Math.round(unitAnim.get()) + "";
                
                Round.draw(ms, new Rect(x + height, barY, barWidth, 8), 2, rock.getThemes().getSecondColor().alpha(this.showing.get() * 0.8f));
                FixColor[] circle = Interface.getCircle(alpha);
                FixColor c = circle[0], // Style.getMain().alpha(this.showing.get()),
                        c1 = circle[2], // Style.getSecond().alpha(this.showing.get()),
                        g = FixColor.YELLOW.alpha(this.showing.get() * goldenHide.get());
                
                if (healthcolor.get()) {
                    c = (healthAnim.get() > 0.5f ? FixColor.ORANGE.move(FixColor.GREEN, (healthAnim.get()-0.5f) * 2) : FixColor.RED.move(FixColor.ORANGE, healthAnim.get() * 2));
                    c1 = c.darker(0.5f);
                }
                
                Interface ui = rock.getModules().get(Interface.class);

                //float offset = 2;
                //Glow.draw(ms, new Rect(x + height, barY, barWidth * healthAnim.get(), 8).size(hurt.get()*0.5f).size(-1), offset, ui.getAlpha().get(), 10 + offset, c, c1, c, c1);
                Round.draw(ms, new Rect(x + height, barY, barWidth * healthAnim.get(), 8).size(hurt.get()*0.5f), 2, c, c1, c, c1);
                if (!goldenHide.finished(false)) {
                    Round.draw(ms, new Rect(x + height + MathHelper.clamp(barWidth * healthAnim.get(), 2, barWidth - barWidth * gappleAnim.get()) + 2, barY, barWidth * gappleAnim.get() - 2, 8).size(hurt.get()*0.5f), 2, g);
                }
                if (particles.get() && this.target.hurtTime > 0 && this.target.getHealth() > 0 && this.showing.finished()) {
                    particleEngine.spawn(x + height - 1 + barWidth * sum, barY + MathUtility.random(1, 7), MathUtility.random(2, 5), MathUtility.random(-1, 1), gold ? FixColor.YELLOW : c1);
                }
                FixColor textColor = (c.getRed() + c.getGreen() + c.getBlue()) / 3F > 200 ? FixColor.BLACK : FixColor.WHITE;
                if (gappleAnim.get() > healthAnim.get() * 0.5f)
                    semibold.get(10).draw(ms, text, x + height + barWidth * sum / 2F - semibold.get(10).getWidth(text)/2F + 0.5f, barY + 1.5f, FixColor.BLACK.alpha(showing.get() * healthHide.get()));
                semibold.get(10).draw(ms, text, x + height + barWidth *  sum/ 2F - semibold.get(10).getWidth(text)/2F, barY + 1, textColor.alpha(showing.get() * healthHide.get()));
                
                ArrayList<ItemStack> stacks = new ArrayList<>();
                target.getArmorInventoryList().forEach((stack) -> {
                    if (!stack.isEmpty()) {
                        stacks.add(stack);
                    }
                });
                
                float xOff = 0, yOff = 0;
                for (int i = 0; i < 4; i++) {
                    //float yAnim = yOff != 0 ? height - showing.get() * height : showing.get() * height - height;
                    float xAnim = magnet.get() ? 0 : height - showing.get() * height;
                    Round.draw(ms, new Rect(x + width - height/2F - 10 + xOff + xAnim, y + height/2f - 10 + yOff, 9, 9), 2, rock.getThemes().getSecondColor().alpha(this.showing.get() * 0.8f));
                    if (i < stacks.size() && showing.get() > 0.5f) {
                        Render.drawStackOld(stacks.get(stacks.size()-i-1), x + width - height/2F - 10 + xOff + xAnim, y + height/2f - 10 + yOff, 0.6F);
                    }
                    yOff += 11;
                    if (yOff > 21) {
                        yOff = 0;
                        xOff += 11;
                    }
                }
            } else {
                ArrayList<ItemStack> stacks = new ArrayList<>();
                if (!target.getHeldItemMainhand().isEmpty()) stacks.add(target.getHeldItemMainhand());
                if (!target.getHeldItemOffhand().isEmpty()) stacks.add(target.getHeldItemOffhand());
                target.getArmorInventoryList().forEach((stack) -> {
                    if (!stack.isEmpty()) {
                        stacks.add(stack);
                    }
                });
                
                for (int i = 0; i < 6; i++) {
                    Round.draw(ms, new Rect(x + height + i * 11, y + 20 + height - this.showing.get() * height, 9, 9), 2, rock.getThemes().getSecondColor().alpha(this.showing.get() * 0.8f));
                }
                
                float xOff = 0;
                if (!this.showing.finished(false))
                    for (ItemStack stack : stacks) {
                        Render.drawStackOld(stack, x + height + xOff, y + 20 + height - this.showing.get() * height, 0.6F);
                        
                        xOff += 11;
                    }
            }
            
            if (!magnet.get())
            GL11.glDisable(GL11.GL_SCISSOR_TEST);
            Render.end(); // ЗАКРЫВАЕМ МАТРИЦУ!!
            
            // Дальше идут партиклы

            
            if (particles.get()) {
                size /= 2;
                x = mode.is(circle) ? x + height / 2 + animPromotion : x + width - size / 2 - 11;
                y = y + height / 2;

                float i = (float) (start + (int) (361 * this.healthAnim.get()));

                final float cos = (float) (Math.cos(i * 3.141592653589793 / 180.0) * size * 1.0);
                final float sin = (float) (Math.sin(i * 3.141592653589793 / 180.0) * size * 1.0);
                final float modifCos = (float) (Math.cos((i + 90 + MathUtility.random(30, -30)) * 3.141592653589793 / 180.0)
                        * size * 0.5);
                final float modifSin = (float) (Math.sin((i + 90 + MathUtility.random(30, -30)) * 3.141592653589793 / 180.0)
                        * size * 0.5);
                
                float gappleVal = healthAnim.get() * (target.getAbsorptionAmount() * 10);
                
                boolean amoutBool = target.getAbsorptionAmount() > 0 && gappleVal > 0 && !Server.isFT();

                if (this.target.hurtTime > 0 && this.target.getHealth() > 0 && this.showing.finished() && !mode.is(bar)) {
                    FixColor color = healthcolor.get() ? (healthAnim.get() > 0.5f ? FixColor.ORANGE.move(FixColor.GREEN, (healthAnim.get()-0.5f) * 2) : FixColor.RED.move(FixColor.ORANGE, healthAnim.get() * 2)) : Style.getSecond();
                    particleEngine.spawn(x + cos - 0.5f, y + sin - 0.5f, modifCos, modifSin, amoutBool ? FixColor.YELLOW : color);
                }
            }
        }
        
        particleEngine.render(ms);
        
        this.draggable.setWidth(width);
        this.draggable.setHeight(height);
        
        if (this.target != null) this.lastTarget = this.target;
    }
    
    public void mouseClicked(double mouseX, double mouseY, int button) {
        if (nickname == null || !get()) return;
        if (Hover.isHovered(nickname, mouseX, mouseY) && copy.get()) {
            TextUtility.copyText(target.getName().getString());
            //rock.getAlertHandler().alert("Ваш ник скопирован!", AlertType.INFO);
            this.copied = true;
        }
    }
    
}
мое:
Expand Collapse Copy
public class TargetHud extends UIElement {

    CheckBox hpClr = new CheckBox(this, "Цвет от здоровья");

    Mode mode = new Mode(this, "Отображение хп");
    Mode.Element def = new Mode.Element(mode, "Обычно");
    Mode.Element procent = new Mode.Element(mode, "Проценты").set();

    Mode hpMode = new Mode(this, "Отображение здоровья");
    Mode.Element circle = new Mode.Element(hpMode, "Круг");
    Mode.Element line = new Mode.Element(hpMode, "Круг слева");
    Mode.Element bar = new Mode.Element(hpMode, "Полоска");

    CheckBox thickness = new CheckBox(this, "Толстый круг").vis(() -> circle.get());

    CheckBox centre = new CheckBox(this, "Центрировать хп").vis(() -> bar.get());

    CheckBox rayTrace = new CheckBox(this, "Показывать при наводке");


    LivingEntity target, prev;

    Animation size = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(400),
            waiting = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(700),
            prevAnim = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(500),
            colorChange = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(500),
            hurtAnim = new Animation().setEasing(Easing.BOTH_CIRC).setSpeed(200);

    InfinityAnimation unitAnim = new InfinityAnimation(),
        healthAnim = new InfinityAnimation(),
        gappleAnim = new InfinityAnimation();

    public TargetHud(Interface ui, Select select) {
        super(select, "Таргет", new Rect(200,200,0,0));
    }

    public void event(Event event) {
        if (event instanceof EventRender e)
            renderHud(e.getMS());

        super.event(event);
    }

    private void renderHud(MatrixStack ms) {
        float x = draggable.getX(), y = draggable.getY();
        float width = line.get() ? 106 : 136;

        Aura aura = Modules.get(Aura.class);
        LivingEntity find = null;

        // Обновляем текущий таргет
        if (aura.get()) find = aura.target;

        RayTraceResult traceResult = mc.objectMouseOver;

        if (rayTrace.get() && find == null && traceResult != null && traceResult.getType() == RayTraceResult.Type.ENTITY) {
            Entity entity = ((EntityRayTraceResult) traceResult).getEntity();
            if (!(entity instanceof LivingEntity)) return;

            find = (LivingEntity) entity;
        }

        if (find == null && mc.currentScreen instanceof ChatScreen)
            find = mc.player;

        waiting.setForward(find != null);
        prevAnim.setForward(!waiting.finished(false));
        size.setForward(!prevAnim.finished(false));

        if (find != null)
            prev = find;

        LivingEntity active = prev;
        float scale = Modules.get(Interface.class).size.get();

        Rect rect = new Rect(x, y, width, 37);

        Render.scale(x + width / 2, y + rect.height / 2, scale);
        Render.rect(rect, 4, Theme.getFirst().move(FixColor.WHITE.rgb(), hover()).alpha(showing.get() * size.get()).rgb());

        // Обводкинс <3
        Render.outline(rect, showing.get() * size.get());

        if (!size.finished(false)) {
            // Анимация хп
            float max = active.getMaxHealth();
            float unit = Server.forHPFix() ? active.realHealth : active.getHealth()+active.getAbsorptionAmount();
            float health = Math.max(0, Math.min(1, Server.forHPFix() ? active.realHealth / 20F : (active.getHealth()) / max));
            float gapple = Math.max(0, Math.min(1, Server.forHPFix() ? 0 : active.getAbsorptionAmount() / max));

            healthAnim.animate(health * showing.get(), 100);
            gappleAnim.animate(gapple * showing.get(), 100);
            unitAnim.animate(unit * showing.get(), 90);

            float alpha = showing.get() * prevAnim.get();

            // Рендерим все остальное
            Scissors.start(Render.getScalar(x, y, width, rect.height, scale));

            float size = 28;
            float anim = prevAnim.reversed() * rect.height * 1.5f;

            Render.rect(new Rect(x + rect.height / 2 - size/2 - anim, y + rect.height / 2 - size/2, size, size), size / 2, Theme.getSecond().alpha(alpha).rgb());

            Scissors.init();
            Render.rect(new Rect(x + rect.height / 2 - size/2 - anim, y + rect.height / 2 - size/2, size, size), size / 2, Theme.getSecond().alpha(alpha).rgb());
            Scissors.read(1);

            RenderSystem.disableDepthTest();
            InventoryScreen.drawEntityOnScreen((int) (x + rect.height / 2 - anim), (int) (y + rect.height / 2 + 2 + active.getHeight() * 20 - (Modules.get(Cosmetics.class).getModel(target) == 1 ? 10 : 0)), (int)(25), -20, 10, active);
            RenderSystem.enableDepthTest();

            Scissors.finish();

            // Рендерим хпшки
            FixColor color = hpClr.get() ? (healthAnim.get() > 0.5f ? FixColor.ORANGE.move(FixColor.GREEN.rgb(), (healthAnim.get()-0.5f) * 2) : FixColor.RED.move(FixColor.ORANGE.rgb(), healthAnim.get() * 2)) : Style.getMain();
            String hp = procent.get() ? String.format("%.0f%%", (unitAnim.get() / max) * 100f) : String.format("%.0f", unitAnim.get());

            if (line.get()) {
                Render.circle(x + rect.height / 2 - anim, y + rect.height - size / 1.55F, size / 2, 1.5f, color.alpha(alpha).rgb(), (int) (360 * healthAnim.get()));

                if (gappleAnim.get() > 0.1f && !Server.isFT()) {
                    Render.circle(x + rect.height / 2 - anim, y + rect.height - size / 1.55F, size / 2, 1.5f, FixColor.YELLOW.alpha(alpha).rgb(), (int) (360 * gappleAnim.get()));
                }
            } else if (circle.get()) {
                size = 26;
                float circleX = x + width + anim - rect.height / 2;
                float circleY = y + rect.height - size / 1.5F - 1;
                float radius = size / 2, th = thickness.get() ? 4 : 3;

                Render.circle(circleX, circleY, radius, th, Theme.getSecond().alpha(alpha).rgb(), 360);
                Render.circle(circleX, circleY, radius, th, color.alpha(alpha).rgb(), (int) (360 * healthAnim.get()));

                if (gappleAnim.get() > 0.1f && !Server.isFT()) {
                    Render.circle(circleX, circleY, radius, th, FixColor.YELLOW.alpha(alpha).rgb(), (int) (360 * gappleAnim.get()));
                }

                // Текст по центру круга
                int font = procent.get() ? 14 : 16;
                bold[font].draw(ms, hp, circleX - bold[font].getWidth(hp) / 2, (int)circleY - (procent.get() ? .5f : 1), Theme.getText().alpha(alpha).Int());
            } else if (bar.get()) {
                Rect bar = new Rect(x + rect.height, y + rect.height - 16 + hurtAnim.get() / 2 + anim, width - rect.height * 2 + 3, 8 - hurtAnim.get());

                FixColor first = Style.getMain().alpha(alpha),
                        two = Style.getSecond().alpha(alpha);

                if (hpClr.get()) {
                    first = color.alpha(alpha);
                    two = color.darker(140).alpha(alpha);
                }

                hurtAnim.setForward(active.hurtTime >= 4);

                float width2 = bar.width * gappleAnim.get();
                float width1 = Math.max(0, bar.width * healthAnim.get() - width2);

                if (width1 > 0) {
                    Render.gradient(bar.x, bar.y, width1, bar.height, 1.5f, first.rgb(), first.rgb(), two.rgb(), two.rgb());
                }

                if (gappleAnim.get() > 0.1f && !Server.isFT() && width2 > 0) {
                    FixColor yellow = FixColor.YELLOW.alpha(alpha);

                    Render.gradient(bar.x + width1 + 1, bar.y, width2 - 1, bar.height, 1.5f, yellow.rgb(), yellow.rgb(), yellow.darker(150).rgb(), yellow.darker(150).rgb());
                }

                float textX;

                if (centre.get()) {
                    textX = bar.x + (width1 - semibold[12].getWidth(hp)) / 2;
                } else {
                    textX = bar.x + width1 - semibold[12].getWidth(hp) - 3;
                }
                textX = Math.max(bar.x, textX);

                colorChange.setForward((first.getBrightness() + two.getBrightness()) / 2f < 0.7f);

                bold[11].drawShadow(ms, hp, textX, bar.y + bar.height / 2 + .5, FixColor.WHITE.move(FixColor.BLACK.rgb(), colorChange.get()).alpha(alpha).Int());
            }

            float width1 = (width - 5) - rect.height;

            // Предметы
            ArrayList<ItemStack> stacks = new ArrayList<>();
            active.getArmorInventoryList().forEach((stack) -> {
                if (!stack.isEmpty()) {
                    stacks.add(stack);
                }
            });

            if (!bar.get()) {
                if (!active.getHeldItemMainhand().isEmpty()) stacks.add(active.getHeldItemMainhand());
                if (!active.getHeldItemOffhand().isEmpty()) stacks.add(active.getHeldItemOffhand());

                Scissors.init();
                Render.rect(x + rect.height, y + 19, width1, 16, 0, Theme.getFirst().alpha(alpha).rgb());
                Scissors.read(1);

                float xOff = 0;
                for (ItemStack stack : stacks) {
                    Render.drawStack(stack, x + rect.height + xOff, y + 20 + anim, 0.6F);
                    xOff += 10.5F;
                }

                Scissors.finish();
            } else {
                Scissors.init();
                Render.rect(x + 9 + width - rect.height, y + rect.height / 4.5f, 30, 30, 0, Theme.getFirst().alpha(alpha).rgb());
                Scissors.read(1);

                int count = 0;
                float xOff = 0, yOff = 0;
                for (ItemStack stack : stacks) {
                    Render.drawStack(stack, x + 9 + width - rect.height + xOff + anim, y + rect.height / 4.5f + yOff, 0.6F);

                    if (count == 0) {
                        xOff += 9.5F;
                    } else {
                        yOff += 9.5F;
                    }

                    count++;
                    if (count > 1) {
                        xOff = 0;
                        count = 0;
                    };
                }

                Scissors.finish();
            }

            // Имя
            String name = NameProtect.correct(active.getName().getString());

            if (name.length() > 10)
                name = name.substring(0, 10);

            Scissors.init();
            Render.rect(x + rect.height, y - anim, width1 - 5 - (line.get() ? -1 : 25), 17, 0, Theme.getFirst().alpha(alpha).rgb());
            Scissors.read(1);

            bold[16].draw(ms, name, x + rect.height, y + 11 - anim, Theme.getText().alpha(alpha).Int());

            FixColor bg = Theme.getFirst().move(FixColor.WHITE.rgb(), hover());
            Render.gradient(x + rect.height + bold[16].getWidth(name) - 20, y + 6.5f - anim, 21, 12, 0, bg.alpha(0).rgb(), bg.alpha(0).rgb(), bg.alpha(alpha).rgb(), bg.alpha(alpha).rgb());

            Scissors.finish();

            Scissors.stop();
        }

        draggable.width(width);
        draggable.height(rect.height);
    }
}
 
так я топ 1 скиддер если что
rockstar:
Expand Collapse Copy
public class TargetHud extends UIElement {
    private final Animation size = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(300);
    private final Animation showing = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(300);
    private final Animation waiting = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(800);
   
    private final Animation hoverNickAnim = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(300);
    private final Animation copiedAnim = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(300);
    private final Animation healthHide = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(300);
    private final Animation goldenHide = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(300);

    private final Animation killing = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(500);
    private final Animation killingWait = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(1000);
   
    private final Animation hurt = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(300);

    private final CheckBox magnet = new CheckBox(this, "Привязка к цели").onEnable(() -> {
        TargetESP targetESP = rock.getModules().get(TargetESP.class);
        if (targetESP.get()) {
            targetESP.set(false);
            rock.getAlertHandler().alert("TargetESP выключен", AlertType.INFO);
        }
    });
   
    private final CheckBox particles = new CheckBox(this, "Частицы").set(true).hide(() -> magnet.get());
    private final InfinityAnimation unitAnim = new InfinityAnimation();
    private final InfinityAnimation healthAnim = new InfinityAnimation();
    private final InfinityAnimation gappleAnim = new InfinityAnimation();
    private final InfinityAnimation silentHealthAnim = new InfinityAnimation();
   
    private final CheckBox additions = new CheckBox(this, "Обводка/Свечение").set(true).hide(() -> !Interface.outline() && !Interface.glow());
   
    private final Mode mode = new Mode(this, "Режим здоровья");
    private final Mode.Element circle = new Mode.Element(mode, "Круг");
    private final Mode.Element circle2 = new Mode.Element(mode, "Круг 2");
    private final Mode.Element bar = new Mode.Element(mode, "Полоска");
    private final Mode.Element none = new Mode.Element(mode, "Ничего");
   
    private final Mode healthMode = new Mode(this, "Отображение здоровья в..").hide(() -> circle.get() || none.get());
    private final Mode.Element percents = new Mode.Element(healthMode, "Процентах").set();
    private final Mode.Element value = new Mode.Element(healthMode, "Единицах");
   
    private final CheckBox rayTrace = new CheckBox(this, "Показывать при наводке");
    private final CheckBox copy = new CheckBox(this, "Копирование никнейма").set(true);
   
    private final CheckBox healthcolor = new CheckBox(this, "Цвет от хп");
   
    private ParticleEngine particleEngine = new ParticleEngine();
    @Getter
    private LivingEntity target, lastTarget;
   
    private boolean killed;
    @Setter
    private int mouseX, mouseY;
   
    private Rect nickname;
    private boolean copied;
   
    private float healthRw = -1;
    @NativeInclude
    public TargetHud(Interface ui, Select select) {
        super(select, "Цель", new Rect(200,200,0,0));
       
        this.set(true);
    }
   
    public void onEvent(Event event) {
        if (event instanceof EventRender2D e)
            renderTargetHud(e);
       
        if (event instanceof EventKill e && e.getTarget() == this.target)
            this.killed = true;
       
        if (event instanceof EventTotemBreak e && e.getEntity() == this.target)
            this.killed = true;
       
        super.onEvent(event);
    }
   
    private void renderTargetHud(EventRender2D event) {
        MatrixStack ms = event.getMatrixStack();
       
        if (!(mc.currentScreen instanceof ChatScreen)) {
            this.mouseX = 0;
            this.mouseY = 0;
        }

        if (nickname != null && !Hover.isHovered(nickname, mouseX, mouseY)) {
            this.copied = false;
        }
       
        float width = mode.is(circle) || mode.is(none) ? 112 : 138;
        float height = 38;
       
        float x = this.draggable.getX(), y = this.draggable.getY();
       
        Aura aura = rock.getModules().get(Aura.class);
        target = Stream.of(
                rock.getModules().get(Aura.class).getTarget(),
                rock.getModules().get(AimAssist.class).getTarget(),
                rock.getModules().get(AimBot.class).getTarget()
        ).filter(Objects::nonNull).findFirst().orElse(null);
       
        if (rock.getModules().containsKey(Aura.class) && target == null) {
            target = rock.getModules().get(Aura.class).getTarget();
        }
       
       
        RayTraceResult traceResult = mc.objectMouseOver;
       
        if (rayTrace.get() && target == null && traceResult != null && traceResult.getType() == RayTraceResult.Type.ENTITY) {
            Entity entity = ((EntityRayTraceResult) traceResult).getEntity();
           
            if (!(entity instanceof LivingEntity)) return;
           
            target = (LivingEntity) entity;
        }
       
        if (this.target == null && mc.currentScreen instanceof ChatScreen)
            this.target = mc.player;
       
       

       
        { // Расчитываем анимации
            if (!super.showing.isForward() || !this.get()) {
                this.waiting.setForward(false);

                this.size.setForward(false);
                this.showing.setForward(false);
               
                if (this.target != null && this.target.getHealth() <= 0) this.killed = true;
               
                this.killing.setForward(false);
                this.killingWait.setForward(false);
               
                if (this.killing.finished()) this.killed = false;
            } else {
                this.waiting.setForward((!(mc.currentScreen instanceof ChatScreen) && this.target == null) || !this.killing.finished(false));
               
                this.size.setForward(this.target != null || !this.showing.finished(false) || !this.killing.finished(false));
                this.showing.setForward(this.size.finished() && (this.target != null || !waiting.finished()) || !this.killing.finished(false));
               
                if (this.target != null && this.target.getHealth() <= 0) this.killed = true;
               
                this.killing.setForward(this.killed || !this.killingWait.finished(false));
                this.killingWait.setForward(this.killed);
               
                if (this.killing.finished()) this.killed = false;
            }
        }
       
        if (this.target == null) {
            this.killed = false;
            this.target = this.lastTarget == null ? mc.player : this.lastTarget;
        }
       
        if (target != null && magnet.get() && !(mc.currentScreen instanceof ChatScreen) && !target.isDead() && mc.world.getAllEntities().contains(target)) {
            float posx = (float) (target.lastTickPosX + (target.getPosX() - target.lastTickPosX) * mc.getRenderPartialTicks());
            float posy = (float) (target.lastTickPosY + (target.getPosY() - target.lastTickPosY) * mc.getRenderPartialTicks());
            float posz = (float) (target.lastTickPosZ + (target.getPosZ() - target.lastTickPosZ) * mc.getRenderPartialTicks());

            double[] pos = Render.worldToScreen(posx, posy + target.getHeight()/2f, posz);
            if (pos == null) return;
           
            if (PositionTracker.isInView(target)) {
                x = (float) pos[0] - width/2F;
                y = (float) pos[1] - height/2F;
            }
        }
        Rect rect = new Rect(x,y,width,height);

        if (!this.size.finished(false)) { // Рендеринг
            // Анимация на здоровье
            int start = 270;
            float max = target.getMaxHealth();
            float unit = target == null ? 20 : (Server.isServerForHPFix() ? target.getRealHealth() : (target.getHealth()+target.getAbsorptionAmount()));
            float health = target == null ? 1 : Math.max(0, Math.min(1, (Server.isServerForHPFix() ? target.getRealHealth() / 20F : (target.getHealth()-target.getAbsorptionAmount()) / (target.getMaxHealth()))));
            float silentHealth = target == null ? 1 : Math.max(0, Math.min(1, (Server.isServerForHPFix() ? target.getRealHealth() / 20F : (target.getHealth()) / (target.getMaxHealth()))));
            float gapple = target == null ? 1 : Math.max(0, Math.min(1, (Server.isServerForHPFix() ? 0 : (target.getAbsorptionAmount() / max))));
            this.healthAnim.animate(health, 100);
            gappleAnim.animate(gapple, 100);
            silentHealthAnim.animate(silentHealth, 100);
            unitAnim.animate(unit, 100);
           
            // Анимация на размер гуишки (открытие/закрытие)
            Render.scale(x + width / 2, y + height / 2, this.size.get());
           
            float alpha = this.size.get();
            float glowAlpha = this.showing.get();
           
            FixColor upLeft = Style.getOutlinePoint(0).alpha(alpha);
            FixColor upRight = Style.getOutlinePoint(45).alpha(alpha);
            FixColor downRight = Style.getOutlinePoint(90).alpha(alpha);
            FixColor downLeft = Style.getOutlinePoint(135).alpha(alpha);
           
            if (!this.killing.finished(false)) {
                //Glow.draw(ms, new Rect(this.draggable.getX()+5,this.draggable.getY()+4,this.draggable.getWidth()-10,this.draggable.getHeight()-8), (rock.getThemes().getCurrent() == rock.getThemes().getLightTheme() ? 5 : 7) + 5 * this.killing.get(), 9.5f + 10 * this.killing.get(), upLeft, upRight, downLeft, downRight);
                Round.draw(ms, rect, 4, rock.getThemes().getFirstColor().alpha(alpha*(1-this.killing.get()*0.2f)));
                float offset = 10 * killing.get();
                Glow.draw(ms, rect, offset, 0.7f * killing.get(), 10 + offset, upLeft, upRight, downLeft, downRight);

                float off = 0.5f;
                //Round.draw(ms, new Rect(this.draggable.getX()-off,this.draggable.getY()-off,this.draggable.getWidth()+off*2,this.draggable.getHeight()+off*2), 5+off, upLeft, upRight, downLeft, downRight);
            }
           
            Round.draw(ms, rect, 4, rock.getThemes().getFirstColor().move(FixColor.WHITE, hover()).alpha(alpha*(1-this.killing.get()*0.2f)));
           
            if (additions.get()) {
                Render.glow(ms, rect, showing.get());
            }
           
            if (additions.get()) {
                Render.outline(ms, rect, showing.get());
            }
           
            if (!magnet.get()) {
                GL11.glEnable(GL11.GL_SCISSOR_TEST);
                Render.scissor(x, y, draggable.getWidth(), draggable.getHeight());
            }
           
            float size = 27;
            float animPromotion = magnet.get() ? 0 : this.showing.get() * height - height;
           
            Round.draw(ms, new Rect(x + height / 2 - size/2 + animPromotion, y + height / 2 - size/2, size, size), size / 2, rock.getThemes().getSecondColor().alpha(this.showing.get() * 0.8f));
           
            Stencil.init();
            size = 26;
            Round.draw(ms, new Rect(x + height / 2 - size/2 + animPromotion, y + height / 2 - size/2, size, size), size / 2, rock.getThemes().getSecondColor().alpha(this.showing.get()));
            Stencil.read(1);

            RenderSystem.disableDepthTest();
            InventoryScreen.drawEntityOnScreen((int) (x + height / 2 + animPromotion), (int) (y + height / 2 + 5 + target.getHeight() * 20 - (rock.getModules().get(Cosmetics.class).getModel(target) == 1 ? 10 : 0)), 25, -20, 10, target);
            RenderSystem.enableDepthTest();
           
            Stencil.finish();
            size = 27;

            Render.drawCircle(x + height / 2 + animPromotion, y + height / 2, size/2, start, start+360, rock.getThemes().getThirdColor().alpha(this.showing.get()));
           
            if (mode.is(circle) && !mode.is(none)) {
                if (healthcolor.get()) {
                    FixColor color = (healthAnim.get() > 0.5f ? FixColor.ORANGE.move(FixColor.GREEN, (healthAnim.get()-0.5f) * 2) : FixColor.RED.move(FixColor.ORANGE, healthAnim.get() * 2));
                    Render.drawCircle(x + height / 2 + animPromotion, y + height / 2, size/2, start, start + (int) (361 * this.healthAnim.get()), color.alpha(this.showing.get()));
                } else {
                    Render.drawUICircle(x + height / 2 + animPromotion, y + height / 2, size/2, start, start + (int) (361 * this.healthAnim.get()), 1.5f, this.showing.get());
                }
               
                if (gappleAnim.get() > 0 && !Server.isFT()) {
                    Render.drawCircle(x + height / 2 + animPromotion, y + height / 2, size/2, start - (int) (gappleAnim.get() * 360), start, FixColor.YELLOW.alpha(this.showing.get()));
                }
            } else if (mode.is(circle2) && !mode.is(none)) {
                Render.drawCircle(x + width - size/2 - 5, y + height / 2, size/2, start, start+360, rock.getThemes().getThirdColor().alpha(this.showing.get()));
               
                if (healthcolor.get()) {
                    FixColor color = (healthAnim.get() > 0.5f ? FixColor.ORANGE.move(FixColor.GREEN, (healthAnim.get()-0.5f) * 2) : FixColor.RED.move(FixColor.ORANGE, healthAnim.get() * 2));
                    Render.drawCircle(x + width - size/2 - 5, y + height / 2, size/2, start, start + (int) (361 * this.healthAnim.get()), 4.5f, color.alpha(this.showing.get()));

                } else {
                    Render.drawUICircle(x + width - size/2 - 5, y + height / 2, size/2, start, start + (int) (361 * this.healthAnim.get()), 4.5f, this.showing.get());
                }
               
                if (gappleAnim.get() > 0 && !Server.isFT()) {
                    Render.drawCircle(x + width - size/2 - 5, y + height / 2, size/2, start - (int) (gappleAnim.get() * 360), start, 4.5f, FixColor.YELLOW.alpha(this.showing.get()));
                }
                String text = percents.get() ? Math.round((silentHealthAnim.get() + gappleAnim.get()) * 100F) + "%" : Math.round(unitAnim.get()) + "";
                if (percents.get()) {
                    this.bold.get(14).draw(ms, text, x + width - size/2 - 5.5f - bold.get(14).getWidth(text)/2, y + height / 2 - 5, rock.getThemes().getTextFirstColor().alpha(this.showing.get()));
                 } else {
                     this.semibold.get(17).draw(ms, text, x + width - size/2 - 5.5f - semibold.get(17).getWidth(text)/2, y + height / 2 - 6, rock.getThemes().getTextFirstColor().alpha(this.showing.get()));
                 }
            }
           
           
            Stencil.init();
            Round.draw(ms, new Rect(x + height / 2 + animPromotion + 17, y + 5, 112 / 2 + 10, 12), 2, rock.getThemes().getSecondColor().alpha(this.showing.get()));
            Stencil.read(1);
            if (copied || !this.copiedAnim.finished(false)) {
                this.bold.get(16).draw(ms, NameProtect.correct(target.getName().getString()), x + height, y + 7 + animPromotion + 12 * this.copiedAnim.get(), rock.getThemes().getTextFirstColor().alpha(this.showing.get() * (1-this.copiedAnim.get())));
                this.bold.get(16).draw(ms, "Скопировано", x + height, y + 7 + animPromotion - 12 + 12 * this.copiedAnim.get(), rock.getThemes().getTextFirstColor().alpha(this.showing.get() * this.copiedAnim.get()));
            } else {
                nickname = this.bold.get(16).draw(ms, NameProtect.correct(target.getName().getString()), x + height, y + 7 + animPromotion, rock.getThemes().getTextFirstColor().alpha(this.showing.get()));
            }
            this.hoverNickAnim.setForward(Hover.isHovered(nickname, mouseX, mouseY) && copy.get());
            Stencil.finish();
           
            Round.draw(ms, new Rect(x + height + animPromotion + 55 - 20 * this.hoverNickAnim.get(), y + 7, 10 + 20 * this.hoverNickAnim.get(), 10), 2, rock.getThemes().getFirstColor().move(FixColor.WHITE, hover()).alpha(0), rock.getThemes().getFirstColor().move(FixColor.WHITE, hover()).alpha(this.showing.get()), rock.getThemes().getFirstColor().move(FixColor.WHITE, hover()).alpha(0), rock.getThemes().getFirstColor().move(FixColor.WHITE, hover()).alpha(this.showing.get()));
           
            this.copiedAnim.setForward(copied);
            Stencil.init();
            Round.draw(ms, new Rect(Math.min(x + height + nickname.getWidth(), x + 112 - 16), y + 7 + .5f, 10, 9), 0, FixColor.RED);
            Stencil.read(1);
            Render.image("icons/copy.png", Math.min(x + height + nickname.getWidth() + 1, x + 112 - 15), y + 7 + 1.5f + 12 * this.copiedAnim.get(), 7, 7, rock.getThemes().getTextSecondColor().alpha(this.showing.get() * this.hoverNickAnim.get() * (1-this.copiedAnim.get())));
            Stencil.finish();
            Render.image("icons/yes.png", Math.min(x + height + bold.get(16).getWidth("Скопировано") + 2, x + 112 - 15), y + 7 + 1.9f - 12 + 12 * this.copiedAnim.get(), 7, 7, FixColor.GREEN.alpha(this.showing.get() * this.hoverNickAnim.get() * this.copiedAnim.get()));

            if (mode.is(bar) && !mode.is(none)) {
                boolean gold = gappleAnim.get() > 0.1f;
                float sum = MathHelper.clamp(healthAnim.get() + gappleAnim.get(), 0, 1);
                healthHide.setForward(sum > 0.3f);
                goldenHide.setForward(gold);
                hurt.setForward(target.hurtTime >= 5);
                float barY = y + height - 17 - animPromotion;
                float barWidth = (width - height*2F + 3);
                String text = percents.get() ? Math.round((silentHealthAnim.get() + gappleAnim.get()) * 100F) + "%" : Math.round(unitAnim.get()) + "";
               
                Round.draw(ms, new Rect(x + height, barY, barWidth, 8), 2, rock.getThemes().getSecondColor().alpha(this.showing.get() * 0.8f));
                FixColor[] circle = Interface.getCircle(alpha);
                FixColor c = circle[0], // Style.getMain().alpha(this.showing.get()),
                        c1 = circle[2], // Style.getSecond().alpha(this.showing.get()),
                        g = FixColor.YELLOW.alpha(this.showing.get() * goldenHide.get());
               
                if (healthcolor.get()) {
                    c = (healthAnim.get() > 0.5f ? FixColor.ORANGE.move(FixColor.GREEN, (healthAnim.get()-0.5f) * 2) : FixColor.RED.move(FixColor.ORANGE, healthAnim.get() * 2));
                    c1 = c.darker(0.5f);
                }
               
                Interface ui = rock.getModules().get(Interface.class);

                //float offset = 2;
                //Glow.draw(ms, new Rect(x + height, barY, barWidth * healthAnim.get(), 8).size(hurt.get()*0.5f).size(-1), offset, ui.getAlpha().get(), 10 + offset, c, c1, c, c1);
                Round.draw(ms, new Rect(x + height, barY, barWidth * healthAnim.get(), 8).size(hurt.get()*0.5f), 2, c, c1, c, c1);
                if (!goldenHide.finished(false)) {
                    Round.draw(ms, new Rect(x + height + MathHelper.clamp(barWidth * healthAnim.get(), 2, barWidth - barWidth * gappleAnim.get()) + 2, barY, barWidth * gappleAnim.get() - 2, 8).size(hurt.get()*0.5f), 2, g);
                }
                if (particles.get() && this.target.hurtTime > 0 && this.target.getHealth() > 0 && this.showing.finished()) {
                    particleEngine.spawn(x + height - 1 + barWidth * sum, barY + MathUtility.random(1, 7), MathUtility.random(2, 5), MathUtility.random(-1, 1), gold ? FixColor.YELLOW : c1);
                }
                FixColor textColor = (c.getRed() + c.getGreen() + c.getBlue()) / 3F > 200 ? FixColor.BLACK : FixColor.WHITE;
                if (gappleAnim.get() > healthAnim.get() * 0.5f)
                    semibold.get(10).draw(ms, text, x + height + barWidth * sum / 2F - semibold.get(10).getWidth(text)/2F + 0.5f, barY + 1.5f, FixColor.BLACK.alpha(showing.get() * healthHide.get()));
                semibold.get(10).draw(ms, text, x + height + barWidth *  sum/ 2F - semibold.get(10).getWidth(text)/2F, barY + 1, textColor.alpha(showing.get() * healthHide.get()));
               
                ArrayList<ItemStack> stacks = new ArrayList<>();
                target.getArmorInventoryList().forEach((stack) -> {
                    if (!stack.isEmpty()) {
                        stacks.add(stack);
                    }
                });
               
                float xOff = 0, yOff = 0;
                for (int i = 0; i < 4; i++) {
                    //float yAnim = yOff != 0 ? height - showing.get() * height : showing.get() * height - height;
                    float xAnim = magnet.get() ? 0 : height - showing.get() * height;
                    Round.draw(ms, new Rect(x + width - height/2F - 10 + xOff + xAnim, y + height/2f - 10 + yOff, 9, 9), 2, rock.getThemes().getSecondColor().alpha(this.showing.get() * 0.8f));
                    if (i < stacks.size() && showing.get() > 0.5f) {
                        Render.drawStackOld(stacks.get(stacks.size()-i-1), x + width - height/2F - 10 + xOff + xAnim, y + height/2f - 10 + yOff, 0.6F);
                    }
                    yOff += 11;
                    if (yOff > 21) {
                        yOff = 0;
                        xOff += 11;
                    }
                }
            } else {
                ArrayList<ItemStack> stacks = new ArrayList<>();
                if (!target.getHeldItemMainhand().isEmpty()) stacks.add(target.getHeldItemMainhand());
                if (!target.getHeldItemOffhand().isEmpty()) stacks.add(target.getHeldItemOffhand());
                target.getArmorInventoryList().forEach((stack) -> {
                    if (!stack.isEmpty()) {
                        stacks.add(stack);
                    }
                });
               
                for (int i = 0; i < 6; i++) {
                    Round.draw(ms, new Rect(x + height + i * 11, y + 20 + height - this.showing.get() * height, 9, 9), 2, rock.getThemes().getSecondColor().alpha(this.showing.get() * 0.8f));
                }
               
                float xOff = 0;
                if (!this.showing.finished(false))
                    for (ItemStack stack : stacks) {
                        Render.drawStackOld(stack, x + height + xOff, y + 20 + height - this.showing.get() * height, 0.6F);
                       
                        xOff += 11;
                    }
            }
           
            if (!magnet.get())
            GL11.glDisable(GL11.GL_SCISSOR_TEST);
            Render.end(); // ЗАКРЫВАЕМ МАТРИЦУ!!
           
            // Дальше идут партиклы

           
            if (particles.get()) {
                size /= 2;
                x = mode.is(circle) ? x + height / 2 + animPromotion : x + width - size / 2 - 11;
                y = y + height / 2;

                float i = (float) (start + (int) (361 * this.healthAnim.get()));

                final float cos = (float) (Math.cos(i * 3.141592653589793 / 180.0) * size * 1.0);
                final float sin = (float) (Math.sin(i * 3.141592653589793 / 180.0) * size * 1.0);
                final float modifCos = (float) (Math.cos((i + 90 + MathUtility.random(30, -30)) * 3.141592653589793 / 180.0)
                        * size * 0.5);
                final float modifSin = (float) (Math.sin((i + 90 + MathUtility.random(30, -30)) * 3.141592653589793 / 180.0)
                        * size * 0.5);
               
                float gappleVal = healthAnim.get() * (target.getAbsorptionAmount() * 10);
               
                boolean amoutBool = target.getAbsorptionAmount() > 0 && gappleVal > 0 && !Server.isFT();

                if (this.target.hurtTime > 0 && this.target.getHealth() > 0 && this.showing.finished() && !mode.is(bar)) {
                    FixColor color = healthcolor.get() ? (healthAnim.get() > 0.5f ? FixColor.ORANGE.move(FixColor.GREEN, (healthAnim.get()-0.5f) * 2) : FixColor.RED.move(FixColor.ORANGE, healthAnim.get() * 2)) : Style.getSecond();
                    particleEngine.spawn(x + cos - 0.5f, y + sin - 0.5f, modifCos, modifSin, amoutBool ? FixColor.YELLOW : color);
                }
            }
        }
       
        particleEngine.render(ms);
       
        this.draggable.setWidth(width);
        this.draggable.setHeight(height);
       
        if (this.target != null) this.lastTarget = this.target;
    }
   
    public void mouseClicked(double mouseX, double mouseY, int button) {
        if (nickname == null || !get()) return;
        if (Hover.isHovered(nickname, mouseX, mouseY) && copy.get()) {
            TextUtility.copyText(target.getName().getString());
            //rock.getAlertHandler().alert("Ваш ник скопирован!", AlertType.INFO);
            this.copied = true;
        }
    }
   
}
мое:
Expand Collapse Copy
public class TargetHud extends UIElement {

    CheckBox hpClr = new CheckBox(this, "Цвет от здоровья");

    Mode mode = new Mode(this, "Отображение хп");
    Mode.Element def = new Mode.Element(mode, "Обычно");
    Mode.Element procent = new Mode.Element(mode, "Проценты").set();

    Mode hpMode = new Mode(this, "Отображение здоровья");
    Mode.Element circle = new Mode.Element(hpMode, "Круг");
    Mode.Element line = new Mode.Element(hpMode, "Круг слева");
    Mode.Element bar = new Mode.Element(hpMode, "Полоска");

    CheckBox thickness = new CheckBox(this, "Толстый круг").vis(() -> circle.get());

    CheckBox centre = new CheckBox(this, "Центрировать хп").vis(() -> bar.get());

    CheckBox rayTrace = new CheckBox(this, "Показывать при наводке");


    LivingEntity target, prev;

    Animation size = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(400),
            waiting = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(700),
            prevAnim = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(500),
            colorChange = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(500),
            hurtAnim = new Animation().setEasing(Easing.BOTH_CIRC).setSpeed(200);

    InfinityAnimation unitAnim = new InfinityAnimation(),
        healthAnim = new InfinityAnimation(),
        gappleAnim = new InfinityAnimation();

    public TargetHud(Interface ui, Select select) {
        super(select, "Таргет", new Rect(200,200,0,0));
    }

    public void event(Event event) {
        if (event instanceof EventRender e)
            renderHud(e.getMS());

        super.event(event);
    }

    private void renderHud(MatrixStack ms) {
        float x = draggable.getX(), y = draggable.getY();
        float width = line.get() ? 106 : 136;

        Aura aura = Modules.get(Aura.class);
        LivingEntity find = null;

        // Обновляем текущий таргет
        if (aura.get()) find = aura.target;

        RayTraceResult traceResult = mc.objectMouseOver;

        if (rayTrace.get() && find == null && traceResult != null && traceResult.getType() == RayTraceResult.Type.ENTITY) {
            Entity entity = ((EntityRayTraceResult) traceResult).getEntity();
            if (!(entity instanceof LivingEntity)) return;

            find = (LivingEntity) entity;
        }

        if (find == null && mc.currentScreen instanceof ChatScreen)
            find = mc.player;

        waiting.setForward(find != null);
        prevAnim.setForward(!waiting.finished(false));
        size.setForward(!prevAnim.finished(false));

        if (find != null)
            prev = find;

        LivingEntity active = prev;
        float scale = Modules.get(Interface.class).size.get();

        Rect rect = new Rect(x, y, width, 37);

        Render.scale(x + width / 2, y + rect.height / 2, scale);
        Render.rect(rect, 4, Theme.getFirst().move(FixColor.WHITE.rgb(), hover()).alpha(showing.get() * size.get()).rgb());

        // Обводкинс <3
        Render.outline(rect, showing.get() * size.get());

        if (!size.finished(false)) {
            // Анимация хп
            float max = active.getMaxHealth();
            float unit = Server.forHPFix() ? active.realHealth : active.getHealth()+active.getAbsorptionAmount();
            float health = Math.max(0, Math.min(1, Server.forHPFix() ? active.realHealth / 20F : (active.getHealth()) / max));
            float gapple = Math.max(0, Math.min(1, Server.forHPFix() ? 0 : active.getAbsorptionAmount() / max));

            healthAnim.animate(health * showing.get(), 100);
            gappleAnim.animate(gapple * showing.get(), 100);
            unitAnim.animate(unit * showing.get(), 90);

            float alpha = showing.get() * prevAnim.get();

            // Рендерим все остальное
            Scissors.start(Render.getScalar(x, y, width, rect.height, scale));

            float size = 28;
            float anim = prevAnim.reversed() * rect.height * 1.5f;

            Render.rect(new Rect(x + rect.height / 2 - size/2 - anim, y + rect.height / 2 - size/2, size, size), size / 2, Theme.getSecond().alpha(alpha).rgb());

            Scissors.init();
            Render.rect(new Rect(x + rect.height / 2 - size/2 - anim, y + rect.height / 2 - size/2, size, size), size / 2, Theme.getSecond().alpha(alpha).rgb());
            Scissors.read(1);

            RenderSystem.disableDepthTest();
            InventoryScreen.drawEntityOnScreen((int) (x + rect.height / 2 - anim), (int) (y + rect.height / 2 + 2 + active.getHeight() * 20 - (Modules.get(Cosmetics.class).getModel(target) == 1 ? 10 : 0)), (int)(25), -20, 10, active);
            RenderSystem.enableDepthTest();

            Scissors.finish();

            // Рендерим хпшки
            FixColor color = hpClr.get() ? (healthAnim.get() > 0.5f ? FixColor.ORANGE.move(FixColor.GREEN.rgb(), (healthAnim.get()-0.5f) * 2) : FixColor.RED.move(FixColor.ORANGE.rgb(), healthAnim.get() * 2)) : Style.getMain();
            String hp = procent.get() ? String.format("%.0f%%", (unitAnim.get() / max) * 100f) : String.format("%.0f", unitAnim.get());

            if (line.get()) {
                Render.circle(x + rect.height / 2 - anim, y + rect.height - size / 1.55F, size / 2, 1.5f, color.alpha(alpha).rgb(), (int) (360 * healthAnim.get()));

                if (gappleAnim.get() > 0.1f && !Server.isFT()) {
                    Render.circle(x + rect.height / 2 - anim, y + rect.height - size / 1.55F, size / 2, 1.5f, FixColor.YELLOW.alpha(alpha).rgb(), (int) (360 * gappleAnim.get()));
                }
            } else if (circle.get()) {
                size = 26;
                float circleX = x + width + anim - rect.height / 2;
                float circleY = y + rect.height - size / 1.5F - 1;
                float radius = size / 2, th = thickness.get() ? 4 : 3;

                Render.circle(circleX, circleY, radius, th, Theme.getSecond().alpha(alpha).rgb(), 360);
                Render.circle(circleX, circleY, radius, th, color.alpha(alpha).rgb(), (int) (360 * healthAnim.get()));

                if (gappleAnim.get() > 0.1f && !Server.isFT()) {
                    Render.circle(circleX, circleY, radius, th, FixColor.YELLOW.alpha(alpha).rgb(), (int) (360 * gappleAnim.get()));
                }

                // Текст по центру круга
                int font = procent.get() ? 14 : 16;
                bold[font].draw(ms, hp, circleX - bold[font].getWidth(hp) / 2, (int)circleY - (procent.get() ? .5f : 1), Theme.getText().alpha(alpha).Int());
            } else if (bar.get()) {
                Rect bar = new Rect(x + rect.height, y + rect.height - 16 + hurtAnim.get() / 2 + anim, width - rect.height * 2 + 3, 8 - hurtAnim.get());

                FixColor first = Style.getMain().alpha(alpha),
                        two = Style.getSecond().alpha(alpha);

                if (hpClr.get()) {
                    first = color.alpha(alpha);
                    two = color.darker(140).alpha(alpha);
                }

                hurtAnim.setForward(active.hurtTime >= 4);

                float width2 = bar.width * gappleAnim.get();
                float width1 = Math.max(0, bar.width * healthAnim.get() - width2);

                if (width1 > 0) {
                    Render.gradient(bar.x, bar.y, width1, bar.height, 1.5f, first.rgb(), first.rgb(), two.rgb(), two.rgb());
                }

                if (gappleAnim.get() > 0.1f && !Server.isFT() && width2 > 0) {
                    FixColor yellow = FixColor.YELLOW.alpha(alpha);

                    Render.gradient(bar.x + width1 + 1, bar.y, width2 - 1, bar.height, 1.5f, yellow.rgb(), yellow.rgb(), yellow.darker(150).rgb(), yellow.darker(150).rgb());
                }

                float textX;

                if (centre.get()) {
                    textX = bar.x + (width1 - semibold[12].getWidth(hp)) / 2;
                } else {
                    textX = bar.x + width1 - semibold[12].getWidth(hp) - 3;
                }
                textX = Math.max(bar.x, textX);

                colorChange.setForward((first.getBrightness() + two.getBrightness()) / 2f < 0.7f);

                bold[11].drawShadow(ms, hp, textX, bar.y + bar.height / 2 + .5, FixColor.WHITE.move(FixColor.BLACK.rgb(), colorChange.get()).alpha(alpha).Int());
            }

            float width1 = (width - 5) - rect.height;

            // Предметы
            ArrayList<ItemStack> stacks = new ArrayList<>();
            active.getArmorInventoryList().forEach((stack) -> {
                if (!stack.isEmpty()) {
                    stacks.add(stack);
                }
            });

            if (!bar.get()) {
                if (!active.getHeldItemMainhand().isEmpty()) stacks.add(active.getHeldItemMainhand());
                if (!active.getHeldItemOffhand().isEmpty()) stacks.add(active.getHeldItemOffhand());

                Scissors.init();
                Render.rect(x + rect.height, y + 19, width1, 16, 0, Theme.getFirst().alpha(alpha).rgb());
                Scissors.read(1);

                float xOff = 0;
                for (ItemStack stack : stacks) {
                    Render.drawStack(stack, x + rect.height + xOff, y + 20 + anim, 0.6F);
                    xOff += 10.5F;
                }

                Scissors.finish();
            } else {
                Scissors.init();
                Render.rect(x + 9 + width - rect.height, y + rect.height / 4.5f, 30, 30, 0, Theme.getFirst().alpha(alpha).rgb());
                Scissors.read(1);

                int count = 0;
                float xOff = 0, yOff = 0;
                for (ItemStack stack : stacks) {
                    Render.drawStack(stack, x + 9 + width - rect.height + xOff + anim, y + rect.height / 4.5f + yOff, 0.6F);

                    if (count == 0) {
                        xOff += 9.5F;
                    } else {
                        yOff += 9.5F;
                    }

                    count++;
                    if (count > 1) {
                        xOff = 0;
                        count = 0;
                    };
                }

                Scissors.finish();
            }

            // Имя
            String name = NameProtect.correct(active.getName().getString());

            if (name.length() > 10)
                name = name.substring(0, 10);

            Scissors.init();
            Render.rect(x + rect.height, y - anim, width1 - 5 - (line.get() ? -1 : 25), 17, 0, Theme.getFirst().alpha(alpha).rgb());
            Scissors.read(1);

            bold[16].draw(ms, name, x + rect.height, y + 11 - anim, Theme.getText().alpha(alpha).Int());

            FixColor bg = Theme.getFirst().move(FixColor.WHITE.rgb(), hover());
            Render.gradient(x + rect.height + bold[16].getWidth(name) - 20, y + 6.5f - anim, 21, 12, 0, bg.alpha(0).rgb(), bg.alpha(0).rgb(), bg.alpha(alpha).rgb(), bg.alpha(alpha).rgb());

            Scissors.finish();

            Scissors.stop();
        }

        draggable.width(width);
        draggable.height(rect.height);
    }
}
врешь
 
так я топ 1 скиддер если что
rockstar:
Expand Collapse Copy
public class TargetHud extends UIElement {
    private final Animation size = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(300);
    private final Animation showing = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(300);
    private final Animation waiting = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(800);
   
    private final Animation hoverNickAnim = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(300);
    private final Animation copiedAnim = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(300);
    private final Animation healthHide = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(300);
    private final Animation goldenHide = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(300);

    private final Animation killing = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(500);
    private final Animation killingWait = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(1000);
   
    private final Animation hurt = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(300);

    private final CheckBox magnet = new CheckBox(this, "Привязка к цели").onEnable(() -> {
        TargetESP targetESP = rock.getModules().get(TargetESP.class);
        if (targetESP.get()) {
            targetESP.set(false);
            rock.getAlertHandler().alert("TargetESP выключен", AlertType.INFO);
        }
    });
   
    private final CheckBox particles = new CheckBox(this, "Частицы").set(true).hide(() -> magnet.get());
    private final InfinityAnimation unitAnim = new InfinityAnimation();
    private final InfinityAnimation healthAnim = new InfinityAnimation();
    private final InfinityAnimation gappleAnim = new InfinityAnimation();
    private final InfinityAnimation silentHealthAnim = new InfinityAnimation();
   
    private final CheckBox additions = new CheckBox(this, "Обводка/Свечение").set(true).hide(() -> !Interface.outline() && !Interface.glow());
   
    private final Mode mode = new Mode(this, "Режим здоровья");
    private final Mode.Element circle = new Mode.Element(mode, "Круг");
    private final Mode.Element circle2 = new Mode.Element(mode, "Круг 2");
    private final Mode.Element bar = new Mode.Element(mode, "Полоска");
    private final Mode.Element none = new Mode.Element(mode, "Ничего");
   
    private final Mode healthMode = new Mode(this, "Отображение здоровья в..").hide(() -> circle.get() || none.get());
    private final Mode.Element percents = new Mode.Element(healthMode, "Процентах").set();
    private final Mode.Element value = new Mode.Element(healthMode, "Единицах");
   
    private final CheckBox rayTrace = new CheckBox(this, "Показывать при наводке");
    private final CheckBox copy = new CheckBox(this, "Копирование никнейма").set(true);
   
    private final CheckBox healthcolor = new CheckBox(this, "Цвет от хп");
   
    private ParticleEngine particleEngine = new ParticleEngine();
    @Getter
    private LivingEntity target, lastTarget;
   
    private boolean killed;
    @Setter
    private int mouseX, mouseY;
   
    private Rect nickname;
    private boolean copied;
   
    private float healthRw = -1;
    @NativeInclude
    public TargetHud(Interface ui, Select select) {
        super(select, "Цель", new Rect(200,200,0,0));
       
        this.set(true);
    }
   
    public void onEvent(Event event) {
        if (event instanceof EventRender2D e)
            renderTargetHud(e);
       
        if (event instanceof EventKill e && e.getTarget() == this.target)
            this.killed = true;
       
        if (event instanceof EventTotemBreak e && e.getEntity() == this.target)
            this.killed = true;
       
        super.onEvent(event);
    }
   
    private void renderTargetHud(EventRender2D event) {
        MatrixStack ms = event.getMatrixStack();
       
        if (!(mc.currentScreen instanceof ChatScreen)) {
            this.mouseX = 0;
            this.mouseY = 0;
        }

        if (nickname != null && !Hover.isHovered(nickname, mouseX, mouseY)) {
            this.copied = false;
        }
       
        float width = mode.is(circle) || mode.is(none) ? 112 : 138;
        float height = 38;
       
        float x = this.draggable.getX(), y = this.draggable.getY();
       
        Aura aura = rock.getModules().get(Aura.class);
        target = Stream.of(
                rock.getModules().get(Aura.class).getTarget(),
                rock.getModules().get(AimAssist.class).getTarget(),
                rock.getModules().get(AimBot.class).getTarget()
        ).filter(Objects::nonNull).findFirst().orElse(null);
       
        if (rock.getModules().containsKey(Aura.class) && target == null) {
            target = rock.getModules().get(Aura.class).getTarget();
        }
       
       
        RayTraceResult traceResult = mc.objectMouseOver;
       
        if (rayTrace.get() && target == null && traceResult != null && traceResult.getType() == RayTraceResult.Type.ENTITY) {
            Entity entity = ((EntityRayTraceResult) traceResult).getEntity();
           
            if (!(entity instanceof LivingEntity)) return;
           
            target = (LivingEntity) entity;
        }
       
        if (this.target == null && mc.currentScreen instanceof ChatScreen)
            this.target = mc.player;
       
       

       
        { // Расчитываем анимации
            if (!super.showing.isForward() || !this.get()) {
                this.waiting.setForward(false);

                this.size.setForward(false);
                this.showing.setForward(false);
               
                if (this.target != null && this.target.getHealth() <= 0) this.killed = true;
               
                this.killing.setForward(false);
                this.killingWait.setForward(false);
               
                if (this.killing.finished()) this.killed = false;
            } else {
                this.waiting.setForward((!(mc.currentScreen instanceof ChatScreen) && this.target == null) || !this.killing.finished(false));
               
                this.size.setForward(this.target != null || !this.showing.finished(false) || !this.killing.finished(false));
                this.showing.setForward(this.size.finished() && (this.target != null || !waiting.finished()) || !this.killing.finished(false));
               
                if (this.target != null && this.target.getHealth() <= 0) this.killed = true;
               
                this.killing.setForward(this.killed || !this.killingWait.finished(false));
                this.killingWait.setForward(this.killed);
               
                if (this.killing.finished()) this.killed = false;
            }
        }
       
        if (this.target == null) {
            this.killed = false;
            this.target = this.lastTarget == null ? mc.player : this.lastTarget;
        }
       
        if (target != null && magnet.get() && !(mc.currentScreen instanceof ChatScreen) && !target.isDead() && mc.world.getAllEntities().contains(target)) {
            float posx = (float) (target.lastTickPosX + (target.getPosX() - target.lastTickPosX) * mc.getRenderPartialTicks());
            float posy = (float) (target.lastTickPosY + (target.getPosY() - target.lastTickPosY) * mc.getRenderPartialTicks());
            float posz = (float) (target.lastTickPosZ + (target.getPosZ() - target.lastTickPosZ) * mc.getRenderPartialTicks());

            double[] pos = Render.worldToScreen(posx, posy + target.getHeight()/2f, posz);
            if (pos == null) return;
           
            if (PositionTracker.isInView(target)) {
                x = (float) pos[0] - width/2F;
                y = (float) pos[1] - height/2F;
            }
        }
        Rect rect = new Rect(x,y,width,height);

        if (!this.size.finished(false)) { // Рендеринг
            // Анимация на здоровье
            int start = 270;
            float max = target.getMaxHealth();
            float unit = target == null ? 20 : (Server.isServerForHPFix() ? target.getRealHealth() : (target.getHealth()+target.getAbsorptionAmount()));
            float health = target == null ? 1 : Math.max(0, Math.min(1, (Server.isServerForHPFix() ? target.getRealHealth() / 20F : (target.getHealth()-target.getAbsorptionAmount()) / (target.getMaxHealth()))));
            float silentHealth = target == null ? 1 : Math.max(0, Math.min(1, (Server.isServerForHPFix() ? target.getRealHealth() / 20F : (target.getHealth()) / (target.getMaxHealth()))));
            float gapple = target == null ? 1 : Math.max(0, Math.min(1, (Server.isServerForHPFix() ? 0 : (target.getAbsorptionAmount() / max))));
            this.healthAnim.animate(health, 100);
            gappleAnim.animate(gapple, 100);
            silentHealthAnim.animate(silentHealth, 100);
            unitAnim.animate(unit, 100);
           
            // Анимация на размер гуишки (открытие/закрытие)
            Render.scale(x + width / 2, y + height / 2, this.size.get());
           
            float alpha = this.size.get();
            float glowAlpha = this.showing.get();
           
            FixColor upLeft = Style.getOutlinePoint(0).alpha(alpha);
            FixColor upRight = Style.getOutlinePoint(45).alpha(alpha);
            FixColor downRight = Style.getOutlinePoint(90).alpha(alpha);
            FixColor downLeft = Style.getOutlinePoint(135).alpha(alpha);
           
            if (!this.killing.finished(false)) {
                //Glow.draw(ms, new Rect(this.draggable.getX()+5,this.draggable.getY()+4,this.draggable.getWidth()-10,this.draggable.getHeight()-8), (rock.getThemes().getCurrent() == rock.getThemes().getLightTheme() ? 5 : 7) + 5 * this.killing.get(), 9.5f + 10 * this.killing.get(), upLeft, upRight, downLeft, downRight);
                Round.draw(ms, rect, 4, rock.getThemes().getFirstColor().alpha(alpha*(1-this.killing.get()*0.2f)));
                float offset = 10 * killing.get();
                Glow.draw(ms, rect, offset, 0.7f * killing.get(), 10 + offset, upLeft, upRight, downLeft, downRight);

                float off = 0.5f;
                //Round.draw(ms, new Rect(this.draggable.getX()-off,this.draggable.getY()-off,this.draggable.getWidth()+off*2,this.draggable.getHeight()+off*2), 5+off, upLeft, upRight, downLeft, downRight);
            }
           
            Round.draw(ms, rect, 4, rock.getThemes().getFirstColor().move(FixColor.WHITE, hover()).alpha(alpha*(1-this.killing.get()*0.2f)));
           
            if (additions.get()) {
                Render.glow(ms, rect, showing.get());
            }
           
            if (additions.get()) {
                Render.outline(ms, rect, showing.get());
            }
           
            if (!magnet.get()) {
                GL11.glEnable(GL11.GL_SCISSOR_TEST);
                Render.scissor(x, y, draggable.getWidth(), draggable.getHeight());
            }
           
            float size = 27;
            float animPromotion = magnet.get() ? 0 : this.showing.get() * height - height;
           
            Round.draw(ms, new Rect(x + height / 2 - size/2 + animPromotion, y + height / 2 - size/2, size, size), size / 2, rock.getThemes().getSecondColor().alpha(this.showing.get() * 0.8f));
           
            Stencil.init();
            size = 26;
            Round.draw(ms, new Rect(x + height / 2 - size/2 + animPromotion, y + height / 2 - size/2, size, size), size / 2, rock.getThemes().getSecondColor().alpha(this.showing.get()));
            Stencil.read(1);

            RenderSystem.disableDepthTest();
            InventoryScreen.drawEntityOnScreen((int) (x + height / 2 + animPromotion), (int) (y + height / 2 + 5 + target.getHeight() * 20 - (rock.getModules().get(Cosmetics.class).getModel(target) == 1 ? 10 : 0)), 25, -20, 10, target);
            RenderSystem.enableDepthTest();
           
            Stencil.finish();
            size = 27;

            Render.drawCircle(x + height / 2 + animPromotion, y + height / 2, size/2, start, start+360, rock.getThemes().getThirdColor().alpha(this.showing.get()));
           
            if (mode.is(circle) && !mode.is(none)) {
                if (healthcolor.get()) {
                    FixColor color = (healthAnim.get() > 0.5f ? FixColor.ORANGE.move(FixColor.GREEN, (healthAnim.get()-0.5f) * 2) : FixColor.RED.move(FixColor.ORANGE, healthAnim.get() * 2));
                    Render.drawCircle(x + height / 2 + animPromotion, y + height / 2, size/2, start, start + (int) (361 * this.healthAnim.get()), color.alpha(this.showing.get()));
                } else {
                    Render.drawUICircle(x + height / 2 + animPromotion, y + height / 2, size/2, start, start + (int) (361 * this.healthAnim.get()), 1.5f, this.showing.get());
                }
               
                if (gappleAnim.get() > 0 && !Server.isFT()) {
                    Render.drawCircle(x + height / 2 + animPromotion, y + height / 2, size/2, start - (int) (gappleAnim.get() * 360), start, FixColor.YELLOW.alpha(this.showing.get()));
                }
            } else if (mode.is(circle2) && !mode.is(none)) {
                Render.drawCircle(x + width - size/2 - 5, y + height / 2, size/2, start, start+360, rock.getThemes().getThirdColor().alpha(this.showing.get()));
               
                if (healthcolor.get()) {
                    FixColor color = (healthAnim.get() > 0.5f ? FixColor.ORANGE.move(FixColor.GREEN, (healthAnim.get()-0.5f) * 2) : FixColor.RED.move(FixColor.ORANGE, healthAnim.get() * 2));
                    Render.drawCircle(x + width - size/2 - 5, y + height / 2, size/2, start, start + (int) (361 * this.healthAnim.get()), 4.5f, color.alpha(this.showing.get()));

                } else {
                    Render.drawUICircle(x + width - size/2 - 5, y + height / 2, size/2, start, start + (int) (361 * this.healthAnim.get()), 4.5f, this.showing.get());
                }
               
                if (gappleAnim.get() > 0 && !Server.isFT()) {
                    Render.drawCircle(x + width - size/2 - 5, y + height / 2, size/2, start - (int) (gappleAnim.get() * 360), start, 4.5f, FixColor.YELLOW.alpha(this.showing.get()));
                }
                String text = percents.get() ? Math.round((silentHealthAnim.get() + gappleAnim.get()) * 100F) + "%" : Math.round(unitAnim.get()) + "";
                if (percents.get()) {
                    this.bold.get(14).draw(ms, text, x + width - size/2 - 5.5f - bold.get(14).getWidth(text)/2, y + height / 2 - 5, rock.getThemes().getTextFirstColor().alpha(this.showing.get()));
                 } else {
                     this.semibold.get(17).draw(ms, text, x + width - size/2 - 5.5f - semibold.get(17).getWidth(text)/2, y + height / 2 - 6, rock.getThemes().getTextFirstColor().alpha(this.showing.get()));
                 }
            }
           
           
            Stencil.init();
            Round.draw(ms, new Rect(x + height / 2 + animPromotion + 17, y + 5, 112 / 2 + 10, 12), 2, rock.getThemes().getSecondColor().alpha(this.showing.get()));
            Stencil.read(1);
            if (copied || !this.copiedAnim.finished(false)) {
                this.bold.get(16).draw(ms, NameProtect.correct(target.getName().getString()), x + height, y + 7 + animPromotion + 12 * this.copiedAnim.get(), rock.getThemes().getTextFirstColor().alpha(this.showing.get() * (1-this.copiedAnim.get())));
                this.bold.get(16).draw(ms, "Скопировано", x + height, y + 7 + animPromotion - 12 + 12 * this.copiedAnim.get(), rock.getThemes().getTextFirstColor().alpha(this.showing.get() * this.copiedAnim.get()));
            } else {
                nickname = this.bold.get(16).draw(ms, NameProtect.correct(target.getName().getString()), x + height, y + 7 + animPromotion, rock.getThemes().getTextFirstColor().alpha(this.showing.get()));
            }
            this.hoverNickAnim.setForward(Hover.isHovered(nickname, mouseX, mouseY) && copy.get());
            Stencil.finish();
           
            Round.draw(ms, new Rect(x + height + animPromotion + 55 - 20 * this.hoverNickAnim.get(), y + 7, 10 + 20 * this.hoverNickAnim.get(), 10), 2, rock.getThemes().getFirstColor().move(FixColor.WHITE, hover()).alpha(0), rock.getThemes().getFirstColor().move(FixColor.WHITE, hover()).alpha(this.showing.get()), rock.getThemes().getFirstColor().move(FixColor.WHITE, hover()).alpha(0), rock.getThemes().getFirstColor().move(FixColor.WHITE, hover()).alpha(this.showing.get()));
           
            this.copiedAnim.setForward(copied);
            Stencil.init();
            Round.draw(ms, new Rect(Math.min(x + height + nickname.getWidth(), x + 112 - 16), y + 7 + .5f, 10, 9), 0, FixColor.RED);
            Stencil.read(1);
            Render.image("icons/copy.png", Math.min(x + height + nickname.getWidth() + 1, x + 112 - 15), y + 7 + 1.5f + 12 * this.copiedAnim.get(), 7, 7, rock.getThemes().getTextSecondColor().alpha(this.showing.get() * this.hoverNickAnim.get() * (1-this.copiedAnim.get())));
            Stencil.finish();
            Render.image("icons/yes.png", Math.min(x + height + bold.get(16).getWidth("Скопировано") + 2, x + 112 - 15), y + 7 + 1.9f - 12 + 12 * this.copiedAnim.get(), 7, 7, FixColor.GREEN.alpha(this.showing.get() * this.hoverNickAnim.get() * this.copiedAnim.get()));

            if (mode.is(bar) && !mode.is(none)) {
                boolean gold = gappleAnim.get() > 0.1f;
                float sum = MathHelper.clamp(healthAnim.get() + gappleAnim.get(), 0, 1);
                healthHide.setForward(sum > 0.3f);
                goldenHide.setForward(gold);
                hurt.setForward(target.hurtTime >= 5);
                float barY = y + height - 17 - animPromotion;
                float barWidth = (width - height*2F + 3);
                String text = percents.get() ? Math.round((silentHealthAnim.get() + gappleAnim.get()) * 100F) + "%" : Math.round(unitAnim.get()) + "";
               
                Round.draw(ms, new Rect(x + height, barY, barWidth, 8), 2, rock.getThemes().getSecondColor().alpha(this.showing.get() * 0.8f));
                FixColor[] circle = Interface.getCircle(alpha);
                FixColor c = circle[0], // Style.getMain().alpha(this.showing.get()),
                        c1 = circle[2], // Style.getSecond().alpha(this.showing.get()),
                        g = FixColor.YELLOW.alpha(this.showing.get() * goldenHide.get());
               
                if (healthcolor.get()) {
                    c = (healthAnim.get() > 0.5f ? FixColor.ORANGE.move(FixColor.GREEN, (healthAnim.get()-0.5f) * 2) : FixColor.RED.move(FixColor.ORANGE, healthAnim.get() * 2));
                    c1 = c.darker(0.5f);
                }
               
                Interface ui = rock.getModules().get(Interface.class);

                //float offset = 2;
                //Glow.draw(ms, new Rect(x + height, barY, barWidth * healthAnim.get(), 8).size(hurt.get()*0.5f).size(-1), offset, ui.getAlpha().get(), 10 + offset, c, c1, c, c1);
                Round.draw(ms, new Rect(x + height, barY, barWidth * healthAnim.get(), 8).size(hurt.get()*0.5f), 2, c, c1, c, c1);
                if (!goldenHide.finished(false)) {
                    Round.draw(ms, new Rect(x + height + MathHelper.clamp(barWidth * healthAnim.get(), 2, barWidth - barWidth * gappleAnim.get()) + 2, barY, barWidth * gappleAnim.get() - 2, 8).size(hurt.get()*0.5f), 2, g);
                }
                if (particles.get() && this.target.hurtTime > 0 && this.target.getHealth() > 0 && this.showing.finished()) {
                    particleEngine.spawn(x + height - 1 + barWidth * sum, barY + MathUtility.random(1, 7), MathUtility.random(2, 5), MathUtility.random(-1, 1), gold ? FixColor.YELLOW : c1);
                }
                FixColor textColor = (c.getRed() + c.getGreen() + c.getBlue()) / 3F > 200 ? FixColor.BLACK : FixColor.WHITE;
                if (gappleAnim.get() > healthAnim.get() * 0.5f)
                    semibold.get(10).draw(ms, text, x + height + barWidth * sum / 2F - semibold.get(10).getWidth(text)/2F + 0.5f, barY + 1.5f, FixColor.BLACK.alpha(showing.get() * healthHide.get()));
                semibold.get(10).draw(ms, text, x + height + barWidth *  sum/ 2F - semibold.get(10).getWidth(text)/2F, barY + 1, textColor.alpha(showing.get() * healthHide.get()));
               
                ArrayList<ItemStack> stacks = new ArrayList<>();
                target.getArmorInventoryList().forEach((stack) -> {
                    if (!stack.isEmpty()) {
                        stacks.add(stack);
                    }
                });
               
                float xOff = 0, yOff = 0;
                for (int i = 0; i < 4; i++) {
                    //float yAnim = yOff != 0 ? height - showing.get() * height : showing.get() * height - height;
                    float xAnim = magnet.get() ? 0 : height - showing.get() * height;
                    Round.draw(ms, new Rect(x + width - height/2F - 10 + xOff + xAnim, y + height/2f - 10 + yOff, 9, 9), 2, rock.getThemes().getSecondColor().alpha(this.showing.get() * 0.8f));
                    if (i < stacks.size() && showing.get() > 0.5f) {
                        Render.drawStackOld(stacks.get(stacks.size()-i-1), x + width - height/2F - 10 + xOff + xAnim, y + height/2f - 10 + yOff, 0.6F);
                    }
                    yOff += 11;
                    if (yOff > 21) {
                        yOff = 0;
                        xOff += 11;
                    }
                }
            } else {
                ArrayList<ItemStack> stacks = new ArrayList<>();
                if (!target.getHeldItemMainhand().isEmpty()) stacks.add(target.getHeldItemMainhand());
                if (!target.getHeldItemOffhand().isEmpty()) stacks.add(target.getHeldItemOffhand());
                target.getArmorInventoryList().forEach((stack) -> {
                    if (!stack.isEmpty()) {
                        stacks.add(stack);
                    }
                });
               
                for (int i = 0; i < 6; i++) {
                    Round.draw(ms, new Rect(x + height + i * 11, y + 20 + height - this.showing.get() * height, 9, 9), 2, rock.getThemes().getSecondColor().alpha(this.showing.get() * 0.8f));
                }
               
                float xOff = 0;
                if (!this.showing.finished(false))
                    for (ItemStack stack : stacks) {
                        Render.drawStackOld(stack, x + height + xOff, y + 20 + height - this.showing.get() * height, 0.6F);
                       
                        xOff += 11;
                    }
            }
           
            if (!magnet.get())
            GL11.glDisable(GL11.GL_SCISSOR_TEST);
            Render.end(); // ЗАКРЫВАЕМ МАТРИЦУ!!
           
            // Дальше идут партиклы

           
            if (particles.get()) {
                size /= 2;
                x = mode.is(circle) ? x + height / 2 + animPromotion : x + width - size / 2 - 11;
                y = y + height / 2;

                float i = (float) (start + (int) (361 * this.healthAnim.get()));

                final float cos = (float) (Math.cos(i * 3.141592653589793 / 180.0) * size * 1.0);
                final float sin = (float) (Math.sin(i * 3.141592653589793 / 180.0) * size * 1.0);
                final float modifCos = (float) (Math.cos((i + 90 + MathUtility.random(30, -30)) * 3.141592653589793 / 180.0)
                        * size * 0.5);
                final float modifSin = (float) (Math.sin((i + 90 + MathUtility.random(30, -30)) * 3.141592653589793 / 180.0)
                        * size * 0.5);
               
                float gappleVal = healthAnim.get() * (target.getAbsorptionAmount() * 10);
               
                boolean amoutBool = target.getAbsorptionAmount() > 0 && gappleVal > 0 && !Server.isFT();

                if (this.target.hurtTime > 0 && this.target.getHealth() > 0 && this.showing.finished() && !mode.is(bar)) {
                    FixColor color = healthcolor.get() ? (healthAnim.get() > 0.5f ? FixColor.ORANGE.move(FixColor.GREEN, (healthAnim.get()-0.5f) * 2) : FixColor.RED.move(FixColor.ORANGE, healthAnim.get() * 2)) : Style.getSecond();
                    particleEngine.spawn(x + cos - 0.5f, y + sin - 0.5f, modifCos, modifSin, amoutBool ? FixColor.YELLOW : color);
                }
            }
        }
       
        particleEngine.render(ms);
       
        this.draggable.setWidth(width);
        this.draggable.setHeight(height);
       
        if (this.target != null) this.lastTarget = this.target;
    }
   
    public void mouseClicked(double mouseX, double mouseY, int button) {
        if (nickname == null || !get()) return;
        if (Hover.isHovered(nickname, mouseX, mouseY) && copy.get()) {
            TextUtility.copyText(target.getName().getString());
            //rock.getAlertHandler().alert("Ваш ник скопирован!", AlertType.INFO);
            this.copied = true;
        }
    }
   
}
мое:
Expand Collapse Copy
public class TargetHud extends UIElement {

    CheckBox hpClr = new CheckBox(this, "Цвет от здоровья");

    Mode mode = new Mode(this, "Отображение хп");
    Mode.Element def = new Mode.Element(mode, "Обычно");
    Mode.Element procent = new Mode.Element(mode, "Проценты").set();

    Mode hpMode = new Mode(this, "Отображение здоровья");
    Mode.Element circle = new Mode.Element(hpMode, "Круг");
    Mode.Element line = new Mode.Element(hpMode, "Круг слева");
    Mode.Element bar = new Mode.Element(hpMode, "Полоска");

    CheckBox thickness = new CheckBox(this, "Толстый круг").vis(() -> circle.get());

    CheckBox centre = new CheckBox(this, "Центрировать хп").vis(() -> bar.get());

    CheckBox rayTrace = new CheckBox(this, "Показывать при наводке");


    LivingEntity target, prev;

    Animation size = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(400),
            waiting = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(700),
            prevAnim = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(500),
            colorChange = new Animation().setEasing(Easing.BOTH_SINE).setSpeed(500),
            hurtAnim = new Animation().setEasing(Easing.BOTH_CIRC).setSpeed(200);

    InfinityAnimation unitAnim = new InfinityAnimation(),
        healthAnim = new InfinityAnimation(),
        gappleAnim = new InfinityAnimation();

    public TargetHud(Interface ui, Select select) {
        super(select, "Таргет", new Rect(200,200,0,0));
    }

    public void event(Event event) {
        if (event instanceof EventRender e)
            renderHud(e.getMS());

        super.event(event);
    }

    private void renderHud(MatrixStack ms) {
        float x = draggable.getX(), y = draggable.getY();
        float width = line.get() ? 106 : 136;

        Aura aura = Modules.get(Aura.class);
        LivingEntity find = null;

        // Обновляем текущий таргет
        if (aura.get()) find = aura.target;

        RayTraceResult traceResult = mc.objectMouseOver;

        if (rayTrace.get() && find == null && traceResult != null && traceResult.getType() == RayTraceResult.Type.ENTITY) {
            Entity entity = ((EntityRayTraceResult) traceResult).getEntity();
            if (!(entity instanceof LivingEntity)) return;

            find = (LivingEntity) entity;
        }

        if (find == null && mc.currentScreen instanceof ChatScreen)
            find = mc.player;

        waiting.setForward(find != null);
        prevAnim.setForward(!waiting.finished(false));
        size.setForward(!prevAnim.finished(false));

        if (find != null)
            prev = find;

        LivingEntity active = prev;
        float scale = Modules.get(Interface.class).size.get();

        Rect rect = new Rect(x, y, width, 37);

        Render.scale(x + width / 2, y + rect.height / 2, scale);
        Render.rect(rect, 4, Theme.getFirst().move(FixColor.WHITE.rgb(), hover()).alpha(showing.get() * size.get()).rgb());

        // Обводкинс <3
        Render.outline(rect, showing.get() * size.get());

        if (!size.finished(false)) {
            // Анимация хп
            float max = active.getMaxHealth();
            float unit = Server.forHPFix() ? active.realHealth : active.getHealth()+active.getAbsorptionAmount();
            float health = Math.max(0, Math.min(1, Server.forHPFix() ? active.realHealth / 20F : (active.getHealth()) / max));
            float gapple = Math.max(0, Math.min(1, Server.forHPFix() ? 0 : active.getAbsorptionAmount() / max));

            healthAnim.animate(health * showing.get(), 100);
            gappleAnim.animate(gapple * showing.get(), 100);
            unitAnim.animate(unit * showing.get(), 90);

            float alpha = showing.get() * prevAnim.get();

            // Рендерим все остальное
            Scissors.start(Render.getScalar(x, y, width, rect.height, scale));

            float size = 28;
            float anim = prevAnim.reversed() * rect.height * 1.5f;

            Render.rect(new Rect(x + rect.height / 2 - size/2 - anim, y + rect.height / 2 - size/2, size, size), size / 2, Theme.getSecond().alpha(alpha).rgb());

            Scissors.init();
            Render.rect(new Rect(x + rect.height / 2 - size/2 - anim, y + rect.height / 2 - size/2, size, size), size / 2, Theme.getSecond().alpha(alpha).rgb());
            Scissors.read(1);

            RenderSystem.disableDepthTest();
            InventoryScreen.drawEntityOnScreen((int) (x + rect.height / 2 - anim), (int) (y + rect.height / 2 + 2 + active.getHeight() * 20 - (Modules.get(Cosmetics.class).getModel(target) == 1 ? 10 : 0)), (int)(25), -20, 10, active);
            RenderSystem.enableDepthTest();

            Scissors.finish();

            // Рендерим хпшки
            FixColor color = hpClr.get() ? (healthAnim.get() > 0.5f ? FixColor.ORANGE.move(FixColor.GREEN.rgb(), (healthAnim.get()-0.5f) * 2) : FixColor.RED.move(FixColor.ORANGE.rgb(), healthAnim.get() * 2)) : Style.getMain();
            String hp = procent.get() ? String.format("%.0f%%", (unitAnim.get() / max) * 100f) : String.format("%.0f", unitAnim.get());

            if (line.get()) {
                Render.circle(x + rect.height / 2 - anim, y + rect.height - size / 1.55F, size / 2, 1.5f, color.alpha(alpha).rgb(), (int) (360 * healthAnim.get()));

                if (gappleAnim.get() > 0.1f && !Server.isFT()) {
                    Render.circle(x + rect.height / 2 - anim, y + rect.height - size / 1.55F, size / 2, 1.5f, FixColor.YELLOW.alpha(alpha).rgb(), (int) (360 * gappleAnim.get()));
                }
            } else if (circle.get()) {
                size = 26;
                float circleX = x + width + anim - rect.height / 2;
                float circleY = y + rect.height - size / 1.5F - 1;
                float radius = size / 2, th = thickness.get() ? 4 : 3;

                Render.circle(circleX, circleY, radius, th, Theme.getSecond().alpha(alpha).rgb(), 360);
                Render.circle(circleX, circleY, radius, th, color.alpha(alpha).rgb(), (int) (360 * healthAnim.get()));

                if (gappleAnim.get() > 0.1f && !Server.isFT()) {
                    Render.circle(circleX, circleY, radius, th, FixColor.YELLOW.alpha(alpha).rgb(), (int) (360 * gappleAnim.get()));
                }

                // Текст по центру круга
                int font = procent.get() ? 14 : 16;
                bold[font].draw(ms, hp, circleX - bold[font].getWidth(hp) / 2, (int)circleY - (procent.get() ? .5f : 1), Theme.getText().alpha(alpha).Int());
            } else if (bar.get()) {
                Rect bar = new Rect(x + rect.height, y + rect.height - 16 + hurtAnim.get() / 2 + anim, width - rect.height * 2 + 3, 8 - hurtAnim.get());

                FixColor first = Style.getMain().alpha(alpha),
                        two = Style.getSecond().alpha(alpha);

                if (hpClr.get()) {
                    first = color.alpha(alpha);
                    two = color.darker(140).alpha(alpha);
                }

                hurtAnim.setForward(active.hurtTime >= 4);

                float width2 = bar.width * gappleAnim.get();
                float width1 = Math.max(0, bar.width * healthAnim.get() - width2);

                if (width1 > 0) {
                    Render.gradient(bar.x, bar.y, width1, bar.height, 1.5f, first.rgb(), first.rgb(), two.rgb(), two.rgb());
                }

                if (gappleAnim.get() > 0.1f && !Server.isFT() && width2 > 0) {
                    FixColor yellow = FixColor.YELLOW.alpha(alpha);

                    Render.gradient(bar.x + width1 + 1, bar.y, width2 - 1, bar.height, 1.5f, yellow.rgb(), yellow.rgb(), yellow.darker(150).rgb(), yellow.darker(150).rgb());
                }

                float textX;

                if (centre.get()) {
                    textX = bar.x + (width1 - semibold[12].getWidth(hp)) / 2;
                } else {
                    textX = bar.x + width1 - semibold[12].getWidth(hp) - 3;
                }
                textX = Math.max(bar.x, textX);

                colorChange.setForward((first.getBrightness() + two.getBrightness()) / 2f < 0.7f);

                bold[11].drawShadow(ms, hp, textX, bar.y + bar.height / 2 + .5, FixColor.WHITE.move(FixColor.BLACK.rgb(), colorChange.get()).alpha(alpha).Int());
            }

            float width1 = (width - 5) - rect.height;

            // Предметы
            ArrayList<ItemStack> stacks = new ArrayList<>();
            active.getArmorInventoryList().forEach((stack) -> {
                if (!stack.isEmpty()) {
                    stacks.add(stack);
                }
            });

            if (!bar.get()) {
                if (!active.getHeldItemMainhand().isEmpty()) stacks.add(active.getHeldItemMainhand());
                if (!active.getHeldItemOffhand().isEmpty()) stacks.add(active.getHeldItemOffhand());

                Scissors.init();
                Render.rect(x + rect.height, y + 19, width1, 16, 0, Theme.getFirst().alpha(alpha).rgb());
                Scissors.read(1);

                float xOff = 0;
                for (ItemStack stack : stacks) {
                    Render.drawStack(stack, x + rect.height + xOff, y + 20 + anim, 0.6F);
                    xOff += 10.5F;
                }

                Scissors.finish();
            } else {
                Scissors.init();
                Render.rect(x + 9 + width - rect.height, y + rect.height / 4.5f, 30, 30, 0, Theme.getFirst().alpha(alpha).rgb());
                Scissors.read(1);

                int count = 0;
                float xOff = 0, yOff = 0;
                for (ItemStack stack : stacks) {
                    Render.drawStack(stack, x + 9 + width - rect.height + xOff + anim, y + rect.height / 4.5f + yOff, 0.6F);

                    if (count == 0) {
                        xOff += 9.5F;
                    } else {
                        yOff += 9.5F;
                    }

                    count++;
                    if (count > 1) {
                        xOff = 0;
                        count = 0;
                    };
                }

                Scissors.finish();
            }

            // Имя
            String name = NameProtect.correct(active.getName().getString());

            if (name.length() > 10)
                name = name.substring(0, 10);

            Scissors.init();
            Render.rect(x + rect.height, y - anim, width1 - 5 - (line.get() ? -1 : 25), 17, 0, Theme.getFirst().alpha(alpha).rgb());
            Scissors.read(1);

            bold[16].draw(ms, name, x + rect.height, y + 11 - anim, Theme.getText().alpha(alpha).Int());

            FixColor bg = Theme.getFirst().move(FixColor.WHITE.rgb(), hover());
            Render.gradient(x + rect.height + bold[16].getWidth(name) - 20, y + 6.5f - anim, 21, 12, 0, bg.alpha(0).rgb(), bg.alpha(0).rgb(), bg.alpha(alpha).rgb(), bg.alpha(alpha).rgb());

            Scissors.finish();

            Scissors.stop();
        }

        draggable.width(width);
        draggable.height(rect.height);
    }
}
база рокстара, блять ты даже рендер утилку не поменял
 
Эта ротация была сделана +- за 5 минут (60 строчек), обходит куча серверов где ач Intave, по типу gulpvp, prostotrainer
желательно ставьте 65 и 40 скорость
ss:
rotation!:
Expand Collapse Copy
public class MetaRotation extends RotationMode {

    Slider speedX = new Slider(this, "Скорость X").min(45).max(80).inc(1).set(65);
    Slider speedY = new Slider(this, "Скорость Y").min(40).max(60).inc(1).set(40);

    CheckBox falling = new CheckBox(this, "Ускорять, если падаешь");

    public MetaRotation(Mode parent) {
        super(parent, "Новая");
    }

    RotationAnimation interp = new RotationAnimation();

    @Override
    public void update(LivingEntity target) {
        Aura aura = Modules.get(Aura.class);

        interp.easing(Easing.SMOOTH_STEP);

        Vector3d pos = mc.player.getEyePosition(0).add(aura.getOffX() * 0.05, -aura.getOffY() * 0.05, 0);

        Vector3d multipoint = new Vector3d(
                MathHelper.clamp(pos.x, target.getBoundingBox().minX, target.getBoundingBox().maxX),
                MathHelper.clamp(pos.y, target.getBoundingBox().minY, target.getBoundingBox().maxY),
                MathHelper.clamp(pos.z, target.getBoundingBox().minZ, target.getBoundingBox().maxZ)
        );

        Vector2f base = Rotation.get(aura.getMPoints() ? multipoint : target.getEyePosition(0).add(aura.getOffX() * 0.05, -aura.getOffY() * 0.05, 0));

        float yaw = interp.getYaw() + Rotation.shorten(base.x, interp.getYaw()),
                speed = AuraUtil.getSens(MathUtil.random(0.6f, 0.9f)),
                test = AuraUtil.getSens(MathUtil.random(100, 135));

        float baseSpeed = (170 - speedX.get()) * speed;
        boolean check = Player.collide(target) && (Player.silent(target)
                || Player.getBlock(0, 2, 0) != Blocks.AIR && Player.getBlock(0, -1, 0)
                != Blocks.AIR && Player.getBlock(0, 2, 0) != Blocks.WATER && Player.getBlock(0, -1, 0) != Blocks.WATER),
                look = MathUtil.rayTraceWithBlock(aura.range.get() - 1, interp.getYaw(), interp.getPitch(), mc.player, target, false);

        // Ускорения
        if (!look) baseSpeed *= 0.87f;

        // Поворачиваем на центр, если падаем
        if (falling.get()) yaw += mc.player.fallDistance * MathHelper.wrapDegrees(base.x - rotation.x) * 3.5f;

        Vector2f angles = new Vector2f(yaw, base.y);
        if (angles.y > 0) angles.y += MathUtil.random(-0.826f, 0.459f);

        float rayCaster = look ? 2.7f : 1f;

        // Замедления
        if (Player.collide(target, -0.4f)) {
            baseSpeed *= 1.4f;
            angles.y = 85; // Смотрим вниз, ведь мы уже в цели
        }

        // Замедляем, если цель в блоках
        if (check) baseSpeed *= 1.35f;

        rotation = interp.animate(angles, (int) (baseSpeed) - 35, ((int) (test - speedY.get()) * (int) rayCaster) - 35);
    }
}

дальше идут утилиты которые юзались в мейнкоде ->
AuraUtil.java:
Expand Collapse Copy
public class AuraUtil {
    public static float getSens(float rotation) {
        return getDeltaMouse(rotation) * Rotation.getGCD();
    }

    public static float getDeltaMouse(float delta) {
        return Math.round(delta / Rotation.getGCD());
    }
}
Player:
Expand Collapse Copy
public class Player {
public static Block getBlock() {
return getBlock(0, 0, 0);
}
public static Block getBlock(double x, double y, double z) {
return mc.world.getBlockState(mc.player.getPosition().add(x, y, z)).getBlock();
}
    public static boolean silent(LivingEntity target) {
        Vector3d pos = target.getPositionVec();
        AxisAlignedBB hitbox = target.getBoundingBox();

        float off = 0.05f;

        return !isAir(hitbox.minX-off, pos.y, hitbox.minZ-off)
                || !isAir(hitbox.maxX+off, pos.y, hitbox.minZ-off)
                || !isAir(hitbox.minX-off, pos.y, hitbox.maxZ+off)
                || !isAir(hitbox.maxX+off, pos.y, hitbox.maxZ+off);
    }

    public static boolean isAir(double x, double y, double z) { return mc.world.getBlockState(new BlockPos(x, y, z)).getBlock() == Blocks.AIR; }
}
    public static boolean collide(LivingEntity entity) {
        return collide(entity, 0);
    }

    public static boolean collide(LivingEntity entity, float grow) {
        AxisAlignedBB box = mc.player.getBoundingBox();
        AxisAlignedBB targetbox = entity.getBoundingBox().grow(grow, 0, grow);

        if (box.maxX > targetbox.minX
                && box.maxY > targetbox.minY && box.maxZ > targetbox.minZ
                && box.minX < targetbox.maxX && box.minY < targetbox.maxY
                && box.minZ < targetbox.maxZ) return true;

        return false;
    }
RotationUtil:
Expand Collapse Copy
public class Rotation {
    public static Vector2f vector(Vector3d vec) {
        Vector3d eyesPos = mc.player.getEyePosition(1.0f);
        double diffX = vec != null ? vec.x - eyesPos.x : 0;
        double diffY = vec != null ? vec.y - (mc.player.getPosY() + (double) mc.player.getEyeHeight() + 0.5) : 0;
        double diffZ = vec != null ? vec.z - eyesPos.z : 0;

        double diffXZ = Math.sqrt(diffX * diffX + diffZ * diffZ);
        float yaw = (float) (Math.toDegrees(Math.atan2(diffZ, diffX)) - 90.0);
        float pitch = (float) (-Math.toDegrees(Math.atan2(diffY, diffXZ)));
        yaw = mc.player.rotationYaw + MathHelper.wrapDegrees(yaw - mc.player.rotationYaw);
        pitch = mc.player.rotationPitch + MathHelper.wrapDegrees(pitch - mc.player.rotationPitch);
        pitch = MathHelper.clamp(pitch, -90.0f, 90.0f);

        return new Vector2f(yaw, pitch);
    }

    public static float shorten(float degree) {
        return (float) (((((mc.player.rotationYaw - degree) % 360) + 540) % 360) - 180);
    }

    public static float shorten(float degree1, float degree2) {
        return (float) (((((degree1 - degree2) % 360) + 540) % 360) - 180);
    }

    public static Vector2f get(Vector3d target) {
        Vector3d eyesPos = new Vector3d(mc.player.getPosX(), mc.player.getPosY() + mc.player.getEyeHeight(), mc.player.getPosZ());
        double diffX = target.x - eyesPos.x;
        double diffY = target.y - eyesPos.y;
        double diffZ = target.z - eyesPos.z;
        double diffXZ = MathHelper.sqrt(diffX * diffX + diffZ * diffZ);
        float yaw = (float) MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(diffZ, diffX)) - 90.0f);
        float pitch = (float) MathHelper.clamp(-Math.toDegrees(Math.atan2(diffY, diffXZ)), -89, 89);

        float sens = (float) (Math.pow(mc.gameSettings.mouseSensitivity, 1.5) * 0.05f + 0.1f);
        float pow = sens * sens * sens * 1.2F;
        yaw -= yaw % pow;
        pitch -= pitch % (pow * sens);

        return new Vector2f(yaw, pitch);
    }

    public static Vector2f gcd(float yaw, float pitch) {
        float gcd = getGCD();
        yaw -= yaw % gcd;
        pitch -= pitch % gcd;

        return new Vector2f(yaw, pitch);
    }

    public static float getGCD() {
        double realGcd = mc.gameSettings.mouseSensitivity;
        double d4 = realGcd * (double) 0.6F + (double) 0.2F;
        return (float) (d4 * d4 * d4 * 8.0D * 0.15);
    }
}
ну для хвхашечки пайдет, но где мой FunTime bypas snap 360 sloth AI rotation с тряской головы и ебанутыми табуляциями?
 
Назад
Сверху Снизу