Исходник HUD Pasta Client, expensive 2.0 ready

Забаненный
Статус
Оффлайн
Регистрация
9 Дек 2022
Сообщения
47
Реакции[?]
2
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.

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

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

Спасибо!

В худе много фич, делал сам, ну как сказать делал, переделывал эксп 2.0

Код от лучшего селф пастера:
package wtf.expensive.modules.impl.render;

import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import lombok.Getter;
import net.minecraft.client.entity.player.AbstractClientPlayerEntity;
import net.minecraft.client.gui.screen.ChatScreen;
import net.minecraft.client.network.play.NetworkPlayerInfo;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.EquipmentSlotType;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.potion.EffectInstance;
import net.minecraft.potion.EffectUtils;
import net.minecraft.scoreboard.ScorePlayerTeam;
import net.minecraft.scoreboard.Team;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Vector4f;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.world.GameType;
import org.joml.Vector2i;
import org.joml.Vector4i;
import wtf.expensive.Initilization;
import wtf.expensive.events.Event;
import wtf.expensive.events.impl.player.EventUpdate;
import wtf.expensive.events.impl.render.EventRender;
import wtf.expensive.managment.Managment;
import wtf.expensive.modules.Function;
import wtf.expensive.modules.FunctionAnnotation;
import wtf.expensive.modules.Type;
import wtf.expensive.modules.settings.imp.BooleanOption;
import wtf.expensive.modules.settings.imp.MultiBoxSetting;
import wtf.expensive.modules.settings.imp.SliderSetting;
import wtf.expensive.ui.midnight.StyleManager;
import wtf.expensive.util.ClientUtil;
import wtf.expensive.util.UserProfile;
import wtf.expensive.util.animations.Animation;
import wtf.expensive.util.animations.Direction;
import wtf.expensive.util.animations.impl.EaseBackIn;
import wtf.expensive.util.drag.Dragging;
import wtf.expensive.util.font.Fonts;
import wtf.expensive.util.font.styled.StyledFont;
import wtf.expensive.util.math.MathUtil;
import wtf.expensive.util.misc.HudUtil;
import wtf.expensive.util.misc.TimerUtil;
import wtf.expensive.util.render.ColorUtil;
import wtf.expensive.util.render.RenderUtil;
import wtf.expensive.util.render.SmartScissor;
import wtf.expensive.util.render.animation.AnimationMath;

import java.awt.*;
import java.time.LocalTime;
import java.util.*;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.atomic.AtomicReference;
import java.util.regex.Pattern;

import static wtf.expensive.modules.impl.render.HudFunction.Status.*;
import static wtf.expensive.util.render.ColorUtil.rgba;
import static wtf.expensive.util.render.RenderUtil.Render2D.*;


@FunctionAnnotation(name = "Hud", type = Type.Render)
public class HudFunction extends Function {

    public MultiBoxSetting elements = new MultiBoxSetting("Элементы",
            new BooleanOption("Логотип", true),
            new BooleanOption("Список модераторов", true),
            new BooleanOption("Список зелий", true),
            new BooleanOption("Уведомления", true),
            new BooleanOption("Таргет Худ", true),
            new BooleanOption("Бинды", true),
            new BooleanOption("Корды", true),
            new BooleanOption("Броня", true));

    public HudFunction() {
        addSettings(elements);
    }

    public final float offs = 0;

    @Override
    public void onEvent(final Event event) {
        if (event instanceof EventUpdate && elements.get(2)) {
            staffPlayers.clear();

            for (ScorePlayerTeam team : mc.world.getScoreboard().getTeams().stream().sorted(Comparator.comparing(Team::getName)).toList()) {

                String name = team.getMembershipCollection().toString();
                name = name.substring(1, name.length() - 1);

                if (namePattern.matcher(name).matches()) {
                    if (prefixMatches.matcher(repairString(team.getPrefix().getString().toLowerCase(Locale.ROOT))).matches() || Managment.STAFF_MANAGER.isStaff(name)) {
                        staffPlayers.add(new StaffPlayer(name, team.getPrefix()));
                    }
                    if (namePattern.matcher(name).matches()) {
                        boolean vanish = true;
                        for (NetworkPlayerInfo info : mc.getConnection().getPlayerInfoMap()) {
                            if (info.getGameProfile().getName().equals(name)) {
                                vanish = false;
                            }
                        }
                        if (vanish == true && !prefixMatches.matcher(repairString(team.getPrefix().getString().toLowerCase(Locale.ROOT))).matches()|| Managment.STAFF_MANAGER.isStaff(name) && mc.getCurrentServerData() != null && mc.getCurrentServerData().serverIP.contains("reallyworld")) {
                            staffPlayers.add(new StaffPlayer(" " + name, ITextComponent.getTextComponentOrEmpty(" ")));
                        }
                    }
                }
            }
        }
        if (event instanceof EventRender eventRender) {
            if (eventRender.isRender2D()) {
                handleRender(eventRender);
            }
        }
    }

    /**
     * Обработчик события типа EventRender
     *
     * [USER=804731]@param[/USER] renderEvent Событие для рендера
     */

//    Renderable waterMark = RenderableFactory.create(RenderableType.WATERMARK, 3, 5);
//    Renderable info = RenderableFactory.create(RenderableType.INFO, 4, 0);

    private void handleRender(EventRender renderEvent) {
        final MatrixStack stack = renderEvent.matrixStack;

        if (elements.get(0)) {
            onTitleRender(stack);
        }
        if (elements.get(1)) {
            onStaffListRender(stack, renderEvent);
        }
        if (elements.get(2)) {
            onPotionElementsRender(stack, renderEvent);
        }
        if (elements.get(4)) {
            onRenderTargetHUD(stack);
        }
        if (elements.get(5)) {
            onKeyBindsRender(stack);
        }
        if (elements.get(6)) {
            onInformationRender(stack, renderEvent);
        }
        if (elements.get(7)) {
            onArmorRender(renderEvent);
        }
    }

    public Dragging keyBinds = Initilization.createDrag(this, "KeyBinds", 200, 50);
    private float heightDynamic = 0;
    private int activeModules = 0;

    private void onKeyBindsRender(MatrixStack stack) {
        float posX = keyBinds.getX();
        float posY = keyBinds.getY();

        int roundDegree = 4;
        int headerHeight = 14;
        int width = 100;
        int padding = 5;
        int offset = 10;

        int headerColor = new Color(30, 30, 30, 200).getRGB();
        int backgroundColor = new Color(40, 40, 40, 230).getRGB();

        int firstColor = ColorUtil.getColorStyle(0);
        int secondColor = ColorUtil.getColorStyle(90);

        float height = activeModules * offset;

        this.heightDynamic = AnimationMath.fast(this.heightDynamic, height, 10);
        //шадоу под ректом
        RenderUtil.Render2D.drawShadow(posX, posY, width, headerHeight + heightDynamic + padding / 2f, 10,  new Color(16, 16, 16, 122).getRGB());
        //рект
        RenderUtil.Render2D.drawRoundedRect(posX, posY, width, heightDynamic + headerHeight + 2.5f, roundDegree - 1, new Color(16, 16, 16, 122).getRGB());
        Fonts.gilroyBold[14].drawCenteredString(stack, ClientUtil.gradient("Бинды", firstColor, secondColor), keyBinds.getX() + 17, posY + 6.5f, firstColor);

        SmartScissor.push();
        SmartScissor.setFromComponentCoordinates(posX, posY, width, headerHeight + heightDynamic + padding / 2f);
        int index = 0;

        for (Function f : Managment.FUNCTION_MANAGER.getFunctions()) {
            if (f.bind != 0 && f.state) {

                String text = ClientUtil.getKey(f.bind);

                if (text == null) {
                    continue;
                }


                String bindText = "[" + text.toUpperCase() + "]";
                float bindWidth = Fonts.gilroyBold[12].getWidth(bindText);

                Fonts.gilroyBold[13].drawString(stack, f.name, posX + padding, posY + headerHeight + padding + (index * offset) - 2, -1);
                Fonts.gilroyBold[13].drawString(stack, bindText, posX + width - bindWidth - padding, posY + headerHeight + padding + (index * offset) - 2, -1);

                index++;
            }
        }
        SmartScissor.unset();
        SmartScissor.pop();
        activeModules = index;

        keyBinds.setWidth(width);
        keyBinds.setHeight(activeModules * offset + headerHeight);
    }

    public CopyOnWriteArrayList<net.minecraft.util.text.TextComponent> components = new CopyOnWriteArrayList<>();

    private final Pattern namePattern = Pattern.compile("^\\w{3,16}$");
    private final Pattern prefixMatches = Pattern.compile(".[I](mod|der|adm|help|wne|мод|хелп|помо|адм|владе|отри|таф|taf|curat|курато|dev|раз|supp|сапп|yt|ютуб).[/I]");

    public Dragging staffList = Initilization.createDrag(this, "StaffList", 400, 50);

    private int activeStaff = 0;
    private float hDynam = 0;
    private float widthDynamic = 0;
    private float nameWidth = 0;
    List<StaffPlayer> staffPlayers = new ArrayList<>();

    private void onStaffListRender(MatrixStack matrixStack, EventRender render) {
        float posX = staffList.getX();
        float posY = staffList.getY();

        int roundDegree = 4;
        int headerHeight = 14;
        float width = (nameWidth != 0) ? (100) : 100;
        int padding = 5;
        int offset = 10;

        int firstColor = ColorUtil.getColorStyle(0);
        int secondColor = ColorUtil.getColorStyle(90);
        float height = activeStaff * offset;

        this.hDynam = AnimationMath.fast(this.hDynam, height, 10);
        this.widthDynamic = AnimationMath.fast(this.widthDynamic, width, 10);
        //шадоу под ректом
        RenderUtil.Render2D.drawShadow(posX, posY, width, headerHeight + hDynam + padding / 2f, 10,  new Color(16, 16, 16, 122).getRGB());
        //рект
        RenderUtil.Render2D.drawRoundedRect(posX, posY, width, hDynam + headerHeight + 2.5f, roundDegree - 1, new Color(16, 16, 16, 122).getRGB());

        Fonts.gilroyBold[14].drawCenteredString(matrixStack, ClientUtil.gradient("Персонал", firstColor, secondColor), posX + 22.5f, posY + 6.5f, -1);

        int index = 0;

        SmartScissor.push();
        SmartScissor.setFromComponentCoordinates(posX, posY, widthDynamic, headerHeight + hDynam + padding / 2f);
        if (!staffPlayers.isEmpty()) {
            for (StaffPlayer staff : staffPlayers) {
                String name = staff.getName();
                ITextComponent prefix = staff.getPrefix();
                String status = staff.getStatus().getString();

                Fonts.gilroyBold[13].drawString(matrixStack, prefix, posX + padding - 4, posY + headerHeight + padding + (index * offset) - 2, -1);
                Fonts.gilroyBold[13].drawString(matrixStack, name, posX + padding + Fonts.gilroyBold[12].getWidth(prefix.getString()) - 3, posY + headerHeight + padding + (index * offset) - 2, -1);
                Fonts.gilroyBold[13].drawCenteredString(matrixStack, status, posX + padding + 85, posY + headerHeight + padding + (index * offset) - 2, -1);
                nameWidth = Fonts.gilroyBold[13].getWidth(prefix.getString() + name + status);
                index++;
            }
        } else {
            nameWidth = 0;
        }
        SmartScissor.unset();
        SmartScissor.pop();

        activeStaff = index;
        staffList.setWidth(widthDynamic);
        staffList.setHeight(hDynam + headerHeight);
    }

    private String repairString(String input) {
        StringBuilder sb = new StringBuilder(input.length());
        for (char c : input.toCharArray()) {
            if (c >= 65281 && c <= 65374) {
                sb.append((char) (c - 65248));
            } else {
                sb.append(c);
            }
        }
        return sb.toString();
    }

    private class StaffPlayer {

        [USER=270918]@Getter[/USER]
        String name;
        [USER=270918]@Getter[/USER]
        ITextComponent prefix;
        [USER=270918]@Getter[/USER]
        Status status;

        private StaffPlayer(String name, ITextComponent prefix) {
            this.name = name;
            this.prefix = prefix;

            updateStatus();
        }

        private void updateStatus() {
            for (AbstractClientPlayerEntity player : mc.world.getPlayers()) {
                if (player.getNameClear().equals(name)) {
                    status = NEAR;
                    return;
                }
            }

            for (NetworkPlayerInfo info : mc.getConnection().getPlayerInfoMap()) {
                if (info.getGameProfile().getName().equals(name)) {
                    if (info.getGameType() == GameType.SPECTATOR) {
                        status = SPEC;
                        return;
                    }

                    status = NONE;
                    return;
                }
            }

            status = VANISHED;
        }
    }

    public enum Status {
        NONE(" §a[A]"),
        NEAR(" §e[N]"),
        SPEC(" §c[S]"),
        VANISHED(" §6[V]");

        [USER=270918]@Getter[/USER]
        final String string;

