Исходник Target HUD exp 3.1 ready

Начинающий
Статус
Оффлайн
Регистрация
7 Фев 2023
Сообщения
13
Реакции[?]
0
Поинты[?]
0

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

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

Спасибо!

Просто таргет худ, первая работа так-что не пиздите
Если чо-то из утилок забыл то пишите

и оцените код если хотите

Пожалуйста, авторизуйтесь для просмотра ссылки.

targethud:
private final Animation animation = new EaseBackIn(400, 1.0, 1.0F);

   public void drawNewTargetHud(EventDisplay eventDisplay) {
        this.entity = this.getTarget(this.entity);
        boolean out = !this.allow || this.stopWatch.isReached(1000L);
        this.animation.setDuration(out ? 400 : 300);
        this.animation.setDirection(out ? Direction.BACKWARDS : Direction.FORWARDS);
        if (this.animation.getOutput() == 0.0) {
            this.entity = null;
        }

// -------------- yep ---------------- //

        if (this.entity != null) {
            String entityName = entity.getName().getString();
            Style style = Expensive.getInstance().getStyleManager().getCurrentStyle();

            float hp = entity.getHealth();
            float maxHp = entity.getMaxHealth();

            float width = 120.0F;
            float height = 40.0F;

            float fontWidth = Fonts.sfui.getWidth(entityName, 8.0F);
            float fontHeight = Fonts.sfui.getHeight(8.0F);

            float headSize = 30F;

            float healtBarWidth = 115.0F;
            float healtBarHeight = 2.5F;

            float space = 2.5F;

            drag.setWidth(width);
            drag.setHeight(height);

            float anyX = this.drag.getX();
            float anyY = this.drag.getY();

            sizeAnimation((anyX + width / 2.0F), (anyY + height / 2.0F), this.animation.getOutput());
            sizeAnimation((anyX + fontWidth / 2.0F), (anyY + fontHeight / 2.0F), this.animation.getOutput());

            healthAnimation = MathUtil.fast(healthAnimation, MathHelper.clamp(hp / maxHp, 0.0F, 1.0F), 10.0F);

            GlStateManager.pushMatrix();

            drawRoundedRect(
                    anyX,
                    anyY,
                    width,
                    height,
                    new Vector4f(
                            4.0F,
                            4.0F,
                            4.0F,
                            4.0F
                    )
            );

            // X + space для отступа

            anyX += space;


            Stencil.initStencilToWrite();

            DisplayUtils.drawRoundedRect(
                    anyX,
                    anyY + space,
                    headSize,
                    headSize,
                    1.5F,
                    style.getSecondColor().getRGB()
            );

            Stencil.readStencilBuffer(1);

            this.drawTargetHead(
                    this.entity,
                    anyX,
                    anyY + space,
                    headSize,
                    headSize
            );

            Stencil.uninitStencilBuffer();

            DisplayUtils.drawRoundedRect(
                    anyX,
                    anyY  + (height - space - (healtBarHeight)),
                    (healtBarWidth * this.healthAnimation),
                    healtBarHeight,
                    new Vector4f(
                            2.0F,
                            2.0F,
                            2.0F,
                            2.0F
                    ),
                    healtBarColor(hp, maxHp).getRGB()
            );

            DisplayUtils.drawShadow(
                    anyX,
                    anyY  + (height - space - (healtBarHeight)),
                    (healtBarWidth + space * this.healthAnimation),
                    healtBarHeight,
                    6,
                    healtBarColor(hp, maxHp).getRGB()
            );

            DisplayUtils.drawRoundedRect(
                    anyX,
                    anyY  + (height - space - (healtBarHeight)),
                    healtBarWidth,
                    healtBarHeight,
                    new Vector4f(
                            2.0F,
                            2.0F,
                            2.0F,
                            2.0F
                    ),
                    ColorUtils.rgba(10, 13, 15, 60)
            );

            anyX += (headSize + space);

            Scissor.push();
            Scissor.setFromComponentCoordinates(anyX, anyY, width - headSize - (space * 3), height);

            Fonts.sfui.drawText(
                    eventDisplay.getMatrixStack(),
                    entityName,
                    anyX,
                    anyY + ((height / 2) - (fontHeight / 2)),
                    ColorUtils.rgba(255, 255, 255, 200),
                    8.0F
                    );

            Scissor.unset();
            Scissor.pop();

            GlStateManager.popMatrix();
        }
    }

    public void drawRoundedRect(float x, float y, float width, float height, Vector4f radius) {

        DisplayUtils.drawRoundedRect(
                x - 1,
                y - 1,
                width + 2,
                height + 2,
                radius,
                ColorUtils.rgba(100, 100, 100, 100)
        ); // обводка если чо

        DisplayUtils.drawRoundedRect(
                x,
                y,
                width,
                height,
                radius,
                ColorUtils.setAlpha(ColorUtils.rgb(10, 15, 13), 60)
        );

        DisplayUtils.drawShadow(
                x - 2,
                y - 2,
                width + 4,
                height + 4,
                6,
                ColorUtils.setAlpha(ColorUtils.rgb(10, 15, 13), 60)
        );
    }

    public Color healtBarColor(float hp, float maxHp) {
            if (hp >= maxHp / 1.5) {
                return new Color(155, 223, 19, 150);
            } else if (hp >= maxHp / 2) {
                return new Color(221, 134, 21, 150);
            } else if (hp >= maxHp / 3) {
                return new Color(180, 19, 19, 150);
            }
        return new Color(255, 0, 0, 255);
    }

    public void drawTargetHead(LivingEntity entity, float x, float y, float width, float height) {
        if (entity != null) {
            EntityRenderer<? super LivingEntity> rendererManager = mc.getRenderManager().getRenderer(entity);
            this.drawFace(rendererManager.getEntityTexture(entity), x, y, 8.0F, 8.0F, 8.0F, 8.0F, width, height, 64.0F, 64.0F, entity);
            this.drawFace(rendererManager.getEntityTexture(entity), x, y, 104.0F, 8.0F, 8.0F, 8.0F, width, height, 64.0F, 64.0F, entity);
        }

    }

    public static void sizeAnimation(double width, double height, double scale) {
        GlStateManager.translated(
                width,
                height,
                0.0
        );
        GlStateManager.scaled(
                scale,
                scale,
                scale
        );
        GlStateManager.translated(
                -width,
                -height,
                0.0
        );
    }

    public void drawFace(ResourceLocation res, float d, float y, float u, float v, float uWidth, float vHeight, float width, float height, float tileWidth, float tileHeight, LivingEntity target) {

        GL11.glPushMatrix();
        GL11.glEnable(3042);
        mc.getTextureManager().bindTexture(res);
        float hurtPercent = ((float)target.hurtTime - (target.hurtTime != 0 ? mc.timer.renderPartialTicks : 0.0F)) / 10.0F;

        GL11.glColor4f(
                1.0F,
                1.0F - hurtPercent,
                1.0F - hurtPercent,
                1.0F
        );
        AbstractGui.drawScaledCustomSizeModalRect(
                d,
                y,
                u,
                v,
                uWidth,
                vHeight,
                width,
                height,
                tileWidth,
                tileHeight
        );
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        GL11.glPopMatrix();
    }
 
