Вопрос Что делать с Target HUD | Expensive 3.1

Начинающий
Статус
Оффлайн
Регистрация
5 Ноя 2023
Сообщения
147
Реакции[?]
0
Поинты[?]
1K

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

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

Спасибо!

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

голова круглая но когда бью чела (только на сервере) она становится квадратной с чем это связано?
 
Начинающий
Статус
Оффлайн
Регистрация
26 Фев 2024
Сообщения
371
Реакции[?]
0
Поинты[?]
0
Начинающий
Статус
Оффлайн
Регистрация
5 Ноя 2023
Сообщения
147
Реакции[?]
0
Поинты[?]
1K
без кода нечем не поможем
Код:
    public void drawTargetHead(LivingEntity entity, float x, float y, float width, float height) {
            EntityRenderer<? super LivingEntity> rendererManager = mc.getRenderManager().getRenderer(entity);
            drawFace(rendererManager.getEntityTexture(entity), x, y, 8F, 8F, 8F, 8F, width, height, 64F, 64F, entity);
    }
Код:
            // Отрисовка головы
            Stencil.initStencilToWrite();
            DisplayUtils.drawRoundedRect(posX + spacing + -2.5f, posY + spacing + -3, 64 / 1.70f, 64 / 1.70f, 4, ColorUtils.rgba(0,0,0,255));
            Stencil.readStencilBuffer(1);
            drawTargetHead(entity, posX + spacing + -2.5f, posY + spacing + -3, 64 / 1.70f, 64 / 1.70f);
            Stencil.uninitStencilBuffer();
            Scissor.push();
 
Начинающий
Статус
Онлайн
Регистрация
8 Мар 2024
Сообщения
598
Реакции[?]
2
Поинты[?]
2K
Начинающий
Статус
Оффлайн
Регистрация
5 Ноя 2023
Сообщения
147
Реакции[?]
0
Поинты[?]
1K
Для просмотра содержимого вам необходимо авторизоваться.

Код:
@FieldDefaults(level = AccessLevel.PRIVATE)
@RequiredArgsConstructor
public class TargetInfoRenderer implements ElementRenderer {
    final StopWatch stopWatch = new StopWatch();
    final Dragging drag;
    LivingEntity entity;
    boolean allow;
    final Animation animation = new EaseBackIn(400, 1, 1);
    float healthAnimation = 0.0f;
    float absorptionAnimation = 0.0f;

    @Override
    public void render(EventDisplay eventDisplay) {
        entity = getTarget(entity);

        float rounding = 6;
        boolean out = !allow || stopWatch.isReached(1000);
        animation.setDuration(out ? 400 : 300);
        animation.setDirection(out ? Direction.BACKWARDS : Direction.FORWARDS);

        if (animation.getOutput() == 0.0f) {
            entity = null;
        }

        if (entity != null) {
            String name = entity.getName().getString();

            float posX = drag.getX();
            float posY = drag.getY();

            float headSize = 28;
            float spacing = 5;

            float width = 234 / 1.75f;
            float height = 93.75f / 1.75f;
            drag.setWidth(width);
            drag.setHeight(height);
            float shrinking = 1.5f;
            Score score = mc.world.getScoreboard().getOrCreateScore(entity.getScoreboardName(), mc.world.getScoreboard().getObjectiveInDisplaySlot(2));


            float hp = entity.getHealth();
            float maxHp = entity.getMaxHealth();
            String header = mc.ingameGUI.getTabList().header == null ? " " : mc.ingameGUI.getTabList().header.getString().toLowerCase();

            if (mc.getCurrentServerData() != null && mc.getCurrentServerData().serverIP.contains("funtime")
                    && (header.contains("анархия") || header.contains("гриферский")) && entity instanceof PlayerEntity) {
                hp = score.getScorePoints();
                maxHp = 20;
            }
            healthAnimation = MathUtil.fast(healthAnimation, MathHelper.clamp(hp / maxHp, 0, 1), 10);
            absorptionAnimation = MathUtil.fast(absorptionAnimation, MathHelper.clamp(entity.getAbsorptionAmount() / maxHp, 0, 1), 10);


            if (mc.getCurrentServerData() != null && mc.getCurrentServerData().serverIP.contains("funtime")
                    && (header.contains("анархия") || header.contains("гриферский")) && entity instanceof PlayerEntity) {
                hp = score.getScorePoints();
                maxHp = 20;
            }


            float animationValue = (float) animation.getOutput();

            float halfAnimationValueRest = (1 - animationValue) / 2f;

            float testX = posX + (width * halfAnimationValueRest);
            float testY = posY + (height * halfAnimationValueRest);
            float testW = width * animationValue;
            float testH = height * animationValue;
            int windowWidth = ClientUtil.calc(mc.getMainWindow().getScaledWidth());

            GlStateManager.pushMatrix();

            sizeAnimation(posX + (width / 2), posY + (height / 2), animation.getOutput());
            float finalPosY = posY;
            drawStyledRect(posX, finalPosY, width, height, 10);

//            DisplayUtils.drawShadow(posX, posY, width, height, 15, ColorUtils.rgba(21,24,40,165));

            // Отрисовка головы
            Stencil.initStencilToWrite();
            DisplayUtils.drawRoundedRect(posX + spacing + -2.5f, posY + spacing + -3, 64 / 1.70f, 64 / 1.70f, 4, ColorUtils.rgba(0,0,0,255));
            Stencil.readStencilBuffer(1);
            drawTargetHead(entity, posX + spacing + -2.5f, posY + spacing + -3, 64 / 1.70f, 64 / 1.70f);
            Stencil.uninitStencilBuffer();
            Scissor.push();

            Scissor.setFromComponentCoordinates(testX, testY, testW - 6, testH);
            Fonts.sfMedium.drawText(eventDisplay.getMatrixStack(), (""), posX + headSize + spacing + spacing + 8, posY + spacing + 5, ColorUtils.rgb(129,135,255), 7);
            Fonts.sfbold.drawText(eventDisplay.getMatrixStack(), entity.getName().getString(), posX + headSize + spacing + spacing - -4, posY + spacing + -2, -1, 9);
            Fonts.sfMedium.drawText(eventDisplay.getMatrixStack(), "HP: " + ((int) hp + (int) mc.player.getAbsorptionAmount()), posX + headSize + spacing + spacing - -5,
                    posY + spacing + 15, ColorUtils.rgb(200, 200, 200), 7);
            Scissor.unset();
            Scissor.pop();

            DisplayUtils.drawRoundedRect(posX + headSize + spacing + spacing - -4, posY + height + 1 - spacing * 2 - 14, (width - 66), 8, new Vector4f(6, 6, 6, 6), ColorUtils.rgb(255, 255, 255));


//            DisplayUtils.drawShadow(posX + headSize + spacing + spacing - 28, posY + height - spacing * 2 - 3, (width - 66) * healthAnimation, 4, 8, ColorUtils.rgb(129,135,255));

            if (HUD.thudpoloska.is("Под цвет темы")) {
                DisplayUtils.drawRoundedRect(posX + headSize + spacing + spacing - -5 , posY + height + 1 - spacing * 2 - 14 , (width - 66) * healthAnimation , 8 , new Vector4f(3 , 3 , 3 , 3) , HUD.getColor(1));
            }
            if (HUD.thudpoloska.is("Под цвет здоровья")) {
                if (hp >= 12) {
                    DisplayUtils.drawRoundedRect(posX + headSize + spacing + spacing - -5 , posY + height + 1 - spacing * 2 - 14 , (width - 66) * healthAnimation , 8 , new Vector4f(3 , 3 , 3 , 3) , ColorUtils.rgba(0 , 255 , 0 , 255));
                }
                else if (hp >= 6) {
                    DisplayUtils.drawRoundedRect(posX + headSize + spacing + spacing - -5 , posY + height + 1 - spacing * 2 - 14 , (width - 66) * healthAnimation , 8 , new Vector4f(3 , 3 , 3 , 3) , ColorUtils.rgba(255 , 255 , 0 , 255));
                }
                else {
                    DisplayUtils.drawRoundedRect(posX + headSize + spacing + spacing - -5 , posY + height + 1 - spacing * 2 - 14 , (width - 66) * healthAnimation , 8 , new Vector4f(3 , 3 , 3 , 3) , ColorUtils.rgba(255 , 0 , 0 , 255));
                }
            }

            DisplayUtils.drawRectVerticalW(posX + headSize + spacing - -95.2f, posY + height + 1 - spacing * 2 - 14, (width - 220) , 8, ColorUtils.rgba(0, 0, 0, 0), ColorUtils.rgba(0,0,0,210));
            GlStateManager.popMatrix();
        }
    }