        Status(String string) {
            this.string = string;
        }
    }

    public Dragging events = Initilization.createDrag(this, "events", 213.0f, 8.0f + 100);


    /**
     * Выполняет рендер информации по типу координат на экране
     *
     * [USER=804731]@param[/USER] stack       Матрица для рендеринга.
     * [USER=804731]@param[/USER] renderEvent Обработчик типа EventRender
     */
    private void onInformationRender(final MatrixStack stack, final EventRender renderEvent) {
           float y = renderEvent.scaledResolution.scaledHeight() - Fonts.gilroyBold[15].getFontHeight() - (mc.currentScreen instanceof ChatScreen ? 8 * mc.gameSettings.guiScale : 0) - 1.5f;
          String pos = (int) mc.player.getPosX() + ", " + (int) mc.player.getPosY() + ", " + (int) mc.player.getPosZ();
          String posInHell = (int) mc.player.getPosX() / 8 + ", " + (int) mc.player.getPosY() + ", " + (int) mc.player.getPosZ() / 8;
          //глоу за задним фоном
          RenderUtil.Render2D.drawShadow(1, y - 5.5f, Fonts.viberclient[20].getWidth("c ") + Fonts.gilroyBold[15].getWidth(pos) + 4, 15, 14, new Color(16, 16, 16, 122).getRGB());
          //задний фон
          RenderUtil.Render2D.drawRoundedRect(1, y - 5.5f, Fonts.viberclient[20].getWidth("c ") + Fonts.gilroyBold[15].getWidth(pos) + 4, 15, 2, new Color(16, 16, 16, 122).getRGB());
          Fonts.viberclient[20].drawString(stack, ClientUtil.gradient("c ", ColorUtil.getColorStyle(0), ColorUtil.getColorStyle(90)), 4, y, -1);
          Fonts.gilroyBold[15].drawString(stack, pos, 2 + Fonts.viberclient[20].getWidth("c "), y, new Color(85, 255, 255, 166).getRGB());
          int xOffset = 8;
          //глоу за задним фоном
          RenderUtil.Render2D.drawShadow(Fonts.viberclient[20].getWidth("c ") + Fonts.gilroyBold[15].getWidth(pos) + 1 + xOffset, y - 5.5f, Fonts.viberclient[20].getWidth("c ") + Fonts.gilroyBold[15].getWidth(posInHell) + 4, 15, 14, new Color(16, 16, 16, 122).getRGB());
          //задний фон
          RenderUtil.Render2D.drawRoundedRect(Fonts.viberclient[20].getWidth("c ") + Fonts.gilroyBold[15].getWidth(pos) + 1 + xOffset, y - 5.5f, Fonts.viberclient[20].getWidth("c ") + Fonts.gilroyBold[15].getWidth(posInHell) + 4, 15, 2, new Color(16, 16, 16, 122).getRGB());
          Fonts.viberclient[20].drawString(stack, ClientUtil.gradient("c ", ColorUtil.getColorStyle(0), ColorUtil.getColorStyle(90)), Fonts.viberclient[20].getWidth("c ") + Fonts.gilroyBold[15].getWidth(pos) + 4 + xOffset, y, -1);
          Fonts.gilroyBold[15].drawString(stack, posInHell, Fonts.viberclient[20].getWidth("c ") + Fonts.gilroyBold[15].getWidth(pos) + 2 + Fonts.viberclient[20].getWidth("c ") + xOffset, y, new Color(255, 85, 85, 166).getRGB());



          xOffset = 878;
          //глоу за задним фоном
          RenderUtil.Render2D.drawShadow(xOffset + 40, y - 5.5f, 40, 15, 14, new Color(16, 16, 16, 122).getRGB());
          //задний фон
          RenderUtil.Render2D.drawRoundedRect(xOffset + 40, y - 5.5f, 40, 15, 2, new Color(16, 16, 16, 122).getRGB());
          Fonts.viberclient[20].drawString(stack, ClientUtil.gradient("b", ColorUtil.getColorStyle(0), ColorUtil.getColorStyle(90)), xOffset + 65, y, new Color(255, 85, 85, 166).getRGB());
          Fonts.gilroyBold[15].drawString(stack, String.format("%.1f", Math.abs(Math.hypot(mc.player.getPosX() - mc.player.prevPosX, mc.player.getPosZ() - mc.player.prevPosZ)) * 20), xOffset + 45, y, new Color(255, 255, 255, 166).getRGB());
    }

    /**
     * Выполняет рендер брони на экране
     *
     * [USER=804731]@param[/USER] renderEvent Обработчик типа EventRender
     *
     */
    public Dragging dragging = Initilization.createDrag(this, "ArmorHud", 350, 50);
    private void onArmorRender(final EventRender renderEvent) {
        float width = 100;
        float height = mc.player.getItemStackFromSlot(EquipmentSlotType.HEAD).isEmpty() && mc.player.getItemStackFromSlot(EquipmentSlotType.CHEST).isEmpty()  && mc.player.getItemStackFromSlot(EquipmentSlotType.LEGS).isEmpty()  && mc.player.getItemStackFromSlot(EquipmentSlotType.FEET).isEmpty()  ? 15 : 80;
        float x = dragging.getX();
        float y = dragging.getY();

        final MatrixStack matrixStack = renderEvent.matrixStack;

        RenderUtil.Render2D.drawShadow(x, y, width - 5, height, 10,  new Color(16, 16, 16, 122).getRGB());
        RenderUtil.Render2D.drawRoundedRect(x, y, width - 5, height, 3,  new Color(16, 16, 16, 122).getRGB());

        Fonts.gilroyBold[14].drawString(matrixStack, ClientUtil.gradient("Броня", ColorUtil.getColorStyle(0), ColorUtil.getColorStyle(90)), x + 5, y + 5, -1);

        int posX = (int) x + 3;
        int posY = (int) y + 63;

        for (ItemStack itemStack : mc.player.getArmorInventoryList()) {

            if (!itemStack.isEmpty()) {

                mc.getItemRenderer().renderItemAndEffectIntoGUI(itemStack, posX, posY);

                float damagePercentage = (itemStack.getDamage() * 100.0f) / itemStack.getMaxDamage();

                int red = (int) (255 * (damagePercentage / 100));
                int green = 255 - red;

                int barHeight2 = Math.round((45 * (100 - damagePercentage)) / 100);

                RenderUtil.Render2D.drawRoundedRect(posX + 20, posY + 6, 45, 3, 1, ColorUtil.rgba(15, 15, 15, 255));
                RenderUtil.Render2D.drawRoundedRect(posX + 20, posY + 6, barHeight2, 3, 1, ColorUtil.rgba(red, green, 0, 255));
                RenderUtil.Render2D.drawShadow(posX + 20, posY + 6, barHeight2, 3, 10,  ColorUtil.rgba(red, green, 0, 255),   ColorUtil.rgba(red, green, 0, 255),  ColorUtil.rgba(red, green, 0, 255) ,  ColorUtil.rgba(red, green, 0, 255));

                Fonts.gilroyBold[14].drawCenteredString(matrixStack, (100 - (itemStack.getDamage() * 100) / itemStack.getMaxDamage()) + "%", posX + width - 20, posY + 4, new Color(255, 255, 255, 166).getRGB());

            }

            posY -= 16;
        }

        width = 100;
        height = 76;
        dragging.setWidth(width);
        dragging.setHeight(height);
    }

    /**
     * Выполняет рендер эффектов на экране
     *
     * [USER=804731]@param[/USER] stack       Матрица для рендеринга.
     * [USER=804731]@param[/USER] renderEvent Обработчик типа EventRender
     */

    public Dragging potionStatus = Initilization.createDrag(this, "PotionStatus", 200, 50);
    private float hDynamic = 0;
    private int activePotions = 0;

    private void onPotionElementsRender(final MatrixStack matrixStack, final EventRender renderEvent) {
        float posX = potionStatus.getX();
        float posY = potionStatus.getY();

        int roundDegree = 4;
        int headerHeight = 14;
        int width = 115;
        int padding = 5;
        int offset = 10;

        int headerColor = new Color(30, 30, 30, 200).getRGB();
        int backgroundColor = new Color(40, 40, 40, 230).getRGB();

        int firstColor = ColorUtil.getColorStyle(0);
        int secondColor = ColorUtil.getColorStyle(90);

        float height = activePotions * offset;

        this.hDynamic = AnimationMath.fast(this.hDynamic, height, 10);
        //шадоу под ректом
        RenderUtil.Render2D.drawShadow(posX, posY, width, headerHeight + hDynamic + padding / 2f, 10,  new Color(16, 16, 16, 122).getRGB());
        //рект
        RenderUtil.Render2D.drawRoundedRect(posX, posY, width, hDynamic + headerHeight + 2.5f, roundDegree - 1, new Color(16, 16, 16, 122).getRGB());

        Fonts.gilroyBold[14].drawCenteredString(matrixStack, ClientUtil.gradient("Эффекты", firstColor, secondColor), potionStatus.getX() + 21, posY + 6.5f, firstColor);

        SmartScissor.push();
        SmartScissor.setFromComponentCoordinates(posX, posY, width, headerHeight + hDynamic + padding / 2f);
        int index = 0;

        for (EffectInstance p : mc.player.getActivePotionEffects()) {
            if (p.isShowIcon()) {

                String durationText = EffectUtils.getPotionDurationString(p, 1);
                float durationWidth = Fonts.gilroyBold[12].getWidth(durationText);
                int red = (int) (255 * (p.getDuration() / 1000));
                int green = 255 - red;

                //рект
                RenderUtil.Render2D.drawShadow(posX + padding + 58, posY + headerHeight + padding + (index * offset) - 2,Math.min(p.getDuration() / 100, 30), 4, 8, ColorUtil.rgba(green, red, 0, 255));
                RenderUtil.Render2D.drawRoundedRect(posX + padding + 58, posY + headerHeight + padding + (index * offset) - 2,30, 4, 1, new Color(0, 0, 0, 255).getRGB());
                RenderUtil.Render2D.drawRoundedRect(posX + padding + 58, posY + headerHeight + padding + (index * offset) - 2,Math.min(p.getDuration() / 100, 30), 4, 1, ColorUtil.rgba(green, red, 0, 255));
                Fonts.gilroyBold[13].drawString(matrixStack, I18n.format(p.getEffectName()), posX + padding, posY + headerHeight + padding + (index * offset) - 2,  new Color(255, 255, 255, 166).getRGB());
                Fonts.gilroyBold[13].drawString(matrixStack, durationText, posX + width - durationWidth - padding, posY + headerHeight + padding + (index * offset) - 2, new Color(255, 255, 255, 166).getRGB());

                index++;
            }
        }
        SmartScissor.unset();
        SmartScissor.pop();
        activePotions = index;

        potionStatus.setWidth(width);
        potionStatus.setHeight(activePotions * offset + headerHeight);
    }

    /**
     * Выполняет рендер логотипа чита
     *
     * [USER=804731]@param[/USER] stack Матрица для рендеринга.
     */
    private void onTitleRender(final MatrixStack stack) {
        //аддоны для показа времени
        LocalTime localTime = LocalTime.now();
        String time = String.format("%02d:%02d:%02d", localTime.getHour(), localTime.getMinute(), localTime.getSecond());
        // Координаты
        byte x = 3, y = 3;
        String point = "    |";
        //название клинта
        String addons = (HudUtil.serverIP() != "" ? HudUtil.serverIP() : "localhost") + "   " + time  + "   " + (!Managment.FUNCTION_MANAGER.nameProtect.isState()  ? mc.player.getName().getString() : "Protected") + "   FPS: " + mc.debugFPS;
        String name = "PASTA CLIENT   ";
        //ширина
        float titleWidth = Fonts.gilroyBold[16].getWidth(name) +  Fonts.gilroyBold[16].getWidth(addons) + 6;
        //высота
        float titleHeight = 15;

        //шадоу под ректом
        RenderUtil.Render2D.drawShadow(x, y, titleWidth, titleHeight, 10,  new Color(16, 16, 16, 122).getRGB());
        //рект
        RenderUtil.Render2D.drawRoundedRect(x, y, titleWidth, titleHeight, 3, new Color(16, 16, 16, 122).getRGB());
        //отрисовка текста
        Fonts.gilroyBold[16].drawString(stack, ClientUtil.gradient(name, ColorUtil.getColorStyle(0), ColorUtil.getColorStyle(90)), x + 3, y + 5, -1);
        //отрисовка текста
        Fonts.gilroyBold[16].drawString(stack, addons, x + Fonts.gilroyBold[16].getWidth(name) + 3, y + 5, -1);
        //отрисовка текста
        Fonts.gilroyBold[16].drawString(stack, point,  Fonts.gilroyBold[16].getWidth(name) + x - 12.4, y + 5, new Color(255, 255, 255, 89).getRGB());
        //отрисовка текста
        Fonts.gilroyBold[16].drawString(stack, point, Fonts.gilroyBold[16].getWidth(name) + x - 4.5 + Fonts.gilroyBold[16].getWidth((HudUtil.serverIP() != "" ? HudUtil.serverIP() : "localhost")), y + 5, new Color(255, 255, 255, 89).getRGB());
        //отрисовка текста
        Fonts.gilroyBold[16].drawString(stack, point, Fonts.gilroyBold[16].getWidth(name) + x + 3.5 + Fonts.gilroyBold[16].getWidth((HudUtil.serverIP() != "" ? HudUtil.serverIP() : "localhost") + time), y + 5, new Color(255, 255, 255, 89).getRGB());
        //отрисовка текста
        Fonts.gilroyBold[16].drawString(stack, point, Fonts.gilroyBold[16].getWidth(name) + x + 10.5 + Fonts.gilroyBold[16].getWidth((HudUtil.serverIP() != "" ? HudUtil.serverIP() : "localhost") + time + (!Managment.FUNCTION_MANAGER.nameProtect.isState()  ? mc.player.getName().getString() : "Protected")), y + 5, new Color(255, 255, 255, 89).getRGB());
    }