Начинающий
Статус
Онлайн
Регистрация
24 Окт 2021
Сообщения
134
Реакции[?]
1
Поинты[?]
1K
Просто таргет худ, первая работа так-что не пиздите
Если чо-то из утилок забыл то пишите

и оцените код если хотите

Пожалуйста, авторизуйтесь для просмотра ссылки.

targethud:
private final Animation animation = new EaseBackIn(400, 1.0, 1.0F);

   public void drawNewTargetHud(EventDisplay eventDisplay) {
        this.entity = this.getTarget(this.entity);
        boolean out = !this.allow || this.stopWatch.isReached(1000L);
        this.animation.setDuration(out ? 400 : 300);
        this.animation.setDirection(out ? Direction.BACKWARDS : Direction.FORWARDS);
        if (this.animation.getOutput() == 0.0) {
            this.entity = null;
        }

// -------------- yep ---------------- //

        if (this.entity != null) {
            String entityName = entity.getName().getString();
            Style style = Expensive.getInstance().getStyleManager().getCurrentStyle();

            float hp = entity.getHealth();
            float maxHp = entity.getMaxHealth();

            float width = 120.0F;
            float height = 40.0F;

            float fontWidth = Fonts.sfui.getWidth(entityName, 8.0F);
            float fontHeight = Fonts.sfui.getHeight(8.0F);

            float headSize = 30F;

            float healtBarWidth = 115.0F;
            float healtBarHeight = 2.5F;

            float space = 2.5F;

            drag.setWidth(width);
            drag.setHeight(height);

            float anyX = this.drag.getX();
            float anyY = this.drag.getY();

            sizeAnimation((anyX + width / 2.0F), (anyY + height / 2.0F), this.animation.getOutput());
            sizeAnimation((anyX + fontWidth / 2.0F), (anyY + fontHeight / 2.0F), this.animation.getOutput());

            healthAnimation = MathUtil.fast(healthAnimation, MathHelper.clamp(hp / maxHp, 0.0F, 1.0F), 10.0F);

            GlStateManager.pushMatrix();

            drawRoundedRect(
                    anyX,
                    anyY,
                    width,
                    height,
                    new Vector4f(
                            4.0F,
                            4.0F,
                            4.0F,
                            4.0F
                    )
            );

            // X + space для отступа

            anyX += space;


            Stencil.initStencilToWrite();

            DisplayUtils.drawRoundedRect(
                    anyX,
                    anyY + space,
                    headSize,
                    headSize,
                    1.5F,
                    style.getSecondColor().getRGB()
            );

            Stencil.readStencilBuffer(1);

            this.drawTargetHead(
                    this.entity,
                    anyX,
                    anyY + space,
                    headSize,
                    headSize
            );

            Stencil.uninitStencilBuffer();

            DisplayUtils.drawRoundedRect(
                    anyX,
                    anyY  + (height - space - (healtBarHeight)),
                    (healtBarWidth * this.healthAnimation),
                    healtBarHeight,
                    new Vector4f(
                            2.0F,
                            2.0F,
                            2.0F,
                            2.0F
                    ),
                    healtBarColor(hp, maxHp).getRGB()
            );

            DisplayUtils.drawShadow(
                    anyX,
                    anyY  + (height - space - (healtBarHeight)),
                    (healtBarWidth + space * this.healthAnimation),
                    healtBarHeight,
                    6,
                    healtBarColor(hp, maxHp).getRGB()
            );

            DisplayUtils.drawRoundedRect(
                    anyX,
                    anyY  + (height - space - (healtBarHeight)),
                    healtBarWidth,
                    healtBarHeight,
                    new Vector4f(
                            2.0F,
                            2.0F,
                            2.0F,
                            2.0F
                    ),
                    ColorUtils.rgba(10, 13, 15, 60)
            );

            anyX += (headSize + space);

            Scissor.push();
            Scissor.setFromComponentCoordinates(anyX, anyY, width - headSize - (space * 3), height);

            Fonts.sfui.drawText(
                    eventDisplay.getMatrixStack(),
                    entityName,
                    anyX,
                    anyY + ((height / 2) - (fontHeight / 2)),
                    ColorUtils.rgba(255, 255, 255, 200),
                    8.0F
                    );

            Scissor.unset();
            Scissor.pop();

            GlStateManager.popMatrix();
        }
    }

    public void drawRoundedRect(float x, float y, float width, float height, Vector4f radius) {

        DisplayUtils.drawRoundedRect(
                x - 1,
                y - 1,
                width + 2,
                height + 2,
                radius,
                ColorUtils.rgba(100, 100, 100, 100)
        ); // обводка если чо

        DisplayUtils.drawRoundedRect(
                x,
                y,
                width,
                height,
                radius,
                ColorUtils.setAlpha(ColorUtils.rgb(10, 15, 13), 60)
        );

        DisplayUtils.drawShadow(
                x - 2,
                y - 2,
                width + 4,
                height + 4,
                6,
                ColorUtils.setAlpha(ColorUtils.rgb(10, 15, 13), 60)
        );
    }

    public Color healtBarColor(float hp, float maxHp) {
            if (hp >= maxHp / 1.5) {
                return new Color(155, 223, 19, 150);
            } else if (hp >= maxHp / 2) {
                return new Color(221, 134, 21, 150);
            } else if (hp >= maxHp / 3) {
                return new Color(180, 19, 19, 150);
            }
        return new Color(255, 0, 0, 255);
    }

    public void drawTargetHead(LivingEntity entity, float x, float y, float width, float height) {
        if (entity != null) {
            EntityRenderer<? super LivingEntity> rendererManager = mc.getRenderManager().getRenderer(entity);
            this.drawFace(rendererManager.getEntityTexture(entity), x, y, 8.0F, 8.0F, 8.0F, 8.0F, width, height, 64.0F, 64.0F, entity);
            this.drawFace(rendererManager.getEntityTexture(entity), x, y, 104.0F, 8.0F, 8.0F, 8.0F, width, height, 64.0F, 64.0F, entity);
        }

    }

    public static void sizeAnimation(double width, double height, double scale) {
        GlStateManager.translated(
                width,
                height,
                0.0
        );
        GlStateManager.scaled(
                scale,
                scale,
                scale
        );
        GlStateManager.translated(
                -width,
                -height,
                0.0
        );
    }

    public void drawFace(ResourceLocation res, float d, float y, float u, float v, float uWidth, float vHeight, float width, float height, float tileWidth, float tileHeight, LivingEntity target) {

        GL11.glPushMatrix();
        GL11.glEnable(3042);
        mc.getTextureManager().bindTexture(res);
        float hurtPercent = ((float)target.hurtTime - (target.hurtTime != 0 ? mc.timer.renderPartialTicks : 0.0F)) / 10.0F;

        GL11.glColor4f(
                1.0F,
                1.0F - hurtPercent,
                1.0F - hurtPercent,
                1.0F
        );
        AbstractGui.drawScaledCustomSizeModalRect(
                d,
                y,
                u,
                v,
                uWidth,
                vHeight,
                width,
                height,
                tileWidth,
                tileHeight
        );
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        GL11.glPopMatrix();
    }
Норм, сделай ник выше и добавь под ником броню, а то как то ник посередине не очень
 
