• Ну и что вы думаете? Мы взяли и создали свой собственный чат, с блекджеком и шлюхами, теперь все легенды в одном месте: даже те 1000 человек, которых мы забанили в старом чате 🫡 Будем публиковать там очень интересные подробности нового дизайна форума, oh yeah

    Вступай и становись легендой, пока это не стало поздно: жмякай на меня, ток не сильно(

Визуальная часть TargetHud I exp 2.0

Начинающий
Статус
Оффлайн
Регистрация
18 Июл 2024
Сообщения
10
Реакции[?]
0
Поинты[?]
0
Выберите загрузчик игры
Прочие моды

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

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

Спасибо!

Код:
 private void onRenderTargetHUD(final MatrixStack stack) {
        this.target = getTarget();
        this.targetHudAnimation.setDuration(150);
        this.scale = targetHudAnimation.getOutput();
        int firstColor2 = (mode.is("13") ? ColorUtils.getColorStyle(0.0F) : StyleManager.getCurrentStyle().getSecondaryColor());
        int secondColor2 = (mode.is("13") ? ColorUtils.getColorStyle(91F) : StyleManager.getCurrentStyle().getFerstyColor());
        if (scale == 0.0F) {
            target = null;
        }

        if (target == null) {
            return;
        }

        if (scale == 0.0F) {
            target = null;
        }

        if (target == null) {
            return;
        }
        boolean isInvisible = target instanceof LivingEntity && ((LivingEntity) target).isInvisible();

        updatePlayerHealth();

        final String targetName = this.target.getName().getString();
        String substring = targetName.substring(0, Math.min(targetName.length(), 10));
        float xPosition = targetHUD.getX() - 5, yPosition = targetHUD.getY() - 4, maxWidth = 100, maxHeight = 48;

        this.health = AnimationMath.fast(health, target.getHealth() / target.getMaxHealth(), 5);
        this.health = MathHelper.clamp(this.health, 0, 1);
        this.healthplus = AnimationMath.fast(this.healthplus, target.getAbsorptionAmount() / target.getMaxHealth(), 5);
        this.healthplus = MathHelper.clamp(this.healthplus, 0, 1);

        GlStateManager.pushMatrix();
        AnimationMath.sizeAnimation(xPosition + (maxWidth / 2), yPosition + (maxHeight / 2), scale);
        IWrapper.blurQueue.add(() -> RenderUtils.Render2D.drawRoundedRect(xPosition + 5, yPosition + 4, maxWidth - 18, maxHeight - 13, 5, ColorUtils.rgba(20, 20, 20, 200)));
        RenderUtils.Render2D.drawRoundedRect(xPosition + 5, yPosition + 4, maxWidth - 18, maxHeight - 13, 5, ColorUtils.rgba(20, 20, 20, 200));


        RenderUtils.Render2D.drawGradientRound(xPosition + 9F, yPosition + 32.0F, 74.5F, 1F, 1.5F, ColorUtils.rgba(19, 21, 23, 255), ColorUtils.rgba(19, 21, 23, 255), ColorUtils.rgba(19, 21, 23, 255), ColorUtils.rgba(19, 21, 23, 255));
        RenderUtils.Render2D.drawGradientRound(xPosition + 9F, yPosition + 32.0F, 74.5F * this.health, 1F, 1.5F, firstColor2, firstColor2, secondColor2, secondColor2);

        if (!ClientUtils.isConnectedToServer("funtime")) {
            RenderUtils.Render2D.drawGradientRound(xPosition + 9F, yPosition + 32.0F, 74.5F * this.healthplus, 1F, 1.5F, (new Color(255, 89, 0, 255)).getRGB(), (new Color(255, 255, 0, 255)).getRGB(), (new Color(255, 89, 0, 255)).getRGB(), (new Color(255, 255, 0, 255)).getRGB());
        }
        if (target instanceof AbstractClientPlayerEntity) {
            RenderUtils.Render2D.drawRoundFace(xPosition + 8, yPosition + 7, 20, 20, 6f, 255, (AbstractClientPlayerEntity) target);
        } else if (target instanceof MobEntity) {
            StencilUtils.initStencilToWrite();
            RenderUtils.Render2D.drawRoundedRect(xPosition + 8, yPosition + 7, 20, 20, 6f, rgba(21, 21, 21, 190));
            StencilUtils.readStencilBuffer(1);
            RenderUtils.Render2D.drawRoundedRect(xPosition + 8, yPosition + 7, 20, 20, 6f, new Color(23, 23, 23, 50).getRGB());
            RenderUtils.Render2D.drawImage(new ResourceLocation("expensive/images/all/other/vopros.png"), xPosition + 8, yPosition + 7, 20, 20, new Color(255, 255, 255, 255).getRGB());
            StencilUtils.uninitStencilBuffer();
        }

        drawItemStack(xPosition + 30f, yPosition + 24 - 6f, 9f);

        SmartScissor.push();
        SmartScissor.setFromComponentCoordinates(xPosition + 20, yPosition, 65, 40);

        Fonts.msMedium[15].drawString(stack, substring, xPosition + 30, yPosition + 11, -1);


        SmartScissor.unset();
        SmartScissor.pop();

        float healthWid2 = Fonts.msMedium[11].getWidth("Неизвестно");
        if (isInvisible && ClientUtils.isConnectedToServer("funtime")) {
            Fonts.msMedium[11].drawCenteredString(stack, "Неизвестно", (double) (xPosition + 9F + 57.25f - (healthWid2 / 2)), (double) (yPosition + 32.0F), -1);
        } else {
        }

        boolean hasPlayerHead = target.getHeldItemMainhand().getItem() == Items.PLAYER_HEAD ||
                target.getHeldItemOffhand().getItem() == Items.PLAYER_HEAD;
        if (target instanceof AbstractClientPlayerEntity) {
            if (mc != null && mc.player != null) {
                if (Manager.FUNCTION_MANAGER.autoMessage.state) {
                    String formattedTargetName = targetName != null ? formatTargetName(targetName) : "null";
                    if (Manager.FUNCTION_MANAGER.autoMessage.shar.get() && hasPlayerHead) {
                        if (timerUtil.hasTimeElapsed(21500) && target != null && target.getHealth() <= 6) {
                            String[] messages = {
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball/elytra, I’ll let go or I’ll beat your balls right now" : " кидай шар/элитры, отпускаю или я тебе щас яйца бить буду"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball/elytra, I'll let you go or I'll bite your balls off right now" : " кидай шар/элитры, отпускаю или я тебе щас яйца откушу"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball, otherwise I'll blow you away now" : " кидай шар/элитры, иначе я тебя сейчас тряхну"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball/elytra, you have 3 seconds left" : " кидай шар/элитры, даю 5 секунд потом яйца кусаю"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball, don't test my patience" : " кидай шар/элитры, пока я тебе хууём по носу не дал"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball, don't test my patience" : " кидай шар/элитры, пока я тебе хууём в нос не дал"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball or I'll set my cat on you" : " кидай шар/элитры или я на тебя кота натравлю"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball or I'll set my cat on you" : " кидай шар/элитры или на колени на колени"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball or I'll set my cat on you" : " кидай шар/элитры пока я твоей маме не рассказал что ты уроки не сделал"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball or I'll set my cat on you" : " кидай шар/элитры или я тебя на дик посажу"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball or I'll set my cat on you" : " кидай шар/элитры пока я залупой по зубам твойм не прошёлся"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball or I'll set my cat on you" : " кидай шар/элитры пока на дик ртом не упал"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball or I'll set my cat on you" : " кидай шар/элитры или я на тебя кота натравлю")
                            };

                            String randomMessage = messages[new Random().nextInt(messages.length)];
                            mc.player.sendChatMessage(randomMessage);
                            timerUtil.reset();
                        }
                    }

                    if (Manager.FUNCTION_MANAGER.autoMessage.kill.get()) {
                        if (timerUtil.hasTimeElapsed(550) && target != null && target.getHealth() <= 0.0f) {
                            mc.player.sendChatMessage("!-" + formattedTargetName);
                            timerUtil.reset();
                        }
                    }
                }
            }
        }

        GlStateManager.popMatrix();
        this.targetHUD.setWidth(maxWidth - 18);
        this.targetHUD.setHeight(maxHeight - 13);
    }
 

Вложения

Начинающий
Статус
Оффлайн
Регистрация
12 Дек 2022
Сообщения
205
Реакции[?]
0
Поинты[?]
0
Код:
 private void onRenderTargetHUD(final MatrixStack stack) {
        this.target = getTarget();
        this.targetHudAnimation.setDuration(150);
        this.scale = targetHudAnimation.getOutput();
        int firstColor2 = (mode.is("13") ? ColorUtils.getColorStyle(0.0F) : StyleManager.getCurrentStyle().getSecondaryColor());
        int secondColor2 = (mode.is("13") ? ColorUtils.getColorStyle(91F) : StyleManager.getCurrentStyle().getFerstyColor());
        if (scale == 0.0F) {
            target = null;
        }

        if (target == null) {
            return;
        }

        if (scale == 0.0F) {
            target = null;
        }

        if (target == null) {
            return;
        }
        boolean isInvisible = target instanceof LivingEntity && ((LivingEntity) target).isInvisible();

        updatePlayerHealth();

        final String targetName = this.target.getName().getString();
        String substring = targetName.substring(0, Math.min(targetName.length(), 10));
        float xPosition = targetHUD.getX() - 5, yPosition = targetHUD.getY() - 4, maxWidth = 100, maxHeight = 48;

        this.health = AnimationMath.fast(health, target.getHealth() / target.getMaxHealth(), 5);
        this.health = MathHelper.clamp(this.health, 0, 1);
        this.healthplus = AnimationMath.fast(this.healthplus, target.getAbsorptionAmount() / target.getMaxHealth(), 5);
        this.healthplus = MathHelper.clamp(this.healthplus, 0, 1);

        GlStateManager.pushMatrix();
        AnimationMath.sizeAnimation(xPosition + (maxWidth / 2), yPosition + (maxHeight / 2), scale);
        IWrapper.blurQueue.add(() -> RenderUtils.Render2D.drawRoundedRect(xPosition + 5, yPosition + 4, maxWidth - 18, maxHeight - 13, 5, ColorUtils.rgba(20, 20, 20, 200)));
        RenderUtils.Render2D.drawRoundedRect(xPosition + 5, yPosition + 4, maxWidth - 18, maxHeight - 13, 5, ColorUtils.rgba(20, 20, 20, 200));


        RenderUtils.Render2D.drawGradientRound(xPosition + 9F, yPosition + 32.0F, 74.5F, 1F, 1.5F, ColorUtils.rgba(19, 21, 23, 255), ColorUtils.rgba(19, 21, 23, 255), ColorUtils.rgba(19, 21, 23, 255), ColorUtils.rgba(19, 21, 23, 255));
        RenderUtils.Render2D.drawGradientRound(xPosition + 9F, yPosition + 32.0F, 74.5F * this.health, 1F, 1.5F, firstColor2, firstColor2, secondColor2, secondColor2);

        if (!ClientUtils.isConnectedToServer("funtime")) {
            RenderUtils.Render2D.drawGradientRound(xPosition + 9F, yPosition + 32.0F, 74.5F * this.healthplus, 1F, 1.5F, (new Color(255, 89, 0, 255)).getRGB(), (new Color(255, 255, 0, 255)).getRGB(), (new Color(255, 89, 0, 255)).getRGB(), (new Color(255, 255, 0, 255)).getRGB());
        }
        if (target instanceof AbstractClientPlayerEntity) {
            RenderUtils.Render2D.drawRoundFace(xPosition + 8, yPosition + 7, 20, 20, 6f, 255, (AbstractClientPlayerEntity) target);
        } else if (target instanceof MobEntity) {
            StencilUtils.initStencilToWrite();
            RenderUtils.Render2D.drawRoundedRect(xPosition + 8, yPosition + 7, 20, 20, 6f, rgba(21, 21, 21, 190));
            StencilUtils.readStencilBuffer(1);
            RenderUtils.Render2D.drawRoundedRect(xPosition + 8, yPosition + 7, 20, 20, 6f, new Color(23, 23, 23, 50).getRGB());
            RenderUtils.Render2D.drawImage(new ResourceLocation("expensive/images/all/other/vopros.png"), xPosition + 8, yPosition + 7, 20, 20, new Color(255, 255, 255, 255).getRGB());
            StencilUtils.uninitStencilBuffer();
        }

        drawItemStack(xPosition + 30f, yPosition + 24 - 6f, 9f);

        SmartScissor.push();
        SmartScissor.setFromComponentCoordinates(xPosition + 20, yPosition, 65, 40);

        Fonts.msMedium[15].drawString(stack, substring, xPosition + 30, yPosition + 11, -1);


        SmartScissor.unset();
        SmartScissor.pop();

        float healthWid2 = Fonts.msMedium[11].getWidth("Неизвестно");
        if (isInvisible && ClientUtils.isConnectedToServer("funtime")) {
            Fonts.msMedium[11].drawCenteredString(stack, "Неизвестно", (double) (xPosition + 9F + 57.25f - (healthWid2 / 2)), (double) (yPosition + 32.0F), -1);
        } else {
        }

        boolean hasPlayerHead = target.getHeldItemMainhand().getItem() == Items.PLAYER_HEAD ||
                target.getHeldItemOffhand().getItem() == Items.PLAYER_HEAD;
        if (target instanceof AbstractClientPlayerEntity) {
            if (mc != null && mc.player != null) {
                if (Manager.FUNCTION_MANAGER.autoMessage.state) {
                    String formattedTargetName = targetName != null ? formatTargetName(targetName) : "null";
                    if (Manager.FUNCTION_MANAGER.autoMessage.shar.get() && hasPlayerHead) {
                        if (timerUtil.hasTimeElapsed(21500) && target != null && target.getHealth() <= 6) {
                            String[] messages = {
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball/elytra, I’ll let go or I’ll beat your balls right now" : " кидай шар/элитры, отпускаю или я тебе щас яйца бить буду"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball/elytra, I'll let you go or I'll bite your balls off right now" : " кидай шар/элитры, отпускаю или я тебе щас яйца откушу"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball, otherwise I'll blow you away now" : " кидай шар/элитры, иначе я тебя сейчас тряхну"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball/elytra, you have 3 seconds left" : " кидай шар/элитры, даю 5 секунд потом яйца кусаю"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball, don't test my patience" : " кидай шар/элитры, пока я тебе хууём по носу не дал"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball, don't test my patience" : " кидай шар/элитры, пока я тебе хууём в нос не дал"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball or I'll set my cat on you" : " кидай шар/элитры или я на тебя кота натравлю"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball or I'll set my cat on you" : " кидай шар/элитры или на колени на колени"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball or I'll set my cat on you" : " кидай шар/элитры пока я твоей маме не рассказал что ты уроки не сделал"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball or I'll set my cat on you" : " кидай шар/элитры или я тебя на дик посажу"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball or I'll set my cat on you" : " кидай шар/элитры пока я залупой по зубам твойм не прошёлся"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball or I'll set my cat on you" : " кидай шар/элитры пока на дик ртом не упал"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball or I'll set my cat on you" : " кидай шар/элитры или я на тебя кота натравлю")
                            };

                            String randomMessage = messages[new Random().nextInt(messages.length)];
                            mc.player.sendChatMessage(randomMessage);
                            timerUtil.reset();
                        }
                    }

                    if (Manager.FUNCTION_MANAGER.autoMessage.kill.get()) {
                        if (timerUtil.hasTimeElapsed(550) && target != null && target.getHealth() <= 0.0f) {
                            mc.player.sendChatMessage("!-" + formattedTargetName);
                            timerUtil.reset();
                        }
                    }
                }
            }
        }

        GlStateManager.popMatrix();
        this.targetHUD.setWidth(maxWidth - 18);
        this.targetHUD.setHeight(maxHeight - 13);
    }
так это дефолтный с ньюкода
 
Начинающий
Статус
Оффлайн
Регистрация
19 Июл 2023
Сообщения
42
Реакции[?]
0
Поинты[?]
0
Код:
 private void onRenderTargetHUD(final MatrixStack stack) {
        this.target = getTarget();
        this.targetHudAnimation.setDuration(150);
        this.scale = targetHudAnimation.getOutput();
        int firstColor2 = (mode.is("13") ? ColorUtils.getColorStyle(0.0F) : StyleManager.getCurrentStyle().getSecondaryColor());
        int secondColor2 = (mode.is("13") ? ColorUtils.getColorStyle(91F) : StyleManager.getCurrentStyle().getFerstyColor());
        if (scale == 0.0F) {
            target = null;
        }

        if (target == null) {
            return;
        }

        if (scale == 0.0F) {
            target = null;
        }

        if (target == null) {
            return;
        }
        boolean isInvisible = target instanceof LivingEntity && ((LivingEntity) target).isInvisible();

        updatePlayerHealth();

        final String targetName = this.target.getName().getString();
        String substring = targetName.substring(0, Math.min(targetName.length(), 10));
        float xPosition = targetHUD.getX() - 5, yPosition = targetHUD.getY() - 4, maxWidth = 100, maxHeight = 48;

        this.health = AnimationMath.fast(health, target.getHealth() / target.getMaxHealth(), 5);
        this.health = MathHelper.clamp(this.health, 0, 1);
        this.healthplus = AnimationMath.fast(this.healthplus, target.getAbsorptionAmount() / target.getMaxHealth(), 5);
        this.healthplus = MathHelper.clamp(this.healthplus, 0, 1);

        GlStateManager.pushMatrix();
        AnimationMath.sizeAnimation(xPosition + (maxWidth / 2), yPosition + (maxHeight / 2), scale);
        IWrapper.blurQueue.add(() -> RenderUtils.Render2D.drawRoundedRect(xPosition + 5, yPosition + 4, maxWidth - 18, maxHeight - 13, 5, ColorUtils.rgba(20, 20, 20, 200)));
        RenderUtils.Render2D.drawRoundedRect(xPosition + 5, yPosition + 4, maxWidth - 18, maxHeight - 13, 5, ColorUtils.rgba(20, 20, 20, 200));


        RenderUtils.Render2D.drawGradientRound(xPosition + 9F, yPosition + 32.0F, 74.5F, 1F, 1.5F, ColorUtils.rgba(19, 21, 23, 255), ColorUtils.rgba(19, 21, 23, 255), ColorUtils.rgba(19, 21, 23, 255), ColorUtils.rgba(19, 21, 23, 255));
        RenderUtils.Render2D.drawGradientRound(xPosition + 9F, yPosition + 32.0F, 74.5F * this.health, 1F, 1.5F, firstColor2, firstColor2, secondColor2, secondColor2);

        if (!ClientUtils.isConnectedToServer("funtime")) {
            RenderUtils.Render2D.drawGradientRound(xPosition + 9F, yPosition + 32.0F, 74.5F * this.healthplus, 1F, 1.5F, (new Color(255, 89, 0, 255)).getRGB(), (new Color(255, 255, 0, 255)).getRGB(), (new Color(255, 89, 0, 255)).getRGB(), (new Color(255, 255, 0, 255)).getRGB());
        }
        if (target instanceof AbstractClientPlayerEntity) {
            RenderUtils.Render2D.drawRoundFace(xPosition + 8, yPosition + 7, 20, 20, 6f, 255, (AbstractClientPlayerEntity) target);
        } else if (target instanceof MobEntity) {
            StencilUtils.initStencilToWrite();
            RenderUtils.Render2D.drawRoundedRect(xPosition + 8, yPosition + 7, 20, 20, 6f, rgba(21, 21, 21, 190));
            StencilUtils.readStencilBuffer(1);
            RenderUtils.Render2D.drawRoundedRect(xPosition + 8, yPosition + 7, 20, 20, 6f, new Color(23, 23, 23, 50).getRGB());
            RenderUtils.Render2D.drawImage(new ResourceLocation("expensive/images/all/other/vopros.png"), xPosition + 8, yPosition + 7, 20, 20, new Color(255, 255, 255, 255).getRGB());
            StencilUtils.uninitStencilBuffer();
        }

        drawItemStack(xPosition + 30f, yPosition + 24 - 6f, 9f);

        SmartScissor.push();
        SmartScissor.setFromComponentCoordinates(xPosition + 20, yPosition, 65, 40);

        Fonts.msMedium[15].drawString(stack, substring, xPosition + 30, yPosition + 11, -1);


        SmartScissor.unset();
        SmartScissor.pop();

        float healthWid2 = Fonts.msMedium[11].getWidth("Неизвестно");
        if (isInvisible && ClientUtils.isConnectedToServer("funtime")) {
            Fonts.msMedium[11].drawCenteredString(stack, "Неизвестно", (double) (xPosition + 9F + 57.25f - (healthWid2 / 2)), (double) (yPosition + 32.0F), -1);
        } else {
        }

        boolean hasPlayerHead = target.getHeldItemMainhand().getItem() == Items.PLAYER_HEAD ||
                target.getHeldItemOffhand().getItem() == Items.PLAYER_HEAD;
        if (target instanceof AbstractClientPlayerEntity) {
            if (mc != null && mc.player != null) {
                if (Manager.FUNCTION_MANAGER.autoMessage.state) {
                    String formattedTargetName = targetName != null ? formatTargetName(targetName) : "null";
                    if (Manager.FUNCTION_MANAGER.autoMessage.shar.get() && hasPlayerHead) {
                        if (timerUtil.hasTimeElapsed(21500) && target != null && target.getHealth() <= 6) {
                            String[] messages = {
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball/elytra, I’ll let go or I’ll beat your balls right now" : " кидай шар/элитры, отпускаю или я тебе щас яйца бить буду"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball/elytra, I'll let you go or I'll bite your balls off right now" : " кидай шар/элитры, отпускаю или я тебе щас яйца откушу"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball, otherwise I'll blow you away now" : " кидай шар/элитры, иначе я тебя сейчас тряхну"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball/elytra, you have 3 seconds left" : " кидай шар/элитры, даю 5 секунд потом яйца кусаю"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball, don't test my patience" : " кидай шар/элитры, пока я тебе хууём по носу не дал"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball, don't test my patience" : " кидай шар/элитры, пока я тебе хууём в нос не дал"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball or I'll set my cat on you" : " кидай шар/элитры или я на тебя кота натравлю"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball or I'll set my cat on you" : " кидай шар/элитры или на колени на колени"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball or I'll set my cat on you" : " кидай шар/элитры пока я твоей маме не рассказал что ты уроки не сделал"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball or I'll set my cat on you" : " кидай шар/элитры или я тебя на дик посажу"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball or I'll set my cat on you" : " кидай шар/элитры пока я залупой по зубам твойм не прошёлся"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball or I'll set my cat on you" : " кидай шар/элитры пока на дик ртом не упал"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball or I'll set my cat on you" : " кидай шар/элитры или я на тебя кота натравлю")
                            };

                            String randomMessage = messages[new Random().nextInt(messages.length)];
                            mc.player.sendChatMessage(randomMessage);
                            timerUtil.reset();
                        }
                    }

                    if (Manager.FUNCTION_MANAGER.autoMessage.kill.get()) {
                        if (timerUtil.hasTimeElapsed(550) && target != null && target.getHealth() <= 0.0f) {
                            mc.player.sendChatMessage("!-" + formattedTargetName);
                            timerUtil.reset();
                        }
                    }
                }
            }
        }

        GlStateManager.popMatrix();
        this.targetHUD.setWidth(maxWidth - 18);
        this.targetHUD.setHeight(maxHeight - 13);
    }
/del NewCode Edition th
 
Начинающий
Статус
Оффлайн
Регистрация
6 Июл 2024
Сообщения
74
Реакции[?]
0
Поинты[?]
0
Код:
 private void onRenderTargetHUD(final MatrixStack stack) {
        this.target = getTarget();
        this.targetHudAnimation.setDuration(150);
        this.scale = targetHudAnimation.getOutput();
        int firstColor2 = (mode.is("13") ? ColorUtils.getColorStyle(0.0F) : StyleManager.getCurrentStyle().getSecondaryColor());
        int secondColor2 = (mode.is("13") ? ColorUtils.getColorStyle(91F) : StyleManager.getCurrentStyle().getFerstyColor());
        if (scale == 0.0F) {
            target = null;
        }

        if (target == null) {
            return;
        }

        if (scale == 0.0F) {
            target = null;
        }

        if (target == null) {
            return;
        }
        boolean isInvisible = target instanceof LivingEntity && ((LivingEntity) target).isInvisible();

        updatePlayerHealth();

        final String targetName = this.target.getName().getString();
        String substring = targetName.substring(0, Math.min(targetName.length(), 10));
        float xPosition = targetHUD.getX() - 5, yPosition = targetHUD.getY() - 4, maxWidth = 100, maxHeight = 48;

        this.health = AnimationMath.fast(health, target.getHealth() / target.getMaxHealth(), 5);
        this.health = MathHelper.clamp(this.health, 0, 1);
        this.healthplus = AnimationMath.fast(this.healthplus, target.getAbsorptionAmount() / target.getMaxHealth(), 5);
        this.healthplus = MathHelper.clamp(this.healthplus, 0, 1);

        GlStateManager.pushMatrix();
        AnimationMath.sizeAnimation(xPosition + (maxWidth / 2), yPosition + (maxHeight / 2), scale);
        IWrapper.blurQueue.add(() -> RenderUtils.Render2D.drawRoundedRect(xPosition + 5, yPosition + 4, maxWidth - 18, maxHeight - 13, 5, ColorUtils.rgba(20, 20, 20, 200)));
        RenderUtils.Render2D.drawRoundedRect(xPosition + 5, yPosition + 4, maxWidth - 18, maxHeight - 13, 5, ColorUtils.rgba(20, 20, 20, 200));


        RenderUtils.Render2D.drawGradientRound(xPosition + 9F, yPosition + 32.0F, 74.5F, 1F, 1.5F, ColorUtils.rgba(19, 21, 23, 255), ColorUtils.rgba(19, 21, 23, 255), ColorUtils.rgba(19, 21, 23, 255), ColorUtils.rgba(19, 21, 23, 255));
        RenderUtils.Render2D.drawGradientRound(xPosition + 9F, yPosition + 32.0F, 74.5F * this.health, 1F, 1.5F, firstColor2, firstColor2, secondColor2, secondColor2);

        if (!ClientUtils.isConnectedToServer("funtime")) {
            RenderUtils.Render2D.drawGradientRound(xPosition + 9F, yPosition + 32.0F, 74.5F * this.healthplus, 1F, 1.5F, (new Color(255, 89, 0, 255)).getRGB(), (new Color(255, 255, 0, 255)).getRGB(), (new Color(255, 89, 0, 255)).getRGB(), (new Color(255, 255, 0, 255)).getRGB());
        }
        if (target instanceof AbstractClientPlayerEntity) {
            RenderUtils.Render2D.drawRoundFace(xPosition + 8, yPosition + 7, 20, 20, 6f, 255, (AbstractClientPlayerEntity) target);
        } else if (target instanceof MobEntity) {
            StencilUtils.initStencilToWrite();
            RenderUtils.Render2D.drawRoundedRect(xPosition + 8, yPosition + 7, 20, 20, 6f, rgba(21, 21, 21, 190));
            StencilUtils.readStencilBuffer(1);
            RenderUtils.Render2D.drawRoundedRect(xPosition + 8, yPosition + 7, 20, 20, 6f, new Color(23, 23, 23, 50).getRGB());
            RenderUtils.Render2D.drawImage(new ResourceLocation("expensive/images/all/other/vopros.png"), xPosition + 8, yPosition + 7, 20, 20, new Color(255, 255, 255, 255).getRGB());
            StencilUtils.uninitStencilBuffer();
        }

        drawItemStack(xPosition + 30f, yPosition + 24 - 6f, 9f);

        SmartScissor.push();
        SmartScissor.setFromComponentCoordinates(xPosition + 20, yPosition, 65, 40);

        Fonts.msMedium[15].drawString(stack, substring, xPosition + 30, yPosition + 11, -1);


        SmartScissor.unset();
        SmartScissor.pop();

        float healthWid2 = Fonts.msMedium[11].getWidth("Неизвестно");
        if (isInvisible && ClientUtils.isConnectedToServer("funtime")) {
            Fonts.msMedium[11].drawCenteredString(stack, "Неизвестно", (double) (xPosition + 9F + 57.25f - (healthWid2 / 2)), (double) (yPosition + 32.0F), -1);
        } else {
        }

        boolean hasPlayerHead = target.getHeldItemMainhand().getItem() == Items.PLAYER_HEAD ||
                target.getHeldItemOffhand().getItem() == Items.PLAYER_HEAD;
        if (target instanceof AbstractClientPlayerEntity) {
            if (mc != null && mc.player != null) {
                if (Manager.FUNCTION_MANAGER.autoMessage.state) {
                    String formattedTargetName = targetName != null ? formatTargetName(targetName) : "null";
                    if (Manager.FUNCTION_MANAGER.autoMessage.shar.get() && hasPlayerHead) {
                        if (timerUtil.hasTimeElapsed(21500) && target != null && target.getHealth() <= 6) {
                            String[] messages = {
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball/elytra, I’ll let go or I’ll beat your balls right now" : " кидай шар/элитры, отпускаю или я тебе щас яйца бить буду"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball/elytra, I'll let you go or I'll bite your balls off right now" : " кидай шар/элитры, отпускаю или я тебе щас яйца откушу"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball, otherwise I'll blow you away now" : " кидай шар/элитры, иначе я тебя сейчас тряхну"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball/elytra, you have 3 seconds left" : " кидай шар/элитры, даю 5 секунд потом яйца кусаю"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball, don't test my patience" : " кидай шар/элитры, пока я тебе хууём по носу не дал"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball, don't test my patience" : " кидай шар/элитры, пока я тебе хууём в нос не дал"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball or I'll set my cat on you" : " кидай шар/элитры или я на тебя кота натравлю"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball or I'll set my cat on you" : " кидай шар/элитры или на колени на колени"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball or I'll set my cat on you" : " кидай шар/элитры пока я твоей маме не рассказал что ты уроки не сделал"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball or I'll set my cat on you" : " кидай шар/элитры или я тебя на дик посажу"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball or I'll set my cat on you" : " кидай шар/элитры пока я залупой по зубам твойм не прошёлся"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball or I'll set my cat on you" : " кидай шар/элитры пока на дик ртом не упал"),
                                    formattedTargetName + (Translated.isRussian() ? " throw the ball or I'll set my cat on you" : " кидай шар/элитры или я на тебя кота натравлю")
                            };

                            String randomMessage = messages[new Random().nextInt(messages.length)];
                            mc.player.sendChatMessage(randomMessage);
                            timerUtil.reset();
                        }
                    }

                    if (Manager.FUNCTION_MANAGER.autoMessage.kill.get()) {
                        if (timerUtil.hasTimeElapsed(550) && target != null && target.getHealth() <= 0.0f) {
                            mc.player.sendChatMessage("!-" + formattedTargetName);
                            timerUtil.reset();
                        }
                    }
                }
            }
        }

        GlStateManager.popMatrix();
        this.targetHUD.setWidth(maxWidth - 18);
        this.targetHUD.setHeight(maxHeight - 13);
    }
/del не NewCode?
 
Сверху Снизу