    List<Function> sortedFunctions = new ArrayList<>();
    TimerUtil delay = new TimerUtil();

    /**
     * Выполняет рендер списка из модулей
     *
     * [USER=804731]@param[/USER] stack Матрица для рендеринга.
     */

    float health = 0;
    public final Dragging targetHUD = Initilization.createDrag(this, "TargetHUD", 500, 50);
    private final Animation targetHudAnimation = new EaseBackIn(200, 1, 1.5f);
    private PlayerEntity target = null;
    private double scale = 0.0D;

    private void onRenderTargetHUD(final MatrixStack stack) {
        this.target = getTarget(this.target);
        this.targetHudAnimation.setDuration(300);
        this.scale = targetHudAnimation.getOutput();

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

        if (target == null) {
            return;
        }

        final String targetName = this.target.getName().getString();

        String substring = targetName.substring(0, Math.min(targetName.length(), 10));
        final float nameWidth = Fonts.gilroyBold[18].getWidth(substring);
        final float xPosition = this.targetHUD.getX();
        final float yPosition = this.targetHUD.getY();
        final float maxWidth = Math.max(nameWidth + 50, 120);
        final float maxHeight = 35;

        // Обновление значения здоровья с анимацией
        this.health = AnimationMath.fast(health, target.getHealth() / target.getMaxHealth(), 5);
        this.health = MathHelper.clamp(this.health, 0, 1);

        GlStateManager.pushMatrix();
        AnimationMath.sizeAnimation(xPosition + (maxWidth / 2), yPosition + (maxHeight / 2), scale);
        //глоу за задним фоном
        RenderUtil.Render2D.drawShadow(xPosition - 10, yPosition + 0.5f, maxWidth + 10, maxHeight, 10, new Color(16, 16, 16, 122).getRGB());
        //задний фон
        RenderUtil.Render2D.drawRoundedRect(xPosition - 10, yPosition + 0.5f, maxWidth+ 10, maxHeight, 2.5f, new Color(16, 16, 16, 122).getRGB());
        Fonts.viberclient[60].drawString(stack, ClientUtil.gradient("a", ColorUtil.getColorStyle(0), ColorUtil.getColorStyle(90)), xPosition - 6, yPosition + 6, -1);
        // Отрисовка головы
       // drawFace(xPosition + 4, yPosition + 4, 8F, 8F, 8F, 8F, 22, 22, 64F, 64F, (AbstractClientPlayerEntity) target);
        // Отрисовка кругового индикатора здоровья
        drawCircle(
                xPosition + maxWidth - 15,
                yPosition + maxHeight / 2,
                0,
                360,
                10,
                6,
                false,
                ColorUtil.rgba(26, 26, 26, 255)
        );

        drawCircle(
                xPosition + maxWidth - 15,
                yPosition + maxHeight / 2,
                0,
                health * 360 + 1,
                10,
                6,
                false,
                Managment.STYLE_MANAGER.getCurrentStyle()
        );
        //глоу
        RenderUtil.Render2D.drawRoundedRect(xPosition + 30, yPosition + 22, 10, 10, 2.5f, new Color(0, 0, 0, 61).getRGB());
        //задний фон
        RenderUtil.Render2D.drawRoundedRect(xPosition + 30, yPosition + 22, 10, 10, 2.5f, new Color(0, 0, 0, 120).getRGB());
        //глоу
        RenderUtil.Render2D.drawRoundedRect(xPosition + 30 + 10, yPosition + 22, 10, 10, 2.5f, new Color(0, 0, 0, 61).getRGB());
        //задний фон
        RenderUtil.Render2D.drawRoundedRect(xPosition + 30 + 10, yPosition + 22, 10, 10, 2.5f, new Color(0, 0, 0, 120).getRGB());
        //глоу
        RenderUtil.Render2D.drawRoundedRect(xPosition + 30 + 10 + 10, yPosition + 22, 10, 10, 2.5f, new Color(0, 0, 0, 61).getRGB());
        //задний фон
        RenderUtil.Render2D.drawRoundedRect(xPosition + 30 + 10 + 10, yPosition + 22, 10, 10, 2.5f, new Color(0, 0, 0, 120).getRGB());
        //глоу
        RenderUtil.Render2D.drawRoundedRect(xPosition + 30 + 10 + 10 + 10, yPosition + 22, 10, 10, 2.5f, new Color(0, 0, 0, 61).getRGB());
        //задний фон
        RenderUtil.Render2D.drawRoundedRect(xPosition + 30 + 10 + 10+ 10, yPosition + 22, 10, 10, 2.5f, new Color(0, 0, 0, 120).getRGB());
        //глоу
        RenderUtil.Render2D.drawRoundedRect(xPosition + 30 + 10 + 10 + 10 + 10, yPosition + 22, 10, 10, 2.5f, new Color(0, 0, 0, 61).getRGB());
        //задний фон
        RenderUtil.Render2D.drawRoundedRect(xPosition + 30 + 10 + 10+ 10 + 10, yPosition + 22, 10, 10, 2.5f, new Color(0, 0, 0, 120).getRGB());
        //глоу
        RenderUtil.Render2D.drawRoundedRect(xPosition + 30 + 10 + 10 + 10 + 10  + 10, yPosition + 22, 10, 10, 2.5f, new Color(0, 0, 0, 61).getRGB());
        //задний фон
        RenderUtil.Render2D.drawRoundedRect(xPosition + 30 + 10 + 10+ 10 + 10  + 10, yPosition + 22, 10, 10, 2.5f, new Color(0, 0, 0, 120).getRGB());
        drawItemStack(xPosition + 31, yPosition + 23, 10);


        Fonts.gilroyBold[18].drawString(stack, substring, xPosition + 30, yPosition + 6, -1);

        String healthValue = (int) MathUtil.round(this.health * 20 + target.getAbsorptionAmount(), 0.5f) + "";
        Fonts.gilroyBold[16].drawCenteredString(stack, "Здоровье: " + healthValue, xPosition + maxWidth - 62.5, yPosition + maxHeight / 2 - 2.2f, ColorUtil.rgba(255, 255, 255, 255));
        GlStateManager.popMatrix();
        this.targetHUD.setWidth(maxWidth);
        this.targetHUD.setHeight(maxHeight);
    }

    private void drawItemStack(float x, float y, float offset) {
        List<ItemStack> stackList = new ArrayList<>(Arrays.asList(target.getHeldItemMainhand(), target.getHeldItemOffhand()));
        stackList.addAll((Collection<? extends ItemStack>) target.getArmorInventoryList());

        final AtomicReference<Float> posX = new AtomicReference<>(x);

        stackList.stream()
                .filter(stack -> !stack.isEmpty())
                .forEach(stack -> HudUtil.drawItemStack(stack,
                        posX.getAndAccumulate(offset, Float::sum),
                        y,
                        false,
                        true, 0.5f));
    }


    private PlayerEntity getTarget(PlayerEntity nullTarget) {
        PlayerEntity target = nullTarget;

        if (Managment.FUNCTION_MANAGER.auraFunction.getTarget() instanceof PlayerEntity) {
            target = (PlayerEntity) Managment.FUNCTION_MANAGER.auraFunction.getTarget();
            targetHudAnimation.setDirection(Direction.FORWARDS);
        } else if (mc.currentScreen instanceof ChatScreen) {
            target = mc.player;
            targetHudAnimation.setDirection(Direction.FORWARDS);
        } else {
            targetHudAnimation.setDirection(Direction.BACKWARDS);
        }

        return target;
    }
}
Пожалуйста, авторизуйтесь для просмотра ссылки.
 
Последнее редактирование:
Начинающий
Статус
Оффлайн
Регистрация
16 Май 2024
Сообщения
137
Реакции[?]
1
Поинты[?]
1K
так ты же его какой то программой делал а не в код вписывал
 
Начинающий
Статус
Оффлайн
Регистрация
30 Июл 2023
Сообщения
409
Реакции[?]
2
Поинты[?]
1K
В худе много фич, делал сам, ну как сказать делал, переделывал эксп 2.0

Код от лучшего селф пастера:
package wtf.expensive.modules.impl.render;

import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import lombok.Getter;
import net.minecraft.client.entity.player.AbstractClientPlayerEntity;
import net.minecraft.client.gui.screen.ChatScreen;
import net.minecraft.client.network.play.NetworkPlayerInfo;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.EquipmentSlotType;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.potion.EffectInstance;
import net.minecraft.potion.EffectUtils;
import net.minecraft.scoreboard.ScorePlayerTeam;
import net.minecraft.scoreboard.Team;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Vector4f;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.world.GameType;
import org.joml.Vector2i;
import org.joml.Vector4i;
import wtf.expensive.Initilization;
import wtf.expensive.events.Event;
import wtf.expensive.events.impl.player.EventUpdate;
import wtf.expensive.events.impl.render.EventRender;
import wtf.expensive.managment.Managment;
import wtf.expensive.modules.Function;
import wtf.expensive.modules.FunctionAnnotation;
import wtf.expensive.modules.Type;
import wtf.expensive.modules.settings.imp.BooleanOption;
import wtf.expensive.modules.settings.imp.MultiBoxSetting;
import wtf.expensive.modules.settings.imp.SliderSetting;
import wtf.expensive.ui.midnight.StyleManager;
import wtf.expensive.util.ClientUtil;
import wtf.expensive.util.UserProfile;
import wtf.expensive.util.animations.Animation;
import wtf.expensive.util.animations.Direction;
import wtf.expensive.util.animations.impl.EaseBackIn;
import wtf.expensive.util.drag.Dragging;
import wtf.expensive.util.font.Fonts;
import wtf.expensive.util.font.styled.StyledFont;
import wtf.expensive.util.math.MathUtil;
import wtf.expensive.util.misc.HudUtil;
import wtf.expensive.util.misc.TimerUtil;
import wtf.expensive.util.render.ColorUtil;
import wtf.expensive.util.render.RenderUtil;
import wtf.expensive.util.render.SmartScissor;
import wtf.expensive.util.render.animation.AnimationMath;

import java.awt.*;
import java.time.LocalTime;
import java.util.*;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.atomic.AtomicReference;
import java.util.regex.Pattern;

import static wtf.expensive.modules.impl.render.HudFunction.Status.*;
import static wtf.expensive.util.render.ColorUtil.rgba;
import static wtf.expensive.util.render.RenderUtil.Render2D.*;


@FunctionAnnotation(name = "Hud", type = Type.Render)
public class HudFunction extends Function {

    public MultiBoxSetting elements = new MultiBoxSetting("Элементы",
            new BooleanOption("Логотип", true),
            new BooleanOption("Список модераторов", true),
            new BooleanOption("Список зелий", true),
            new BooleanOption("Уведомления", true),
            new BooleanOption("Таргет Худ", true),
            new BooleanOption("Бинды", true),
            new BooleanOption("Корды", true),
            new BooleanOption("Броня", true));

    public HudFunction() {
        addSettings(elements);
    }

    public final float offs = 0;

    @Override
    public void onEvent(final Event event) {
        if (event instanceof EventUpdate && elements.get(2)) {
            staffPlayers.clear();

            for (ScorePlayerTeam team : mc.world.getScoreboard().getTeams().stream().sorted(Comparator.comparing(Team::getName)).toList()) {

                String name = team.getMembershipCollection().toString();
                name = name.substring(1, name.length() - 1);

                if (namePattern.matcher(name).matches()) {
                    if (prefixMatches.matcher(repairString(team.getPrefix().getString().toLowerCase(Locale.ROOT))).matches() || Managment.STAFF_MANAGER.isStaff(name)) {
                        staffPlayers.add(new StaffPlayer(name, team.getPrefix()));
                    }
                    if (namePattern.matcher(name).matches()) {
                        boolean vanish = true;
                        for (NetworkPlayerInfo info : mc.getConnection().getPlayerInfoMap()) {
                            if (info.getGameProfile().getName().equals(name)) {
                                vanish = false;
                            }
                        }
                        if (vanish == true && !prefixMatches.matcher(repairString(team.getPrefix().getString().toLowerCase(Locale.ROOT))).matches()|| Managment.STAFF_MANAGER.isStaff(name) && mc.getCurrentServerData() != null && mc.getCurrentServerData().serverIP.contains("reallyworld")) {
                            staffPlayers.add(new StaffPlayer(" " + name, ITextComponent.getTextComponentOrEmpty(" ")));
                        }
                    }
                }
            }
        }
        if (event instanceof EventRender eventRender) {
            if (eventRender.isRender2D()) {
                handleRender(eventRender);
            }
        }
    }