Начинающий
Статус
Оффлайн
Регистрация
18 Июл 2022
Сообщения
66
Реакции[?]
0
Поинты[?]
0
Просто таргет худ, первая работа так-что не пиздите
Если чо-то из утилок забыл то пишите

и оцените код если хотите

Пожалуйста, авторизуйтесь для просмотра ссылки.

targethud:
private final Animation animation = new EaseBackIn(400, 1.0, 1.0F);

   public void drawNewTargetHud(EventDisplay eventDisplay) {
        this.entity = this.getTarget(this.entity);
        boolean out = !this.allow || this.stopWatch.isReached(1000L);
        this.animation.setDuration(out ? 400 : 300);
        this.animation.setDirection(out ? Direction.BACKWARDS : Direction.FORWARDS);
        if (this.animation.getOutput() == 0.0) {
            this.entity = null;
        }

// -------------- yep ---------------- //

        if (this.entity != null) {
            String entityName = entity.getName().getString();
            Style style = Expensive.getInstance().getStyleManager().getCurrentStyle();

            float hp = entity.getHealth();
            float maxHp = entity.getMaxHealth();

            float width = 120.0F;
            float height = 40.0F;

            float fontWidth = Fonts.sfui.getWidth(entityName, 8.0F);
            float fontHeight = Fonts.sfui.getHeight(8.0F);

            float headSize = 30F;

            float healtBarWidth = 115.0F;
            float healtBarHeight = 2.5F;

            float space = 2.5F;

            drag.setWidth(width);
            drag.setHeight(height);

            float anyX = this.drag.getX();
            float anyY = this.drag.getY();

            sizeAnimation((anyX + width / 2.0F), (anyY + height / 2.0F), this.animation.getOutput());
            sizeAnimation((anyX + fontWidth / 2.0F), (anyY + fontHeight / 2.0F), this.animation.getOutput());

            healthAnimation = MathUtil.fast(healthAnimation, MathHelper.clamp(hp / maxHp, 0.0F, 1.0F), 10.0F);

            GlStateManager.pushMatrix();

            drawRoundedRect(
                    anyX,
                    anyY,
                    width,
                    height,
                    new Vector4f(
                            4.0F,
                            4.0F,
                            4.0F,
                            4.0F
                    )
            );

            // X + space для отступа

            anyX += space;


            Stencil.initStencilToWrite();

            DisplayUtils.drawRoundedRect(
                    anyX,
                    anyY + space,
                    headSize,
                    headSize,
                    1.5F,
                    style.getSecondColor().getRGB()
            );

            Stencil.readStencilBuffer(1);

            this.drawTargetHead(
                    this.entity,
                    anyX,
                    anyY + space,
                    headSize,
                    headSize
            );

            Stencil.uninitStencilBuffer();

            DisplayUtils.drawRoundedRect(
                    anyX,
                    anyY  + (height - space - (healtBarHeight)),
                    (healtBarWidth * this.healthAnimation),
                    healtBarHeight,
                    new Vector4f(
                            2.0F,
                            2.0F,
                            2.0F,
                            2.0F
                    ),
                    healtBarColor(hp, maxHp).getRGB()
            );

            DisplayUtils.drawShadow(
                    anyX,
                    anyY  + (height - space - (healtBarHeight)),
                    (healtBarWidth + space * this.healthAnimation),
                    healtBarHeight,
                    6,
                    healtBarColor(hp, maxHp).getRGB()
            );

            DisplayUtils.drawRoundedRect(
                    anyX,
                    anyY  + (height - space - (healtBarHeight)),
                    healtBarWidth,
                    healtBarHeight,
                    new Vector4f(
                            2.0F,
                            2.0F,
                            2.0F,
                            2.0F
                    ),
                    ColorUtils.rgba(10, 13, 15, 60)
            );

            anyX += (headSize + space);

            Scissor.push();
            Scissor.setFromComponentCoordinates(anyX, anyY, width - headSize - (space * 3), height);

            Fonts.sfui.drawText(
                    eventDisplay.getMatrixStack(),
                    entityName,
                    anyX,
                    anyY + ((height / 2) - (fontHeight / 2)),
                    ColorUtils.rgba(255, 255, 255, 200),
                    8.0F
                    );

            Scissor.unset();
            Scissor.pop();

            GlStateManager.popMatrix();
        }
    }

    public void drawRoundedRect(float x, float y, float width, float height, Vector4f radius) {

        DisplayUtils.drawRoundedRect(
                x - 1,
                y - 1,
                width + 2,
                height + 2,
                radius,
                ColorUtils.rgba(100, 100, 100, 100)
        ); // обводка если чо

        DisplayUtils.drawRoundedRect(
                x,
                y,
                width,
                height,
                radius,
                ColorUtils.setAlpha(ColorUtils.rgb(10, 15, 13), 60)
        );

        DisplayUtils.drawShadow(
                x - 2,
                y - 2,
                width + 4,
                height + 4,
                6,
                ColorUtils.setAlpha(ColorUtils.rgb(10, 15, 13), 60)
        );
    }

    public Color healtBarColor(float hp, float maxHp) {
            if (hp >= maxHp / 1.5) {
                return new Color(155, 223, 19, 150);
            } else if (hp >= maxHp / 2) {
                return new Color(221, 134, 21, 150);
            } else if (hp >= maxHp / 3) {
                return new Color(180, 19, 19, 150);
            }
        return new Color(255, 0, 0, 255);
    }

    public void drawTargetHead(LivingEntity entity, float x, float y, float width, float height) {
        if (entity != null) {
            EntityRenderer<? super LivingEntity> rendererManager = mc.getRenderManager().getRenderer(entity);
            this.drawFace(rendererManager.getEntityTexture(entity), x, y, 8.0F, 8.0F, 8.0F, 8.0F, width, height, 64.0F, 64.0F, entity);
            this.drawFace(rendererManager.getEntityTexture(entity), x, y, 104.0F, 8.0F, 8.0F, 8.0F, width, height, 64.0F, 64.0F, entity);
        }

    }

    public static void sizeAnimation(double width, double height, double scale) {
        GlStateManager.translated(
                width,
                height,
                0.0
        );
        GlStateManager.scaled(
                scale,
                scale,
                scale
        );
        GlStateManager.translated(
                -width,
                -height,
                0.0
        );
    }

    public void drawFace(ResourceLocation res, float d, float y, float u, float v, float uWidth, float vHeight, float width, float height, float tileWidth, float tileHeight, LivingEntity target) {

        GL11.glPushMatrix();
        GL11.glEnable(3042);
        mc.getTextureManager().bindTexture(res);
        float hurtPercent = ((float)target.hurtTime - (target.hurtTime != 0 ? mc.timer.renderPartialTicks : 0.0F)) / 10.0F;

        GL11.glColor4f(
                1.0F,
                1.0F - hurtPercent,
                1.0F - hurtPercent,
                1.0F
        );
        AbstractGui.drawScaledCustomSizeModalRect(
                d,
                y,
                u,
                v,
                uWidth,
                vHeight,
                width,
                height,
                tileWidth,
                tileHeight
        );
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        GL11.glPopMatrix();
    }
сойдет
 