    private LivingEntity getTarget(LivingEntity nullTarget) {
        LivingEntity auraTarget = AlphaClass.getInstance().getFunctionRegistry().getKillAura().getTarget();
        LivingEntity target = nullTarget;
        if (auraTarget != null) {
            stopWatch.reset();
            allow = true;
            target = auraTarget;
        } else if (mc.currentScreen instanceof ChatScreen) {
            stopWatch.reset();
            allow = true;
            target = mc.player;
        } else {
            allow = false;
        }
        return target;
    }

    public void drawTargetHead(LivingEntity entity, float x, float y, float width, float height) {
            EntityRenderer<? super LivingEntity> rendererManager = mc.getRenderManager().getRenderer(entity);
            drawFace(rendererManager.getEntityTexture(entity), x, y, 8F, 8F, 8F, 8F, width, height, 64F, 64F, entity);
    }

    public static void sizeAnimation(double width, double height, double scale) {
        GlStateManager.translated(width, height, 0);
        GlStateManager.scaled(scale, scale, scale);
        GlStateManager.translated(-width, -height, 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(GL11.GL_BLEND);
        mc.getTextureManager().bindTexture(res);
        float hurtPercent = (target.hurtTime - (target.hurtTime != 0 ? mc.timer.renderPartialTicks : 0.0f)) / 10.0f;
        GL11.glColor4f(1, 1 - hurtPercent, 1 - hurtPercent, 1);
        AbstractGui.drawScaledCustomSizeModalRect(d, y, u, v, uWidth, vHeight, width, height, tileWidth, tileHeight);
        GL11.glColor4f(1, 1, 1, 1);
        GL11.glPopMatrix();
    }

    private void drawStyledRect(float x,
                                float y,
                                float width,
                                float height,
                                float radius) {

        DisplayUtils.drawRoundedRect(x - 0.5f, y - 0.5f, width + -20, height + -11.7f, radius + -2f, ColorUtils.setAlpha(ColorUtils.rgb(0,0,0), 255));
        DisplayUtils.drawRoundedRect(x, y, width + -20, height + -11.7f, radius + -2f, ColorUtils.rgba(0, 0, 0, 255));
    }
}
 
Начинающий
Статус
Оффлайн
Регистрация
5 Ноя 2023
Сообщения
147
Реакции[?]
0
Поинты[?]
1K
Для просмотра содержимого вам необходимо авторизоваться.

Для просмотра содержимого вам необходимо авторизоваться.

можешь дс дать свой? помочь там плиз
 
Последнее редактирование:
Сверху Снизу