    /**
     * Обработчик события типа EventRender
     *
     * [USER=804731]@param[/USER] renderEvent Событие для рендера
     */

//    Renderable waterMark = RenderableFactory.create(RenderableType.WATERMARK, 3, 5);
//    Renderable info = RenderableFactory.create(RenderableType.INFO, 4, 0);

    private void handleRender(EventRender renderEvent) {
        final MatrixStack stack = renderEvent.matrixStack;

        if (elements.get(0)) {
            onTitleRender(stack);
        }
        if (elements.get(1)) {
            onStaffListRender(stack, renderEvent);
        }
        if (elements.get(2)) {
            onPotionElementsRender(stack, renderEvent);
        }
        if (elements.get(4)) {
            onRenderTargetHUD(stack);
        }
        if (elements.get(5)) {
            onKeyBindsRender(stack);
        }
        if (elements.get(6)) {
            onInformationRender(stack, renderEvent);
        }
        if (elements.get(7)) {
            onArmorRender(renderEvent);
        }
    }

    public Dragging keyBinds = Initilization.createDrag(this, "KeyBinds", 200, 50);
    private float heightDynamic = 0;
    private int activeModules = 0;

    private void onKeyBindsRender(MatrixStack stack) {
        float posX = keyBinds.getX();
        float posY = keyBinds.getY();

        int roundDegree = 4;
        int headerHeight = 14;
        int width = 100;
        int padding = 5;
        int offset = 10;

        int headerColor = new Color(30, 30, 30, 200).getRGB();
        int backgroundColor = new Color(40, 40, 40, 230).getRGB();

        int firstColor = ColorUtil.getColorStyle(0);
        int secondColor = ColorUtil.getColorStyle(90);

        float height = activeModules * offset;

        this.heightDynamic = AnimationMath.fast(this.heightDynamic, height, 10);
        //шадоу под ректом
        RenderUtil.Render2D.drawShadow(posX, posY, width, headerHeight + heightDynamic + padding / 2f, 10,  new Color(16, 16, 16, 122).getRGB());
        //рект
        RenderUtil.Render2D.drawRoundedRect(posX, posY, width, heightDynamic + headerHeight + 2.5f, roundDegree - 1, new Color(16, 16, 16, 122).getRGB());
        Fonts.gilroyBold[14].drawCenteredString(stack, ClientUtil.gradient("Бинды", firstColor, secondColor), keyBinds.getX() + 17, posY + 6.5f, firstColor);

        SmartScissor.push();
        SmartScissor.setFromComponentCoordinates(posX, posY, width, headerHeight + heightDynamic + padding / 2f);
        int index = 0;

        for (Function f : Managment.FUNCTION_MANAGER.getFunctions()) {
            if (f.bind != 0 && f.state) {

                String text = ClientUtil.getKey(f.bind);

                if (text == null) {
                    continue;
                }


                String bindText = "[" + text.toUpperCase() + "]";
                float bindWidth = Fonts.gilroyBold[12].getWidth(bindText);

                Fonts.gilroyBold[13].drawString(stack, f.name, posX + padding, posY + headerHeight + padding + (index * offset) - 2, -1);
                Fonts.gilroyBold[13].drawString(stack, bindText, posX + width - bindWidth - padding, posY + headerHeight + padding + (index * offset) - 2, -1);

                index++;
            }
        }
        SmartScissor.unset();
        SmartScissor.pop();
        activeModules = index;

        keyBinds.setWidth(width);
        keyBinds.setHeight(activeModules * offset + headerHeight);
    }

    public CopyOnWriteArrayList<net.minecraft.util.text.TextComponent> components = new CopyOnWriteArrayList<>();

    private final Pattern namePattern = Pattern.compile("^\\w{3,16}$");
    private final Pattern prefixMatches = Pattern.compile(".[I](mod|der|adm|help|wne|мод|хелп|помо|адм|владе|отри|таф|taf|curat|курато|dev|раз|supp|сапп|yt|ютуб).[/I]");

    public Dragging staffList = Initilization.createDrag(this, "StaffList", 400, 50);

    private int activeStaff = 0;
    private float hDynam = 0;
    private float widthDynamic = 0;
    private float nameWidth = 0;
    List<StaffPlayer> staffPlayers = new ArrayList<>();

    private void onStaffListRender(MatrixStack matrixStack, EventRender render) {
        float posX = staffList.getX();
        float posY = staffList.getY();

        int roundDegree = 4;
        int headerHeight = 14;
        float width = (nameWidth != 0) ? (100) : 100;
        int padding = 5;
        int offset = 10;

        int firstColor = ColorUtil.getColorStyle(0);
        int secondColor = ColorUtil.getColorStyle(90);
        float height = activeStaff * offset;

        this.hDynam = AnimationMath.fast(this.hDynam, height, 10);
        this.widthDynamic = AnimationMath.fast(this.widthDynamic, width, 10);
        //шадоу под ректом
        RenderUtil.Render2D.drawShadow(posX, posY, width, headerHeight + hDynam + padding / 2f, 10,  new Color(16, 16, 16, 122).getRGB());
        //рект
        RenderUtil.Render2D.drawRoundedRect(posX, posY, width, hDynam + headerHeight + 2.5f, roundDegree - 1, new Color(16, 16, 16, 122).getRGB());

        Fonts.gilroyBold[14].drawCenteredString(matrixStack, ClientUtil.gradient("Персонал", firstColor, secondColor), posX + 22.5f, posY + 6.5f, -1);

        int index = 0;

        SmartScissor.push();
        SmartScissor.setFromComponentCoordinates(posX, posY, widthDynamic, headerHeight + hDynam + padding / 2f);
        if (!staffPlayers.isEmpty()) {
            for (StaffPlayer staff : staffPlayers) {
                String name = staff.getName();
                ITextComponent prefix = staff.getPrefix();
                String status = staff.getStatus().getString();

                Fonts.gilroyBold[13].drawString(matrixStack, prefix, posX + padding - 4, posY + headerHeight + padding + (index * offset) - 2, -1);
                Fonts.gilroyBold[13].drawString(matrixStack, name, posX + padding + Fonts.gilroyBold[12].getWidth(prefix.getString()) - 3, posY + headerHeight + padding + (index * offset) - 2, -1);
                Fonts.gilroyBold[13].drawCenteredString(matrixStack, status, posX + padding + 85, posY + headerHeight + padding + (index * offset) - 2, -1);
                nameWidth = Fonts.gilroyBold[13].getWidth(prefix.getString() + name + status);
                index++;
            }
        } else {
            nameWidth = 0;
        }
        SmartScissor.unset();
        SmartScissor.pop();

        activeStaff = index;
        staffList.setWidth(widthDynamic);
        staffList.setHeight(hDynam + headerHeight);
    }

    private String repairString(String input) {
        StringBuilder sb = new StringBuilder(input.length());
        for (char c : input.toCharArray()) {
            if (c >= 65281 && c <= 65374) {
                sb.append((char) (c - 65248));
            } else {
                sb.append(c);
            }
        }
        return sb.toString();
    }

    private class StaffPlayer {

        [USER=270918]@Getter[/USER]
        String name;
        [USER=270918]@Getter[/USER]
        ITextComponent prefix;
        [USER=270918]@Getter[/USER]
        Status status;

        private StaffPlayer(String name, ITextComponent prefix) {
            this.name = name;
            this.prefix = prefix;

            updateStatus();
        }

        private void updateStatus() {
            for (AbstractClientPlayerEntity player : mc.world.getPlayers()) {
                if (player.getNameClear().equals(name)) {
                    status = NEAR;
                    return;
                }
            }

            for (NetworkPlayerInfo info : mc.getConnection().getPlayerInfoMap()) {
                if (info.getGameProfile().getName().equals(name)) {
                    if (info.getGameType() == GameType.SPECTATOR) {
                        status = SPEC;
                        return;
                    }

                    status = NONE;
                    return;
                }
            }

            status = VANISHED;
        }
    }

    public enum Status {
        NONE(" §a[A]"),
        NEAR(" §e[N]"),
        SPEC(" §c[S]"),
        VANISHED(" §6[V]");

        [USER=270918]@Getter[/USER]
        final String string;

        Status(String string) {
            this.string = string;
        }
    }

    public Dragging events = Initilization.createDrag(this, "events", 213.0f, 8.0f + 100);


    /**
     * Выполняет рендер информации по типу координат на экране
     *
     * [USER=804731]@param[/USER] stack       Матрица для рендеринга.
     * [USER=804731]@param[/USER] renderEvent Обработчик типа EventRender
     */
    private void onInformationRender(final MatrixStack stack, final EventRender renderEvent) {
           float y = renderEvent.scaledResolution.scaledHeight() - Fonts.gilroyBold[15].getFontHeight() - (mc.currentScreen instanceof ChatScreen ? 8 * mc.gameSettings.guiScale : 0) - 1.5f;
          String pos = (int) mc.player.getPosX() + ", " + (int) mc.player.getPosY() + ", " + (int) mc.player.getPosZ();
          String posInHell = (int) mc.player.getPosX() / 8 + ", " + (int) mc.player.getPosY() + ", " + (int) mc.player.getPosZ() / 8;
          //глоу за задним фоном
          RenderUtil.Render2D.drawShadow(1, y - 5.5f, Fonts.viberclient[20].getWidth("c ") + Fonts.gilroyBold[15].getWidth(pos) + 4, 15, 14, new Color(16, 16, 16, 122).getRGB());
          //задний фон
          RenderUtil.Render2D.drawRoundedRect(1, y - 5.5f, Fonts.viberclient[20].getWidth("c ") + Fonts.gilroyBold[15].getWidth(pos) + 4, 15, 2, new Color(16, 16, 16, 122).getRGB());
          Fonts.viberclient[20].drawString(stack, ClientUtil.gradient("c ", ColorUtil.getColorStyle(0), ColorUtil.getColorStyle(90)), 4, y, -1);
          Fonts.gilroyBold[15].drawString(stack, pos, 2 + Fonts.viberclient[20].getWidth("c "), y, new Color(85, 255, 255, 166).getRGB());
          int xOffset = 8;
          //глоу за задним фоном
          RenderUtil.Render2D.drawShadow(Fonts.viberclient[20].getWidth("c ") + Fonts.gilroyBold[15].getWidth(pos) + 1 + xOffset, y - 5.5f, Fonts.viberclient[20].getWidth("c ") + Fonts.gilroyBold[15].getWidth(posInHell) + 4, 15, 14, new Color(16, 16, 16, 122).getRGB());
          //задний фон
          RenderUtil.Render2D.drawRoundedRect(Fonts.viberclient[20].getWidth("c ") + Fonts.gilroyBold[15].getWidth(pos) + 1 + xOffset, y - 5.5f, Fonts.viberclient[20].getWidth("c ") + Fonts.gilroyBold[15].getWidth(posInHell) + 4, 15, 2, new Color(16, 16, 16, 122).getRGB());
          Fonts.viberclient[20].drawString(stack, ClientUtil.gradient("c ", ColorUtil.getColorStyle(0), ColorUtil.getColorStyle(90)), Fonts.viberclient[20].getWidth("c ") + Fonts.gilroyBold[15].getWidth(pos) + 4 + xOffset, y, -1);
          Fonts.gilroyBold[15].drawString(stack, posInHell, Fonts.viberclient[20].getWidth("c ") + Fonts.gilroyBold[15].getWidth(pos) + 2 + Fonts.viberclient[20].getWidth("c ") + xOffset, y, new Color(255, 85, 85, 166).getRGB());



          xOffset = 878;
          //глоу за задним фоном
          RenderUtil.Render2D.drawShadow(xOffset + 40, y - 5.5f, 40, 15, 14, new Color(16, 16, 16, 122).getRGB());
          //задний фон
          RenderUtil.Render2D.drawRoundedRect(xOffset + 40, y - 5.5f, 40, 15, 2, new Color(16, 16, 16, 122).getRGB());
          Fonts.viberclient[20].drawString(stack, ClientUtil.gradient("b", ColorUtil.getColorStyle(0), ColorUtil.getColorStyle(90)), xOffset + 65, y, new Color(255, 85, 85, 166).getRGB());
          Fonts.gilroyBold[15].drawString(stack, String.format("%.1f", Math.abs(Math.hypot(mc.player.getPosX() - mc.player.prevPosX, mc.player.getPosZ() - mc.player.prevPosZ)) * 20), xOffset + 45, y, new Color(255, 255, 255, 166).getRGB());
    }