Начинающий
Статус
Оффлайн
Регистрация
23 Май 2024
Сообщения
27
Реакции[?]
0
Поинты[?]
0
Targethuhud expa 3.1 nurpupkan edition
Relake edition 1728305265307.png
Просто таргет худ, первая работа так-что не пиздите
Если чо-то из утилок забыл то пишите

и оцените код если хотите

Пожалуйста, авторизуйтесь для просмотра ссылки.

targethud:
private final Animation animation = new EaseBackIn(400, 1.0, 1.0F);

   public void drawNewTargetHud(EventDisplay eventDisplay) {
        this.entity = this.getTarget(this.entity);
        boolean out = !this.allow || this.stopWatch.isReached(1000L);
        this.animation.setDuration(out ? 400 : 300);
        this.animation.setDirection(out ? Direction.BACKWARDS : Direction.FORWARDS);
        if (this.animation.getOutput() == 0.0) {
            this.entity = null;
        }

// -------------- yep ---------------- //

        if (this.entity != null) {
            String entityName = entity.getName().getString();
            Style style = Expensive.getInstance().getStyleManager().getCurrentStyle();

            float hp = entity.getHealth();
            float maxHp = entity.getMaxHealth();

            float width = 120.0F;
            float height = 40.0F;

            float fontWidth = Fonts.sfui.getWidth(entityName, 8.0F);
            float fontHeight = Fonts.sfui.getHeight(8.0F);

            float headSize = 30F;

            float healtBarWidth = 115.0F;
            float healtBarHeight = 2.5F;

            float space = 2.5F;

            drag.setWidth(width);
            drag.setHeight(height);

            float anyX = this.drag.getX();
            float anyY = this.drag.getY();

            sizeAnimation((anyX + width / 2.0F), (anyY + height / 2.0F), this.animation.getOutput());
            sizeAnimation((anyX + fontWidth / 2.0F), (anyY + fontHeight / 2.0F), this.animation.getOutput());

            healthAnimation = MathUtil.fast(healthAnimation, MathHelper.clamp(hp / maxHp, 0.0F, 1.0F), 10.0F);

            GlStateManager.pushMatrix();

            drawRoundedRect(
                    anyX,
                    anyY,
                    width,
                    height,
                    new Vector4f(
                            4.0F,
                            4.0F,
                            4.0F,
                            4.0F
                    )
            );

            // X + space для отступа

            anyX += space;


            Stencil.initStencilToWrite();

            DisplayUtils.drawRoundedRect(
                    anyX,
                    anyY + space,
                    headSize,
                    headSize,
                    1.5F,
                    style.getSecondColor().getRGB()
            );

            Stencil.readStencilBuffer(1);

            this.drawTargetHead(
                    this.entity,
                    anyX,
                    anyY + space,
                    headSize,
                    headSize
            );

            Stencil.uninitStencilBuffer();

            DisplayUtils.drawRoundedRect(
                    anyX,
                    anyY  + (height - space - (healtBarHeight)),
                    (healtBarWidth * this.healthAnimation),
                    healtBarHeight,
                    new Vector4f(
                            2.0F,
                            2.0F,
                            2.0F,
                            2.0F
                    ),
                    healtBarColor(hp, maxHp).getRGB()
            );

            DisplayUtils.drawShadow(
                    anyX,
                    anyY  + (height - space - (healtBarHeight)),
                    (healtBarWidth + space * this.healthAnimation),
                    healtBarHeight,
                    6,
                    healtBarColor(hp, maxHp).getRGB()
            );

            DisplayUtils.drawRoundedRect(
                    anyX,
                    anyY  + (height - space - (healtBarHeight)),
                    healtBarWidth,
                    healtBarHeight,
                    new Vector4f(
                            2.0F,
                            2.0F,
                            2.0F,
                            2.0F
                    ),
                    ColorUtils.rgba(10, 13, 15, 60)
            );

            anyX += (headSize + space);

            Scissor.push();
            Scissor.setFromComponentCoordinates(anyX, anyY, width - headSize - (space * 3), height);

            Fonts.sfui.drawText(
                    eventDisplay.getMatrixStack(),
                    entityName,
                    anyX,
                    anyY + ((height / 2) - (fontHeight / 2)),
                    ColorUtils.rgba(255, 255, 255, 200),
                    8.0F
                    );

            Scissor.unset();
            Scissor.pop();

            GlStateManager.popMatrix();
        }
    }

    public void drawRoundedRect(float x, float y, float width, float height, Vector4f radius) {

        DisplayUtils.drawRoundedRect(
                x - 1,
                y - 1,
                width + 2,
                height + 2,
                radius,
                ColorUtils.rgba(100, 100, 100, 100)
        ); // обводка если чо

        DisplayUtils.drawRoundedRect(
                x,
                y,
                width,
                height,
                radius,
                ColorUtils.setAlpha(ColorUtils.rgb(10, 15, 13), 60)
        );

        DisplayUtils.drawShadow(
                x - 2,
                y - 2,
                width + 4,
                height + 4,
                6,
                ColorUtils.setAlpha(ColorUtils.rgb(10, 15, 13), 60)
        );
    }

    public Color healtBarColor(float hp, float maxHp) {
            if (hp >= maxHp / 1.5) {
                return new Color(155, 223, 19, 150);
            } else if (hp >= maxHp / 2) {
                return new Color(221, 134, 21, 150);
            } else if (hp >= maxHp / 3) {
                return new Color(180, 19, 19, 150);
            }
        return new Color(255, 0, 0, 255);
    }

    public void drawTargetHead(LivingEntity entity, float x, float y, float width, float height) {
        if (entity != null) {
            EntityRenderer<? super LivingEntity> rendererManager = mc.getRenderManager().getRenderer(entity);
            this.drawFace(rendererManager.getEntityTexture(entity), x, y, 8.0F, 8.0F, 8.0F, 8.0F, width, height, 64.0F, 64.0F, entity);
            this.drawFace(rendererManager.getEntityTexture(entity), x, y, 104.0F, 8.0F, 8.0F, 8.0F, width, height, 64.0F, 64.0F, entity);
        }

    }

    public static void sizeAnimation(double width, double height, double scale) {
        GlStateManager.translated(
                width,
                height,
                0.0
        );
        GlStateManager.scaled(
                scale,
                scale,
                scale
        );
        GlStateManager.translated(
                -width,
                -height,
                0.0
        );
    }

    public void drawFace(ResourceLocation res, float d, float y, float u, float v, float uWidth, float vHeight, float width, float height, float tileWidth, float tileHeight, LivingEntity target) {

        GL11.glPushMatrix();
        GL11.glEnable(3042);
        mc.getTextureManager().bindTexture(res);
        float hurtPercent = ((float)target.hurtTime - (target.hurtTime != 0 ? mc.timer.renderPartialTicks : 0.0F)) / 10.0F;

        GL11.glColor4f(
                1.0F,
                1.0F - hurtPercent,
                1.0F - hurtPercent,
                1.0F
        );
        AbstractGui.drawScaledCustomSizeModalRect(
                d,
                y,
                u,
                v,
                uWidth,
                vHeight,
                width,
                height,
                tileWidth,
                tileHeight
        );
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        GL11.glPopMatrix();
    }
Топова
 
Пользователь
Статус
Оффлайн
Регистрация
13 Сен 2021
Сообщения
625
Реакции[?]
117
Поинты[?]
44K
Просто таргет худ, первая работа так-что не пиздите
Если чо-то из утилок забыл то пишите

и оцените код если хотите

Пожалуйста, авторизуйтесь для просмотра ссылки.

targethud:
private final Animation animation = new EaseBackIn(400, 1.0, 1.0F);

   public void drawNewTargetHud(EventDisplay eventDisplay) {
        this.entity = this.getTarget(this.entity);
        boolean out = !this.allow || this.stopWatch.isReached(1000L);
        this.animation.setDuration(out ? 400 : 300);
        this.animation.setDirection(out ? Direction.BACKWARDS : Direction.FORWARDS);
        if (this.animation.getOutput() == 0.0) {
            this.entity = null;
        }

// -------------- yep ---------------- //

        if (this.entity != null) {
            String entityName = entity.getName().getString();
            Style style = Expensive.getInstance().getStyleManager().getCurrentStyle();

            float hp = entity.getHealth();
            float maxHp = entity.getMaxHealth();

            float width = 120.0F;
            float height = 40.0F;

            float fontWidth = Fonts.sfui.getWidth(entityName, 8.0F);
            float fontHeight = Fonts.sfui.getHeight(8.0F);

            float headSize = 30F;

            float healtBarWidth = 115.0F;
            float healtBarHeight = 2.5F;

            float space = 2.5F;

            drag.setWidth(width);
            drag.setHeight(height);

            float anyX = this.drag.getX();
            float anyY = this.drag.getY();

            sizeAnimation((anyX + width / 2.0F), (anyY + height / 2.0F), this.animation.getOutput());
            sizeAnimation((anyX + fontWidth / 2.0F), (anyY + fontHeight / 2.0F), this.animation.getOutput());

            healthAnimation = MathUtil.fast(healthAnimation, MathHelper.clamp(hp / maxHp, 0.0F, 1.0F), 10.0F);

            GlStateManager.pushMatrix();

            drawRoundedRect(
                    anyX,
                    anyY,
                    width,
                    height,
                    new Vector4f(
                            4.0F,
                            4.0F,
                            4.0F,
                            4.0F
                    )
            );

            // X + space для отступа

            anyX += space;


            Stencil.initStencilToWrite();

            DisplayUtils.drawRoundedRect(
                    anyX,
                    anyY + space,
                    headSize,
                    headSize,
                    1.5F,
                    style.getSecondColor().getRGB()
            );

            Stencil.readStencilBuffer(1);

            this.drawTargetHead(
                    this.entity,
                    anyX,
                    anyY + space,
                    headSize,
                    headSize
            );

            Stencil.uninitStencilBuffer();

            DisplayUtils.drawRoundedRect(
                    anyX,
                    anyY  + (height - space - (healtBarHeight)),
                    (healtBarWidth * this.healthAnimation),
                    healtBarHeight,
                    new Vector4f(
                            2.0F,
                            2.0F,
                            2.0F,
                            2.0F
                    ),
                    healtBarColor(hp, maxHp).getRGB()
            );

            DisplayUtils.drawShadow(
                    anyX,
                    anyY  + (height - space - (healtBarHeight)),
                    (healtBarWidth + space * this.healthAnimation),
                    healtBarHeight,
                    6,
                    healtBarColor(hp, maxHp).getRGB()
            );

            DisplayUtils.drawRoundedRect(
                    anyX,
                    anyY  + (height - space - (healtBarHeight)),
                    healtBarWidth,
                    healtBarHeight,
                    new Vector4f(
                            2.0F,
                            2.0F,
                            2.0F,
                            2.0F
                    ),
                    ColorUtils.rgba(10, 13, 15, 60)
            );

            anyX += (headSize + space);

            Scissor.push();
            Scissor.setFromComponentCoordinates(anyX, anyY, width - headSize - (space * 3), height);

            Fonts.sfui.drawText(
                    eventDisplay.getMatrixStack(),
                    entityName,
                    anyX,
                    anyY + ((height / 2) - (fontHeight / 2)),
                    ColorUtils.rgba(255, 255, 255, 200),
                    8.0F
                    );

            Scissor.unset();
            Scissor.pop();

            GlStateManager.popMatrix();
        }
    }

    public void drawRoundedRect(float x, float y, float width, float height, Vector4f radius) {

        DisplayUtils.drawRoundedRect(
                x - 1,
                y - 1,
                width + 2,
                height + 2,
                radius,
                ColorUtils.rgba(100, 100, 100, 100)
        ); // обводка если чо

        DisplayUtils.drawRoundedRect(
                x,
                y,
                width,
                height,
                radius,
                ColorUtils.setAlpha(ColorUtils.rgb(10, 15, 13), 60)
        );

        DisplayUtils.drawShadow(
                x - 2,
                y - 2,
                width + 4,
                height + 4,
                6,
                ColorUtils.setAlpha(ColorUtils.rgb(10, 15, 13), 60)
        );
    }

    public Color healtBarColor(float hp, float maxHp) {
            if (hp >= maxHp / 1.5) {
                return new Color(155, 223, 19, 150);
            } else if (hp >= maxHp / 2) {
                return new Color(221, 134, 21, 150);
            } else if (hp >= maxHp / 3) {
                return new Color(180, 19, 19, 150);
            }
        return new Color(255, 0, 0, 255);
    }

    public void drawTargetHead(LivingEntity entity, float x, float y, float width, float height) {
        if (entity != null) {
            EntityRenderer<? super LivingEntity> rendererManager = mc.getRenderManager().getRenderer(entity);
            this.drawFace(rendererManager.getEntityTexture(entity), x, y, 8.0F, 8.0F, 8.0F, 8.0F, width, height, 64.0F, 64.0F, entity);
            this.drawFace(rendererManager.getEntityTexture(entity), x, y, 104.0F, 8.0F, 8.0F, 8.0F, width, height, 64.0F, 64.0F, entity);
        }

    }

    public static void sizeAnimation(double width, double height, double scale) {
        GlStateManager.translated(
                width,
                height,
                0.0
        );
        GlStateManager.scaled(
                scale,
                scale,
                scale
        );
        GlStateManager.translated(
                -width,
                -height,
                0.0
        );
    }

    public void drawFace(ResourceLocation res, float d, float y, float u, float v, float uWidth, float vHeight, float width, float height, float tileWidth, float tileHeight, LivingEntity target) {

        GL11.glPushMatrix();
        GL11.glEnable(3042);
        mc.getTextureManager().bindTexture(res);
        float hurtPercent = ((float)target.hurtTime - (target.hurtTime != 0 ? mc.timer.renderPartialTicks : 0.0F)) / 10.0F;

        GL11.glColor4f(
                1.0F,
                1.0F - hurtPercent,
                1.0F - hurtPercent,
                1.0F
        );
        AbstractGui.drawScaledCustomSizeModalRect(
                d,
                y,
                u,
                v,
                uWidth,
                vHeight,
                width,
                height,
                tileWidth,
                tileHeight
        );
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        GL11.glPopMatrix();
    }
Я ваще не шарю за яву, да и результат мне понравился, но т. к. обсирать пастеров - тренд, так уж и быть - насру, однако потом.
 