    /**
     * Выполняет рендер брони на экране
     *
     * [USER=804731]@param[/USER] renderEvent Обработчик типа EventRender
     *
     */
    public Dragging dragging = Initilization.createDrag(this, "ArmorHud", 350, 50);
    private void onArmorRender(final EventRender renderEvent) {
        float width = 100;
        float height = mc.player.getItemStackFromSlot(EquipmentSlotType.HEAD).isEmpty() && mc.player.getItemStackFromSlot(EquipmentSlotType.CHEST).isEmpty()  && mc.player.getItemStackFromSlot(EquipmentSlotType.LEGS).isEmpty()  && mc.player.getItemStackFromSlot(EquipmentSlotType.FEET).isEmpty()  ? 15 : 80;
        float x = dragging.getX();
        float y = dragging.getY();

        final MatrixStack matrixStack = renderEvent.matrixStack;

        RenderUtil.Render2D.drawShadow(x, y, width - 5, height, 10,  new Color(16, 16, 16, 122).getRGB());
        RenderUtil.Render2D.drawRoundedRect(x, y, width - 5, height, 3,  new Color(16, 16, 16, 122).getRGB());

        Fonts.gilroyBold[14].drawString(matrixStack, ClientUtil.gradient("Броня", ColorUtil.getColorStyle(0), ColorUtil.getColorStyle(90)), x + 5, y + 5, -1);

        int posX = (int) x + 3;
        int posY = (int) y + 63;

        for (ItemStack itemStack : mc.player.getArmorInventoryList()) {

            if (!itemStack.isEmpty()) {

                mc.getItemRenderer().renderItemAndEffectIntoGUI(itemStack, posX, posY);

                float damagePercentage = (itemStack.getDamage() * 100.0f) / itemStack.getMaxDamage();

                int red = (int) (255 * (damagePercentage / 100));
                int green = 255 - red;

                int barHeight2 = Math.round((45 * (100 - damagePercentage)) / 100);

                RenderUtil.Render2D.drawRoundedRect(posX + 20, posY + 6, 45, 3, 1, ColorUtil.rgba(15, 15, 15, 255));
                RenderUtil.Render2D.drawRoundedRect(posX + 20, posY + 6, barHeight2, 3, 1, ColorUtil.rgba(red, green, 0, 255));
                RenderUtil.Render2D.drawShadow(posX + 20, posY + 6, barHeight2, 3, 10,  ColorUtil.rgba(red, green, 0, 255),   ColorUtil.rgba(red, green, 0, 255),  ColorUtil.rgba(red, green, 0, 255) ,  ColorUtil.rgba(red, green, 0, 255));

                Fonts.gilroyBold[14].drawCenteredString(matrixStack, (100 - (itemStack.getDamage() * 100) / itemStack.getMaxDamage()) + "%", posX + width - 20, posY + 4, new Color(255, 255, 255, 166).getRGB());

            }

            posY -= 16;
        }

        width = 100;
        height = 76;
        dragging.setWidth(width);
        dragging.setHeight(height);
    }

    /**
     * Выполняет рендер эффектов на экране
     *
     * [USER=804731]@param[/USER] stack       Матрица для рендеринга.
     * [USER=804731]@param[/USER] renderEvent Обработчик типа EventRender
     */

    public Dragging potionStatus = Initilization.createDrag(this, "PotionStatus", 200, 50);
    private float hDynamic = 0;
    private int activePotions = 0;

    private void onPotionElementsRender(final MatrixStack matrixStack, final EventRender renderEvent) {
        float posX = potionStatus.getX();
        float posY = potionStatus.getY();

        int roundDegree = 4;
        int headerHeight = 14;
        int width = 115;
        int padding = 5;
        int offset = 10;

        int headerColor = new Color(30, 30, 30, 200).getRGB();
        int backgroundColor = new Color(40, 40, 40, 230).getRGB();

        int firstColor = ColorUtil.getColorStyle(0);
        int secondColor = ColorUtil.getColorStyle(90);

        float height = activePotions * offset;

        this.hDynamic = AnimationMath.fast(this.hDynamic, height, 10);
        //шадоу под ректом
        RenderUtil.Render2D.drawShadow(posX, posY, width, headerHeight + hDynamic + padding / 2f, 10,  new Color(16, 16, 16, 122).getRGB());
        //рект
        RenderUtil.Render2D.drawRoundedRect(posX, posY, width, hDynamic + headerHeight + 2.5f, roundDegree - 1, new Color(16, 16, 16, 122).getRGB());

        Fonts.gilroyBold[14].drawCenteredString(matrixStack, ClientUtil.gradient("Эффекты", firstColor, secondColor), potionStatus.getX() + 21, posY + 6.5f, firstColor);

        SmartScissor.push();
        SmartScissor.setFromComponentCoordinates(posX, posY, width, headerHeight + hDynamic + padding / 2f);
        int index = 0;

        for (EffectInstance p : mc.player.getActivePotionEffects()) {
            if (p.isShowIcon()) {

                String durationText = EffectUtils.getPotionDurationString(p, 1);
                float durationWidth = Fonts.gilroyBold[12].getWidth(durationText);
                int red = (int) (255 * (p.getDuration() / 1000));
                int green = 255 - red;

                //рект
                RenderUtil.Render2D.drawShadow(posX + padding + 58, posY + headerHeight + padding + (index * offset) - 2,Math.min(p.getDuration() / 100, 30), 4, 8, ColorUtil.rgba(green, red, 0, 255));
                RenderUtil.Render2D.drawRoundedRect(posX + padding + 58, posY + headerHeight + padding + (index * offset) - 2,30, 4, 1, new Color(0, 0, 0, 255).getRGB());
                RenderUtil.Render2D.drawRoundedRect(posX + padding + 58, posY + headerHeight + padding + (index * offset) - 2,Math.min(p.getDuration() / 100, 30), 4, 1, ColorUtil.rgba(green, red, 0, 255));
                Fonts.gilroyBold[13].drawString(matrixStack, I18n.format(p.getEffectName()), posX + padding, posY + headerHeight + padding + (index * offset) - 2,  new Color(255, 255, 255, 166).getRGB());
                Fonts.gilroyBold[13].drawString(matrixStack, durationText, posX + width - durationWidth - padding, posY + headerHeight + padding + (index * offset) - 2, new Color(255, 255, 255, 166).getRGB());

                index++;
            }
        }
        SmartScissor.unset();
        SmartScissor.pop();
        activePotions = index;

        potionStatus.setWidth(width);
        potionStatus.setHeight(activePotions * offset + headerHeight);
    }

    /**
     * Выполняет рендер логотипа чита
     *
     * [USER=804731]@param[/USER] stack Матрица для рендеринга.
     */
    private void onTitleRender(final MatrixStack stack) {
        //аддоны для показа времени
        LocalTime localTime = LocalTime.now();
        String time = String.format("%02d:%02d:%02d", localTime.getHour(), localTime.getMinute(), localTime.getSecond());
        // Координаты
        byte x = 3, y = 3;
        String point = "    |";
        //название клинта
        String addons = (HudUtil.serverIP() != "" ? HudUtil.serverIP() : "localhost") + "   " + time  + "   " + (!Managment.FUNCTION_MANAGER.nameProtect.isState()  ? mc.player.getName().getString() : "Protected") + "   FPS: " + mc.debugFPS;
        String name = "PASTA CLIENT   ";
        //ширина
        float titleWidth = Fonts.gilroyBold[16].getWidth(name) +  Fonts.gilroyBold[16].getWidth(addons) + 6;
        //высота
        float titleHeight = 15;

        //шадоу под ректом
        RenderUtil.Render2D.drawShadow(x, y, titleWidth, titleHeight, 10,  new Color(16, 16, 16, 122).getRGB());
        //рект
        RenderUtil.Render2D.drawRoundedRect(x, y, titleWidth, titleHeight, 3, new Color(16, 16, 16, 122).getRGB());
        //отрисовка текста
        Fonts.gilroyBold[16].drawString(stack, ClientUtil.gradient(name, ColorUtil.getColorStyle(0), ColorUtil.getColorStyle(90)), x + 3, y + 5, -1);
        //отрисовка текста
        Fonts.gilroyBold[16].drawString(stack, addons, x + Fonts.gilroyBold[16].getWidth(name) + 3, y + 5, -1);
        //отрисовка текста
        Fonts.gilroyBold[16].drawString(stack, point,  Fonts.gilroyBold[16].getWidth(name) + x - 12.4, y + 5, new Color(255, 255, 255, 89).getRGB());
        //отрисовка текста
        Fonts.gilroyBold[16].drawString(stack, point, Fonts.gilroyBold[16].getWidth(name) + x - 4.5 + Fonts.gilroyBold[16].getWidth((HudUtil.serverIP() != "" ? HudUtil.serverIP() : "localhost")), y + 5, new Color(255, 255, 255, 89).getRGB());
        //отрисовка текста
        Fonts.gilroyBold[16].drawString(stack, point, Fonts.gilroyBold[16].getWidth(name) + x + 3.5 + Fonts.gilroyBold[16].getWidth((HudUtil.serverIP() != "" ? HudUtil.serverIP() : "localhost") + time), y + 5, new Color(255, 255, 255, 89).getRGB());
        //отрисовка текста
        Fonts.gilroyBold[16].drawString(stack, point, Fonts.gilroyBold[16].getWidth(name) + x + 10.5 + Fonts.gilroyBold[16].getWidth((HudUtil.serverIP() != "" ? HudUtil.serverIP() : "localhost") + time + (!Managment.FUNCTION_MANAGER.nameProtect.isState()  ? mc.player.getName().getString() : "Protected")), y + 5, new Color(255, 255, 255, 89).getRGB());
    }

    List<Function> sortedFunctions = new ArrayList<>();
    TimerUtil delay = new TimerUtil();

    /**
     * Выполняет рендер списка из модулей
     *
     * [USER=804731]@param[/USER] stack Матрица для рендеринга.
     */

    float health = 0;
    public final Dragging targetHUD = Initilization.createDrag(this, "TargetHUD", 500, 50);
    private final Animation targetHudAnimation = new EaseBackIn(200, 1, 1.5f);
    private PlayerEntity target = null;
    private double scale = 0.0D;