Начинающий
Статус
Оффлайн
Регистрация
7 Фев 2023
Сообщения
13
Реакции[?]
0
Поинты[?]
0
Норм, сделай ник выше и добавь под ником броню, а то как то ник посередине не очень
обнова


targethud:
    public void drawNewTargetHud(EventDisplay eventDisplay) {
        this.entity = this.getTarget(this.entity);
        boolean out = !this.allow || this.stopWatch.isReached(1000L);
        this.animation.setDuration(out ? 400 : 300);
        this.animation.setDirection(out ? Direction.BACKWARDS : Direction.FORWARDS);
        if (this.animation.getOutput() == 0.0) {
            this.entity = null;
        }

// -------------- yep ---------------- //

        if (this.entity != null) {
            String entityName = entity.getName().getString();
            Style style = Expensive.getInstance().getStyleManager().getCurrentStyle();
            HUD targetHud = Expensive.getInstance().getFunctionRegistry().getHud();

            float hp = entity.getHealth();
            float maxHp = entity.getMaxHealth();

            float width = 120.0F;
            float height = 40.0F;

            float fontWidth = Fonts.sfui.getWidth(entityName, 8.0F);
            float fontHeight = Fonts.sfui.getHeight(8.0F);

            float headSize = 30F;

            float healtBarWidth = 115.0F;
            float healtBarHeight = 2.5F;

            float space = 2.5F;

            drag.setWidth(width);
            drag.setHeight(height);

            float anyX = this.drag.getX();
            float anyY = this.drag.getY();

            sizeAnimation((anyX + width / 2.0F), (anyY + height / 2.0F), this.animation.getOutput());
            sizeAnimation((anyX + fontWidth / 2.0F), (anyY + fontHeight / 2.0F), this.animation.getOutput());

            healthAnimation = MathUtil.fast(healthAnimation, MathHelper.clamp(hp / maxHp, 0.0F, 1.0F), 10.0F);

            GlStateManager.pushMatrix();

            drawRoundedRect(
                    anyX,
                    anyY,
                    width,
                    height,
                    new Vector4f(
                            4.0F,
                            4.0F,
                            4.0F,
                            4.0F
                    )
            );

            // X + space для отступа

            anyX += space;


            Stencil.initStencilToWrite();

            DisplayUtils.drawRoundedRect(
                    anyX,
                    anyY + space,
                    headSize,
                    headSize,
                    1.5F,
                    style.getSecondColor().getRGB()
            );

            Stencil.readStencilBuffer(1);

            this.drawTargetHead(
                    this.entity,
                    anyX,
                    anyY + space,
                    headSize,
                    headSize
            );

            Stencil.uninitStencilBuffer();

            DisplayUtils.drawRoundedRect(
                    anyX,
                    anyY  + (height - space - (healtBarHeight)),
                    (healtBarWidth * this.healthAnimation),
                    healtBarHeight,
                    new Vector4f(
                            2.0F,
                            2.0F,
                            2.0F,
                            2.0F
                    ),
                    healtBarColor(hp, maxHp).getRGB()
            );

            DisplayUtils.drawShadow(
                    anyX,
                    anyY  + (height - space - (healtBarHeight)),
                    (healtBarWidth * this.healthAnimation),
                    healtBarHeight,
                    6,
                    healtBarColor(hp, maxHp).getRGB()
            );

            DisplayUtils.drawRoundedRect(
                    anyX,
                    anyY  + (height - space - (healtBarHeight)),
                    healtBarWidth,
                    healtBarHeight,
                    new Vector4f(
                            2.0F,
                            2.0F,
                            2.0F,
                            2.0F
                    ),
                    ColorUtils.rgba(10, 13, 15, 60)
            );

            anyX += (headSize + space);

            Scissor.push();
            Scissor.setFromComponentCoordinates(anyX, anyY, width - headSize - (space * 3), height);

            String entityHpText = "HP: " + hp;

            anyY += ((height / 2) - (fontHeight / 2));

            if (targetHud.visibleHp.get()) {
                Fonts.sfui.drawText(
                        eventDisplay.getMatrixStack(),
                        entityHpText,
                        anyX,
                        anyY + fontHeight + space,
                        ColorUtils.rgba(255, 255, 255, 200),
                        6.0F
                );
            }

            Fonts.sfui.drawText(
                    eventDisplay.getMatrixStack(),
                    entityName,
                    anyX,
                    anyY,
                    ColorUtils.rgba(255, 255, 255, 200),
                    8.0F
                    );

            Scissor.unset();
            Scissor.pop();

            float posX = anyX + (width / 2.0F) + (space * 4.0F);
            float posY = anyY - (height / 2.0F) + (space * 2.5F);

            for (ItemStack itemStack : mc.player.getArmorInventoryList()) {
                if (!itemStack.isEmpty()) {
                    DisplayUtils.drawRoundedRect(posX - 0.5F, posY - 0.5F, 12.0F, 12.0F, 3, new Color(10, 13, 15, 60).getRGB());
                    float scale = 0.7F;
                    GlStateManager.pushMatrix();
                    GlStateManager.translatef(posX, posY, 0);
                    GlStateManager.scalef(scale, scale, scale);
                    mc.getItemRenderer().renderItemAndEffectIntoGUI(itemStack, 0, 0);
                    GlStateManager.popMatrix();

                    posX -= (14 * scale + space);
                }
            }

            GlStateManager.popMatrix();
        }
    }
Пожалуйста, авторизуйтесь для просмотра ссылки.
 
Начинающий
Статус
Оффлайн
Регистрация
18 Июл 2022
Сообщения
66
Реакции[?]
0
Поинты[?]
0
обнова