    private void onRenderTargetHUD(final MatrixStack stack) {
        this.target = getTarget(this.target);
        this.targetHudAnimation.setDuration(300);
        this.scale = targetHudAnimation.getOutput();

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

        if (target == null) {
            return;
        }

        final String targetName = this.target.getName().getString();

        String substring = targetName.substring(0, Math.min(targetName.length(), 10));
        final float nameWidth = Fonts.gilroyBold[18].getWidth(substring);
        final float xPosition = this.targetHUD.getX();
        final float yPosition = this.targetHUD.getY();
        final float maxWidth = Math.max(nameWidth + 50, 120);
        final float maxHeight = 35;

        // Обновление значения здоровья с анимацией
        this.health = AnimationMath.fast(health, target.getHealth() / target.getMaxHealth(), 5);
        this.health = MathHelper.clamp(this.health, 0, 1);

        GlStateManager.pushMatrix();
        AnimationMath.sizeAnimation(xPosition + (maxWidth / 2), yPosition + (maxHeight / 2), scale);
        //глоу за задним фоном
        RenderUtil.Render2D.drawShadow(xPosition - 10, yPosition + 0.5f, maxWidth + 10, maxHeight, 10, new Color(16, 16, 16, 122).getRGB());
        //задний фон
        RenderUtil.Render2D.drawRoundedRect(xPosition - 10, yPosition + 0.5f, maxWidth+ 10, maxHeight, 2.5f, new Color(16, 16, 16, 122).getRGB());
        Fonts.viberclient[60].drawString(stack, ClientUtil.gradient("a", ColorUtil.getColorStyle(0), ColorUtil.getColorStyle(90)), xPosition - 6, yPosition + 6, -1);
        // Отрисовка головы
       // drawFace(xPosition + 4, yPosition + 4, 8F, 8F, 8F, 8F, 22, 22, 64F, 64F, (AbstractClientPlayerEntity) target);
        // Отрисовка кругового индикатора здоровья
        drawCircle(
                xPosition + maxWidth - 15,
                yPosition + maxHeight / 2,
                0,
                360,
                10,
                6,
                false,
                ColorUtil.rgba(26, 26, 26, 255)
        );

        drawCircle(
                xPosition + maxWidth - 15,
                yPosition + maxHeight / 2,
                0,
                health * 360 + 1,
                10,
                6,
                false,
                Managment.STYLE_MANAGER.getCurrentStyle()
        );
        //глоу
        RenderUtil.Render2D.drawRoundedRect(xPosition + 30, yPosition + 22, 10, 10, 2.5f, new Color(0, 0, 0, 61).getRGB());
        //задний фон
        RenderUtil.Render2D.drawRoundedRect(xPosition + 30, yPosition + 22, 10, 10, 2.5f, new Color(0, 0, 0, 120).getRGB());
        //глоу
        RenderUtil.Render2D.drawRoundedRect(xPosition + 30 + 10, yPosition + 22, 10, 10, 2.5f, new Color(0, 0, 0, 61).getRGB());
        //задний фон
        RenderUtil.Render2D.drawRoundedRect(xPosition + 30 + 10, yPosition + 22, 10, 10, 2.5f, new Color(0, 0, 0, 120).getRGB());
        //глоу
        RenderUtil.Render2D.drawRoundedRect(xPosition + 30 + 10 + 10, yPosition + 22, 10, 10, 2.5f, new Color(0, 0, 0, 61).getRGB());
        //задний фон
        RenderUtil.Render2D.drawRoundedRect(xPosition + 30 + 10 + 10, yPosition + 22, 10, 10, 2.5f, new Color(0, 0, 0, 120).getRGB());
        //глоу
        RenderUtil.Render2D.drawRoundedRect(xPosition + 30 + 10 + 10 + 10, yPosition + 22, 10, 10, 2.5f, new Color(0, 0, 0, 61).getRGB());
        //задний фон
        RenderUtil.Render2D.drawRoundedRect(xPosition + 30 + 10 + 10+ 10, yPosition + 22, 10, 10, 2.5f, new Color(0, 0, 0, 120).getRGB());
        //глоу
        RenderUtil.Render2D.drawRoundedRect(xPosition + 30 + 10 + 10 + 10 + 10, yPosition + 22, 10, 10, 2.5f, new Color(0, 0, 0, 61).getRGB());
        //задний фон
        RenderUtil.Render2D.drawRoundedRect(xPosition + 30 + 10 + 10+ 10 + 10, yPosition + 22, 10, 10, 2.5f, new Color(0, 0, 0, 120).getRGB());
        //глоу
        RenderUtil.Render2D.drawRoundedRect(xPosition + 30 + 10 + 10 + 10 + 10  + 10, yPosition + 22, 10, 10, 2.5f, new Color(0, 0, 0, 61).getRGB());
        //задний фон
        RenderUtil.Render2D.drawRoundedRect(xPosition + 30 + 10 + 10+ 10 + 10  + 10, yPosition + 22, 10, 10, 2.5f, new Color(0, 0, 0, 120).getRGB());
        drawItemStack(xPosition + 31, yPosition + 23, 10);


        Fonts.gilroyBold[18].drawString(stack, substring, xPosition + 30, yPosition + 6, -1);

        String healthValue = (int) MathUtil.round(this.health * 20 + target.getAbsorptionAmount(), 0.5f) + "";
        Fonts.gilroyBold[16].drawCenteredString(stack, "Здоровье: " + healthValue, xPosition + maxWidth - 62.5, yPosition + maxHeight / 2 - 2.2f, ColorUtil.rgba(255, 255, 255, 255));
        GlStateManager.popMatrix();
        this.targetHUD.setWidth(maxWidth);
        this.targetHUD.setHeight(maxHeight);
    }

    private void drawItemStack(float x, float y, float offset) {
        List<ItemStack> stackList = new ArrayList<>(Arrays.asList(target.getHeldItemMainhand(), target.getHeldItemOffhand()));
        stackList.addAll((Collection<? extends ItemStack>) target.getArmorInventoryList());

        final AtomicReference<Float> posX = new AtomicReference<>(x);

        stackList.stream()
                .filter(stack -> !stack.isEmpty())
                .forEach(stack -> HudUtil.drawItemStack(stack,
                        posX.getAndAccumulate(offset, Float::sum),
                        y,
                        false,
                        true, 0.5f));
    }


    private PlayerEntity getTarget(PlayerEntity nullTarget) {
        PlayerEntity target = nullTarget;

        if (Managment.FUNCTION_MANAGER.auraFunction.getTarget() instanceof PlayerEntity) {
            target = (PlayerEntity) Managment.FUNCTION_MANAGER.auraFunction.getTarget();
            targetHudAnimation.setDirection(Direction.FORWARDS);
        } else if (mc.currentScreen instanceof ChatScreen) {
            target = mc.player;
            targetHudAnimation.setDirection(Direction.FORWARDS);
        } else {
            targetHudAnimation.setDirection(Direction.BACKWARDS);
        }

        return target;
    }
}
Пожалуйста, авторизуйтесь для просмотра ссылки.
Опа на експу 3.1 щя перепишу
 
Начинающий
Статус
Оффлайн
Регистрация
13 Дек 2023
Сообщения
40
Реакции[?]
0
Поинты[?]
0
В худе много фич, делал сам, ну как сказать делал, переделывал эксп 2.0

Код от лучшего селф пастера:
package wtf.expensive.modules.impl.render;

import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import lombok.Getter;
import net.minecraft.client.entity.player.AbstractClientPlayerEntity;
import net.minecraft.client.gui.screen.ChatScreen;
import net.minecraft.client.network.play.NetworkPlayerInfo;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.EquipmentSlotType;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.potion.EffectInstance;
import net.minecraft.potion.EffectUtils;
import net.minecraft.scoreboard.ScorePlayerTeam;
import net.minecraft.scoreboard.Team;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Vector4f;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.world.GameType;
import org.joml.Vector2i;
import org.joml.Vector4i;
import wtf.expensive.Initilization;
import wtf.expensive.events.Event;
import wtf.expensive.events.impl.player.EventUpdate;
import wtf.expensive.events.impl.render.EventRender;
import wtf.expensive.managment.Managment;
import wtf.expensive.modules.Function;
import wtf.expensive.modules.FunctionAnnotation;
import wtf.expensive.modules.Type;
import wtf.expensive.modules.settings.imp.BooleanOption;
import wtf.expensive.modules.settings.imp.MultiBoxSetting;
import wtf.expensive.modules.settings.imp.SliderSetting;
import wtf.expensive.ui.midnight.StyleManager;
import wtf.expensive.util.ClientUtil;
import wtf.expensive.util.UserProfile;
import wtf.expensive.util.animations.Animation;
import wtf.expensive.util.animations.Direction;
import wtf.expensive.util.animations.impl.EaseBackIn;
import wtf.expensive.util.drag.Dragging;
import wtf.expensive.util.font.Fonts;
import wtf.expensive.util.font.styled.StyledFont;
import wtf.expensive.util.math.MathUtil;
import wtf.expensive.util.misc.HudUtil;
import wtf.expensive.util.misc.TimerUtil;
import wtf.expensive.util.render.ColorUtil;
import wtf.expensive.util.render.RenderUtil;
import wtf.expensive.util.render.SmartScissor;
import wtf.expensive.util.render.animation.AnimationMath;

import java.awt.*;
import java.time.LocalTime;
import java.util.*;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.atomic.AtomicReference;
import java.util.regex.Pattern;

import static wtf.expensive.modules.impl.render.HudFunction.Status.*;
import static wtf.expensive.util.render.ColorUtil.rgba;
import static wtf.expensive.util.render.RenderUtil.Render2D.*;


@FunctionAnnotation(name = "Hud", type = Type.Render)
public class HudFunction extends Function {

    public MultiBoxSetting elements = new MultiBoxSetting("Элементы",
            new BooleanOption("Логотип", true),
            new BooleanOption("Список модераторов", true),
            new BooleanOption("Список зелий", true),
            new BooleanOption("Уведомления", true),
            new BooleanOption("Таргет Худ", true),
            new BooleanOption("Бинды", true),
            new BooleanOption("Корды", true),
            new BooleanOption("Броня", true));

    public HudFunction() {
        addSettings(elements);
    }

    public final float offs = 0;

    @Override
    public void onEvent(final Event event) {
        if (event instanceof EventUpdate && elements.get(2)) {
            staffPlayers.clear();

            for (ScorePlayerTeam team : mc.world.getScoreboard().getTeams().stream().sorted(Comparator.comparing(Team::getName)).toList()) {

                String name = team.getMembershipCollection().toString();
                name = name.substring(1, name.length() - 1);

                if (namePattern.matcher(name).matches()) {
                    if (prefixMatches.matcher(repairString(team.getPrefix().getString().toLowerCase(Locale.ROOT))).matches() || Managment.STAFF_MANAGER.isStaff(name)) {
                        staffPlayers.add(new StaffPlayer(name, team.getPrefix()));
                    }
                    if (namePattern.matcher(name).matches()) {
                        boolean vanish = true;
                        for (NetworkPlayerInfo info : mc.getConnection().getPlayerInfoMap()) {
                            if (info.getGameProfile().getName().equals(name)) {
                                vanish = false;
                            }
                        }
                        if (vanish == true && !prefixMatches.matcher(repairString(team.getPrefix().getString().toLowerCase(Locale.ROOT))).matches()|| Managment.STAFF_MANAGER.isStaff(name) && mc.getCurrentServerData() != null && mc.getCurrentServerData().serverIP.contains("reallyworld")) {
                            staffPlayers.add(new StaffPlayer(" " + name, ITextComponent.getTextComponentOrEmpty(" ")));
                        }
                    }
                }
            }
        }
        if (event instanceof EventRender eventRender) {
            if (eventRender.isRender2D()) {
                handleRender(eventRender);
            }
        }
    }

    /**
     * Обработчик события типа EventRender
     *
     * [USER=804731]@param[/USER] renderEvent Событие для рендера
     */

//    Renderable waterMark = RenderableFactory.create(RenderableType.WATERMARK, 3, 5);
//    Renderable info = RenderableFactory.create(RenderableType.INFO, 4, 0);

    private void handleRender(EventRender renderEvent) {
        final MatrixStack stack = renderEvent.matrixStack;

        if (elements.get(0)) {
            onTitleRender(stack);
        }
        if (elements.get(1)) {
            onStaffListRender(stack, renderEvent);
        }
        if (elements.get(2)) {
            onPotionElementsRender(stack, renderEvent);
        }
        if (elements.get(4)) {
            onRenderTargetHUD(stack);
        }
        if (elements.get(5)) {
            onKeyBindsRender(stack);
        }
        if (elements.get(6)) {
            onInformationRender(stack, renderEvent);
        }
        if (elements.get(7)) {
            onArmorRender(renderEvent);
        }
    }

    public Dragging keyBinds = Initilization.createDrag(this, "KeyBinds", 200, 50);
    private float heightDynamic = 0;
    private int activeModules = 0;

    private void onKeyBindsRender(MatrixStack stack) {
        float posX = keyBinds.getX();
        float posY = keyBinds.getY();

        int roundDegree = 4;
        int headerHeight = 14;
        int width = 100;
        int padding = 5;
        int offset = 10;

        int headerColor = new Color(30, 30, 30, 200).getRGB();
        int backgroundColor = new Color(40, 40, 40, 230).getRGB();

        int firstColor = ColorUtil.getColorStyle(0);
        int secondColor = ColorUtil.getColorStyle(90);

        float height = activeModules * offset;

        this.heightDynamic = AnimationMath.fast(this.heightDynamic, height, 10);
        //шадоу под ректом
        RenderUtil.Render2D.drawShadow(posX, posY, width, headerHeight + heightDynamic + padding / 2f, 10,  new Color(16, 16, 16, 122).getRGB());
        //рект
        RenderUtil.Render2D.drawRoundedRect(posX, posY, width, heightDynamic + headerHeight + 2.5f, roundDegree - 1, new Color(16, 16, 16, 122).getRGB());
        Fonts.gilroyBold[14].drawCenteredString(stack, ClientUtil.gradient("Бинды", firstColor, secondColor), keyBinds.getX() + 17, posY + 6.5f, firstColor);

        SmartScissor.push();
        SmartScissor.setFromComponentCoordinates(posX, posY, width, headerHeight + heightDynamic + padding / 2f);
        int index = 0;

        for (Function f : Managment.FUNCTION_MANAGER.getFunctions()) {
            if (f.bind != 0 && f.state) {

                String text = ClientUtil.getKey(f.bind);

                if (text == null) {
                    continue;
                }


                String bindText = "[" + text.toUpperCase() + "]";
                float bindWidth = Fonts.gilroyBold[12].getWidth(bindText);

                Fonts.gilroyBold[13].drawString(stack, f.name, posX + padding, posY + headerHeight + padding + (index * offset) - 2, -1);
                Fonts.gilroyBold[13].drawString(stack, bindText, posX + width - bindWidth - padding, posY + headerHeight + padding + (index * offset) - 2, -1);

                index++;
            }
        }
        SmartScissor.unset();
        SmartScissor.pop();
        activeModules = index;

        keyBinds.setWidth(width);
        keyBinds.setHeight(activeModules * offset + headerHeight);
    }

    public CopyOnWriteArrayList<net.minecraft.util.text.TextComponent> components = new CopyOnWriteArrayList<>();

    private final Pattern namePattern = Pattern.compile("^\\w{3,16}$");
    private final Pattern prefixMatches = Pattern.compile(".[I](mod|der|adm|help|wne|мод|хелп|помо|адм|владе|отри|таф|taf|curat|курато|dev|раз|supp|сапп|yt|ютуб).[/I]");