targethud:
    public void drawNewTargetHud(EventDisplay eventDisplay) {
        this.entity = this.getTarget(this.entity);
        boolean out = !this.allow || this.stopWatch.isReached(1000L);
        this.animation.setDuration(out ? 400 : 300);
        this.animation.setDirection(out ? Direction.BACKWARDS : Direction.FORWARDS);
        if (this.animation.getOutput() == 0.0) {
            this.entity = null;
        }

// -------------- yep ---------------- //

        if (this.entity != null) {
            String entityName = entity.getName().getString();
            Style style = Expensive.getInstance().getStyleManager().getCurrentStyle();
            HUD targetHud = Expensive.getInstance().getFunctionRegistry().getHud();

            float hp = entity.getHealth();
            float maxHp = entity.getMaxHealth();

            float width = 120.0F;
            float height = 40.0F;

            float fontWidth = Fonts.sfui.getWidth(entityName, 8.0F);
            float fontHeight = Fonts.sfui.getHeight(8.0F);

            float headSize = 30F;

            float healtBarWidth = 115.0F;
            float healtBarHeight = 2.5F;

            float space = 2.5F;

            drag.setWidth(width);
            drag.setHeight(height);

            float anyX = this.drag.getX();
            float anyY = this.drag.getY();

            sizeAnimation((anyX + width / 2.0F), (anyY + height / 2.0F), this.animation.getOutput());
            sizeAnimation((anyX + fontWidth / 2.0F), (anyY + fontHeight / 2.0F), this.animation.getOutput());

            healthAnimation = MathUtil.fast(healthAnimation, MathHelper.clamp(hp / maxHp, 0.0F, 1.0F), 10.0F);

            GlStateManager.pushMatrix();

            drawRoundedRect(
                    anyX,
                    anyY,
                    width,
                    height,
                    new Vector4f(
                            4.0F,
                            4.0F,
                            4.0F,
                            4.0F
                    )
            );

            // X + space для отступа

            anyX += space;


            Stencil.initStencilToWrite();

            DisplayUtils.drawRoundedRect(
                    anyX,
                    anyY + space,
                    headSize,
                    headSize,
                    1.5F,
                    style.getSecondColor().getRGB()
            );

            Stencil.readStencilBuffer(1);

            this.drawTargetHead(
                    this.entity,
                    anyX,
                    anyY + space,
                    headSize,
                    headSize
            );

            Stencil.uninitStencilBuffer();

            DisplayUtils.drawRoundedRect(
                    anyX,
                    anyY  + (height - space - (healtBarHeight)),
                    (healtBarWidth * this.healthAnimation),
                    healtBarHeight,
                    new Vector4f(
                            2.0F,
                            2.0F,
                            2.0F,
                            2.0F
                    ),
                    healtBarColor(hp, maxHp).getRGB()
            );

            DisplayUtils.drawShadow(
                    anyX,
                    anyY  + (height - space - (healtBarHeight)),
                    (healtBarWidth * this.healthAnimation),
                    healtBarHeight,
                    6,
                    healtBarColor(hp, maxHp).getRGB()
            );

            DisplayUtils.drawRoundedRect(
                    anyX,
                    anyY  + (height - space - (healtBarHeight)),
                    healtBarWidth,
                    healtBarHeight,
                    new Vector4f(
                            2.0F,
                            2.0F,
                            2.0F,
                            2.0F
                    ),
                    ColorUtils.rgba(10, 13, 15, 60)
            );

            anyX += (headSize + space);

            Scissor.push();
            Scissor.setFromComponentCoordinates(anyX, anyY, width - headSize - (space * 3), height);

            String entityHpText = "HP: " + hp;

            anyY += ((height / 2) - (fontHeight / 2));

            if (targetHud.visibleHp.get()) {
                Fonts.sfui.drawText(
                        eventDisplay.getMatrixStack(),
                        entityHpText,
                        anyX,
                        anyY + fontHeight + space,
                        ColorUtils.rgba(255, 255, 255, 200),
                        6.0F
                );
            }

            Fonts.sfui.drawText(
                    eventDisplay.getMatrixStack(),
                    entityName,
                    anyX,
                    anyY,
                    ColorUtils.rgba(255, 255, 255, 200),
                    8.0F
                    );

            Scissor.unset();
            Scissor.pop();

            float posX = anyX + (width / 2.0F) + (space * 4.0F);
            float posY = anyY - (height / 2.0F) + (space * 2.5F);

            for (ItemStack itemStack : mc.player.getArmorInventoryList()) {
                if (!itemStack.isEmpty()) {
                    DisplayUtils.drawRoundedRect(posX - 0.5F, posY - 0.5F, 12.0F, 12.0F, 3, new Color(10, 13, 15, 60).getRGB());
                    float scale = 0.7F;
                    GlStateManager.pushMatrix();
                    GlStateManager.translatef(posX, posY, 0);
                    GlStateManager.scalef(scale, scale, scale);
                    mc.getItemRenderer().renderItemAndEffectIntoGUI(itemStack, 0, 0);
                    GlStateManager.popMatrix();

                    posX -= (14 * scale + space);
                }
            }

            GlStateManager.popMatrix();
        }
    }
Пожалуйста, авторизуйтесь для просмотра ссылки.
красава
 
Начинающий
Статус
Онлайн
Регистрация
24 Окт 2021
Сообщения
134
Реакции[?]
1
Поинты[?]
1K
обнова


targethud:
    public void drawNewTargetHud(EventDisplay eventDisplay) {
        this.entity = this.getTarget(this.entity);
        boolean out = !this.allow || this.stopWatch.isReached(1000L);
        this.animation.setDuration(out ? 400 : 300);
        this.animation.setDirection(out ? Direction.BACKWARDS : Direction.FORWARDS);
        if (this.animation.getOutput() == 0.0) {
            this.entity = null;
        }

// -------------- yep ---------------- //

        if (this.entity != null) {
            String entityName = entity.getName().getString();
            Style style = Expensive.getInstance().getStyleManager().getCurrentStyle();
            HUD targetHud = Expensive.getInstance().getFunctionRegistry().getHud();

            float hp = entity.getHealth();
            float maxHp = entity.getMaxHealth();

            float width = 120.0F;
            float height = 40.0F;

            float fontWidth = Fonts.sfui.getWidth(entityName, 8.0F);
            float fontHeight = Fonts.sfui.getHeight(8.0F);

            float headSize = 30F;

            float healtBarWidth = 115.0F;
            float healtBarHeight = 2.5F;

            float space = 2.5F;

            drag.setWidth(width);
            drag.setHeight(height);

            float anyX = this.drag.getX();
            float anyY = this.drag.getY();

            sizeAnimation((anyX + width / 2.0F), (anyY + height / 2.0F), this.animation.getOutput());
            sizeAnimation((anyX + fontWidth / 2.0F), (anyY + fontHeight / 2.0F), this.animation.getOutput());

            healthAnimation = MathUtil.fast(healthAnimation, MathHelper.clamp(hp / maxHp, 0.0F, 1.0F), 10.0F);

            GlStateManager.pushMatrix();

            drawRoundedRect(
                    anyX,
                    anyY,
                    width,
                    height,
                    new Vector4f(
                            4.0F,
                            4.0F,
                            4.0F,
                            4.0F
                    )
            );

            // X + space для отступа

            anyX += space;


            Stencil.initStencilToWrite();

            DisplayUtils.drawRoundedRect(
                    anyX,
                    anyY + space,
                    headSize,
                    headSize,
                    1.5F,
                    style.getSecondColor().getRGB()
            );

            Stencil.readStencilBuffer(1);

            this.drawTargetHead(
                    this.entity,
                    anyX,
                    anyY + space,
                    headSize,
                    headSize
            );

            Stencil.uninitStencilBuffer();

            DisplayUtils.drawRoundedRect(
                    anyX,
                    anyY  + (height - space - (healtBarHeight)),
                    (healtBarWidth * this.healthAnimation),
                    healtBarHeight,
                    new Vector4f(
                            2.0F,
                            2.0F,
                            2.0F,
                            2.0F
                    ),
                    healtBarColor(hp, maxHp).getRGB()
            );

            DisplayUtils.drawShadow(
                    anyX,
                    anyY  + (height - space - (healtBarHeight)),
                    (healtBarWidth * this.healthAnimation),
                    healtBarHeight,
                    6,
                    healtBarColor(hp, maxHp).getRGB()
            );

            DisplayUtils.drawRoundedRect(
                    anyX,
                    anyY  + (height - space - (healtBarHeight)),
                    healtBarWidth,
                    healtBarHeight,
                    new Vector4f(
                            2.0F,
                            2.0F,
                            2.0F,
                            2.0F
                    ),
                    ColorUtils.rgba(10, 13, 15, 60)
            );

            anyX += (headSize + space);

            Scissor.push();
            Scissor.setFromComponentCoordinates(anyX, anyY, width - headSize - (space * 3), height);

            String entityHpText = "HP: " + hp;

            anyY += ((height / 2) - (fontHeight / 2));

            if (targetHud.visibleHp.get()) {
                Fonts.sfui.drawText(
                        eventDisplay.getMatrixStack(),
                        entityHpText,
                        anyX,
                        anyY + fontHeight + space,
                        ColorUtils.rgba(255, 255, 255, 200),
                        6.0F
                );
            }

            Fonts.sfui.drawText(
                    eventDisplay.getMatrixStack(),
                    entityName,
                    anyX,
                    anyY,
                    ColorUtils.rgba(255, 255, 255, 200),
                    8.0F
                    );

            Scissor.unset();
            Scissor.pop();

            float posX = anyX + (width / 2.0F) + (space * 4.0F);
            float posY = anyY - (height / 2.0F) + (space * 2.5F);

            for (ItemStack itemStack : mc.player.getArmorInventoryList()) {
                if (!itemStack.isEmpty()) {
                    DisplayUtils.drawRoundedRect(posX - 0.5F, posY - 0.5F, 12.0F, 12.0F, 3, new Color(10, 13, 15, 60).getRGB());
                    float scale = 0.7F;
                    GlStateManager.pushMatrix();
                    GlStateManager.translatef(posX, posY, 0);
                    GlStateManager.scalef(scale, scale, scale);
                    mc.getItemRenderer().renderItemAndEffectIntoGUI(itemStack, 0, 0);
                    GlStateManager.popMatrix();

                    posX -= (14 * scale + space);
                }
            }

            GlStateManager.popMatrix();
        }
    }
Пожалуйста, авторизуйтесь для просмотра ссылки.
imbo
 
Начинающий
Статус
Оффлайн
Регистрация
15 Июн 2024
Сообщения
546
Реакции[?]
4
Поинты[?]
3K
обнова


targethud:
    public void drawNewTargetHud(EventDisplay eventDisplay) {
        this.entity = this.getTarget(this.entity);
        boolean out = !this.allow || this.stopWatch.isReached(1000L);
        this.animation.setDuration(out ? 400 : 300);
        this.animation.setDirection(out ? Direction.BACKWARDS : Direction.FORWARDS);
        if (this.animation.getOutput() == 0.0) {
            this.entity = null;
        }

// -------------- yep ---------------- //

        if (this.entity != null) {
            String entityName = entity.getName().getString();
            Style style = Expensive.getInstance().getStyleManager().getCurrentStyle();
            HUD targetHud = Expensive.getInstance().getFunctionRegistry().getHud();

            float hp = entity.getHealth();
            float maxHp = entity.getMaxHealth();

            float width = 120.0F;
            float height = 40.0F;

            float fontWidth = Fonts.sfui.getWidth(entityName, 8.0F);
            float fontHeight = Fonts.sfui.getHeight(8.0F);

            float headSize = 30F;

            float healtBarWidth = 115.0F;
            float healtBarHeight = 2.5F;

            float space = 2.5F;

            drag.setWidth(width);
            drag.setHeight(height);

            float anyX = this.drag.getX();
            float anyY = this.drag.getY();

            sizeAnimation((anyX + width / 2.0F), (anyY + height / 2.0F), this.animation.getOutput());
            sizeAnimation((anyX + fontWidth / 2.0F), (anyY + fontHeight / 2.0F), this.animation.getOutput());

            healthAnimation = MathUtil.fast(healthAnimation, MathHelper.clamp(hp / maxHp, 0.0F, 1.0F), 10.0F);

            GlStateManager.pushMatrix();

            drawRoundedRect(
                    anyX,
                    anyY,
                    width,
                    height,
                    new Vector4f(
                            4.0F,
                            4.0F,
                            4.0F,
                            4.0F
                    )
            );

            // X + space для отступа

            anyX += space;


            Stencil.initStencilToWrite();

            DisplayUtils.drawRoundedRect(
                    anyX,
                    anyY + space,
                    headSize,
                    headSize,
                    1.5F,
                    style.getSecondColor().getRGB()
            );

            Stencil.readStencilBuffer(1);

            this.drawTargetHead(
                    this.entity,
                    anyX,
                    anyY + space,
                    headSize,
                    headSize
            );

            Stencil.uninitStencilBuffer();

            DisplayUtils.drawRoundedRect(
                    anyX,
                    anyY  + (height - space - (healtBarHeight)),
                    (healtBarWidth * this.healthAnimation),
                    healtBarHeight,
                    new Vector4f(
                            2.0F,
                            2.0F,
                            2.0F,
                            2.0F
                    ),
                    healtBarColor(hp, maxHp).getRGB()
            );

            DisplayUtils.drawShadow(
                    anyX,
                    anyY  + (height - space - (healtBarHeight)),
                    (healtBarWidth * this.healthAnimation),
                    healtBarHeight,
                    6,
                    healtBarColor(hp, maxHp).getRGB()
            );

            DisplayUtils.drawRoundedRect(
                    anyX,
                    anyY  + (height - space - (healtBarHeight)),
                    healtBarWidth,
                    healtBarHeight,
                    new Vector4f(
                            2.0F,
                            2.0F,
                            2.0F,
                            2.0F
                    ),
                    ColorUtils.rgba(10, 13, 15, 60)
            );

            anyX += (headSize + space);

            Scissor.push();
            Scissor.setFromComponentCoordinates(anyX, anyY, width - headSize - (space * 3), height);

            String entityHpText = "HP: " + hp;

            anyY += ((height / 2) - (fontHeight / 2));

            if (targetHud.visibleHp.get()) {
                Fonts.sfui.drawText(
                        eventDisplay.getMatrixStack(),
                        entityHpText,
                        anyX,
                        anyY + fontHeight + space,
                        ColorUtils.rgba(255, 255, 255, 200),
                        6.0F
                );
            }

            Fonts.sfui.drawText(
                    eventDisplay.getMatrixStack(),
                    entityName,
                    anyX,
                    anyY,
                    ColorUtils.rgba(255, 255, 255, 200),
                    8.0F
                    );

            Scissor.unset();
            Scissor.pop();

            float posX = anyX + (width / 2.0F) + (space * 4.0F);
            float posY = anyY - (height / 2.0F) + (space * 2.5F);

            for (ItemStack itemStack : mc.player.getArmorInventoryList()) {
                if (!itemStack.isEmpty()) {
                    DisplayUtils.drawRoundedRect(posX - 0.5F, posY - 0.5F, 12.0F, 12.0F, 3, new Color(10, 13, 15, 60).getRGB());
                    float scale = 0.7F;
                    GlStateManager.pushMatrix();
                    GlStateManager.translatef(posX, posY, 0);
                    GlStateManager.scalef(scale, scale, scale);
                    mc.getItemRenderer().renderItemAndEffectIntoGUI(itemStack, 0, 0);
                    GlStateManager.popMatrix();

                    posX -= (14 * scale + space);
                }
            }

            GlStateManager.popMatrix();
        }
    }
Пожалуйста, авторизуйтесь для просмотра ссылки.
Обход хпешек есть? А так ваще имба лютая, +реп
 
Начинающий
Статус
Оффлайн
Регистрация
27 Сен 2024
Сообщения
11
Реакции[?]
0
Поинты[?]
0
Сверху Снизу