    public Dragging staffList = Initilization.createDrag(this, "StaffList", 400, 50);

    private int activeStaff = 0;
    private float hDynam = 0;
    private float widthDynamic = 0;
    private float nameWidth = 0;
    List<StaffPlayer> staffPlayers = new ArrayList<>();

    private void onStaffListRender(MatrixStack matrixStack, EventRender render) {
        float posX = staffList.getX();
        float posY = staffList.getY();

        int roundDegree = 4;
        int headerHeight = 14;
        float width = (nameWidth != 0) ? (100) : 100;
        int padding = 5;
        int offset = 10;

        int firstColor = ColorUtil.getColorStyle(0);
        int secondColor = ColorUtil.getColorStyle(90);
        float height = activeStaff * offset;

        this.hDynam = AnimationMath.fast(this.hDynam, height, 10);
        this.widthDynamic = AnimationMath.fast(this.widthDynamic, width, 10);
        //шадоу под ректом
        RenderUtil.Render2D.drawShadow(posX, posY, width, headerHeight + hDynam + padding / 2f, 10,  new Color(16, 16, 16, 122).getRGB());
        //рект
        RenderUtil.Render2D.drawRoundedRect(posX, posY, width, hDynam + headerHeight + 2.5f, roundDegree - 1, new Color(16, 16, 16, 122).getRGB());

        Fonts.gilroyBold[14].drawCenteredString(matrixStack, ClientUtil.gradient("Персонал", firstColor, secondColor), posX + 22.5f, posY + 6.5f, -1);

        int index = 0;

        SmartScissor.push();
        SmartScissor.setFromComponentCoordinates(posX, posY, widthDynamic, headerHeight + hDynam + padding / 2f);
        if (!staffPlayers.isEmpty()) {
            for (StaffPlayer staff : staffPlayers) {
                String name = staff.getName();
                ITextComponent prefix = staff.getPrefix();
                String status = staff.getStatus().getString();

                Fonts.gilroyBold[13].drawString(matrixStack, prefix, posX + padding - 4, posY + headerHeight + padding + (index * offset) - 2, -1);
                Fonts.gilroyBold[13].drawString(matrixStack, name, posX + padding + Fonts.gilroyBold[12].getWidth(prefix.getString()) - 3, posY + headerHeight + padding + (index * offset) - 2, -1);
                Fonts.gilroyBold[13].drawCenteredString(matrixStack, status, posX + padding + 85, posY + headerHeight + padding + (index * offset) - 2, -1);
                nameWidth = Fonts.gilroyBold[13].getWidth(prefix.getString() + name + status);
                index++;
            }
        } else {
            nameWidth = 0;
        }
        SmartScissor.unset();
        SmartScissor.pop();

        activeStaff = index;
        staffList.setWidth(widthDynamic);
        staffList.setHeight(hDynam + headerHeight);
    }

    private String repairString(String input) {
        StringBuilder sb = new StringBuilder(input.length());
        for (char c : input.toCharArray()) {
            if (c >= 65281 && c <= 65374) {
                sb.append((char) (c - 65248));
            } else {
                sb.append(c);
            }
        }
        return sb.toString();
    }

    private class StaffPlayer {

        [USER=270918]@Getter[/USER]
        String name;
        [USER=270918]@Getter[/USER]
        ITextComponent prefix;
        [USER=270918]@Getter[/USER]
        Status status;

        private StaffPlayer(String name, ITextComponent prefix) {
            this.name = name;
            this.prefix = prefix;

            updateStatus();
        }

        private void updateStatus() {
            for (AbstractClientPlayerEntity player : mc.world.getPlayers()) {
                if (player.getNameClear().equals(name)) {
                    status = NEAR;
                    return;
                }
            }

            for (NetworkPlayerInfo info : mc.getConnection().getPlayerInfoMap()) {
                if (info.getGameProfile().getName().equals(name)) {
                    if (info.getGameType() == GameType.SPECTATOR) {
                        status = SPEC;
                        return;
                    }

                    status = NONE;
                    return;
                }
            }

            status = VANISHED;
        }
    }

    public enum Status {
        NONE(" §a[A]"),
        NEAR(" §e[N]"),
        SPEC(" §c[S]"),
        VANISHED(" §6[V]");

        [USER=270918]@Getter[/USER]
        final String string;

        Status(String string) {
            this.string = string;
        }
    }

    public Dragging events = Initilization.createDrag(this, "events", 213.0f, 8.0f + 100);


    /**
     * Выполняет рендер информации по типу координат на экране
     *
     * [USER=804731]@param[/USER] stack       Матрица для рендеринга.
     * [USER=804731]@param[/USER] renderEvent Обработчик типа EventRender
     */
    private void onInformationRender(final MatrixStack stack, final EventRender renderEvent) {
           float y = renderEvent.scaledResolution.scaledHeight() - Fonts.gilroyBold[15].getFontHeight() - (mc.currentScreen instanceof ChatScreen ? 8 * mc.gameSettings.guiScale : 0) - 1.5f;
          String pos = (int) mc.player.getPosX() + ", " + (int) mc.player.getPosY() + ", " + (int) mc.player.getPosZ();
          String posInHell = (int) mc.player.getPosX() / 8 + ", " + (int) mc.player.getPosY() + ", " + (int) mc.player.getPosZ() / 8;
          //глоу за задним фоном
          RenderUtil.Render2D.drawShadow(1, y - 5.5f, Fonts.viberclient[20].getWidth("c ") + Fonts.gilroyBold[15].getWidth(pos) + 4, 15, 14, new Color(16, 16, 16, 122).getRGB());
          //задний фон
          RenderUtil.Render2D.drawRoundedRect(1, y - 5.5f, Fonts.viberclient[20].getWidth("c ") + Fonts.gilroyBold[15].getWidth(pos) + 4, 15, 2, new Color(16, 16, 16, 122).getRGB());
          Fonts.viberclient[20].drawString(stack, ClientUtil.gradient("c ", ColorUtil.getColorStyle(0), ColorUtil.getColorStyle(90)), 4, y, -1);
          Fonts.gilroyBold[15].drawString(stack, pos, 2 + Fonts.viberclient[20].getWidth("c "), y, new Color(85, 255, 255, 166).getRGB());
          int xOffset = 8;
          //глоу за задним фоном
          RenderUtil.Render2D.drawShadow(Fonts.viberclient[20].getWidth("c ") + Fonts.gilroyBold[15].getWidth(pos) + 1 + xOffset, y - 5.5f, Fonts.viberclient[20].getWidth("c ") + Fonts.gilroyBold[15].getWidth(posInHell) + 4, 15, 14, new Color(16, 16, 16, 122).getRGB());
          //задний фон
          RenderUtil.Render2D.drawRoundedRect(Fonts.viberclient[20].getWidth("c ") + Fonts.gilroyBold[15].getWidth(pos) + 1 + xOffset, y - 5.5f, Fonts.viberclient[20].getWidth("c ") + Fonts.gilroyBold[15].getWidth(posInHell) + 4, 15, 2, new Color(16, 16, 16, 122).getRGB());
          Fonts.viberclient[20].drawString(stack, ClientUtil.gradient("c ", ColorUtil.getColorStyle(0), ColorUtil.getColorStyle(90)), Fonts.viberclient[20].getWidth("c ") + Fonts.gilroyBold[15].getWidth(pos) + 4 + xOffset, y, -1);
          Fonts.gilroyBold[15].drawString(stack, posInHell, Fonts.viberclient[20].getWidth("c ") + Fonts.gilroyBold[15].getWidth(pos) + 2 + Fonts.viberclient[20].getWidth("c ") + xOffset, y, new Color(255, 85, 85, 166).getRGB());



          xOffset = 878;
          //глоу за задним фоном
          RenderUtil.Render2D.drawShadow(xOffset + 40, y - 5.5f, 40, 15, 14, new Color(16, 16, 16, 122).getRGB());
          //задний фон
          RenderUtil.Render2D.drawRoundedRect(xOffset + 40, y - 5.5f, 40, 15, 2, new Color(16, 16, 16, 122).getRGB());
          Fonts.viberclient[20].drawString(stack, ClientUtil.gradient("b", ColorUtil.getColorStyle(0), ColorUtil.getColorStyle(90)), xOffset + 65, y, new Color(255, 85, 85, 166).getRGB());
          Fonts.gilroyBold[15].drawString(stack, String.format("%.1f", Math.abs(Math.hypot(mc.player.getPosX() - mc.player.prevPosX, mc.player.getPosZ() - mc.player.prevPosZ)) * 20), xOffset + 45, y, new Color(255, 255, 255, 166).getRGB());
    }

    /**
     * Выполняет рендер брони на экране
     *
     * [USER=804731]@param[/USER] renderEvent Обработчик типа EventRender
     *
     */
    public Dragging dragging = Initilization.createDrag(this, "ArmorHud", 350, 50);
    private void onArmorRender(final EventRender renderEvent) {
        float width = 100;
        float height = mc.player.getItemStackFromSlot(EquipmentSlotType.HEAD).isEmpty() && mc.player.getItemStackFromSlot(EquipmentSlotType.CHEST).isEmpty()  && mc.player.getItemStackFromSlot(EquipmentSlotType.LEGS).isEmpty()  && mc.player.getItemStackFromSlot(EquipmentSlotType.FEET).isEmpty()  ? 15 : 80;
        float x = dragging.getX();
        float y = dragging.getY();

        final MatrixStack matrixStack = renderEvent.matrixStack;

        RenderUtil.Render2D.drawShadow(x, y, width - 5, height, 10,  new Color(16, 16, 16, 122).getRGB());
        RenderUtil.Render2D.drawRoundedRect(x, y, width - 5, height, 3,  new Color(16, 16, 16, 122).getRGB());

        Fonts.gilroyBold[14].drawString(matrixStack, ClientUtil.gradient("Броня", ColorUtil.getColorStyle(0), ColorUtil.getColorStyle(90)), x + 5, y + 5, -1);

        int posX = (int) x + 3;
        int posY = (int) y + 63;

        for (ItemStack itemStack : mc.player.getArmorInventoryList()) {

            if (!itemStack.isEmpty()) {

                mc.getItemRenderer().renderItemAndEffectIntoGUI(itemStack, posX, posY);

                float damagePercentage = (itemStack.getDamage() * 100.0f) / itemStack.getMaxDamage();

                int red = (int) (255 * (damagePercentage / 100));
                int green = 255 - red;

                int barHeight2 = Math.round((45 * (100 - damagePercentage)) / 100);

                RenderUtil.Render2D.drawRoundedRect(posX + 20, posY + 6, 45, 3, 1, ColorUtil.rgba(15, 15, 15, 255));
                RenderUtil.Render2D.drawRoundedRect(posX + 20, posY + 6, barHeight2, 3, 1, ColorUtil.rgba(red, green, 0, 255));
                RenderUtil.Render2D.drawShadow(posX + 20, posY + 6, barHeight2, 3, 10,  ColorUtil.rgba(red, green, 0, 255),   ColorUtil.rgba(red, green, 0, 255),  ColorUtil.rgba(red, green, 0, 255) ,  ColorUtil.rgba(red, green, 0, 255));

                Fonts.gilroyBold[14].drawCenteredString(matrixStack, (100 - (itemStack.getDamage() * 100) / itemStack.getMaxDamage()) + "%", posX + width - 20, posY + 4, new Color(255, 255, 255, 166).getRGB());

            }

            posY -= 16;
        }

        width = 100;
        height = 76;
        dragging.setWidth(width);
        dragging.setHeight(height);
    }

    /**
     * Выполняет рендер эффектов на экране
     *
     * [USER=804731]@param[/USER] stack       Матрица для рендеринга.
     * [USER=804731]@param[/USER] renderEvent Обработчик типа EventRender
     */

    public Dragging potionStatus = Initilization.createDrag(this, "PotionStatus", 200, 50);
    private float hDynamic = 0;
    private int activePotions = 0;

    private void onPotionElementsRender(final MatrixStack matrixStack, final EventRender renderEvent) {
        float posX = potionStatus.getX();
        float posY = potionStatus.getY();

        int roundDegree = 4;
        int headerHeight = 14;
        int width = 115;
        int padding = 5;
        int offset = 10;

        int headerColor = new Color(30, 30, 30, 200).getRGB();
        int backgroundColor = new Color(40, 40, 40, 230).getRGB();

        int firstColor = ColorUtil.getColorStyle(0);
        int secondColor = ColorUtil.getColorStyle(90);

        float height = activePotions * offset;

        this.hDynamic = AnimationMath.fast(this.hDynamic, height, 10);
        //шадоу под ректом
        RenderUtil.Render2D.drawShadow(posX, posY, width, headerHeight + hDynamic + padding / 2f, 10,  new Color(16, 16, 16, 122).getRGB());
        //рект
        RenderUtil.Render2D.drawRoundedRect(posX, posY, width, hDynamic + headerHeight + 2.5f, roundDegree - 1, new Color(16, 16, 16, 122).getRGB());

        Fonts.gilroyBold[14].drawCenteredString(matrixStack, ClientUtil.gradient("Эффекты", firstColor, secondColor), potionStatus.getX() + 21, posY + 6.5f, firstColor);

        SmartScissor.push();
        SmartScissor.setFromComponentCoordinates(posX, posY, width, headerHeight + hDynamic + padding / 2f);
        int index = 0;

        for (EffectInstance p : mc.player.getActivePotionEffects()) {
            if (p.isShowIcon()) {

                String durationText = EffectUtils.getPotionDurationString(p, 1);
                float durationWidth = Fonts.gilroyBold[12].getWidth(durationText);
                int red = (int) (255 * (p.getDuration() / 1000));
                int green = 255 - red;

                //рект
                RenderUtil.Render2D.drawShadow(posX + padding + 58, posY + headerHeight + padding + (index * offset) - 2,Math.min(p.getDuration() / 100, 30), 4, 8, ColorUtil.rgba(green, red, 0, 255));
                RenderUtil.Render2D.drawRoundedRect(posX + padding + 58, posY + headerHeight + padding + (index * offset) - 2,30, 4, 1, new Color(0, 0, 0, 255).getRGB());
                RenderUtil.Render2D.drawRoundedRect(posX + padding + 58, posY + headerHeight + padding + (index * offset) - 2,Math.min(p.getDuration() / 100, 30), 4, 1, ColorUtil.rgba(green, red, 0, 255));
                Fonts.gilroyBold[13].drawString(matrixStack, I18n.format(p.getEffectName()), posX + padding, posY + headerHeight + padding + (index * offset) - 2,  new Color(255, 255, 255, 166).getRGB());
                Fonts.gilroyBold[13].drawString(matrixStack, durationText, posX + width - durationWidth - padding, posY + headerHeight + padding + (index * offset) - 2, new Color(255, 255, 255, 166).getRGB());

                index++;
            }
        }
        SmartScissor.unset();
        SmartScissor.pop();
        activePotions = index;

        potionStatus.setWidth(width);
        potionStatus.setHeight(activePotions * offset + headerHeight);
    }

    /**
     * Выполняет рендер логотипа чита
     *
     * [USER=804731]@param[/USER] stack Матрица для рендеринга.
     */
    private void onTitleRender(final MatrixStack stack) {
        //аддоны для показа времени
        LocalTime localTime = LocalTime.now();
        String time = String.format("%02d:%02d:%02d", localTime.getHour(), localTime.getMinute(), localTime.getSecond());
        // Координаты
        byte x = 3, y = 3;
        String point = "    |";
        //название клинта
        String addons = (HudUtil.serverIP() != "" ? HudUtil.serverIP() : "localhost") + "   " + time  + "   " + (!Managment.FUNCTION_MANAGER.nameProtect.isState()  ? mc.player.getName().getString() : "Protected") + "   FPS: " + mc.debugFPS;
        String name = "PASTA CLIENT   ";
        //ширина
        float titleWidth = Fonts.gilroyBold[16].getWidth(name) +  Fonts.gilroyBold[16].getWidth(addons) + 6;
        //высота
        float titleHeight = 15;

        //шадоу под ректом
        RenderUtil.Render2D.drawShadow(x, y, titleWidth, titleHeight, 10,  new Color(16, 16, 16, 122).getRGB());
        //рект
        RenderUtil.Render2D.drawRoundedRect(x, y, titleWidth, titleHeight, 3, new Color(16, 16, 16, 122).getRGB());
        //отрисовка текста
        Fonts.gilroyBold[16].drawString(stack, ClientUtil.gradient(name, ColorUtil.getColorStyle(0), ColorUtil.getColorStyle(90)), x + 3, y + 5, -1);
        //отрисовка текста
        Fonts.gilroyBold[16].drawString(stack, addons, x + Fonts.gilroyBold[16].getWidth(name) + 3, y + 5, -1);
        //отрисовка текста
        Fonts.gilroyBold[16].drawString(stack, point,  Fonts.gilroyBold[16].getWidth(name) + x - 12.4, y + 5, new Color(255, 255, 255, 89).getRGB());
        //отрисовка текста
        Fonts.gilroyBold[16].drawString(stack, point, Fonts.gilroyBold[16].getWidth(name) + x - 4.5 + Fonts.gilroyBold[16].getWidth((HudUtil.serverIP() != "" ? HudUtil.serverIP() : "localhost")), y + 5, new Color(255, 255, 255, 89).getRGB());
        //отрисовка текста
        Fonts.gilroyBold[16].drawString(stack, point, Fonts.gilroyBold[16].getWidth(name) + x + 3.5 + Fonts.gilroyBold[16].getWidth((HudUtil.serverIP() != "" ? HudUtil.serverIP() : "localhost") + time), y + 5, new Color(255, 255, 255, 89).getRGB());
        //отрисовка текста
        Fonts.gilroyBold[16].drawString(stack, point, Fonts.gilroyBold[16].getWidth(name) + x + 10.5 + Fonts.gilroyBold[16].getWidth((HudUtil.serverIP() != "" ? HudUtil.serverIP() : "localhost") + time + (!Managment.FUNCTION_MANAGER.nameProtect.isState()  ? mc.player.getName().getString() : "Protected")), y + 5, new Color(255, 255, 255, 89).getRGB());
    }

    List<Function> sortedFunctions = new ArrayList<>();
    TimerUtil delay = new TimerUtil();

    /**
     * Выполняет рендер списка из модулей
     *
     * [USER=804731]@param[/USER] stack Матрица для рендеринга.
     */

    float health = 0;
    public final Dragging targetHUD = Initilization.createDrag(this, "TargetHUD", 500, 50);
    private final Animation targetHudAnimation = new EaseBackIn(200, 1, 1.5f);
    private PlayerEntity target = null;
    private double scale = 0.0D;

    private void onRenderTargetHUD(final MatrixStack stack) {
        this.target = getTarget(this.target);
        this.targetHudAnimation.setDuration(300);
        this.scale = targetHudAnimation.getOutput();

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

        if (target == null) {
            return;
        }

        final String targetName = this.target.getName().getString();

        String substring = targetName.substring(0, Math.min(targetName.length(), 10));
        final float nameWidth = Fonts.gilroyBold[18].getWidth(substring);
        final float xPosition = this.targetHUD.getX();
        final float yPosition = this.targetHUD.getY();
        final float maxWidth = Math.max(nameWidth + 50, 120);
        final float maxHeight = 35;

        // Обновление значения здоровья с анимацией
        this.health = AnimationMath.fast(health, target.getHealth() / target.getMaxHealth(), 5);
        this.health = MathHelper.clamp(this.health, 0, 1);

        GlStateManager.pushMatrix();
        AnimationMath.sizeAnimation(xPosition + (maxWidth / 2), yPosition + (maxHeight / 2), scale);
        //глоу за задним фоном
        RenderUtil.Render2D.drawShadow(xPosition - 10, yPosition + 0.5f, maxWidth + 10, maxHeight, 10, new Color(16, 16, 16, 122).getRGB());
        //задний фон
        RenderUtil.Render2D.drawRoundedRect(xPosition - 10, yPosition + 0.5f, maxWidth+ 10, maxHeight, 2.5f, new Color(16, 16, 16, 122).getRGB());
        Fonts.viberclient[60].drawString(stack, ClientUtil.gradient("a", ColorUtil.getColorStyle(0), ColorUtil.getColorStyle(90)), xPosition - 6, yPosition + 6, -1);
        // Отрисовка головы
       // drawFace(xPosition + 4, yPosition + 4, 8F, 8F, 8F, 8F, 22, 22, 64F, 64F, (AbstractClientPlayerEntity) target);
        // Отрисовка кругового индикатора здоровья
        drawCircle(
                xPosition + maxWidth - 15,
                yPosition + maxHeight / 2,
                0,
                360,
                10,
                6,
                false,
                ColorUtil.rgba(26, 26, 26, 255)
        );

        drawCircle(
                xPosition + maxWidth - 15,
                yPosition + maxHeight / 2,
                0,
                health * 360 + 1,
                10,
                6,
                false,
                Managment.STYLE_MANAGER.getCurrentStyle()
        );
        //глоу
        RenderUtil.Render2D.drawRoundedRect(xPosition + 30, yPosition + 22, 10, 10, 2.5f, new Color(0, 0, 0, 61).getRGB());
        //задний фон
        RenderUtil.Render2D.drawRoundedRect(xPosition + 30, yPosition + 22, 10, 10, 2.5f, new Color(0, 0, 0, 120).getRGB());
        //глоу
        RenderUtil.Render2D.drawRoundedRect(xPosition + 30 + 10, yPosition + 22, 10, 10, 2.5f, new Color(0, 0, 0, 61).getRGB());
        //задний фон
        RenderUtil.Render2D.drawRoundedRect(xPosition + 30 + 10, yPosition + 22, 10, 10, 2.5f, new Color(0, 0, 0, 120).getRGB());
        //глоу
        RenderUtil.Render2D.drawRoundedRect(xPosition + 30 + 10 + 10, yPosition + 22, 10, 10, 2.5f, new Color(0, 0, 0, 61).getRGB());
        //задний фон
        RenderUtil.Render2D.drawRoundedRect(xPosition + 30 + 10 + 10, yPosition + 22, 10, 10, 2.5f, new Color(0, 0, 0, 120).getRGB());
        //глоу
        RenderUtil.Render2D.drawRoundedRect(xPosition + 30 + 10 + 10 + 10, yPosition + 22, 10, 10, 2.5f, new Color(0, 0, 0, 61).getRGB());
        //задний фон
        RenderUtil.Render2D.drawRoundedRect(xPosition + 30 + 10 + 10+ 10, yPosition + 22, 10, 10, 2.5f, new Color(0, 0, 0, 120).getRGB());
        //глоу
        RenderUtil.Render2D.drawRoundedRect(xPosition + 30 + 10 + 10 + 10 + 10, yPosition + 22, 10, 10, 2.5f, new Color(0, 0, 0, 61).getRGB());
        //задний фон
        RenderUtil.Render2D.drawRoundedRect(xPosition + 30 + 10 + 10+ 10 + 10, yPosition + 22, 10, 10, 2.5f, new Color(0, 0, 0, 120).getRGB());
        //глоу
        RenderUtil.Render2D.drawRoundedRect(xPosition + 30 + 10 + 10 + 10 + 10  + 10, yPosition + 22, 10, 10, 2.5f, new Color(0, 0, 0, 61).getRGB());
        //задний фон
        RenderUtil.Render2D.drawRoundedRect(xPosition + 30 + 10 + 10+ 10 + 10  + 10, yPosition + 22, 10, 10, 2.5f, new Color(0, 0, 0, 120).getRGB());
        drawItemStack(xPosition + 31, yPosition + 23, 10);


        Fonts.gilroyBold[18].drawString(stack, substring, xPosition + 30, yPosition + 6, -1);

        String healthValue = (int) MathUtil.round(this.health * 20 + target.getAbsorptionAmount(), 0.5f) + "";
        Fonts.gilroyBold[16].drawCenteredString(stack, "Здоровье: " + healthValue, xPosition + maxWidth - 62.5, yPosition + maxHeight / 2 - 2.2f, ColorUtil.rgba(255, 255, 255, 255));
        GlStateManager.popMatrix();
        this.targetHUD.setWidth(maxWidth);
        this.targetHUD.setHeight(maxHeight);
    }

    private void drawItemStack(float x, float y, float offset) {
        List<ItemStack> stackList = new ArrayList<>(Arrays.asList(target.getHeldItemMainhand(), target.getHeldItemOffhand()));
        stackList.addAll((Collection<? extends ItemStack>) target.getArmorInventoryList());

        final AtomicReference<Float> posX = new AtomicReference<>(x);

        stackList.stream()
                .filter(stack -> !stack.isEmpty())
                .forEach(stack -> HudUtil.drawItemStack(stack,
                        posX.getAndAccumulate(offset, Float::sum),
                        y,
                        false,
                        true, 0.5f));
    }


    private PlayerEntity getTarget(PlayerEntity nullTarget) {
        PlayerEntity target = nullTarget;

        if (Managment.FUNCTION_MANAGER.auraFunction.getTarget() instanceof PlayerEntity) {
            target = (PlayerEntity) Managment.FUNCTION_MANAGER.auraFunction.getTarget();
            targetHudAnimation.setDirection(Direction.FORWARDS);
        } else if (mc.currentScreen instanceof ChatScreen) {
            target = mc.player;
            targetHudAnimation.setDirection(Direction.FORWARDS);
        } else {
            targetHudAnimation.setDirection(Direction.BACKWARDS);
        }

        return target;
    }
}
Пожалуйста, авторизуйтесь для просмотра ссылки.
где шрифт viberclient а еще когда открываю чат крашит майн
 
Сверху Снизу