Selfcode hud | expensive 2.0

Начинающий
Начинающий
Статус
Оффлайн
Регистрация
28 Ноя 2024
Сообщения
3
Реакции
0
делал худ на орбите, переделал худ, так же сливаю худ фришки, знаю легко это сделать но на премке жёстче
ss -
Пожалуйста, авторизуйтесь для просмотра ссылки.

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

hud:
Expand Collapse Copy
package hilz.orbita.modules.impl.render;



import com.mojang.blaze3d.matrix.MatrixStack;

import com.mojang.blaze3d.platform.GlStateManager;

import hilz.orbita.Initilization;

import hilz.orbita.events.Event;

import hilz.orbita.events.impl.render.EventRender;

import hilz.orbita.managment.Managment;

import hilz.orbita.modules.Function;

import hilz.orbita.modules.FunctionAnnotation;

import hilz.orbita.modules.FunctionManager;

import hilz.orbita.modules.Type;

import hilz.orbita.modules.settings.imp.BooleanOption;

import hilz.orbita.modules.settings.imp.MultiBoxSetting;

import hilz.orbita.modules.settings.imp.SliderSetting;

import hilz.orbita.util.ClientUtil;

import hilz.orbita.util.IMinecraft;

import hilz.orbita.util.animations.Animation;

import hilz.orbita.util.animations.Direction;

import hilz.orbita.util.animations.impl.EaseBackIn;

import hilz.orbita.util.drag.Dragging;

import hilz.orbita.util.font.Fonts;

import hilz.orbita.util.font.styled.StyledFont;

import hilz.orbita.util.misc.HudUtil;

import hilz.orbita.util.render.ColorUtil;

import hilz.orbita.util.render.RenderUtil;

import hilz.orbita.util.render.animation.AnimationMath;

import net.minecraft.client.Minecraft;

import net.minecraft.client.entity.player.AbstractClientPlayerEntity;

import net.minecraft.client.gui.DisplayEffectsScreen;

import net.minecraft.client.gui.screen.ChatScreen;

import net.minecraft.client.network.play.NetworkPlayerInfo;

import net.minecraft.client.renderer.texture.PotionSpriteUploader;

import net.minecraft.client.renderer.texture.TextureAtlasSprite;

import net.minecraft.client.resources.I18n;

import net.minecraft.entity.LivingEntity;

import net.minecraft.entity.player.PlayerEntity;

import net.minecraft.item.ItemStack;

import net.minecraft.item.Items;

import net.minecraft.potion.Effect;

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 java.awt.*;

import java.util.ArrayList;

import java.util.Arrays;

import java.util.Collection;

import java.util.Comparator;

import java.util.concurrent.atomic.AtomicReference;

import java.util.regex.Pattern;



@FunctionAnnotation(name="Display", type= Type.Render)

public class Hud

        extends Function {

    public static MultiBoxSetting elements = new MultiBoxSetting("Elements",

            new BooleanOption("Active Target", true),

            new BooleanOption("Timer Indicator", true),

            new BooleanOption("Logo", true),

            new BooleanOption("Coordinates", true),

            new BooleanOption("Speed", true),

            new BooleanOption("Effects", true),

            new BooleanOption("Active Binds", true),

            new BooleanOption("Active Staff", true),

            new BooleanOption("Armor", true),

            new BooleanOption("Cooldown", true));



    private final SliderSetting offsetEffects = new SliderSetting("\u0420\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432", 24.0f, 23.0f, 26.0f, 0.1f).setVisible(() -> elements.get(5));

    final Dragging TargetHUD = Initilization.createDrag(this, "TargetHUD7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging TimerHUD = Initilization.createDrag(this, "TimerHUD7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging Logo = Initilization.createDrag(this, "Logo7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging Coords = Initilization.createDrag(this, "Coords7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging BPS = Initilization.createDrag(this, "BPS7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging Effects = Initilization.createDrag(this, "Effects7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging KeyBinds = Initilization.createDrag(this, "KeyBinds7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging StaffActive = Initilization.createDrag(this, "StaffActive7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging Cooldown = Initilization.createDrag(this, "Cooldown7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    int activeStaff = 0;

    private final Pattern namePattern = Pattern.compile("^\\w{3,16}$");

    int activeBind = 0;

    float heightAnimation = 0.0f;

    private float perc;

    private final Animation targetHudAnimation = new EaseBackIn(270, 1.0, 1.5f);

    private double scale = 0.0;

    private LivingEntity target = null;

    float health = 0.0f;

    float absorpation = 0.0f;



    public Hud() {

        this.addSettings(elements, this.offsetEffects);

    }



    [USER=1367676]@override[/USER]

    public void onEvent(Event event) {

        if (event instanceof EventRender) {

            EventRender eventRender = (EventRender)event;

            MatrixStack stack = eventRender.matrixStack;

            if (elements.get(0)) {

                this.TargetHUD(stack);

            }

            if (elements.get(1)) {

                this.TimerHUD(stack);

            }

            if (elements.get(2)) {

                this.Logo(stack);

            }

            if (elements.get(3)) {

                this.Coords(stack);

            }

            if (elements.get(4)) {

                this.BPS(stack);

            }

            if (elements.get(5)) {

                this.Effects(stack);

            }

            if (elements.get(6)) {

                this.KeyBinds(stack);

            }

            if (elements.get(7)) {

                this.StaffActive(stack);

            }

            if (elements.get(8)) {

                this.ArmorHUD(stack, eventRender);

            }

        }

    }



    public void ArmorHUD(MatrixStack stack, EventRender eventRender) {

        int off;

        int count = 0;

        for (int i = 0; i < Hud.mc.player.inventory.getSizeInventory(); ++i) {

            ItemStack s = Hud.mc.player.inventory.getStackInSlot(i);

            if (s.getItem() != Items.TOTEM_OF_UNDYING) continue;

            ++count;

        }

        float xPos = (float)eventRender.scaledResolution.scaledWidth() / 2.0f;

        float yPos = eventRender.scaledResolution.scaledHeight();

        boolean totemInInv = Hud.mc.player.inventory.mainInventory.stream().map(ItemStack::getItem).toList().contains(Items.TOTEM_OF_UNDYING);

        int n = off = totemInInv ? 5 : 0;

        if (Hud.mc.player.isCreative()) {

            yPos += 17.0f;

        }

        for (ItemStack s : Hud.mc.player.inventory.armorInventory) {

            ESPFunction.drawItemStack(s, xPos - (float)off + 74.0f * ((float)Hud.mc.gameSettings.guiScale / 2.0f), yPos - 56.0f * ((float)Hud.mc.gameSettings.guiScale / 2.0f), null, false);

            off += 15;

        }

        if (totemInInv) {

            ESPFunction.drawItemStack(new ItemStack(Items.TOTEM_OF_UNDYING), xPos - (float)off + 73.0f * ((float)Hud.mc.gameSettings.guiScale / 2.0f), yPos - 56.0f * ((float)Hud.mc.gameSettings.guiScale / 2.0f), String.valueOf(count), false);

        }

    }



    public void StaffActive(MatrixStack stack) {

        float x = this.StaffActive.getX();

        float y = this.StaffActive.getY();

        float offset = 9.0f;

        float height2 = 20.5f;

        float width2 = 100.0f;

        height2 += offset * (float)this.activeStaff - 4.0f;

        float xStaff = x + 26.0f;

        if (this.activeStaff == 0) {

            height2 -= 1.5f;

            width2 -= 25.0f;

            xStaff -= 12.5f;

        }



        RenderUtil.Render2D.drawRoundedRect(x,y,width2,height2,3.5f,ColorUtil.rgba(27, 25, 41, 255));

        RenderUtil.Render2D.drawShadow(x,y,width2 + 5,15,19, ColorUtil.getColorStyle(255));

        StyledFont small1 = Fonts.sfbold[15];

        small1.drawString(stack, "Staff List", (double)xStaff - 23.0f, (double)(y + 5.0f), new Color(255, 255, 255, 255).getRGB());

        int i = 0;

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

            String name = team.getMembershipCollection().toString();

            if (!this.namePattern.matcher(name = name.substring(1, name.length() - 1)).matches()) continue;

            boolean vanish = true;

            boolean near = false;

            boolean active = false;

            for (AbstractClientPlayerEntity player : Hud.mc.world.getPlayers()) {

                if (!player.getNameClear().equals(name)) continue;

                near = true;

            }

            for (NetworkPlayerInfo info : mc.getConnection().getPlayerInfoMap()) {

                if (!info.getGameProfile().getName().equals(name)) continue;

                vanish = false;

                if (near) continue;

                active = true;

            }

            if (!vanish && !Managment.STAFF_MANAGER.isStaff(name)) continue;

            String Name2 = name.substring(0, Math.min(name.length(), 10));

            StyledFont small = Fonts.sfbold[13];

            StyledFont small2 = Fonts.sfbold[14];

            float yText = y + 17.0f;

            small2.drawString(stack, Name2, (double)(x + 4.0f), (double)yText, new Color(255, 255, 255, 255).getRGB());

            if (vanish) {

                small.drawString(stack, "Spectator", (double)(x + 63.5f), (double)yText, new Color(231, 52, 52, 255).getRGB());

            } else if (active) {

                small.drawString(stack, "Online", (double)(x + 74f), (double)yText, new Color(116, 236, 114, 255).getRGB());

            } else if (near) {

                small.drawString(stack, "Near", (double)(x + 80.8f), (double)yText, new Color(255, 251, 0, 255).getRGB());

            }

            y += offset;

            ++i;

        }

        this.activeStaff = i;

        this.StaffActive.setWidth(width2);

        this.StaffActive.setHeight(height2);

    }



    public void KeyBinds(MatrixStack stack) {

        float x = this.KeyBinds.getX();

        float y = this.KeyBinds.getY();

        float offset = 10f;

        float height2 = 20.0f;

        float width2 = 75.0f;

        height2 += offset * (float)this.activeBind - 5.0f;

        if (this.activeBind == 0) {

            height2 -= 1.0f;

        }

        RenderUtil.Render2D.drawRoundedCorner(x, y, width2, this.heightAnimation, 3.5f, ColorUtil.rgba(27, 25, 41, 255));

        RenderUtil.Render2D.drawShadow(x,y,width2 + 5,15,19, ColorUtil.rgba(27, 25, 41, 222));

        StyledFont small1 = Fonts.sfbold[15];

        small1.drawString(stack, "Hotkeys", (x + 5.0f), (y + 5.0f), new Color(255, 255, 255, 255).getRGB());

        int i = 0;

        for (Function f : Managment.FUNCTION_MANAGER.getFunctions()) {

            String text;

            if (f.bind == 0 || !f.state || (text = ClientUtil.getKey(f.bind)) == null) continue;

            StyledFont small = Fonts.sfbold[13];

            String bindText = text.toUpperCase();

            float yText = y + 17.0f;

            RenderUtil.SmartScissor.push();

            RenderUtil.SmartScissor.setFromComponentCoordinates(x, y, width2, this.heightAnimation);

            small.drawString(stack, f.name, (x + 4.0f), yText, new Color(255, 255, 255, 255).getRGB());

            small.drawString(stack, "On", (x + 62.0f), yText, new Color(255, 255, 255, 255).getRGB());

            RenderUtil.SmartScissor.unset();

            RenderUtil.SmartScissor.pop();

            y += offset;

            ++i;

        }

        this.heightAnimation = AnimationMath.fast(this.heightAnimation, height2, 11.0f);

        this.activeBind = i;

        this.KeyBinds.setWidth(width2);

        this.KeyBinds.setHeight(height2);

    }



    public void Effects(MatrixStack stack) {

        float x = 3;

        float y = 40;

        float offset = this.offsetEffects.getValue().floatValue();

        float height2 = 21.3f;

        StyledFont small = Fonts.msSemiBold[13];

        int counterEffect = 0;

        for (EffectInstance effectInstance : Hud.mc.player.getActivePotionEffects()) {

            String levelpotion = String.valueOf(effectInstance.getAmplifier() + 1);

            float textWidthBonus = 27.3f;

            if (levelpotion.contains("1")) {

                levelpotion = "";

                textWidthBonus -= 5.0f;

            }

            String durationText = EffectUtils.getPotionDurationString(effectInstance, 1.0f);

            String text = I18n.format(effectInstance.getEffectName(), new Object[0]);

            float textWidth = small.getWidth(text + effectInstance.getAmplifier() + levelpotion) + textWidthBonus - 0.6f;

            RenderUtil.Render2D.drawRoundedCorner(x, y, textWidth, height2, 3.0f, ColorUtil.rgba(27, 25, 41, 255));

            small.drawString(stack, text + " " + levelpotion, (double)(x + 22.3f), (double)(y + 5.5f), new Color(255, 255, 255, 255).getRGB());

            small.drawString(stack, durationText, (double)(x + 22.3f), (double)(y + 13.5f), new Color(255, 255, 255, 255).getRGB());

            PotionSpriteUploader potionspriteuploader = mc.getPotionSpriteUploader();

            Effect effect = effectInstance.getPotion();

            TextureAtlasSprite textureatlassprite = potionspriteuploader.getSprite(effect);

            mc.getTextureManager().bindTexture(textureatlassprite.getAtlasTexture().getTextureLocation());

            DisplayEffectsScreen.blit(stack, (int)(x + 2.0f), (int)y + 2, 10, 18, 18, textureatlassprite);

            y += offset;

            ++counterEffect;

            this.Effects.setWidth(textWidth);

        }

        float setHeight = offset / 8.0f * (float)counterEffect;

        this.Effects.setHeight(height2 * (float)counterEffect + setHeight);

    }



    public void BPS(MatrixStack stack) {

        float x = 3;

        float y = 507;

        float height2 = 15.0f;

        StyledFont small = Fonts.msSemiBold[14];

        String text = "Speed: " + String.format("%.2f", Math.hypot(mc.player.getPosX() - mc.player.prevPosX, mc.player.getPosZ() - mc.player.prevPosZ) * 20.0);

        float textWidth = small.getWidth(text) + 8.5f;

        RenderUtil.Render2D.drawRoundedCorner(x, y, textWidth, height2, 3.0f, ColorUtil.rgba(27, 25, 41, 255));

        RenderUtil.Render2D.drawShadow(x,y,textWidth + 5,15,19, ColorUtil.getColorStyle(255));

        small.drawString(stack, text, (x + 4.5f), (double)y + 6.3, new Color(255, 255, 255, 255).getRGB());

        this.BPS.setWidth(textWidth);

        this.BPS.setHeight(height2);

    }



    public void Coords(MatrixStack stack) {

        float x = 3;

        float y = 524;

        float height2 = 15.0f;

        StyledFont small = Fonts.msSemiBold[14];

        int X = (int)Hud.mc.player.getPosX();

        int Y = (int)Hud.mc.player.getPosY();

        int Z2 = (int)Hud.mc.player.getPosZ();

        String text = "Coords: X: " + X + " Y: " + Y + " Z: " + Z2;

        float textWidth = small.getWidth(text) + 8.5f;

        RenderUtil.Render2D.drawRoundedCorner(x, y, textWidth, height2, 3.0f, new Color(27,25,41,255).getRGB());

        RenderUtil.Render2D.drawShadow(x,y,textWidth + 5,15,19, ColorUtil.getColorStyle(255));

        small.drawString(stack, text, (x + 4.5f), (y + 6.0f), new Color(255, 255, 255, 255).getRGB());

        this.Coords.setWidth(textWidth);

        this.Coords.setHeight(height2);

    }



    public void Logo(MatrixStack stack) {

        float x = 3;

        float y = 3;

        float height2 = 17.0f;



        String text = "" + HudUtil.serverIP();

        String fps = "" + Minecraft.debugFPS;

        String tit = "starside free";

        float textWidth = Fonts.sfbold[18].getWidth(text) + 12;

        RenderUtil.Render2D.drawRoundedCorner(x, y, textWidth, height2, 3.5f, new Color(27,25,41,255).getRGB());

        RenderUtil.Render2D.drawShadow(x,y,textWidth + 5,15,19, ColorUtil.rgba(27, 25, 41, 222));

        RenderUtil.Render2D.drawRoundedCorner(x + 0, y + 18, textWidth, height2, 3.5f, new Color(27,25,41,255).getRGB());

        RenderUtil.Render2D.drawShadow(x,y,textWidth + 5,15,19, ColorUtil.rgba(27, 25, 41, 222));

        RenderUtil.Render2D.drawRoundedCorner(x + 438f, y + 1.0f, textWidth, height2, 3.5f, new Color(27,25,41,255).getRGB());

        RenderUtil.Render2D.drawShadow(x + 438f,y + 1.0f,textWidth + 5.0f,15,19, ColorUtil.rgba(27, 25, 41, 222));

        Fonts.sfbold[18].drawString(stack, "" + HudUtil.serverIP(), x + 3.0f, y + 5.5f, new Color(255, 255, 255, 255).getRGB());

        Fonts.sfbold[18].drawString(stack, "StarSide Free" , x + 450.0f, y + 5.5f, new Color(255, 255, 255, 255).getRGB());

        Fonts.sfbold[18].drawString(stack, "fps " + Minecraft.debugFPS + " | " + "ping " + HudUtil.calculatePing(), x + 3.0f, y + 23f, new Color(255, 255, 255, 255).getRGB());

        this.Logo.setWidth(textWidth);

        this.Logo.setHeight(height2);

    }



    public void TimerHUD(MatrixStack stack) {

        float x = this.TimerHUD.getX();

        float y = this.TimerHUD.getY();

        float width2 = 71.0f;

        float height2 = 25.0f;

        float quotient = Managment.FUNCTION_MANAGER.timerFunction.maxViolation / Managment.FUNCTION_MANAGER.timerFunction.timerAmount.getValue().floatValue();

        float minimumValue = Math.min(Managment.FUNCTION_MANAGER.timerFunction.getViolation(), quotient);

        this.perc = AnimationMath.lerp(this.perc, (quotient - minimumValue) / quotient, 7.0f);

        String text = (int)(this.perc * 100.0f) + "%";

        RenderUtil.Render2D.drawRoundedCorner(x, y, width2, height2, 3, new Color(0, 0, 0, 195).getRGB());

        RenderUtil.Render2D.drawRoundedCorner(x + 5.0f, y + 14.0f, 61.0f, 8.0f, 0.0f, new Color(23, 23, 23, 196).getRGB());

        RenderUtil.Render2D.drawRoundedCorner(x + 5.0f, y + 14.0f, 61.0f * this.perc, 8.0f, 3.0f, ColorUtil.getColorStyle(0.0f));

        Fonts.msSemiBold[16].drawString(stack, "Timer ", (double)(x + 23.5f), (double)(y + 7.4f), new Color(255, 255, 255, 255).getRGB());

        if (this.perc * 100.0f < 10.0f) {

//            Fonts.msSemiBold[13].drawString(stack, text, (double)(x + 55.0f), (double)(y + 7.4f), new Color(255, 255, 255, 255).getRGB());

        } else if (this.perc * 100.0f == 100.0f) {

//            Fonts.msSemiBold[13].drawString(stack, text, (double)(x + 49.5f), (double)(y + 7.4f), new Color(255, 255, 255, 255).getRGB());

        } else {

//            Fonts.msSemiBold[13].drawString(stack, text, (double)(x + 51.5f), (double)(y + 7.4f), new Color(255, 255, 255, 255).getRGB());

        }

        this.TimerHUD.setWidth(width2);

        this.TimerHUD.setHeight(height2);

    }



    public void TargetHUD(MatrixStack stack) {

        float x = this.TargetHUD.getX();

        float y = this.TargetHUD.getY();

        float width2 = 115.0f;

        float height2 = 50.0f;

        float widthFace = 50.0f;

        this.target = this.getTarget(this.target);

        this.targetHudAnimation.setDuration(280);

        this.scale = this.targetHudAnimation.getOutput();

        if (this.scale == 0.0) {

            this.target = null;

        }

        if (this.target == null) {

            return;

        }

        GlStateManager.pushMatrix();

        AnimationMath.sizeAnimation(x + width2 / 2.0f, y + 15.0f, this.scale);

        RenderUtil.Render2D.drawRoundedCorner(x, y, width2 - 5, height2, 3.0f, ColorUtil.rgba(27, 25, 41, 255));

        RenderUtil.Render2D.drawShadow(x,y,width2 + 5,15,19, ColorUtil.getColorStyle(255));

        if (this.target instanceof PlayerEntity) {

            RenderUtil.Render2D.drawFace(x + 2.5f, y + 4, 8.0f, 8.0f, 8.0f, 8.0f, widthFace - 20, height2 - 20, 64.0f, 64.0f, (AbstractClientPlayerEntity)this.target);

        }

        float xHP = x + widthFace + 3.8f;

        float yHP = y + 21.3f;

        float widthHP = 52.0f;

        this.health = AnimationMath.fast(this.health, this.target.getHealth() / this.target.getMaxHealth(), 6.0f);

        this.health = MathHelper.clamp(this.health, 0.0f, 1.0f);

        this.absorpation = AnimationMath.fast(this.absorpation, this.target.getAbsorptionAmount() / this.target.getMaxHealth(), 6.0f);

        this.absorpation = MathHelper.clamp(this.absorpation, 0.0f, 1.0f);

        RenderUtil.Render2D.drawRoundedCorner(xHP - 52, yHP + 17, 106.0f * this.health, 9f, 1f, ColorUtil.getColorStyle(0.0f));

        RenderUtil.Render2D.drawShadow(x,y,width2 + 5,15,19, ColorUtil.getColorStyle(255));

        RenderUtil.Render2D.drawRoundedCorner(xHP - 52, yHP + 17, 106.0f * this.absorpation, 9f, 1f, new Color(222, 211, 14, 255).getRGB());

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

        RenderUtil.SmartScissor.push();

        RenderUtil.SmartScissor.setFromComponentCoordinates(x, y, width2 - 6.0f, height2);

        Fonts.msSemiBold[16].drawString(stack, targetName, (double)xHP - 5, (double)(yHP - 17.3f), new Color(255, 255, 255, 255).getRGB());

        RenderUtil.SmartScissor.unset();

        RenderUtil.SmartScissor.pop();

        String HP = String.valueOf(this.target.getHealth() + this.target.getAbsorptionAmount());

        String StringHP = HP.substring(0, Math.min(HP.length(), 4));

        if (this.target.getHealth() + this.target.getAbsorptionAmount() < 10.0f) {

            StringHP = HP.substring(0, Math.min(HP.length(), 3));

        }

        Fonts.msSemiBold[14].drawString(stack, "Health: " + StringHP, (double)xHP - 20, (double)(yHP + 8.5f), new Color(255, 255, 255, 255).getRGB());

        this.drawItemStack(x + 35, y + 13.0f, 10.5f, 0.7f);

        GlStateManager.popMatrix();

        this.TargetHUD.setWidth(width2);

        this.TargetHUD.setHeight(height2);

    }



    private void drawItemStack(float x, float y, float offset, float scaleValue) {

        ArrayList<ItemStack> stackList = new ArrayList<ItemStack>(Arrays.asList(this.target.getHeldItemMainhand(), this.target.getHeldItemOffhand()));

        stackList.addAll((Collection)this.target.getArmorInventoryList());

        AtomicReference<Float> posX = new AtomicReference<Float>(Float.valueOf(x));

        stackList.stream().filter(stack -> !stack.isEmpty()).forEach(stack -> HudUtil.drawItemStack(stack, posX.getAndAccumulate(Float.valueOf(offset), Float::sum).floatValue(), y, true, true, scaleValue));

    }



    private LivingEntity getTarget(LivingEntity nullTarget) {

        LivingEntity target = nullTarget;

        FunctionManager functionManager = Managment.FUNCTION_MANAGER;

        if (functionManager.auraNew.getTarget() instanceof LivingEntity) {

            FunctionManager functionManager2 = Managment.FUNCTION_MANAGER;

            target = functionManager2.auraNew.getTarget();

            this.targetHudAnimation.setDirection(Direction.FORWARDS);

        } else if (IMinecraft.mc.currentScreen instanceof ChatScreen) {

            target = IMinecraft.mc.player;

            this.targetHudAnimation.setDirection(Direction.FORWARDS);

        } else {

            this.targetHudAnimation.setDirection(Direction.BACKWARDS);

        }

        return target;

    }
 
Последнее редактирование:
делал худ на орбите, переделал худ, так же сливаю худ фришки, знаю легко это сделать но на премке жёстче
ss -
Пожалуйста, авторизуйтесь для просмотра ссылки.

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

hud:
Expand Collapse Copy
package hilz.orbita.modules.impl.render;



import com.mojang.blaze3d.matrix.MatrixStack;

import com.mojang.blaze3d.platform.GlStateManager;

import hilz.orbita.Initilization;

import hilz.orbita.events.Event;

import hilz.orbita.events.impl.render.EventRender;

import hilz.orbita.managment.Managment;

import hilz.orbita.modules.Function;

import hilz.orbita.modules.FunctionAnnotation;

import hilz.orbita.modules.FunctionManager;

import hilz.orbita.modules.Type;

import hilz.orbita.modules.settings.imp.BooleanOption;

import hilz.orbita.modules.settings.imp.MultiBoxSetting;

import hilz.orbita.modules.settings.imp.SliderSetting;

import hilz.orbita.util.ClientUtil;

import hilz.orbita.util.IMinecraft;

import hilz.orbita.util.animations.Animation;

import hilz.orbita.util.animations.Direction;

import hilz.orbita.util.animations.impl.EaseBackIn;

import hilz.orbita.util.drag.Dragging;

import hilz.orbita.util.font.Fonts;

import hilz.orbita.util.font.styled.StyledFont;

import hilz.orbita.util.misc.HudUtil;

import hilz.orbita.util.render.ColorUtil;

import hilz.orbita.util.render.RenderUtil;

import hilz.orbita.util.render.animation.AnimationMath;

import net.minecraft.client.Minecraft;

import net.minecraft.client.entity.player.AbstractClientPlayerEntity;

import net.minecraft.client.gui.DisplayEffectsScreen;

import net.minecraft.client.gui.screen.ChatScreen;

import net.minecraft.client.network.play.NetworkPlayerInfo;

import net.minecraft.client.renderer.texture.PotionSpriteUploader;

import net.minecraft.client.renderer.texture.TextureAtlasSprite;

import net.minecraft.client.resources.I18n;

import net.minecraft.entity.LivingEntity;

import net.minecraft.entity.player.PlayerEntity;

import net.minecraft.item.ItemStack;

import net.minecraft.item.Items;

import net.minecraft.potion.Effect;

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 java.awt.*;

import java.util.ArrayList;

import java.util.Arrays;

import java.util.Collection;

import java.util.Comparator;

import java.util.concurrent.atomic.AtomicReference;

import java.util.regex.Pattern;



@FunctionAnnotation(name="Display", type= Type.Render)

public class Hud

        extends Function {

    public static MultiBoxSetting elements = new MultiBoxSetting("Elements",

            new BooleanOption("Active Target", true),

            new BooleanOption("Timer Indicator", true),

            new BooleanOption("Logo", true),

            new BooleanOption("Coordinates", true),

            new BooleanOption("Speed", true),

            new BooleanOption("Effects", true),

            new BooleanOption("Active Binds", true),

            new BooleanOption("Active Staff", true),

            new BooleanOption("Armor", true),

            new BooleanOption("Cooldown", true));



    private final SliderSetting offsetEffects = new SliderSetting("\u0420\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432", 24.0f, 23.0f, 26.0f, 0.1f).setVisible(() -> elements.get(5));

    final Dragging TargetHUD = Initilization.createDrag(this, "TargetHUD7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging TimerHUD = Initilization.createDrag(this, "TimerHUD7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging Logo = Initilization.createDrag(this, "Logo7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging Coords = Initilization.createDrag(this, "Coords7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging BPS = Initilization.createDrag(this, "BPS7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging Effects = Initilization.createDrag(this, "Effects7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging KeyBinds = Initilization.createDrag(this, "KeyBinds7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging StaffActive = Initilization.createDrag(this, "StaffActive7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging Cooldown = Initilization.createDrag(this, "Cooldown7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    int activeStaff = 0;

    private final Pattern namePattern = Pattern.compile("^\\w{3,16}$");

    int activeBind = 0;

    float heightAnimation = 0.0f;

    private float perc;

    private final Animation targetHudAnimation = new EaseBackIn(270, 1.0, 1.5f);

    private double scale = 0.0;

    private LivingEntity target = null;

    float health = 0.0f;

    float absorpation = 0.0f;



    public Hud() {

        this.addSettings(elements, this.offsetEffects);

    }



    [USER=1367676]@override[/USER]

    public void onEvent(Event event) {

        if (event instanceof EventRender) {

            EventRender eventRender = (EventRender)event;

            MatrixStack stack = eventRender.matrixStack;

            if (elements.get(0)) {

                this.TargetHUD(stack);

            }

            if (elements.get(1)) {

                this.TimerHUD(stack);

            }

            if (elements.get(2)) {

                this.Logo(stack);

            }

            if (elements.get(3)) {

                this.Coords(stack);

            }

            if (elements.get(4)) {

                this.BPS(stack);

            }

            if (elements.get(5)) {

                this.Effects(stack);

            }

            if (elements.get(6)) {

                this.KeyBinds(stack);

            }

            if (elements.get(7)) {

                this.StaffActive(stack);

            }

            if (elements.get(8)) {

                this.ArmorHUD(stack, eventRender);

            }

        }

    }



    public void ArmorHUD(MatrixStack stack, EventRender eventRender) {

        int off;

        int count = 0;

        for (int i = 0; i < Hud.mc.player.inventory.getSizeInventory(); ++i) {

            ItemStack s = Hud.mc.player.inventory.getStackInSlot(i);

            if (s.getItem() != Items.TOTEM_OF_UNDYING) continue;

            ++count;

        }

        float xPos = (float)eventRender.scaledResolution.scaledWidth() / 2.0f;

        float yPos = eventRender.scaledResolution.scaledHeight();

        boolean totemInInv = Hud.mc.player.inventory.mainInventory.stream().map(ItemStack::getItem).toList().contains(Items.TOTEM_OF_UNDYING);

        int n = off = totemInInv ? 5 : 0;

        if (Hud.mc.player.isCreative()) {

            yPos += 17.0f;

        }

        for (ItemStack s : Hud.mc.player.inventory.armorInventory) {

            ESPFunction.drawItemStack(s, xPos - (float)off + 74.0f * ((float)Hud.mc.gameSettings.guiScale / 2.0f), yPos - 56.0f * ((float)Hud.mc.gameSettings.guiScale / 2.0f), null, false);

            off += 15;

        }

        if (totemInInv) {

            ESPFunction.drawItemStack(new ItemStack(Items.TOTEM_OF_UNDYING), xPos - (float)off + 73.0f * ((float)Hud.mc.gameSettings.guiScale / 2.0f), yPos - 56.0f * ((float)Hud.mc.gameSettings.guiScale / 2.0f), String.valueOf(count), false);

        }

    }



    public void StaffActive(MatrixStack stack) {

        float x = this.StaffActive.getX();

        float y = this.StaffActive.getY();

        float offset = 9.0f;

        float height2 = 20.5f;

        float width2 = 100.0f;

        height2 += offset * (float)this.activeStaff - 4.0f;

        float xStaff = x + 26.0f;

        if (this.activeStaff == 0) {

            height2 -= 1.5f;

            width2 -= 25.0f;

            xStaff -= 12.5f;

        }



        RenderUtil.Render2D.drawRoundedRect(x,y,width2,height2,3.5f,ColorUtil.rgba(27, 25, 41, 255));

        RenderUtil.Render2D.drawShadow(x,y,width2 + 5,15,19, ColorUtil.getColorStyle(255));

        StyledFont small1 = Fonts.sfbold[15];

        small1.drawString(stack, "Staff List", (double)xStaff - 23.0f, (double)(y + 5.0f), new Color(255, 255, 255, 255).getRGB());

        int i = 0;

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

            String name = team.getMembershipCollection().toString();

            if (!this.namePattern.matcher(name = name.substring(1, name.length() - 1)).matches()) continue;

            boolean vanish = true;

            boolean near = false;

            boolean active = false;

            for (AbstractClientPlayerEntity player : Hud.mc.world.getPlayers()) {

                if (!player.getNameClear().equals(name)) continue;

                near = true;

            }

            for (NetworkPlayerInfo info : mc.getConnection().getPlayerInfoMap()) {

                if (!info.getGameProfile().getName().equals(name)) continue;

                vanish = false;

                if (near) continue;

                active = true;

            }

            if (!vanish && !Managment.STAFF_MANAGER.isStaff(name)) continue;

            String Name2 = name.substring(0, Math.min(name.length(), 10));

            StyledFont small = Fonts.sfbold[13];

            StyledFont small2 = Fonts.sfbold[14];

            float yText = y + 17.0f;

            small2.drawString(stack, Name2, (double)(x + 4.0f), (double)yText, new Color(255, 255, 255, 255).getRGB());

            if (vanish) {

                small.drawString(stack, "Spectator", (double)(x + 63.5f), (double)yText, new Color(231, 52, 52, 255).getRGB());

            } else if (active) {

                small.drawString(stack, "Online", (double)(x + 74f), (double)yText, new Color(116, 236, 114, 255).getRGB());

            } else if (near) {

                small.drawString(stack, "Near", (double)(x + 80.8f), (double)yText, new Color(255, 251, 0, 255).getRGB());

            }

            y += offset;

            ++i;

        }

        this.activeStaff = i;

        this.StaffActive.setWidth(width2);

        this.StaffActive.setHeight(height2);

    }



    public void KeyBinds(MatrixStack stack) {

        float x = this.KeyBinds.getX();

        float y = this.KeyBinds.getY();

        float offset = 10f;

        float height2 = 20.0f;

        float width2 = 75.0f;

        height2 += offset * (float)this.activeBind - 5.0f;

        if (this.activeBind == 0) {

            height2 -= 1.0f;

        }

        RenderUtil.Render2D.drawRoundedCorner(x, y, width2, this.heightAnimation, 3.5f, ColorUtil.rgba(27, 25, 41, 255));

        RenderUtil.Render2D.drawShadow(x,y,width2 + 5,15,19, ColorUtil.rgba(27, 25, 41, 222));

        StyledFont small1 = Fonts.sfbold[15];

        small1.drawString(stack, "Hotkeys", (x + 5.0f), (y + 5.0f), new Color(255, 255, 255, 255).getRGB());

        int i = 0;

        for (Function f : Managment.FUNCTION_MANAGER.getFunctions()) {

            String text;

            if (f.bind == 0 || !f.state || (text = ClientUtil.getKey(f.bind)) == null) continue;

            StyledFont small = Fonts.sfbold[13];

            String bindText = text.toUpperCase();

            float yText = y + 17.0f;

            RenderUtil.SmartScissor.push();

            RenderUtil.SmartScissor.setFromComponentCoordinates(x, y, width2, this.heightAnimation);

            small.drawString(stack, f.name, (x + 4.0f), yText, new Color(255, 255, 255, 255).getRGB());

            small.drawString(stack, "On", (x + 62.0f), yText, new Color(255, 255, 255, 255).getRGB());

            RenderUtil.SmartScissor.unset();

            RenderUtil.SmartScissor.pop();

            y += offset;

            ++i;

        }

        this.heightAnimation = AnimationMath.fast(this.heightAnimation, height2, 11.0f);

        this.activeBind = i;

        this.KeyBinds.setWidth(width2);

        this.KeyBinds.setHeight(height2);

    }



    public void Effects(MatrixStack stack) {

        float x = 3;

        float y = 40;

        float offset = this.offsetEffects.getValue().floatValue();

        float height2 = 21.3f;

        StyledFont small = Fonts.msSemiBold[13];

        int counterEffect = 0;

        for (EffectInstance effectInstance : Hud.mc.player.getActivePotionEffects()) {

            String levelpotion = String.valueOf(effectInstance.getAmplifier() + 1);

            float textWidthBonus = 27.3f;

            if (levelpotion.contains("1")) {

                levelpotion = "";

                textWidthBonus -= 5.0f;

            }

            String durationText = EffectUtils.getPotionDurationString(effectInstance, 1.0f);

            String text = I18n.format(effectInstance.getEffectName(), new Object[0]);

            float textWidth = small.getWidth(text + effectInstance.getAmplifier() + levelpotion) + textWidthBonus - 0.6f;

            RenderUtil.Render2D.drawRoundedCorner(x, y, textWidth, height2, 3.0f, ColorUtil.rgba(27, 25, 41, 255));

            small.drawString(stack, text + " " + levelpotion, (double)(x + 22.3f), (double)(y + 5.5f), new Color(255, 255, 255, 255).getRGB());

            small.drawString(stack, durationText, (double)(x + 22.3f), (double)(y + 13.5f), new Color(255, 255, 255, 255).getRGB());

            PotionSpriteUploader potionspriteuploader = mc.getPotionSpriteUploader();

            Effect effect = effectInstance.getPotion();

            TextureAtlasSprite textureatlassprite = potionspriteuploader.getSprite(effect);

            mc.getTextureManager().bindTexture(textureatlassprite.getAtlasTexture().getTextureLocation());

            DisplayEffectsScreen.blit(stack, (int)(x + 2.0f), (int)y + 2, 10, 18, 18, textureatlassprite);

            y += offset;

            ++counterEffect;

            this.Effects.setWidth(textWidth);

        }

        float setHeight = offset / 8.0f * (float)counterEffect;

        this.Effects.setHeight(height2 * (float)counterEffect + setHeight);

    }



    public void BPS(MatrixStack stack) {

        float x = 3;

        float y = 507;

        float height2 = 15.0f;

        StyledFont small = Fonts.msSemiBold[14];

        String text = "Speed: " + String.format("%.2f", Math.hypot(mc.player.getPosX() - mc.player.prevPosX, mc.player.getPosZ() - mc.player.prevPosZ) * 20.0);

        float textWidth = small.getWidth(text) + 8.5f;

        RenderUtil.Render2D.drawRoundedCorner(x, y, textWidth, height2, 3.0f, ColorUtil.rgba(27, 25, 41, 255));

        RenderUtil.Render2D.drawShadow(x,y,textWidth + 5,15,19, ColorUtil.getColorStyle(255));

        small.drawString(stack, text, (x + 4.5f), (double)y + 6.3, new Color(255, 255, 255, 255).getRGB());

        this.BPS.setWidth(textWidth);

        this.BPS.setHeight(height2);

    }



    public void Coords(MatrixStack stack) {

        float x = 3;

        float y = 524;

        float height2 = 15.0f;

        StyledFont small = Fonts.msSemiBold[14];

        int X = (int)Hud.mc.player.getPosX();

        int Y = (int)Hud.mc.player.getPosY();

        int Z2 = (int)Hud.mc.player.getPosZ();

        String text = "Coords: X: " + X + " Y: " + Y + " Z: " + Z2;

        float textWidth = small.getWidth(text) + 8.5f;

        RenderUtil.Render2D.drawRoundedCorner(x, y, textWidth, height2, 3.0f, new Color(27,25,41,255).getRGB());

        RenderUtil.Render2D.drawShadow(x,y,textWidth + 5,15,19, ColorUtil.getColorStyle(255));

        small.drawString(stack, text, (x + 4.5f), (y + 6.0f), new Color(255, 255, 255, 255).getRGB());

        this.Coords.setWidth(textWidth);

        this.Coords.setHeight(height2);

    }



    public void Logo(MatrixStack stack) {

        float x = 3;

        float y = 3;

        float height2 = 17.0f;



        String text = "" + HudUtil.serverIP();

        String fps = "" + Minecraft.debugFPS;

        String tit = "starside free";

        float textWidth = Fonts.sfbold[18].getWidth(text) + 12;

        RenderUtil.Render2D.drawRoundedCorner(x, y, textWidth, height2, 3.5f, new Color(27,25,41,255).getRGB());

        RenderUtil.Render2D.drawShadow(x,y,textWidth + 5,15,19, ColorUtil.rgba(27, 25, 41, 222));

        RenderUtil.Render2D.drawRoundedCorner(x + 0, y + 18, textWidth, height2, 3.5f, new Color(27,25,41,255).getRGB());

        RenderUtil.Render2D.drawShadow(x,y,textWidth + 5,15,19, ColorUtil.rgba(27, 25, 41, 222));

        RenderUtil.Render2D.drawRoundedCorner(x + 438f, y + 1.0f, textWidth, height2, 3.5f, new Color(27,25,41,255).getRGB());

        RenderUtil.Render2D.drawShadow(x + 438f,y + 1.0f,textWidth + 5.0f,15,19, ColorUtil.rgba(27, 25, 41, 222));

        Fonts.sfbold[18].drawString(stack, "" + HudUtil.serverIP(), x + 3.0f, y + 5.5f, new Color(255, 255, 255, 255).getRGB());

        Fonts.sfbold[18].drawString(stack, "StarSide Free" , x + 450.0f, y + 5.5f, new Color(255, 255, 255, 255).getRGB());

        Fonts.sfbold[18].drawString(stack, "fps " + Minecraft.debugFPS + " | " + "ping " + HudUtil.calculatePing(), x + 3.0f, y + 23f, new Color(255, 255, 255, 255).getRGB());

        this.Logo.setWidth(textWidth);

        this.Logo.setHeight(height2);

    }



    public void TimerHUD(MatrixStack stack) {

        float x = this.TimerHUD.getX();

        float y = this.TimerHUD.getY();

        float width2 = 71.0f;

        float height2 = 25.0f;

        float quotient = Managment.FUNCTION_MANAGER.timerFunction.maxViolation / Managment.FUNCTION_MANAGER.timerFunction.timerAmount.getValue().floatValue();

        float minimumValue = Math.min(Managment.FUNCTION_MANAGER.timerFunction.getViolation(), quotient);

        this.perc = AnimationMath.lerp(this.perc, (quotient - minimumValue) / quotient, 7.0f);

        String text = (int)(this.perc * 100.0f) + "%";

        RenderUtil.Render2D.drawRoundedCorner(x, y, width2, height2, 3, new Color(0, 0, 0, 195).getRGB());

        RenderUtil.Render2D.drawRoundedCorner(x + 5.0f, y + 14.0f, 61.0f, 8.0f, 0.0f, new Color(23, 23, 23, 196).getRGB());

        RenderUtil.Render2D.drawRoundedCorner(x + 5.0f, y + 14.0f, 61.0f * this.perc, 8.0f, 3.0f, ColorUtil.getColorStyle(0.0f));

        Fonts.msSemiBold[16].drawString(stack, "Timer ", (double)(x + 23.5f), (double)(y + 7.4f), new Color(255, 255, 255, 255).getRGB());

        if (this.perc * 100.0f < 10.0f) {

//            Fonts.msSemiBold[13].drawString(stack, text, (double)(x + 55.0f), (double)(y + 7.4f), new Color(255, 255, 255, 255).getRGB());

        } else if (this.perc * 100.0f == 100.0f) {

//            Fonts.msSemiBold[13].drawString(stack, text, (double)(x + 49.5f), (double)(y + 7.4f), new Color(255, 255, 255, 255).getRGB());

        } else {

//            Fonts.msSemiBold[13].drawString(stack, text, (double)(x + 51.5f), (double)(y + 7.4f), new Color(255, 255, 255, 255).getRGB());

        }

        this.TimerHUD.setWidth(width2);

        this.TimerHUD.setHeight(height2);

    }



    public void TargetHUD(MatrixStack stack) {

        float x = this.TargetHUD.getX();

        float y = this.TargetHUD.getY();

        float width2 = 115.0f;

        float height2 = 50.0f;

        float widthFace = 50.0f;

        this.target = this.getTarget(this.target);

        this.targetHudAnimation.setDuration(280);

        this.scale = this.targetHudAnimation.getOutput();

        if (this.scale == 0.0) {

            this.target = null;

        }

        if (this.target == null) {

            return;

        }

        GlStateManager.pushMatrix();

        AnimationMath.sizeAnimation(x + width2 / 2.0f, y + 15.0f, this.scale);

        RenderUtil.Render2D.drawRoundedCorner(x, y, width2 - 5, height2, 3.0f, ColorUtil.rgba(27, 25, 41, 255));

        RenderUtil.Render2D.drawShadow(x,y,width2 + 5,15,19, ColorUtil.getColorStyle(255));

        if (this.target instanceof PlayerEntity) {

            RenderUtil.Render2D.drawFace(x + 2.5f, y + 4, 8.0f, 8.0f, 8.0f, 8.0f, widthFace - 20, height2 - 20, 64.0f, 64.0f, (AbstractClientPlayerEntity)this.target);

        }

        float xHP = x + widthFace + 3.8f;

        float yHP = y + 21.3f;

        float widthHP = 52.0f;

        this.health = AnimationMath.fast(this.health, this.target.getHealth() / this.target.getMaxHealth(), 6.0f);

        this.health = MathHelper.clamp(this.health, 0.0f, 1.0f);

        this.absorpation = AnimationMath.fast(this.absorpation, this.target.getAbsorptionAmount() / this.target.getMaxHealth(), 6.0f);

        this.absorpation = MathHelper.clamp(this.absorpation, 0.0f, 1.0f);

        RenderUtil.Render2D.drawRoundedCorner(xHP - 52, yHP + 17, 106.0f * this.health, 9f, 1f, ColorUtil.getColorStyle(0.0f));

        RenderUtil.Render2D.drawShadow(x,y,width2 + 5,15,19, ColorUtil.getColorStyle(255));

        RenderUtil.Render2D.drawRoundedCorner(xHP - 52, yHP + 17, 106.0f * this.absorpation, 9f, 1f, new Color(222, 211, 14, 255).getRGB());

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

        RenderUtil.SmartScissor.push();

        RenderUtil.SmartScissor.setFromComponentCoordinates(x, y, width2 - 6.0f, height2);

        Fonts.msSemiBold[16].drawString(stack, targetName, (double)xHP - 5, (double)(yHP - 17.3f), new Color(255, 255, 255, 255).getRGB());

        RenderUtil.SmartScissor.unset();

        RenderUtil.SmartScissor.pop();

        String HP = String.valueOf(this.target.getHealth() + this.target.getAbsorptionAmount());

        String StringHP = HP.substring(0, Math.min(HP.length(), 4));

        if (this.target.getHealth() + this.target.getAbsorptionAmount() < 10.0f) {

            StringHP = HP.substring(0, Math.min(HP.length(), 3));

        }

        Fonts.msSemiBold[14].drawString(stack, "Health: " + StringHP, (double)xHP - 20, (double)(yHP + 8.5f), new Color(255, 255, 255, 255).getRGB());

        this.drawItemStack(x + 35, y + 13.0f, 10.5f, 0.7f);

        GlStateManager.popMatrix();

        this.TargetHUD.setWidth(width2);

        this.TargetHUD.setHeight(height2);

    }



    private void drawItemStack(float x, float y, float offset, float scaleValue) {

        ArrayList<ItemStack> stackList = new ArrayList<ItemStack>(Arrays.asList(this.target.getHeldItemMainhand(), this.target.getHeldItemOffhand()));

        stackList.addAll((Collection)this.target.getArmorInventoryList());

        AtomicReference<Float> posX = new AtomicReference<Float>(Float.valueOf(x));

        stackList.stream().filter(stack -> !stack.isEmpty()).forEach(stack -> HudUtil.drawItemStack(stack, posX.getAndAccumulate(Float.valueOf(offset), Float::sum).floatValue(), y, true, true, scaleValue));

    }



    private LivingEntity getTarget(LivingEntity nullTarget) {

        LivingEntity target = nullTarget;

        FunctionManager functionManager = Managment.FUNCTION_MANAGER;

        if (functionManager.auraNew.getTarget() instanceof LivingEntity) {

            FunctionManager functionManager2 = Managment.FUNCTION_MANAGER;

            target = functionManager2.auraNew.getTarget();

            this.targetHudAnimation.setDirection(Direction.FORWARDS);

        } else if (IMinecraft.mc.currentScreen instanceof ChatScreen) {

            target = IMinecraft.mc.player;

            this.targetHudAnimation.setDirection(Direction.FORWARDS);

        } else {

            this.targetHudAnimation.setDirection(Direction.BACKWARDS);

        }

        return target;

    }
фу сука
 
Можно было бы хотя б хп с ником нормально сделать...
 

Вложения

  • 1733561702466.png
    1733561702466.png
    10.8 KB · Просмотры: 50
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Худ в 850 строк выглядел бы лучше этого
 
делал худ на орбите, переделал худ, так же сливаю худ фришки, знаю легко это сделать но на премке жёстче
ss -
Пожалуйста, авторизуйтесь для просмотра ссылки.

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

hud:
Expand Collapse Copy
package hilz.orbita.modules.impl.render;



import com.mojang.blaze3d.matrix.MatrixStack;

import com.mojang.blaze3d.platform.GlStateManager;

import hilz.orbita.Initilization;

import hilz.orbita.events.Event;

import hilz.orbita.events.impl.render.EventRender;

import hilz.orbita.managment.Managment;

import hilz.orbita.modules.Function;

import hilz.orbita.modules.FunctionAnnotation;

import hilz.orbita.modules.FunctionManager;

import hilz.orbita.modules.Type;

import hilz.orbita.modules.settings.imp.BooleanOption;

import hilz.orbita.modules.settings.imp.MultiBoxSetting;

import hilz.orbita.modules.settings.imp.SliderSetting;

import hilz.orbita.util.ClientUtil;

import hilz.orbita.util.IMinecraft;

import hilz.orbita.util.animations.Animation;

import hilz.orbita.util.animations.Direction;

import hilz.orbita.util.animations.impl.EaseBackIn;

import hilz.orbita.util.drag.Dragging;

import hilz.orbita.util.font.Fonts;

import hilz.orbita.util.font.styled.StyledFont;

import hilz.orbita.util.misc.HudUtil;

import hilz.orbita.util.render.ColorUtil;

import hilz.orbita.util.render.RenderUtil;

import hilz.orbita.util.render.animation.AnimationMath;

import net.minecraft.client.Minecraft;

import net.minecraft.client.entity.player.AbstractClientPlayerEntity;

import net.minecraft.client.gui.DisplayEffectsScreen;

import net.minecraft.client.gui.screen.ChatScreen;

import net.minecraft.client.network.play.NetworkPlayerInfo;

import net.minecraft.client.renderer.texture.PotionSpriteUploader;

import net.minecraft.client.renderer.texture.TextureAtlasSprite;

import net.minecraft.client.resources.I18n;

import net.minecraft.entity.LivingEntity;

import net.minecraft.entity.player.PlayerEntity;

import net.minecraft.item.ItemStack;

import net.minecraft.item.Items;

import net.minecraft.potion.Effect;

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 java.awt.*;

import java.util.ArrayList;

import java.util.Arrays;

import java.util.Collection;

import java.util.Comparator;

import java.util.concurrent.atomic.AtomicReference;

import java.util.regex.Pattern;



@FunctionAnnotation(name="Display", type= Type.Render)

public class Hud

        extends Function {

    public static MultiBoxSetting elements = new MultiBoxSetting("Elements",

            new BooleanOption("Active Target", true),

            new BooleanOption("Timer Indicator", true),

            new BooleanOption("Logo", true),

            new BooleanOption("Coordinates", true),

            new BooleanOption("Speed", true),

            new BooleanOption("Effects", true),

            new BooleanOption("Active Binds", true),

            new BooleanOption("Active Staff", true),

            new BooleanOption("Armor", true),

            new BooleanOption("Cooldown", true));



    private final SliderSetting offsetEffects = new SliderSetting("\u0420\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432", 24.0f, 23.0f, 26.0f, 0.1f).setVisible(() -> elements.get(5));

    final Dragging TargetHUD = Initilization.createDrag(this, "TargetHUD7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging TimerHUD = Initilization.createDrag(this, "TimerHUD7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging Logo = Initilization.createDrag(this, "Logo7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging Coords = Initilization.createDrag(this, "Coords7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging BPS = Initilization.createDrag(this, "BPS7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging Effects = Initilization.createDrag(this, "Effects7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging KeyBinds = Initilization.createDrag(this, "KeyBinds7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging StaffActive = Initilization.createDrag(this, "StaffActive7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging Cooldown = Initilization.createDrag(this, "Cooldown7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    int activeStaff = 0;

    private final Pattern namePattern = Pattern.compile("^\\w{3,16}$");

    int activeBind = 0;

    float heightAnimation = 0.0f;

    private float perc;

    private final Animation targetHudAnimation = new EaseBackIn(270, 1.0, 1.5f);

    private double scale = 0.0;

    private LivingEntity target = null;

    float health = 0.0f;

    float absorpation = 0.0f;



    public Hud() {

        this.addSettings(elements, this.offsetEffects);

    }



    [USER=1367676]@override[/USER]

    public void onEvent(Event event) {

        if (event instanceof EventRender) {

            EventRender eventRender = (EventRender)event;

            MatrixStack stack = eventRender.matrixStack;

            if (elements.get(0)) {

                this.TargetHUD(stack);

            }

            if (elements.get(1)) {

                this.TimerHUD(stack);

            }

            if (elements.get(2)) {

                this.Logo(stack);

            }

            if (elements.get(3)) {

                this.Coords(stack);

            }

            if (elements.get(4)) {

                this.BPS(stack);

            }

            if (elements.get(5)) {

                this.Effects(stack);

            }

            if (elements.get(6)) {

                this.KeyBinds(stack);

            }

            if (elements.get(7)) {

                this.StaffActive(stack);

            }

            if (elements.get(8)) {

                this.ArmorHUD(stack, eventRender);

            }

        }

    }



    public void ArmorHUD(MatrixStack stack, EventRender eventRender) {

        int off;

        int count = 0;

        for (int i = 0; i < Hud.mc.player.inventory.getSizeInventory(); ++i) {

            ItemStack s = Hud.mc.player.inventory.getStackInSlot(i);

            if (s.getItem() != Items.TOTEM_OF_UNDYING) continue;

            ++count;

        }

        float xPos = (float)eventRender.scaledResolution.scaledWidth() / 2.0f;

        float yPos = eventRender.scaledResolution.scaledHeight();

        boolean totemInInv = Hud.mc.player.inventory.mainInventory.stream().map(ItemStack::getItem).toList().contains(Items.TOTEM_OF_UNDYING);

        int n = off = totemInInv ? 5 : 0;

        if (Hud.mc.player.isCreative()) {

            yPos += 17.0f;

        }

        for (ItemStack s : Hud.mc.player.inventory.armorInventory) {

            ESPFunction.drawItemStack(s, xPos - (float)off + 74.0f * ((float)Hud.mc.gameSettings.guiScale / 2.0f), yPos - 56.0f * ((float)Hud.mc.gameSettings.guiScale / 2.0f), null, false);

            off += 15;

        }

        if (totemInInv) {

            ESPFunction.drawItemStack(new ItemStack(Items.TOTEM_OF_UNDYING), xPos - (float)off + 73.0f * ((float)Hud.mc.gameSettings.guiScale / 2.0f), yPos - 56.0f * ((float)Hud.mc.gameSettings.guiScale / 2.0f), String.valueOf(count), false);

        }

    }



    public void StaffActive(MatrixStack stack) {

        float x = this.StaffActive.getX();

        float y = this.StaffActive.getY();

        float offset = 9.0f;

        float height2 = 20.5f;

        float width2 = 100.0f;

        height2 += offset * (float)this.activeStaff - 4.0f;

        float xStaff = x + 26.0f;

        if (this.activeStaff == 0) {

            height2 -= 1.5f;

            width2 -= 25.0f;

            xStaff -= 12.5f;

        }



        RenderUtil.Render2D.drawRoundedRect(x,y,width2,height2,3.5f,ColorUtil.rgba(27, 25, 41, 255));

        RenderUtil.Render2D.drawShadow(x,y,width2 + 5,15,19, ColorUtil.getColorStyle(255));

        StyledFont small1 = Fonts.sfbold[15];

        small1.drawString(stack, "Staff List", (double)xStaff - 23.0f, (double)(y + 5.0f), new Color(255, 255, 255, 255).getRGB());

        int i = 0;

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

            String name = team.getMembershipCollection().toString();

            if (!this.namePattern.matcher(name = name.substring(1, name.length() - 1)).matches()) continue;

            boolean vanish = true;

            boolean near = false;

            boolean active = false;

            for (AbstractClientPlayerEntity player : Hud.mc.world.getPlayers()) {

                if (!player.getNameClear().equals(name)) continue;

                near = true;

            }

            for (NetworkPlayerInfo info : mc.getConnection().getPlayerInfoMap()) {

                if (!info.getGameProfile().getName().equals(name)) continue;

                vanish = false;

                if (near) continue;

                active = true;

            }

            if (!vanish && !Managment.STAFF_MANAGER.isStaff(name)) continue;

            String Name2 = name.substring(0, Math.min(name.length(), 10));

            StyledFont small = Fonts.sfbold[13];

            StyledFont small2 = Fonts.sfbold[14];

            float yText = y + 17.0f;

            small2.drawString(stack, Name2, (double)(x + 4.0f), (double)yText, new Color(255, 255, 255, 255).getRGB());

            if (vanish) {

                small.drawString(stack, "Spectator", (double)(x + 63.5f), (double)yText, new Color(231, 52, 52, 255).getRGB());

            } else if (active) {

                small.drawString(stack, "Online", (double)(x + 74f), (double)yText, new Color(116, 236, 114, 255).getRGB());

            } else if (near) {

                small.drawString(stack, "Near", (double)(x + 80.8f), (double)yText, new Color(255, 251, 0, 255).getRGB());

            }

            y += offset;

            ++i;

        }

        this.activeStaff = i;

        this.StaffActive.setWidth(width2);

        this.StaffActive.setHeight(height2);

    }



    public void KeyBinds(MatrixStack stack) {

        float x = this.KeyBinds.getX();

        float y = this.KeyBinds.getY();

        float offset = 10f;

        float height2 = 20.0f;

        float width2 = 75.0f;

        height2 += offset * (float)this.activeBind - 5.0f;

        if (this.activeBind == 0) {

            height2 -= 1.0f;

        }

        RenderUtil.Render2D.drawRoundedCorner(x, y, width2, this.heightAnimation, 3.5f, ColorUtil.rgba(27, 25, 41, 255));

        RenderUtil.Render2D.drawShadow(x,y,width2 + 5,15,19, ColorUtil.rgba(27, 25, 41, 222));

        StyledFont small1 = Fonts.sfbold[15];

        small1.drawString(stack, "Hotkeys", (x + 5.0f), (y + 5.0f), new Color(255, 255, 255, 255).getRGB());

        int i = 0;

        for (Function f : Managment.FUNCTION_MANAGER.getFunctions()) {

            String text;

            if (f.bind == 0 || !f.state || (text = ClientUtil.getKey(f.bind)) == null) continue;

            StyledFont small = Fonts.sfbold[13];

            String bindText = text.toUpperCase();

            float yText = y + 17.0f;

            RenderUtil.SmartScissor.push();

            RenderUtil.SmartScissor.setFromComponentCoordinates(x, y, width2, this.heightAnimation);

            small.drawString(stack, f.name, (x + 4.0f), yText, new Color(255, 255, 255, 255).getRGB());

            small.drawString(stack, "On", (x + 62.0f), yText, new Color(255, 255, 255, 255).getRGB());

            RenderUtil.SmartScissor.unset();

            RenderUtil.SmartScissor.pop();

            y += offset;

            ++i;

        }

        this.heightAnimation = AnimationMath.fast(this.heightAnimation, height2, 11.0f);

        this.activeBind = i;

        this.KeyBinds.setWidth(width2);

        this.KeyBinds.setHeight(height2);

    }



    public void Effects(MatrixStack stack) {

        float x = 3;

        float y = 40;

        float offset = this.offsetEffects.getValue().floatValue();

        float height2 = 21.3f;

        StyledFont small = Fonts.msSemiBold[13];

        int counterEffect = 0;

        for (EffectInstance effectInstance : Hud.mc.player.getActivePotionEffects()) {

            String levelpotion = String.valueOf(effectInstance.getAmplifier() + 1);

            float textWidthBonus = 27.3f;

            if (levelpotion.contains("1")) {

                levelpotion = "";

                textWidthBonus -= 5.0f;

            }

            String durationText = EffectUtils.getPotionDurationString(effectInstance, 1.0f);

            String text = I18n.format(effectInstance.getEffectName(), new Object[0]);

            float textWidth = small.getWidth(text + effectInstance.getAmplifier() + levelpotion) + textWidthBonus - 0.6f;

            RenderUtil.Render2D.drawRoundedCorner(x, y, textWidth, height2, 3.0f, ColorUtil.rgba(27, 25, 41, 255));

            small.drawString(stack, text + " " + levelpotion, (double)(x + 22.3f), (double)(y + 5.5f), new Color(255, 255, 255, 255).getRGB());

            small.drawString(stack, durationText, (double)(x + 22.3f), (double)(y + 13.5f), new Color(255, 255, 255, 255).getRGB());

            PotionSpriteUploader potionspriteuploader = mc.getPotionSpriteUploader();

            Effect effect = effectInstance.getPotion();

            TextureAtlasSprite textureatlassprite = potionspriteuploader.getSprite(effect);

            mc.getTextureManager().bindTexture(textureatlassprite.getAtlasTexture().getTextureLocation());

            DisplayEffectsScreen.blit(stack, (int)(x + 2.0f), (int)y + 2, 10, 18, 18, textureatlassprite);

            y += offset;

            ++counterEffect;

            this.Effects.setWidth(textWidth);

        }

        float setHeight = offset / 8.0f * (float)counterEffect;

        this.Effects.setHeight(height2 * (float)counterEffect + setHeight);

    }



    public void BPS(MatrixStack stack) {

        float x = 3;

        float y = 507;

        float height2 = 15.0f;

        StyledFont small = Fonts.msSemiBold[14];

        String text = "Speed: " + String.format("%.2f", Math.hypot(mc.player.getPosX() - mc.player.prevPosX, mc.player.getPosZ() - mc.player.prevPosZ) * 20.0);

        float textWidth = small.getWidth(text) + 8.5f;

        RenderUtil.Render2D.drawRoundedCorner(x, y, textWidth, height2, 3.0f, ColorUtil.rgba(27, 25, 41, 255));

        RenderUtil.Render2D.drawShadow(x,y,textWidth + 5,15,19, ColorUtil.getColorStyle(255));

        small.drawString(stack, text, (x + 4.5f), (double)y + 6.3, new Color(255, 255, 255, 255).getRGB());

        this.BPS.setWidth(textWidth);

        this.BPS.setHeight(height2);

    }



    public void Coords(MatrixStack stack) {

        float x = 3;

        float y = 524;

        float height2 = 15.0f;

        StyledFont small = Fonts.msSemiBold[14];

        int X = (int)Hud.mc.player.getPosX();

        int Y = (int)Hud.mc.player.getPosY();

        int Z2 = (int)Hud.mc.player.getPosZ();

        String text = "Coords: X: " + X + " Y: " + Y + " Z: " + Z2;

        float textWidth = small.getWidth(text) + 8.5f;

        RenderUtil.Render2D.drawRoundedCorner(x, y, textWidth, height2, 3.0f, new Color(27,25,41,255).getRGB());

        RenderUtil.Render2D.drawShadow(x,y,textWidth + 5,15,19, ColorUtil.getColorStyle(255));

        small.drawString(stack, text, (x + 4.5f), (y + 6.0f), new Color(255, 255, 255, 255).getRGB());

        this.Coords.setWidth(textWidth);

        this.Coords.setHeight(height2);

    }



    public void Logo(MatrixStack stack) {

        float x = 3;

        float y = 3;

        float height2 = 17.0f;



        String text = "" + HudUtil.serverIP();

        String fps = "" + Minecraft.debugFPS;

        String tit = "starside free";

        float textWidth = Fonts.sfbold[18].getWidth(text) + 12;

        RenderUtil.Render2D.drawRoundedCorner(x, y, textWidth, height2, 3.5f, new Color(27,25,41,255).getRGB());

        RenderUtil.Render2D.drawShadow(x,y,textWidth + 5,15,19, ColorUtil.rgba(27, 25, 41, 222));

        RenderUtil.Render2D.drawRoundedCorner(x + 0, y + 18, textWidth, height2, 3.5f, new Color(27,25,41,255).getRGB());

        RenderUtil.Render2D.drawShadow(x,y,textWidth + 5,15,19, ColorUtil.rgba(27, 25, 41, 222));

        RenderUtil.Render2D.drawRoundedCorner(x + 438f, y + 1.0f, textWidth, height2, 3.5f, new Color(27,25,41,255).getRGB());

        RenderUtil.Render2D.drawShadow(x + 438f,y + 1.0f,textWidth + 5.0f,15,19, ColorUtil.rgba(27, 25, 41, 222));

        Fonts.sfbold[18].drawString(stack, "" + HudUtil.serverIP(), x + 3.0f, y + 5.5f, new Color(255, 255, 255, 255).getRGB());

        Fonts.sfbold[18].drawString(stack, "StarSide Free" , x + 450.0f, y + 5.5f, new Color(255, 255, 255, 255).getRGB());

        Fonts.sfbold[18].drawString(stack, "fps " + Minecraft.debugFPS + " | " + "ping " + HudUtil.calculatePing(), x + 3.0f, y + 23f, new Color(255, 255, 255, 255).getRGB());

        this.Logo.setWidth(textWidth);

        this.Logo.setHeight(height2);

    }



    public void TimerHUD(MatrixStack stack) {

        float x = this.TimerHUD.getX();

        float y = this.TimerHUD.getY();

        float width2 = 71.0f;

        float height2 = 25.0f;

        float quotient = Managment.FUNCTION_MANAGER.timerFunction.maxViolation / Managment.FUNCTION_MANAGER.timerFunction.timerAmount.getValue().floatValue();

        float minimumValue = Math.min(Managment.FUNCTION_MANAGER.timerFunction.getViolation(), quotient);

        this.perc = AnimationMath.lerp(this.perc, (quotient - minimumValue) / quotient, 7.0f);

        String text = (int)(this.perc * 100.0f) + "%";

        RenderUtil.Render2D.drawRoundedCorner(x, y, width2, height2, 3, new Color(0, 0, 0, 195).getRGB());

        RenderUtil.Render2D.drawRoundedCorner(x + 5.0f, y + 14.0f, 61.0f, 8.0f, 0.0f, new Color(23, 23, 23, 196).getRGB());

        RenderUtil.Render2D.drawRoundedCorner(x + 5.0f, y + 14.0f, 61.0f * this.perc, 8.0f, 3.0f, ColorUtil.getColorStyle(0.0f));

        Fonts.msSemiBold[16].drawString(stack, "Timer ", (double)(x + 23.5f), (double)(y + 7.4f), new Color(255, 255, 255, 255).getRGB());

        if (this.perc * 100.0f < 10.0f) {

//            Fonts.msSemiBold[13].drawString(stack, text, (double)(x + 55.0f), (double)(y + 7.4f), new Color(255, 255, 255, 255).getRGB());

        } else if (this.perc * 100.0f == 100.0f) {

//            Fonts.msSemiBold[13].drawString(stack, text, (double)(x + 49.5f), (double)(y + 7.4f), new Color(255, 255, 255, 255).getRGB());

        } else {

//            Fonts.msSemiBold[13].drawString(stack, text, (double)(x + 51.5f), (double)(y + 7.4f), new Color(255, 255, 255, 255).getRGB());

        }

        this.TimerHUD.setWidth(width2);

        this.TimerHUD.setHeight(height2);

    }



    public void TargetHUD(MatrixStack stack) {

        float x = this.TargetHUD.getX();

        float y = this.TargetHUD.getY();

        float width2 = 115.0f;

        float height2 = 50.0f;

        float widthFace = 50.0f;

        this.target = this.getTarget(this.target);

        this.targetHudAnimation.setDuration(280);

        this.scale = this.targetHudAnimation.getOutput();

        if (this.scale == 0.0) {

            this.target = null;

        }

        if (this.target == null) {

            return;

        }

        GlStateManager.pushMatrix();

        AnimationMath.sizeAnimation(x + width2 / 2.0f, y + 15.0f, this.scale);

        RenderUtil.Render2D.drawRoundedCorner(x, y, width2 - 5, height2, 3.0f, ColorUtil.rgba(27, 25, 41, 255));

        RenderUtil.Render2D.drawShadow(x,y,width2 + 5,15,19, ColorUtil.getColorStyle(255));

        if (this.target instanceof PlayerEntity) {

            RenderUtil.Render2D.drawFace(x + 2.5f, y + 4, 8.0f, 8.0f, 8.0f, 8.0f, widthFace - 20, height2 - 20, 64.0f, 64.0f, (AbstractClientPlayerEntity)this.target);

        }

        float xHP = x + widthFace + 3.8f;

        float yHP = y + 21.3f;

        float widthHP = 52.0f;

        this.health = AnimationMath.fast(this.health, this.target.getHealth() / this.target.getMaxHealth(), 6.0f);

        this.health = MathHelper.clamp(this.health, 0.0f, 1.0f);

        this.absorpation = AnimationMath.fast(this.absorpation, this.target.getAbsorptionAmount() / this.target.getMaxHealth(), 6.0f);

        this.absorpation = MathHelper.clamp(this.absorpation, 0.0f, 1.0f);

        RenderUtil.Render2D.drawRoundedCorner(xHP - 52, yHP + 17, 106.0f * this.health, 9f, 1f, ColorUtil.getColorStyle(0.0f));

        RenderUtil.Render2D.drawShadow(x,y,width2 + 5,15,19, ColorUtil.getColorStyle(255));

        RenderUtil.Render2D.drawRoundedCorner(xHP - 52, yHP + 17, 106.0f * this.absorpation, 9f, 1f, new Color(222, 211, 14, 255).getRGB());

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

        RenderUtil.SmartScissor.push();

        RenderUtil.SmartScissor.setFromComponentCoordinates(x, y, width2 - 6.0f, height2);

        Fonts.msSemiBold[16].drawString(stack, targetName, (double)xHP - 5, (double)(yHP - 17.3f), new Color(255, 255, 255, 255).getRGB());

        RenderUtil.SmartScissor.unset();

        RenderUtil.SmartScissor.pop();

        String HP = String.valueOf(this.target.getHealth() + this.target.getAbsorptionAmount());

        String StringHP = HP.substring(0, Math.min(HP.length(), 4));

        if (this.target.getHealth() + this.target.getAbsorptionAmount() < 10.0f) {

            StringHP = HP.substring(0, Math.min(HP.length(), 3));

        }

        Fonts.msSemiBold[14].drawString(stack, "Health: " + StringHP, (double)xHP - 20, (double)(yHP + 8.5f), new Color(255, 255, 255, 255).getRGB());

        this.drawItemStack(x + 35, y + 13.0f, 10.5f, 0.7f);

        GlStateManager.popMatrix();

        this.TargetHUD.setWidth(width2);

        this.TargetHUD.setHeight(height2);

    }



    private void drawItemStack(float x, float y, float offset, float scaleValue) {

        ArrayList<ItemStack> stackList = new ArrayList<ItemStack>(Arrays.asList(this.target.getHeldItemMainhand(), this.target.getHeldItemOffhand()));

        stackList.addAll((Collection)this.target.getArmorInventoryList());

        AtomicReference<Float> posX = new AtomicReference<Float>(Float.valueOf(x));

        stackList.stream().filter(stack -> !stack.isEmpty()).forEach(stack -> HudUtil.drawItemStack(stack, posX.getAndAccumulate(Float.valueOf(offset), Float::sum).floatValue(), y, true, true, scaleValue));

    }



    private LivingEntity getTarget(LivingEntity nullTarget) {

        LivingEntity target = nullTarget;

        FunctionManager functionManager = Managment.FUNCTION_MANAGER;

        if (functionManager.auraNew.getTarget() instanceof LivingEntity) {

            FunctionManager functionManager2 = Managment.FUNCTION_MANAGER;

            target = functionManager2.auraNew.getTarget();

            this.targetHudAnimation.setDirection(Direction.FORWARDS);

        } else if (IMinecraft.mc.currentScreen instanceof ChatScreen) {

            target = IMinecraft.mc.player;

            this.targetHudAnimation.setDirection(Direction.FORWARDS);

        } else {

            this.targetHudAnimation.setDirection(Direction.BACKWARDS);

        }

        return target;

    }
не вкусна чо та
 
делал худ на орбите, переделал худ, так же сливаю худ фришки, знаю легко это сделать но на премке жёстче
ss -
Пожалуйста, авторизуйтесь для просмотра ссылки.

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

hud:
Expand Collapse Copy
package hilz.orbita.modules.impl.render;



import com.mojang.blaze3d.matrix.MatrixStack;

import com.mojang.blaze3d.platform.GlStateManager;

import hilz.orbita.Initilization;

import hilz.orbita.events.Event;

import hilz.orbita.events.impl.render.EventRender;

import hilz.orbita.managment.Managment;

import hilz.orbita.modules.Function;

import hilz.orbita.modules.FunctionAnnotation;

import hilz.orbita.modules.FunctionManager;

import hilz.orbita.modules.Type;

import hilz.orbita.modules.settings.imp.BooleanOption;

import hilz.orbita.modules.settings.imp.MultiBoxSetting;

import hilz.orbita.modules.settings.imp.SliderSetting;

import hilz.orbita.util.ClientUtil;

import hilz.orbita.util.IMinecraft;

import hilz.orbita.util.animations.Animation;

import hilz.orbita.util.animations.Direction;

import hilz.orbita.util.animations.impl.EaseBackIn;

import hilz.orbita.util.drag.Dragging;

import hilz.orbita.util.font.Fonts;

import hilz.orbita.util.font.styled.StyledFont;

import hilz.orbita.util.misc.HudUtil;

import hilz.orbita.util.render.ColorUtil;

import hilz.orbita.util.render.RenderUtil;

import hilz.orbita.util.render.animation.AnimationMath;

import net.minecraft.client.Minecraft;

import net.minecraft.client.entity.player.AbstractClientPlayerEntity;

import net.minecraft.client.gui.DisplayEffectsScreen;

import net.minecraft.client.gui.screen.ChatScreen;

import net.minecraft.client.network.play.NetworkPlayerInfo;

import net.minecraft.client.renderer.texture.PotionSpriteUploader;

import net.minecraft.client.renderer.texture.TextureAtlasSprite;

import net.minecraft.client.resources.I18n;

import net.minecraft.entity.LivingEntity;

import net.minecraft.entity.player.PlayerEntity;

import net.minecraft.item.ItemStack;

import net.minecraft.item.Items;

import net.minecraft.potion.Effect;

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 java.awt.*;

import java.util.ArrayList;

import java.util.Arrays;

import java.util.Collection;

import java.util.Comparator;

import java.util.concurrent.atomic.AtomicReference;

import java.util.regex.Pattern;



@FunctionAnnotation(name="Display", type= Type.Render)

public class Hud

        extends Function {

    public static MultiBoxSetting elements = new MultiBoxSetting("Elements",

            new BooleanOption("Active Target", true),

            new BooleanOption("Timer Indicator", true),

            new BooleanOption("Logo", true),

            new BooleanOption("Coordinates", true),

            new BooleanOption("Speed", true),

            new BooleanOption("Effects", true),

            new BooleanOption("Active Binds", true),

            new BooleanOption("Active Staff", true),

            new BooleanOption("Armor", true),

            new BooleanOption("Cooldown", true));



    private final SliderSetting offsetEffects = new SliderSetting("\u0420\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432", 24.0f, 23.0f, 26.0f, 0.1f).setVisible(() -> elements.get(5));

    final Dragging TargetHUD = Initilization.createDrag(this, "TargetHUD7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging TimerHUD = Initilization.createDrag(this, "TimerHUD7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging Logo = Initilization.createDrag(this, "Logo7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging Coords = Initilization.createDrag(this, "Coords7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging BPS = Initilization.createDrag(this, "BPS7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging Effects = Initilization.createDrag(this, "Effects7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging KeyBinds = Initilization.createDrag(this, "KeyBinds7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging StaffActive = Initilization.createDrag(this, "StaffActive7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging Cooldown = Initilization.createDrag(this, "Cooldown7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    int activeStaff = 0;

    private final Pattern namePattern = Pattern.compile("^\\w{3,16}$");

    int activeBind = 0;

    float heightAnimation = 0.0f;

    private float perc;

    private final Animation targetHudAnimation = new EaseBackIn(270, 1.0, 1.5f);

    private double scale = 0.0;

    private LivingEntity target = null;

    float health = 0.0f;

    float absorpation = 0.0f;



    public Hud() {

        this.addSettings(elements, this.offsetEffects);

    }



    [USER=1367676]@override[/USER]

    public void onEvent(Event event) {

        if (event instanceof EventRender) {

            EventRender eventRender = (EventRender)event;

            MatrixStack stack = eventRender.matrixStack;

            if (elements.get(0)) {

                this.TargetHUD(stack);

            }

            if (elements.get(1)) {

                this.TimerHUD(stack);

            }

            if (elements.get(2)) {

                this.Logo(stack);

            }

            if (elements.get(3)) {

                this.Coords(stack);

            }

            if (elements.get(4)) {

                this.BPS(stack);

            }

            if (elements.get(5)) {

                this.Effects(stack);

            }

            if (elements.get(6)) {

                this.KeyBinds(stack);

            }

            if (elements.get(7)) {

                this.StaffActive(stack);

            }

            if (elements.get(8)) {

                this.ArmorHUD(stack, eventRender);

            }

        }

    }



    public void ArmorHUD(MatrixStack stack, EventRender eventRender) {

        int off;

        int count = 0;

        for (int i = 0; i < Hud.mc.player.inventory.getSizeInventory(); ++i) {

            ItemStack s = Hud.mc.player.inventory.getStackInSlot(i);

            if (s.getItem() != Items.TOTEM_OF_UNDYING) continue;

            ++count;

        }

        float xPos = (float)eventRender.scaledResolution.scaledWidth() / 2.0f;

        float yPos = eventRender.scaledResolution.scaledHeight();

        boolean totemInInv = Hud.mc.player.inventory.mainInventory.stream().map(ItemStack::getItem).toList().contains(Items.TOTEM_OF_UNDYING);

        int n = off = totemInInv ? 5 : 0;

        if (Hud.mc.player.isCreative()) {

            yPos += 17.0f;

        }

        for (ItemStack s : Hud.mc.player.inventory.armorInventory) {

            ESPFunction.drawItemStack(s, xPos - (float)off + 74.0f * ((float)Hud.mc.gameSettings.guiScale / 2.0f), yPos - 56.0f * ((float)Hud.mc.gameSettings.guiScale / 2.0f), null, false);

            off += 15;

        }

        if (totemInInv) {

            ESPFunction.drawItemStack(new ItemStack(Items.TOTEM_OF_UNDYING), xPos - (float)off + 73.0f * ((float)Hud.mc.gameSettings.guiScale / 2.0f), yPos - 56.0f * ((float)Hud.mc.gameSettings.guiScale / 2.0f), String.valueOf(count), false);

        }

    }



    public void StaffActive(MatrixStack stack) {

        float x = this.StaffActive.getX();

        float y = this.StaffActive.getY();

        float offset = 9.0f;

        float height2 = 20.5f;

        float width2 = 100.0f;

        height2 += offset * (float)this.activeStaff - 4.0f;

        float xStaff = x + 26.0f;

        if (this.activeStaff == 0) {

            height2 -= 1.5f;

            width2 -= 25.0f;

            xStaff -= 12.5f;

        }



        RenderUtil.Render2D.drawRoundedRect(x,y,width2,height2,3.5f,ColorUtil.rgba(27, 25, 41, 255));

        RenderUtil.Render2D.drawShadow(x,y,width2 + 5,15,19, ColorUtil.getColorStyle(255));

        StyledFont small1 = Fonts.sfbold[15];

        small1.drawString(stack, "Staff List", (double)xStaff - 23.0f, (double)(y + 5.0f), new Color(255, 255, 255, 255).getRGB());

        int i = 0;

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

            String name = team.getMembershipCollection().toString();

            if (!this.namePattern.matcher(name = name.substring(1, name.length() - 1)).matches()) continue;

            boolean vanish = true;

            boolean near = false;

            boolean active = false;

            for (AbstractClientPlayerEntity player : Hud.mc.world.getPlayers()) {

                if (!player.getNameClear().equals(name)) continue;

                near = true;

            }

            for (NetworkPlayerInfo info : mc.getConnection().getPlayerInfoMap()) {

                if (!info.getGameProfile().getName().equals(name)) continue;

                vanish = false;

                if (near) continue;

                active = true;

            }

            if (!vanish && !Managment.STAFF_MANAGER.isStaff(name)) continue;

            String Name2 = name.substring(0, Math.min(name.length(), 10));

            StyledFont small = Fonts.sfbold[13];

            StyledFont small2 = Fonts.sfbold[14];

            float yText = y + 17.0f;

            small2.drawString(stack, Name2, (double)(x + 4.0f), (double)yText, new Color(255, 255, 255, 255).getRGB());

            if (vanish) {

                small.drawString(stack, "Spectator", (double)(x + 63.5f), (double)yText, new Color(231, 52, 52, 255).getRGB());

            } else if (active) {

                small.drawString(stack, "Online", (double)(x + 74f), (double)yText, new Color(116, 236, 114, 255).getRGB());

            } else if (near) {

                small.drawString(stack, "Near", (double)(x + 80.8f), (double)yText, new Color(255, 251, 0, 255).getRGB());

            }

            y += offset;

            ++i;

        }

        this.activeStaff = i;

        this.StaffActive.setWidth(width2);

        this.StaffActive.setHeight(height2);

    }



    public void KeyBinds(MatrixStack stack) {

        float x = this.KeyBinds.getX();

        float y = this.KeyBinds.getY();

        float offset = 10f;

        float height2 = 20.0f;

        float width2 = 75.0f;

        height2 += offset * (float)this.activeBind - 5.0f;

        if (this.activeBind == 0) {

            height2 -= 1.0f;

        }

        RenderUtil.Render2D.drawRoundedCorner(x, y, width2, this.heightAnimation, 3.5f, ColorUtil.rgba(27, 25, 41, 255));

        RenderUtil.Render2D.drawShadow(x,y,width2 + 5,15,19, ColorUtil.rgba(27, 25, 41, 222));

        StyledFont small1 = Fonts.sfbold[15];

        small1.drawString(stack, "Hotkeys", (x + 5.0f), (y + 5.0f), new Color(255, 255, 255, 255).getRGB());

        int i = 0;

        for (Function f : Managment.FUNCTION_MANAGER.getFunctions()) {

            String text;

            if (f.bind == 0 || !f.state || (text = ClientUtil.getKey(f.bind)) == null) continue;

            StyledFont small = Fonts.sfbold[13];

            String bindText = text.toUpperCase();

            float yText = y + 17.0f;

            RenderUtil.SmartScissor.push();

            RenderUtil.SmartScissor.setFromComponentCoordinates(x, y, width2, this.heightAnimation);

            small.drawString(stack, f.name, (x + 4.0f), yText, new Color(255, 255, 255, 255).getRGB());

            small.drawString(stack, "On", (x + 62.0f), yText, new Color(255, 255, 255, 255).getRGB());

            RenderUtil.SmartScissor.unset();

            RenderUtil.SmartScissor.pop();

            y += offset;

            ++i;

        }

        this.heightAnimation = AnimationMath.fast(this.heightAnimation, height2, 11.0f);

        this.activeBind = i;

        this.KeyBinds.setWidth(width2);

        this.KeyBinds.setHeight(height2);

    }



    public void Effects(MatrixStack stack) {

        float x = 3;

        float y = 40;

        float offset = this.offsetEffects.getValue().floatValue();

        float height2 = 21.3f;

        StyledFont small = Fonts.msSemiBold[13];

        int counterEffect = 0;

        for (EffectInstance effectInstance : Hud.mc.player.getActivePotionEffects()) {

            String levelpotion = String.valueOf(effectInstance.getAmplifier() + 1);

            float textWidthBonus = 27.3f;

            if (levelpotion.contains("1")) {

                levelpotion = "";

                textWidthBonus -= 5.0f;

            }

            String durationText = EffectUtils.getPotionDurationString(effectInstance, 1.0f);

            String text = I18n.format(effectInstance.getEffectName(), new Object[0]);

            float textWidth = small.getWidth(text + effectInstance.getAmplifier() + levelpotion) + textWidthBonus - 0.6f;

            RenderUtil.Render2D.drawRoundedCorner(x, y, textWidth, height2, 3.0f, ColorUtil.rgba(27, 25, 41, 255));

            small.drawString(stack, text + " " + levelpotion, (double)(x + 22.3f), (double)(y + 5.5f), new Color(255, 255, 255, 255).getRGB());

            small.drawString(stack, durationText, (double)(x + 22.3f), (double)(y + 13.5f), new Color(255, 255, 255, 255).getRGB());

            PotionSpriteUploader potionspriteuploader = mc.getPotionSpriteUploader();

            Effect effect = effectInstance.getPotion();

            TextureAtlasSprite textureatlassprite = potionspriteuploader.getSprite(effect);

            mc.getTextureManager().bindTexture(textureatlassprite.getAtlasTexture().getTextureLocation());

            DisplayEffectsScreen.blit(stack, (int)(x + 2.0f), (int)y + 2, 10, 18, 18, textureatlassprite);

            y += offset;

            ++counterEffect;

            this.Effects.setWidth(textWidth);

        }

        float setHeight = offset / 8.0f * (float)counterEffect;

        this.Effects.setHeight(height2 * (float)counterEffect + setHeight);

    }



    public void BPS(MatrixStack stack) {

        float x = 3;

        float y = 507;

        float height2 = 15.0f;

        StyledFont small = Fonts.msSemiBold[14];

        String text = "Speed: " + String.format("%.2f", Math.hypot(mc.player.getPosX() - mc.player.prevPosX, mc.player.getPosZ() - mc.player.prevPosZ) * 20.0);

        float textWidth = small.getWidth(text) + 8.5f;

        RenderUtil.Render2D.drawRoundedCorner(x, y, textWidth, height2, 3.0f, ColorUtil.rgba(27, 25, 41, 255));

        RenderUtil.Render2D.drawShadow(x,y,textWidth + 5,15,19, ColorUtil.getColorStyle(255));

        small.drawString(stack, text, (x + 4.5f), (double)y + 6.3, new Color(255, 255, 255, 255).getRGB());

        this.BPS.setWidth(textWidth);

        this.BPS.setHeight(height2);

    }



    public void Coords(MatrixStack stack) {

        float x = 3;

        float y = 524;

        float height2 = 15.0f;

        StyledFont small = Fonts.msSemiBold[14];

        int X = (int)Hud.mc.player.getPosX();

        int Y = (int)Hud.mc.player.getPosY();

        int Z2 = (int)Hud.mc.player.getPosZ();

        String text = "Coords: X: " + X + " Y: " + Y + " Z: " + Z2;

        float textWidth = small.getWidth(text) + 8.5f;

        RenderUtil.Render2D.drawRoundedCorner(x, y, textWidth, height2, 3.0f, new Color(27,25,41,255).getRGB());

        RenderUtil.Render2D.drawShadow(x,y,textWidth + 5,15,19, ColorUtil.getColorStyle(255));

        small.drawString(stack, text, (x + 4.5f), (y + 6.0f), new Color(255, 255, 255, 255).getRGB());

        this.Coords.setWidth(textWidth);

        this.Coords.setHeight(height2);

    }



    public void Logo(MatrixStack stack) {

        float x = 3;

        float y = 3;

        float height2 = 17.0f;



        String text = "" + HudUtil.serverIP();

        String fps = "" + Minecraft.debugFPS;

        String tit = "starside free";

        float textWidth = Fonts.sfbold[18].getWidth(text) + 12;

        RenderUtil.Render2D.drawRoundedCorner(x, y, textWidth, height2, 3.5f, new Color(27,25,41,255).getRGB());

        RenderUtil.Render2D.drawShadow(x,y,textWidth + 5,15,19, ColorUtil.rgba(27, 25, 41, 222));

        RenderUtil.Render2D.drawRoundedCorner(x + 0, y + 18, textWidth, height2, 3.5f, new Color(27,25,41,255).getRGB());

        RenderUtil.Render2D.drawShadow(x,y,textWidth + 5,15,19, ColorUtil.rgba(27, 25, 41, 222));

        RenderUtil.Render2D.drawRoundedCorner(x + 438f, y + 1.0f, textWidth, height2, 3.5f, new Color(27,25,41,255).getRGB());

        RenderUtil.Render2D.drawShadow(x + 438f,y + 1.0f,textWidth + 5.0f,15,19, ColorUtil.rgba(27, 25, 41, 222));

        Fonts.sfbold[18].drawString(stack, "" + HudUtil.serverIP(), x + 3.0f, y + 5.5f, new Color(255, 255, 255, 255).getRGB());

        Fonts.sfbold[18].drawString(stack, "StarSide Free" , x + 450.0f, y + 5.5f, new Color(255, 255, 255, 255).getRGB());

        Fonts.sfbold[18].drawString(stack, "fps " + Minecraft.debugFPS + " | " + "ping " + HudUtil.calculatePing(), x + 3.0f, y + 23f, new Color(255, 255, 255, 255).getRGB());

        this.Logo.setWidth(textWidth);

        this.Logo.setHeight(height2);

    }



    public void TimerHUD(MatrixStack stack) {

        float x = this.TimerHUD.getX();

        float y = this.TimerHUD.getY();

        float width2 = 71.0f;

        float height2 = 25.0f;

        float quotient = Managment.FUNCTION_MANAGER.timerFunction.maxViolation / Managment.FUNCTION_MANAGER.timerFunction.timerAmount.getValue().floatValue();

        float minimumValue = Math.min(Managment.FUNCTION_MANAGER.timerFunction.getViolation(), quotient);

        this.perc = AnimationMath.lerp(this.perc, (quotient - minimumValue) / quotient, 7.0f);

        String text = (int)(this.perc * 100.0f) + "%";

        RenderUtil.Render2D.drawRoundedCorner(x, y, width2, height2, 3, new Color(0, 0, 0, 195).getRGB());

        RenderUtil.Render2D.drawRoundedCorner(x + 5.0f, y + 14.0f, 61.0f, 8.0f, 0.0f, new Color(23, 23, 23, 196).getRGB());

        RenderUtil.Render2D.drawRoundedCorner(x + 5.0f, y + 14.0f, 61.0f * this.perc, 8.0f, 3.0f, ColorUtil.getColorStyle(0.0f));

        Fonts.msSemiBold[16].drawString(stack, "Timer ", (double)(x + 23.5f), (double)(y + 7.4f), new Color(255, 255, 255, 255).getRGB());

        if (this.perc * 100.0f < 10.0f) {

//            Fonts.msSemiBold[13].drawString(stack, text, (double)(x + 55.0f), (double)(y + 7.4f), new Color(255, 255, 255, 255).getRGB());

        } else if (this.perc * 100.0f == 100.0f) {

//            Fonts.msSemiBold[13].drawString(stack, text, (double)(x + 49.5f), (double)(y + 7.4f), new Color(255, 255, 255, 255).getRGB());

        } else {

//            Fonts.msSemiBold[13].drawString(stack, text, (double)(x + 51.5f), (double)(y + 7.4f), new Color(255, 255, 255, 255).getRGB());

        }

        this.TimerHUD.setWidth(width2);

        this.TimerHUD.setHeight(height2);

    }



    public void TargetHUD(MatrixStack stack) {

        float x = this.TargetHUD.getX();

        float y = this.TargetHUD.getY();

        float width2 = 115.0f;

        float height2 = 50.0f;

        float widthFace = 50.0f;

        this.target = this.getTarget(this.target);

        this.targetHudAnimation.setDuration(280);

        this.scale = this.targetHudAnimation.getOutput();

        if (this.scale == 0.0) {

            this.target = null;

        }

        if (this.target == null) {

            return;

        }

        GlStateManager.pushMatrix();

        AnimationMath.sizeAnimation(x + width2 / 2.0f, y + 15.0f, this.scale);

        RenderUtil.Render2D.drawRoundedCorner(x, y, width2 - 5, height2, 3.0f, ColorUtil.rgba(27, 25, 41, 255));

        RenderUtil.Render2D.drawShadow(x,y,width2 + 5,15,19, ColorUtil.getColorStyle(255));

        if (this.target instanceof PlayerEntity) {

            RenderUtil.Render2D.drawFace(x + 2.5f, y + 4, 8.0f, 8.0f, 8.0f, 8.0f, widthFace - 20, height2 - 20, 64.0f, 64.0f, (AbstractClientPlayerEntity)this.target);

        }

        float xHP = x + widthFace + 3.8f;

        float yHP = y + 21.3f;

        float widthHP = 52.0f;

        this.health = AnimationMath.fast(this.health, this.target.getHealth() / this.target.getMaxHealth(), 6.0f);

        this.health = MathHelper.clamp(this.health, 0.0f, 1.0f);

        this.absorpation = AnimationMath.fast(this.absorpation, this.target.getAbsorptionAmount() / this.target.getMaxHealth(), 6.0f);

        this.absorpation = MathHelper.clamp(this.absorpation, 0.0f, 1.0f);

        RenderUtil.Render2D.drawRoundedCorner(xHP - 52, yHP + 17, 106.0f * this.health, 9f, 1f, ColorUtil.getColorStyle(0.0f));

        RenderUtil.Render2D.drawShadow(x,y,width2 + 5,15,19, ColorUtil.getColorStyle(255));

        RenderUtil.Render2D.drawRoundedCorner(xHP - 52, yHP + 17, 106.0f * this.absorpation, 9f, 1f, new Color(222, 211, 14, 255).getRGB());

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

        RenderUtil.SmartScissor.push();

        RenderUtil.SmartScissor.setFromComponentCoordinates(x, y, width2 - 6.0f, height2);

        Fonts.msSemiBold[16].drawString(stack, targetName, (double)xHP - 5, (double)(yHP - 17.3f), new Color(255, 255, 255, 255).getRGB());

        RenderUtil.SmartScissor.unset();

        RenderUtil.SmartScissor.pop();

        String HP = String.valueOf(this.target.getHealth() + this.target.getAbsorptionAmount());

        String StringHP = HP.substring(0, Math.min(HP.length(), 4));

        if (this.target.getHealth() + this.target.getAbsorptionAmount() < 10.0f) {

            StringHP = HP.substring(0, Math.min(HP.length(), 3));

        }

        Fonts.msSemiBold[14].drawString(stack, "Health: " + StringHP, (double)xHP - 20, (double)(yHP + 8.5f), new Color(255, 255, 255, 255).getRGB());

        this.drawItemStack(x + 35, y + 13.0f, 10.5f, 0.7f);

        GlStateManager.popMatrix();

        this.TargetHUD.setWidth(width2);

        this.TargetHUD.setHeight(height2);

    }



    private void drawItemStack(float x, float y, float offset, float scaleValue) {

        ArrayList<ItemStack> stackList = new ArrayList<ItemStack>(Arrays.asList(this.target.getHeldItemMainhand(), this.target.getHeldItemOffhand()));

        stackList.addAll((Collection)this.target.getArmorInventoryList());

        AtomicReference<Float> posX = new AtomicReference<Float>(Float.valueOf(x));

        stackList.stream().filter(stack -> !stack.isEmpty()).forEach(stack -> HudUtil.drawItemStack(stack, posX.getAndAccumulate(Float.valueOf(offset), Float::sum).floatValue(), y, true, true, scaleValue));

    }



    private LivingEntity getTarget(LivingEntity nullTarget) {

        LivingEntity target = nullTarget;

        FunctionManager functionManager = Managment.FUNCTION_MANAGER;

        if (functionManager.auraNew.getTarget() instanceof LivingEntity) {

            FunctionManager functionManager2 = Managment.FUNCTION_MANAGER;

            target = functionManager2.auraNew.getTarget();

            this.targetHudAnimation.setDirection(Direction.FORWARDS);

        } else if (IMinecraft.mc.currentScreen instanceof ChatScreen) {

            target = IMinecraft.mc.player;

            this.targetHudAnimation.setDirection(Direction.FORWARDS);

        } else {

            this.targetHudAnimation.setDirection(Direction.BACKWARDS);

        }

        return target;

    }
/del хуйня
 
делал худ на орбите, переделал худ, так же сливаю худ фришки, знаю легко это сделать но на премке жёстче
ss -
Пожалуйста, авторизуйтесь для просмотра ссылки.

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

hud:
Expand Collapse Copy
package hilz.orbita.modules.impl.render;



import com.mojang.blaze3d.matrix.MatrixStack;

import com.mojang.blaze3d.platform.GlStateManager;

import hilz.orbita.Initilization;

import hilz.orbita.events.Event;

import hilz.orbita.events.impl.render.EventRender;

import hilz.orbita.managment.Managment;

import hilz.orbita.modules.Function;

import hilz.orbita.modules.FunctionAnnotation;

import hilz.orbita.modules.FunctionManager;

import hilz.orbita.modules.Type;

import hilz.orbita.modules.settings.imp.BooleanOption;

import hilz.orbita.modules.settings.imp.MultiBoxSetting;

import hilz.orbita.modules.settings.imp.SliderSetting;

import hilz.orbita.util.ClientUtil;

import hilz.orbita.util.IMinecraft;

import hilz.orbita.util.animations.Animation;

import hilz.orbita.util.animations.Direction;

import hilz.orbita.util.animations.impl.EaseBackIn;

import hilz.orbita.util.drag.Dragging;

import hilz.orbita.util.font.Fonts;

import hilz.orbita.util.font.styled.StyledFont;

import hilz.orbita.util.misc.HudUtil;

import hilz.orbita.util.render.ColorUtil;

import hilz.orbita.util.render.RenderUtil;

import hilz.orbita.util.render.animation.AnimationMath;

import net.minecraft.client.Minecraft;

import net.minecraft.client.entity.player.AbstractClientPlayerEntity;

import net.minecraft.client.gui.DisplayEffectsScreen;

import net.minecraft.client.gui.screen.ChatScreen;

import net.minecraft.client.network.play.NetworkPlayerInfo;

import net.minecraft.client.renderer.texture.PotionSpriteUploader;

import net.minecraft.client.renderer.texture.TextureAtlasSprite;

import net.minecraft.client.resources.I18n;

import net.minecraft.entity.LivingEntity;

import net.minecraft.entity.player.PlayerEntity;

import net.minecraft.item.ItemStack;

import net.minecraft.item.Items;

import net.minecraft.potion.Effect;

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 java.awt.*;

import java.util.ArrayList;

import java.util.Arrays;

import java.util.Collection;

import java.util.Comparator;

import java.util.concurrent.atomic.AtomicReference;

import java.util.regex.Pattern;



@FunctionAnnotation(name="Display", type= Type.Render)

public class Hud

        extends Function {

    public static MultiBoxSetting elements = new MultiBoxSetting("Elements",

            new BooleanOption("Active Target", true),

            new BooleanOption("Timer Indicator", true),

            new BooleanOption("Logo", true),

            new BooleanOption("Coordinates", true),

            new BooleanOption("Speed", true),

            new BooleanOption("Effects", true),

            new BooleanOption("Active Binds", true),

            new BooleanOption("Active Staff", true),

            new BooleanOption("Armor", true),

            new BooleanOption("Cooldown", true));



    private final SliderSetting offsetEffects = new SliderSetting("\u0420\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432", 24.0f, 23.0f, 26.0f, 0.1f).setVisible(() -> elements.get(5));

    final Dragging TargetHUD = Initilization.createDrag(this, "TargetHUD7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging TimerHUD = Initilization.createDrag(this, "TimerHUD7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging Logo = Initilization.createDrag(this, "Logo7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging Coords = Initilization.createDrag(this, "Coords7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging BPS = Initilization.createDrag(this, "BPS7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging Effects = Initilization.createDrag(this, "Effects7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging KeyBinds = Initilization.createDrag(this, "KeyBinds7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging StaffActive = Initilization.createDrag(this, "StaffActive7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging Cooldown = Initilization.createDrag(this, "Cooldown7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    int activeStaff = 0;

    private final Pattern namePattern = Pattern.compile("^\\w{3,16}$");

    int activeBind = 0;

    float heightAnimation = 0.0f;

    private float perc;

    private final Animation targetHudAnimation = new EaseBackIn(270, 1.0, 1.5f);

    private double scale = 0.0;

    private LivingEntity target = null;

    float health = 0.0f;

    float absorpation = 0.0f;



    public Hud() {

        this.addSettings(elements, this.offsetEffects);

    }



    [USER=1367676]@override[/USER]

    public void onEvent(Event event) {

        if (event instanceof EventRender) {

            EventRender eventRender = (EventRender)event;

            MatrixStack stack = eventRender.matrixStack;

            if (elements.get(0)) {

                this.TargetHUD(stack);

            }

            if (elements.get(1)) {

                this.TimerHUD(stack);

            }

            if (elements.get(2)) {

                this.Logo(stack);

            }

            if (elements.get(3)) {

                this.Coords(stack);

            }

            if (elements.get(4)) {

                this.BPS(stack);

            }

            if (elements.get(5)) {

                this.Effects(stack);

            }

            if (elements.get(6)) {

                this.KeyBinds(stack);

            }

            if (elements.get(7)) {

                this.StaffActive(stack);

            }

            if (elements.get(8)) {

                this.ArmorHUD(stack, eventRender);

            }

        }

    }



    public void ArmorHUD(MatrixStack stack, EventRender eventRender) {

        int off;

        int count = 0;

        for (int i = 0; i < Hud.mc.player.inventory.getSizeInventory(); ++i) {

            ItemStack s = Hud.mc.player.inventory.getStackInSlot(i);

            if (s.getItem() != Items.TOTEM_OF_UNDYING) continue;

            ++count;

        }

        float xPos = (float)eventRender.scaledResolution.scaledWidth() / 2.0f;

        float yPos = eventRender.scaledResolution.scaledHeight();

        boolean totemInInv = Hud.mc.player.inventory.mainInventory.stream().map(ItemStack::getItem).toList().contains(Items.TOTEM_OF_UNDYING);

        int n = off = totemInInv ? 5 : 0;

        if (Hud.mc.player.isCreative()) {

            yPos += 17.0f;

        }

        for (ItemStack s : Hud.mc.player.inventory.armorInventory) {

            ESPFunction.drawItemStack(s, xPos - (float)off + 74.0f * ((float)Hud.mc.gameSettings.guiScale / 2.0f), yPos - 56.0f * ((float)Hud.mc.gameSettings.guiScale / 2.0f), null, false);

            off += 15;

        }

        if (totemInInv) {

            ESPFunction.drawItemStack(new ItemStack(Items.TOTEM_OF_UNDYING), xPos - (float)off + 73.0f * ((float)Hud.mc.gameSettings.guiScale / 2.0f), yPos - 56.0f * ((float)Hud.mc.gameSettings.guiScale / 2.0f), String.valueOf(count), false);

        }

    }



    public void StaffActive(MatrixStack stack) {

        float x = this.StaffActive.getX();

        float y = this.StaffActive.getY();

        float offset = 9.0f;

        float height2 = 20.5f;

        float width2 = 100.0f;

        height2 += offset * (float)this.activeStaff - 4.0f;

        float xStaff = x + 26.0f;

        if (this.activeStaff == 0) {

            height2 -= 1.5f;

            width2 -= 25.0f;

            xStaff -= 12.5f;

        }



        RenderUtil.Render2D.drawRoundedRect(x,y,width2,height2,3.5f,ColorUtil.rgba(27, 25, 41, 255));

        RenderUtil.Render2D.drawShadow(x,y,width2 + 5,15,19, ColorUtil.getColorStyle(255));

        StyledFont small1 = Fonts.sfbold[15];

        small1.drawString(stack, "Staff List", (double)xStaff - 23.0f, (double)(y + 5.0f), new Color(255, 255, 255, 255).getRGB());

        int i = 0;

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

            String name = team.getMembershipCollection().toString();

            if (!this.namePattern.matcher(name = name.substring(1, name.length() - 1)).matches()) continue;

            boolean vanish = true;

            boolean near = false;

            boolean active = false;

            for (AbstractClientPlayerEntity player : Hud.mc.world.getPlayers()) {

                if (!player.getNameClear().equals(name)) continue;

                near = true;

            }

            for (NetworkPlayerInfo info : mc.getConnection().getPlayerInfoMap()) {

                if (!info.getGameProfile().getName().equals(name)) continue;

                vanish = false;

                if (near) continue;

                active = true;

            }

            if (!vanish && !Managment.STAFF_MANAGER.isStaff(name)) continue;

            String Name2 = name.substring(0, Math.min(name.length(), 10));

            StyledFont small = Fonts.sfbold[13];

            StyledFont small2 = Fonts.sfbold[14];

            float yText = y + 17.0f;

            small2.drawString(stack, Name2, (double)(x + 4.0f), (double)yText, new Color(255, 255, 255, 255).getRGB());

            if (vanish) {

                small.drawString(stack, "Spectator", (double)(x + 63.5f), (double)yText, new Color(231, 52, 52, 255).getRGB());

            } else if (active) {

                small.drawString(stack, "Online", (double)(x + 74f), (double)yText, new Color(116, 236, 114, 255).getRGB());

            } else if (near) {

                small.drawString(stack, "Near", (double)(x + 80.8f), (double)yText, new Color(255, 251, 0, 255).getRGB());

            }

            y += offset;

            ++i;

        }

        this.activeStaff = i;

        this.StaffActive.setWidth(width2);

        this.StaffActive.setHeight(height2);

    }



    public void KeyBinds(MatrixStack stack) {

        float x = this.KeyBinds.getX();

        float y = this.KeyBinds.getY();

        float offset = 10f;

        float height2 = 20.0f;

        float width2 = 75.0f;

        height2 += offset * (float)this.activeBind - 5.0f;

        if (this.activeBind == 0) {

            height2 -= 1.0f;

        }

        RenderUtil.Render2D.drawRoundedCorner(x, y, width2, this.heightAnimation, 3.5f, ColorUtil.rgba(27, 25, 41, 255));

        RenderUtil.Render2D.drawShadow(x,y,width2 + 5,15,19, ColorUtil.rgba(27, 25, 41, 222));

        StyledFont small1 = Fonts.sfbold[15];

        small1.drawString(stack, "Hotkeys", (x + 5.0f), (y + 5.0f), new Color(255, 255, 255, 255).getRGB());

        int i = 0;

        for (Function f : Managment.FUNCTION_MANAGER.getFunctions()) {

            String text;

            if (f.bind == 0 || !f.state || (text = ClientUtil.getKey(f.bind)) == null) continue;

            StyledFont small = Fonts.sfbold[13];

            String bindText = text.toUpperCase();

            float yText = y + 17.0f;

            RenderUtil.SmartScissor.push();

            RenderUtil.SmartScissor.setFromComponentCoordinates(x, y, width2, this.heightAnimation);

            small.drawString(stack, f.name, (x + 4.0f), yText, new Color(255, 255, 255, 255).getRGB());

            small.drawString(stack, "On", (x + 62.0f), yText, new Color(255, 255, 255, 255).getRGB());

            RenderUtil.SmartScissor.unset();

            RenderUtil.SmartScissor.pop();

            y += offset;

            ++i;

        }

        this.heightAnimation = AnimationMath.fast(this.heightAnimation, height2, 11.0f);

        this.activeBind = i;

        this.KeyBinds.setWidth(width2);

        this.KeyBinds.setHeight(height2);

    }



    public void Effects(MatrixStack stack) {

        float x = 3;

        float y = 40;

        float offset = this.offsetEffects.getValue().floatValue();

        float height2 = 21.3f;

        StyledFont small = Fonts.msSemiBold[13];

        int counterEffect = 0;

        for (EffectInstance effectInstance : Hud.mc.player.getActivePotionEffects()) {

            String levelpotion = String.valueOf(effectInstance.getAmplifier() + 1);

            float textWidthBonus = 27.3f;

            if (levelpotion.contains("1")) {

                levelpotion = "";

                textWidthBonus -= 5.0f;

            }

            String durationText = EffectUtils.getPotionDurationString(effectInstance, 1.0f);

            String text = I18n.format(effectInstance.getEffectName(), new Object[0]);

            float textWidth = small.getWidth(text + effectInstance.getAmplifier() + levelpotion) + textWidthBonus - 0.6f;

            RenderUtil.Render2D.drawRoundedCorner(x, y, textWidth, height2, 3.0f, ColorUtil.rgba(27, 25, 41, 255));

            small.drawString(stack, text + " " + levelpotion, (double)(x + 22.3f), (double)(y + 5.5f), new Color(255, 255, 255, 255).getRGB());

            small.drawString(stack, durationText, (double)(x + 22.3f), (double)(y + 13.5f), new Color(255, 255, 255, 255).getRGB());

            PotionSpriteUploader potionspriteuploader = mc.getPotionSpriteUploader();

            Effect effect = effectInstance.getPotion();

            TextureAtlasSprite textureatlassprite = potionspriteuploader.getSprite(effect);

            mc.getTextureManager().bindTexture(textureatlassprite.getAtlasTexture().getTextureLocation());

            DisplayEffectsScreen.blit(stack, (int)(x + 2.0f), (int)y + 2, 10, 18, 18, textureatlassprite);

            y += offset;

            ++counterEffect;

            this.Effects.setWidth(textWidth);

        }

        float setHeight = offset / 8.0f * (float)counterEffect;

        this.Effects.setHeight(height2 * (float)counterEffect + setHeight);

    }



    public void BPS(MatrixStack stack) {

        float x = 3;

        float y = 507;

        float height2 = 15.0f;

        StyledFont small = Fonts.msSemiBold[14];

        String text = "Speed: " + String.format("%.2f", Math.hypot(mc.player.getPosX() - mc.player.prevPosX, mc.player.getPosZ() - mc.player.prevPosZ) * 20.0);

        float textWidth = small.getWidth(text) + 8.5f;

        RenderUtil.Render2D.drawRoundedCorner(x, y, textWidth, height2, 3.0f, ColorUtil.rgba(27, 25, 41, 255));

        RenderUtil.Render2D.drawShadow(x,y,textWidth + 5,15,19, ColorUtil.getColorStyle(255));

        small.drawString(stack, text, (x + 4.5f), (double)y + 6.3, new Color(255, 255, 255, 255).getRGB());

        this.BPS.setWidth(textWidth);

        this.BPS.setHeight(height2);

    }



    public void Coords(MatrixStack stack) {

        float x = 3;

        float y = 524;

        float height2 = 15.0f;

        StyledFont small = Fonts.msSemiBold[14];

        int X = (int)Hud.mc.player.getPosX();

        int Y = (int)Hud.mc.player.getPosY();

        int Z2 = (int)Hud.mc.player.getPosZ();

        String text = "Coords: X: " + X + " Y: " + Y + " Z: " + Z2;

        float textWidth = small.getWidth(text) + 8.5f;

        RenderUtil.Render2D.drawRoundedCorner(x, y, textWidth, height2, 3.0f, new Color(27,25,41,255).getRGB());

        RenderUtil.Render2D.drawShadow(x,y,textWidth + 5,15,19, ColorUtil.getColorStyle(255));

        small.drawString(stack, text, (x + 4.5f), (y + 6.0f), new Color(255, 255, 255, 255).getRGB());

        this.Coords.setWidth(textWidth);

        this.Coords.setHeight(height2);

    }



    public void Logo(MatrixStack stack) {

        float x = 3;

        float y = 3;

        float height2 = 17.0f;



        String text = "" + HudUtil.serverIP();

        String fps = "" + Minecraft.debugFPS;

        String tit = "starside free";

        float textWidth = Fonts.sfbold[18].getWidth(text) + 12;

        RenderUtil.Render2D.drawRoundedCorner(x, y, textWidth, height2, 3.5f, new Color(27,25,41,255).getRGB());

        RenderUtil.Render2D.drawShadow(x,y,textWidth + 5,15,19, ColorUtil.rgba(27, 25, 41, 222));

        RenderUtil.Render2D.drawRoundedCorner(x + 0, y + 18, textWidth, height2, 3.5f, new Color(27,25,41,255).getRGB());

        RenderUtil.Render2D.drawShadow(x,y,textWidth + 5,15,19, ColorUtil.rgba(27, 25, 41, 222));

        RenderUtil.Render2D.drawRoundedCorner(x + 438f, y + 1.0f, textWidth, height2, 3.5f, new Color(27,25,41,255).getRGB());

        RenderUtil.Render2D.drawShadow(x + 438f,y + 1.0f,textWidth + 5.0f,15,19, ColorUtil.rgba(27, 25, 41, 222));

        Fonts.sfbold[18].drawString(stack, "" + HudUtil.serverIP(), x + 3.0f, y + 5.5f, new Color(255, 255, 255, 255).getRGB());

        Fonts.sfbold[18].drawString(stack, "StarSide Free" , x + 450.0f, y + 5.5f, new Color(255, 255, 255, 255).getRGB());

        Fonts.sfbold[18].drawString(stack, "fps " + Minecraft.debugFPS + " | " + "ping " + HudUtil.calculatePing(), x + 3.0f, y + 23f, new Color(255, 255, 255, 255).getRGB());

        this.Logo.setWidth(textWidth);

        this.Logo.setHeight(height2);

    }



    public void TimerHUD(MatrixStack stack) {

        float x = this.TimerHUD.getX();

        float y = this.TimerHUD.getY();

        float width2 = 71.0f;

        float height2 = 25.0f;

        float quotient = Managment.FUNCTION_MANAGER.timerFunction.maxViolation / Managment.FUNCTION_MANAGER.timerFunction.timerAmount.getValue().floatValue();

        float minimumValue = Math.min(Managment.FUNCTION_MANAGER.timerFunction.getViolation(), quotient);

        this.perc = AnimationMath.lerp(this.perc, (quotient - minimumValue) / quotient, 7.0f);

        String text = (int)(this.perc * 100.0f) + "%";

        RenderUtil.Render2D.drawRoundedCorner(x, y, width2, height2, 3, new Color(0, 0, 0, 195).getRGB());

        RenderUtil.Render2D.drawRoundedCorner(x + 5.0f, y + 14.0f, 61.0f, 8.0f, 0.0f, new Color(23, 23, 23, 196).getRGB());

        RenderUtil.Render2D.drawRoundedCorner(x + 5.0f, y + 14.0f, 61.0f * this.perc, 8.0f, 3.0f, ColorUtil.getColorStyle(0.0f));

        Fonts.msSemiBold[16].drawString(stack, "Timer ", (double)(x + 23.5f), (double)(y + 7.4f), new Color(255, 255, 255, 255).getRGB());

        if (this.perc * 100.0f < 10.0f) {

//            Fonts.msSemiBold[13].drawString(stack, text, (double)(x + 55.0f), (double)(y + 7.4f), new Color(255, 255, 255, 255).getRGB());

        } else if (this.perc * 100.0f == 100.0f) {

//            Fonts.msSemiBold[13].drawString(stack, text, (double)(x + 49.5f), (double)(y + 7.4f), new Color(255, 255, 255, 255).getRGB());

        } else {

//            Fonts.msSemiBold[13].drawString(stack, text, (double)(x + 51.5f), (double)(y + 7.4f), new Color(255, 255, 255, 255).getRGB());

        }

        this.TimerHUD.setWidth(width2);

        this.TimerHUD.setHeight(height2);

    }



    public void TargetHUD(MatrixStack stack) {

        float x = this.TargetHUD.getX();

        float y = this.TargetHUD.getY();

        float width2 = 115.0f;

        float height2 = 50.0f;

        float widthFace = 50.0f;

        this.target = this.getTarget(this.target);

        this.targetHudAnimation.setDuration(280);

        this.scale = this.targetHudAnimation.getOutput();

        if (this.scale == 0.0) {

            this.target = null;

        }

        if (this.target == null) {

            return;

        }

        GlStateManager.pushMatrix();

        AnimationMath.sizeAnimation(x + width2 / 2.0f, y + 15.0f, this.scale);

        RenderUtil.Render2D.drawRoundedCorner(x, y, width2 - 5, height2, 3.0f, ColorUtil.rgba(27, 25, 41, 255));

        RenderUtil.Render2D.drawShadow(x,y,width2 + 5,15,19, ColorUtil.getColorStyle(255));

        if (this.target instanceof PlayerEntity) {

            RenderUtil.Render2D.drawFace(x + 2.5f, y + 4, 8.0f, 8.0f, 8.0f, 8.0f, widthFace - 20, height2 - 20, 64.0f, 64.0f, (AbstractClientPlayerEntity)this.target);

        }

        float xHP = x + widthFace + 3.8f;

        float yHP = y + 21.3f;

        float widthHP = 52.0f;

        this.health = AnimationMath.fast(this.health, this.target.getHealth() / this.target.getMaxHealth(), 6.0f);

        this.health = MathHelper.clamp(this.health, 0.0f, 1.0f);

        this.absorpation = AnimationMath.fast(this.absorpation, this.target.getAbsorptionAmount() / this.target.getMaxHealth(), 6.0f);

        this.absorpation = MathHelper.clamp(this.absorpation, 0.0f, 1.0f);

        RenderUtil.Render2D.drawRoundedCorner(xHP - 52, yHP + 17, 106.0f * this.health, 9f, 1f, ColorUtil.getColorStyle(0.0f));

        RenderUtil.Render2D.drawShadow(x,y,width2 + 5,15,19, ColorUtil.getColorStyle(255));

        RenderUtil.Render2D.drawRoundedCorner(xHP - 52, yHP + 17, 106.0f * this.absorpation, 9f, 1f, new Color(222, 211, 14, 255).getRGB());

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

        RenderUtil.SmartScissor.push();

        RenderUtil.SmartScissor.setFromComponentCoordinates(x, y, width2 - 6.0f, height2);

        Fonts.msSemiBold[16].drawString(stack, targetName, (double)xHP - 5, (double)(yHP - 17.3f), new Color(255, 255, 255, 255).getRGB());

        RenderUtil.SmartScissor.unset();

        RenderUtil.SmartScissor.pop();

        String HP = String.valueOf(this.target.getHealth() + this.target.getAbsorptionAmount());

        String StringHP = HP.substring(0, Math.min(HP.length(), 4));

        if (this.target.getHealth() + this.target.getAbsorptionAmount() < 10.0f) {

            StringHP = HP.substring(0, Math.min(HP.length(), 3));

        }

        Fonts.msSemiBold[14].drawString(stack, "Health: " + StringHP, (double)xHP - 20, (double)(yHP + 8.5f), new Color(255, 255, 255, 255).getRGB());

        this.drawItemStack(x + 35, y + 13.0f, 10.5f, 0.7f);

        GlStateManager.popMatrix();

        this.TargetHUD.setWidth(width2);

        this.TargetHUD.setHeight(height2);

    }



    private void drawItemStack(float x, float y, float offset, float scaleValue) {

        ArrayList<ItemStack> stackList = new ArrayList<ItemStack>(Arrays.asList(this.target.getHeldItemMainhand(), this.target.getHeldItemOffhand()));

        stackList.addAll((Collection)this.target.getArmorInventoryList());

        AtomicReference<Float> posX = new AtomicReference<Float>(Float.valueOf(x));

        stackList.stream().filter(stack -> !stack.isEmpty()).forEach(stack -> HudUtil.drawItemStack(stack, posX.getAndAccumulate(Float.valueOf(offset), Float::sum).floatValue(), y, true, true, scaleValue));

    }



    private LivingEntity getTarget(LivingEntity nullTarget) {

        LivingEntity target = nullTarget;

        FunctionManager functionManager = Managment.FUNCTION_MANAGER;

        if (functionManager.auraNew.getTarget() instanceof LivingEntity) {

            FunctionManager functionManager2 = Managment.FUNCTION_MANAGER;

            target = functionManager2.auraNew.getTarget();

            this.targetHudAnimation.setDirection(Direction.FORWARDS);

        } else if (IMinecraft.mc.currentScreen instanceof ChatScreen) {

            target = IMinecraft.mc.player;

            this.targetHudAnimation.setDirection(Direction.FORWARDS);

        } else {

            this.targetHudAnimation.setDirection(Direction.BACKWARDS);

        }

        return target;

    }



Хилз людей плохому учит, они делают селфкод в надежде на то что их за это начнут уважать, ЕСЛИ ТЫ ХОЧЕШЬ УВАЖЕНИЯ ТО СУКА СДЕЛАЙ НОРМАЛЬНО А НЕ ВЫРВИГЛАЗНО

о боже повелитель сайта пастеров с крутым статусом высказался
кланимся в ноги
 
кому эта 10-ти минутная поделка нужна? /del
 
/DEL ЭТО ЧТО ЗА ПИЗДЕЦ
 
хотите залью адекватную версию этого дерьмища
 
делал худ на орбите, переделал худ, так же сливаю худ фришки, знаю легко это сделать но на премке жёстче
ss -
Пожалуйста, авторизуйтесь для просмотра ссылки.

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

hud:
Expand Collapse Copy
package hilz.orbita.modules.impl.render;



import com.mojang.blaze3d.matrix.MatrixStack;

import com.mojang.blaze3d.platform.GlStateManager;

import hilz.orbita.Initilization;

import hilz.orbita.events.Event;

import hilz.orbita.events.impl.render.EventRender;

import hilz.orbita.managment.Managment;

import hilz.orbita.modules.Function;

import hilz.orbita.modules.FunctionAnnotation;

import hilz.orbita.modules.FunctionManager;

import hilz.orbita.modules.Type;

import hilz.orbita.modules.settings.imp.BooleanOption;

import hilz.orbita.modules.settings.imp.MultiBoxSetting;

import hilz.orbita.modules.settings.imp.SliderSetting;

import hilz.orbita.util.ClientUtil;

import hilz.orbita.util.IMinecraft;

import hilz.orbita.util.animations.Animation;

import hilz.orbita.util.animations.Direction;

import hilz.orbita.util.animations.impl.EaseBackIn;

import hilz.orbita.util.drag.Dragging;

import hilz.orbita.util.font.Fonts;

import hilz.orbita.util.font.styled.StyledFont;

import hilz.orbita.util.misc.HudUtil;

import hilz.orbita.util.render.ColorUtil;

import hilz.orbita.util.render.RenderUtil;

import hilz.orbita.util.render.animation.AnimationMath;

import net.minecraft.client.Minecraft;

import net.minecraft.client.entity.player.AbstractClientPlayerEntity;

import net.minecraft.client.gui.DisplayEffectsScreen;

import net.minecraft.client.gui.screen.ChatScreen;

import net.minecraft.client.network.play.NetworkPlayerInfo;

import net.minecraft.client.renderer.texture.PotionSpriteUploader;

import net.minecraft.client.renderer.texture.TextureAtlasSprite;

import net.minecraft.client.resources.I18n;

import net.minecraft.entity.LivingEntity;

import net.minecraft.entity.player.PlayerEntity;

import net.minecraft.item.ItemStack;

import net.minecraft.item.Items;

import net.minecraft.potion.Effect;

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 java.awt.*;

import java.util.ArrayList;

import java.util.Arrays;

import java.util.Collection;

import java.util.Comparator;

import java.util.concurrent.atomic.AtomicReference;

import java.util.regex.Pattern;



@FunctionAnnotation(name="Display", type= Type.Render)

public class Hud

        extends Function {

    public static MultiBoxSetting elements = new MultiBoxSetting("Elements",

            new BooleanOption("Active Target", true),

            new BooleanOption("Timer Indicator", true),

            new BooleanOption("Logo", true),

            new BooleanOption("Coordinates", true),

            new BooleanOption("Speed", true),

            new BooleanOption("Effects", true),

            new BooleanOption("Active Binds", true),

            new BooleanOption("Active Staff", true),

            new BooleanOption("Armor", true),

            new BooleanOption("Cooldown", true));



    private final SliderSetting offsetEffects = new SliderSetting("\u0420\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432", 24.0f, 23.0f, 26.0f, 0.1f).setVisible(() -> elements.get(5));

    final Dragging TargetHUD = Initilization.createDrag(this, "TargetHUD7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging TimerHUD = Initilization.createDrag(this, "TimerHUD7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging Logo = Initilization.createDrag(this, "Logo7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging Coords = Initilization.createDrag(this, "Coords7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging BPS = Initilization.createDrag(this, "BPS7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging Effects = Initilization.createDrag(this, "Effects7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging KeyBinds = Initilization.createDrag(this, "KeyBinds7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging StaffActive = Initilization.createDrag(this, "StaffActive7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging Cooldown = Initilization.createDrag(this, "Cooldown7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    int activeStaff = 0;

    private final Pattern namePattern = Pattern.compile("^\\w{3,16}$");

    int activeBind = 0;

    float heightAnimation = 0.0f;

    private float perc;

    private final Animation targetHudAnimation = new EaseBackIn(270, 1.0, 1.5f);

    private double scale = 0.0;

    private LivingEntity target = null;

    float health = 0.0f;

    float absorpation = 0.0f;



    public Hud() {

        this.addSettings(elements, this.offsetEffects);

    }



    [USER=1367676]@override[/USER]

    public void onEvent(Event event) {

        if (event instanceof EventRender) {

            EventRender eventRender = (EventRender)event;

            MatrixStack stack = eventRender.matrixStack;

            if (elements.get(0)) {

                this.TargetHUD(stack);

            }

            if (elements.get(1)) {

                this.TimerHUD(stack);

            }

            if (elements.get(2)) {

                this.Logo(stack);

            }

            if (elements.get(3)) {

                this.Coords(stack);

            }

            if (elements.get(4)) {

                this.BPS(stack);

            }

            if (elements.get(5)) {

                this.Effects(stack);

            }

            if (elements.get(6)) {

                this.KeyBinds(stack);

            }

            if (elements.get(7)) {

                this.StaffActive(stack);

            }

            if (elements.get(8)) {

                this.ArmorHUD(stack, eventRender);

            }

        }

    }



    public void ArmorHUD(MatrixStack stack, EventRender eventRender) {

        int off;

        int count = 0;

        for (int i = 0; i < Hud.mc.player.inventory.getSizeInventory(); ++i) {

            ItemStack s = Hud.mc.player.inventory.getStackInSlot(i);

            if (s.getItem() != Items.TOTEM_OF_UNDYING) continue;

            ++count;

        }

        float xPos = (float)eventRender.scaledResolution.scaledWidth() / 2.0f;

        float yPos = eventRender.scaledResolution.scaledHeight();

        boolean totemInInv = Hud.mc.player.inventory.mainInventory.stream().map(ItemStack::getItem).toList().contains(Items.TOTEM_OF_UNDYING);

        int n = off = totemInInv ? 5 : 0;

        if (Hud.mc.player.isCreative()) {

            yPos += 17.0f;

        }

        for (ItemStack s : Hud.mc.player.inventory.armorInventory) {

            ESPFunction.drawItemStack(s, xPos - (float)off + 74.0f * ((float)Hud.mc.gameSettings.guiScale / 2.0f), yPos - 56.0f * ((float)Hud.mc.gameSettings.guiScale / 2.0f), null, false);

            off += 15;

        }

        if (totemInInv) {

            ESPFunction.drawItemStack(new ItemStack(Items.TOTEM_OF_UNDYING), xPos - (float)off + 73.0f * ((float)Hud.mc.gameSettings.guiScale / 2.0f), yPos - 56.0f * ((float)Hud.mc.gameSettings.guiScale / 2.0f), String.valueOf(count), false);

        }

    }



    public void StaffActive(MatrixStack stack) {

        float x = this.StaffActive.getX();

        float y = this.StaffActive.getY();

        float offset = 9.0f;

        float height2 = 20.5f;

        float width2 = 100.0f;

        height2 += offset * (float)this.activeStaff - 4.0f;

        float xStaff = x + 26.0f;

        if (this.activeStaff == 0) {

            height2 -= 1.5f;

            width2 -= 25.0f;

            xStaff -= 12.5f;

        }



        RenderUtil.Render2D.drawRoundedRect(x,y,width2,height2,3.5f,ColorUtil.rgba(27, 25, 41, 255));

        RenderUtil.Render2D.drawShadow(x,y,width2 + 5,15,19, ColorUtil.getColorStyle(255));

        StyledFont small1 = Fonts.sfbold[15];

        small1.drawString(stack, "Staff List", (double)xStaff - 23.0f, (double)(y + 5.0f), new Color(255, 255, 255, 255).getRGB());

        int i = 0;

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

            String name = team.getMembershipCollection().toString();

            if (!this.namePattern.matcher(name = name.substring(1, name.length() - 1)).matches()) continue;

            boolean vanish = true;

            boolean near = false;

            boolean active = false;

            for (AbstractClientPlayerEntity player : Hud.mc.world.getPlayers()) {

                if (!player.getNameClear().equals(name)) continue;

                near = true;

            }

            for (NetworkPlayerInfo info : mc.getConnection().getPlayerInfoMap()) {

                if (!info.getGameProfile().getName().equals(name)) continue;

                vanish = false;

                if (near) continue;

                active = true;

            }

            if (!vanish && !Managment.STAFF_MANAGER.isStaff(name)) continue;

            String Name2 = name.substring(0, Math.min(name.length(), 10));

            StyledFont small = Fonts.sfbold[13];

            StyledFont small2 = Fonts.sfbold[14];

            float yText = y + 17.0f;

            small2.drawString(stack, Name2, (double)(x + 4.0f), (double)yText, new Color(255, 255, 255, 255).getRGB());

            if (vanish) {

                small.drawString(stack, "Spectator", (double)(x + 63.5f), (double)yText, new Color(231, 52, 52, 255).getRGB());

            } else if (active) {

                small.drawString(stack, "Online", (double)(x + 74f), (double)yText, new Color(116, 236, 114, 255).getRGB());

            } else if (near) {

                small.drawString(stack, "Near", (double)(x + 80.8f), (double)yText, new Color(255, 251, 0, 255).getRGB());

            }

            y += offset;

            ++i;

        }

        this.activeStaff = i;

        this.StaffActive.setWidth(width2);

        this.StaffActive.setHeight(height2);

    }



    public void KeyBinds(MatrixStack stack) {

        float x = this.KeyBinds.getX();

        float y = this.KeyBinds.getY();

        float offset = 10f;

        float height2 = 20.0f;

        float width2 = 75.0f;

        height2 += offset * (float)this.activeBind - 5.0f;

        if (this.activeBind == 0) {

            height2 -= 1.0f;

        }

        RenderUtil.Render2D.drawRoundedCorner(x, y, width2, this.heightAnimation, 3.5f, ColorUtil.rgba(27, 25, 41, 255));

        RenderUtil.Render2D.drawShadow(x,y,width2 + 5,15,19, ColorUtil.rgba(27, 25, 41, 222));

        StyledFont small1 = Fonts.sfbold[15];

        small1.drawString(stack, "Hotkeys", (x + 5.0f), (y + 5.0f), new Color(255, 255, 255, 255).getRGB());

        int i = 0;

        for (Function f : Managment.FUNCTION_MANAGER.getFunctions()) {

            String text;

            if (f.bind == 0 || !f.state || (text = ClientUtil.getKey(f.bind)) == null) continue;

            StyledFont small = Fonts.sfbold[13];

            String bindText = text.toUpperCase();

            float yText = y + 17.0f;

            RenderUtil.SmartScissor.push();

            RenderUtil.SmartScissor.setFromComponentCoordinates(x, y, width2, this.heightAnimation);

            small.drawString(stack, f.name, (x + 4.0f), yText, new Color(255, 255, 255, 255).getRGB());

            small.drawString(stack, "On", (x + 62.0f), yText, new Color(255, 255, 255, 255).getRGB());

            RenderUtil.SmartScissor.unset();

            RenderUtil.SmartScissor.pop();

            y += offset;

            ++i;

        }

        this.heightAnimation = AnimationMath.fast(this.heightAnimation, height2, 11.0f);

        this.activeBind = i;

        this.KeyBinds.setWidth(width2);

        this.KeyBinds.setHeight(height2);

    }



    public void Effects(MatrixStack stack) {

        float x = 3;

        float y = 40;

        float offset = this.offsetEffects.getValue().floatValue();

        float height2 = 21.3f;

        StyledFont small = Fonts.msSemiBold[13];

        int counterEffect = 0;

        for (EffectInstance effectInstance : Hud.mc.player.getActivePotionEffects()) {

            String levelpotion = String.valueOf(effectInstance.getAmplifier() + 1);

            float textWidthBonus = 27.3f;

            if (levelpotion.contains("1")) {

                levelpotion = "";

                textWidthBonus -= 5.0f;

            }

            String durationText = EffectUtils.getPotionDurationString(effectInstance, 1.0f);

            String text = I18n.format(effectInstance.getEffectName(), new Object[0]);

            float textWidth = small.getWidth(text + effectInstance.getAmplifier() + levelpotion) + textWidthBonus - 0.6f;

            RenderUtil.Render2D.drawRoundedCorner(x, y, textWidth, height2, 3.0f, ColorUtil.rgba(27, 25, 41, 255));

            small.drawString(stack, text + " " + levelpotion, (double)(x + 22.3f), (double)(y + 5.5f), new Color(255, 255, 255, 255).getRGB());

            small.drawString(stack, durationText, (double)(x + 22.3f), (double)(y + 13.5f), new Color(255, 255, 255, 255).getRGB());

            PotionSpriteUploader potionspriteuploader = mc.getPotionSpriteUploader();

            Effect effect = effectInstance.getPotion();

            TextureAtlasSprite textureatlassprite = potionspriteuploader.getSprite(effect);

            mc.getTextureManager().bindTexture(textureatlassprite.getAtlasTexture().getTextureLocation());

            DisplayEffectsScreen.blit(stack, (int)(x + 2.0f), (int)y + 2, 10, 18, 18, textureatlassprite);

            y += offset;

            ++counterEffect;

            this.Effects.setWidth(textWidth);

        }

        float setHeight = offset / 8.0f * (float)counterEffect;

        this.Effects.setHeight(height2 * (float)counterEffect + setHeight);

    }



    public void BPS(MatrixStack stack) {

        float x = 3;

        float y = 507;

        float height2 = 15.0f;

        StyledFont small = Fonts.msSemiBold[14];

        String text = "Speed: " + String.format("%.2f", Math.hypot(mc.player.getPosX() - mc.player.prevPosX, mc.player.getPosZ() - mc.player.prevPosZ) * 20.0);

        float textWidth = small.getWidth(text) + 8.5f;

        RenderUtil.Render2D.drawRoundedCorner(x, y, textWidth, height2, 3.0f, ColorUtil.rgba(27, 25, 41, 255));

        RenderUtil.Render2D.drawShadow(x,y,textWidth + 5,15,19, ColorUtil.getColorStyle(255));

        small.drawString(stack, text, (x + 4.5f), (double)y + 6.3, new Color(255, 255, 255, 255).getRGB());

        this.BPS.setWidth(textWidth);

        this.BPS.setHeight(height2);

    }



    public void Coords(MatrixStack stack) {

        float x = 3;

        float y = 524;

        float height2 = 15.0f;

        StyledFont small = Fonts.msSemiBold[14];

        int X = (int)Hud.mc.player.getPosX();

        int Y = (int)Hud.mc.player.getPosY();

        int Z2 = (int)Hud.mc.player.getPosZ();

        String text = "Coords: X: " + X + " Y: " + Y + " Z: " + Z2;

        float textWidth = small.getWidth(text) + 8.5f;

        RenderUtil.Render2D.drawRoundedCorner(x, y, textWidth, height2, 3.0f, new Color(27,25,41,255).getRGB());

        RenderUtil.Render2D.drawShadow(x,y,textWidth + 5,15,19, ColorUtil.getColorStyle(255));

        small.drawString(stack, text, (x + 4.5f), (y + 6.0f), new Color(255, 255, 255, 255).getRGB());

        this.Coords.setWidth(textWidth);

        this.Coords.setHeight(height2);

    }



    public void Logo(MatrixStack stack) {

        float x = 3;

        float y = 3;

        float height2 = 17.0f;



        String text = "" + HudUtil.serverIP();

        String fps = "" + Minecraft.debugFPS;

        String tit = "starside free";

        float textWidth = Fonts.sfbold[18].getWidth(text) + 12;

        RenderUtil.Render2D.drawRoundedCorner(x, y, textWidth, height2, 3.5f, new Color(27,25,41,255).getRGB());

        RenderUtil.Render2D.drawShadow(x,y,textWidth + 5,15,19, ColorUtil.rgba(27, 25, 41, 222));

        RenderUtil.Render2D.drawRoundedCorner(x + 0, y + 18, textWidth, height2, 3.5f, new Color(27,25,41,255).getRGB());

        RenderUtil.Render2D.drawShadow(x,y,textWidth + 5,15,19, ColorUtil.rgba(27, 25, 41, 222));

        RenderUtil.Render2D.drawRoundedCorner(x + 438f, y + 1.0f, textWidth, height2, 3.5f, new Color(27,25,41,255).getRGB());

        RenderUtil.Render2D.drawShadow(x + 438f,y + 1.0f,textWidth + 5.0f,15,19, ColorUtil.rgba(27, 25, 41, 222));

        Fonts.sfbold[18].drawString(stack, "" + HudUtil.serverIP(), x + 3.0f, y + 5.5f, new Color(255, 255, 255, 255).getRGB());

        Fonts.sfbold[18].drawString(stack, "StarSide Free" , x + 450.0f, y + 5.5f, new Color(255, 255, 255, 255).getRGB());

        Fonts.sfbold[18].drawString(stack, "fps " + Minecraft.debugFPS + " | " + "ping " + HudUtil.calculatePing(), x + 3.0f, y + 23f, new Color(255, 255, 255, 255).getRGB());

        this.Logo.setWidth(textWidth);

        this.Logo.setHeight(height2);

    }



    public void TimerHUD(MatrixStack stack) {

        float x = this.TimerHUD.getX();

        float y = this.TimerHUD.getY();

        float width2 = 71.0f;

        float height2 = 25.0f;

        float quotient = Managment.FUNCTION_MANAGER.timerFunction.maxViolation / Managment.FUNCTION_MANAGER.timerFunction.timerAmount.getValue().floatValue();

        float minimumValue = Math.min(Managment.FUNCTION_MANAGER.timerFunction.getViolation(), quotient);

        this.perc = AnimationMath.lerp(this.perc, (quotient - minimumValue) / quotient, 7.0f);

        String text = (int)(this.perc * 100.0f) + "%";

        RenderUtil.Render2D.drawRoundedCorner(x, y, width2, height2, 3, new Color(0, 0, 0, 195).getRGB());

        RenderUtil.Render2D.drawRoundedCorner(x + 5.0f, y + 14.0f, 61.0f, 8.0f, 0.0f, new Color(23, 23, 23, 196).getRGB());

        RenderUtil.Render2D.drawRoundedCorner(x + 5.0f, y + 14.0f, 61.0f * this.perc, 8.0f, 3.0f, ColorUtil.getColorStyle(0.0f));

        Fonts.msSemiBold[16].drawString(stack, "Timer ", (double)(x + 23.5f), (double)(y + 7.4f), new Color(255, 255, 255, 255).getRGB());

        if (this.perc * 100.0f < 10.0f) {

//            Fonts.msSemiBold[13].drawString(stack, text, (double)(x + 55.0f), (double)(y + 7.4f), new Color(255, 255, 255, 255).getRGB());

        } else if (this.perc * 100.0f == 100.0f) {

//            Fonts.msSemiBold[13].drawString(stack, text, (double)(x + 49.5f), (double)(y + 7.4f), new Color(255, 255, 255, 255).getRGB());

        } else {

//            Fonts.msSemiBold[13].drawString(stack, text, (double)(x + 51.5f), (double)(y + 7.4f), new Color(255, 255, 255, 255).getRGB());

        }

        this.TimerHUD.setWidth(width2);

        this.TimerHUD.setHeight(height2);

    }



    public void TargetHUD(MatrixStack stack) {

        float x = this.TargetHUD.getX();

        float y = this.TargetHUD.getY();

        float width2 = 115.0f;

        float height2 = 50.0f;

        float widthFace = 50.0f;

        this.target = this.getTarget(this.target);

        this.targetHudAnimation.setDuration(280);

        this.scale = this.targetHudAnimation.getOutput();

        if (this.scale == 0.0) {

            this.target = null;

        }

        if (this.target == null) {

            return;

        }

        GlStateManager.pushMatrix();

        AnimationMath.sizeAnimation(x + width2 / 2.0f, y + 15.0f, this.scale);

        RenderUtil.Render2D.drawRoundedCorner(x, y, width2 - 5, height2, 3.0f, ColorUtil.rgba(27, 25, 41, 255));

        RenderUtil.Render2D.drawShadow(x,y,width2 + 5,15,19, ColorUtil.getColorStyle(255));

        if (this.target instanceof PlayerEntity) {

            RenderUtil.Render2D.drawFace(x + 2.5f, y + 4, 8.0f, 8.0f, 8.0f, 8.0f, widthFace - 20, height2 - 20, 64.0f, 64.0f, (AbstractClientPlayerEntity)this.target);

        }

        float xHP = x + widthFace + 3.8f;

        float yHP = y + 21.3f;

        float widthHP = 52.0f;

        this.health = AnimationMath.fast(this.health, this.target.getHealth() / this.target.getMaxHealth(), 6.0f);

        this.health = MathHelper.clamp(this.health, 0.0f, 1.0f);

        this.absorpation = AnimationMath.fast(this.absorpation, this.target.getAbsorptionAmount() / this.target.getMaxHealth(), 6.0f);

        this.absorpation = MathHelper.clamp(this.absorpation, 0.0f, 1.0f);

        RenderUtil.Render2D.drawRoundedCorner(xHP - 52, yHP + 17, 106.0f * this.health, 9f, 1f, ColorUtil.getColorStyle(0.0f));

        RenderUtil.Render2D.drawShadow(x,y,width2 + 5,15,19, ColorUtil.getColorStyle(255));

        RenderUtil.Render2D.drawRoundedCorner(xHP - 52, yHP + 17, 106.0f * this.absorpation, 9f, 1f, new Color(222, 211, 14, 255).getRGB());

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

        RenderUtil.SmartScissor.push();

        RenderUtil.SmartScissor.setFromComponentCoordinates(x, y, width2 - 6.0f, height2);

        Fonts.msSemiBold[16].drawString(stack, targetName, (double)xHP - 5, (double)(yHP - 17.3f), new Color(255, 255, 255, 255).getRGB());

        RenderUtil.SmartScissor.unset();

        RenderUtil.SmartScissor.pop();

        String HP = String.valueOf(this.target.getHealth() + this.target.getAbsorptionAmount());

        String StringHP = HP.substring(0, Math.min(HP.length(), 4));

        if (this.target.getHealth() + this.target.getAbsorptionAmount() < 10.0f) {

            StringHP = HP.substring(0, Math.min(HP.length(), 3));

        }

        Fonts.msSemiBold[14].drawString(stack, "Health: " + StringHP, (double)xHP - 20, (double)(yHP + 8.5f), new Color(255, 255, 255, 255).getRGB());

        this.drawItemStack(x + 35, y + 13.0f, 10.5f, 0.7f);

        GlStateManager.popMatrix();

        this.TargetHUD.setWidth(width2);

        this.TargetHUD.setHeight(height2);

    }



    private void drawItemStack(float x, float y, float offset, float scaleValue) {

        ArrayList<ItemStack> stackList = new ArrayList<ItemStack>(Arrays.asList(this.target.getHeldItemMainhand(), this.target.getHeldItemOffhand()));

        stackList.addAll((Collection)this.target.getArmorInventoryList());

        AtomicReference<Float> posX = new AtomicReference<Float>(Float.valueOf(x));

        stackList.stream().filter(stack -> !stack.isEmpty()).forEach(stack -> HudUtil.drawItemStack(stack, posX.getAndAccumulate(Float.valueOf(offset), Float::sum).floatValue(), y, true, true, scaleValue));

    }



    private LivingEntity getTarget(LivingEntity nullTarget) {

        LivingEntity target = nullTarget;

        FunctionManager functionManager = Managment.FUNCTION_MANAGER;

        if (functionManager.auraNew.getTarget() instanceof LivingEntity) {

            FunctionManager functionManager2 = Managment.FUNCTION_MANAGER;

            target = functionManager2.auraNew.getTarget();

            this.targetHudAnimation.setDirection(Direction.FORWARDS);

        } else if (IMinecraft.mc.currentScreen instanceof ChatScreen) {

            target = IMinecraft.mc.player;

            this.targetHudAnimation.setDirection(Direction.FORWARDS);

        } else {

            this.targetHudAnimation.setDirection(Direction.BACKWARDS);

        }

        return target;

    }
для своего использования норм для залива на форум хуета
 
делал худ на орбите, переделал худ, так же сливаю худ фришки, знаю легко это сделать но на премке жёстче
ss -
Пожалуйста, авторизуйтесь для просмотра ссылки.

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

hud:
Expand Collapse Copy
package hilz.orbita.modules.impl.render;



import com.mojang.blaze3d.matrix.MatrixStack;

import com.mojang.blaze3d.platform.GlStateManager;

import hilz.orbita.Initilization;

import hilz.orbita.events.Event;

import hilz.orbita.events.impl.render.EventRender;

import hilz.orbita.managment.Managment;

import hilz.orbita.modules.Function;

import hilz.orbita.modules.FunctionAnnotation;

import hilz.orbita.modules.FunctionManager;

import hilz.orbita.modules.Type;

import hilz.orbita.modules.settings.imp.BooleanOption;

import hilz.orbita.modules.settings.imp.MultiBoxSetting;

import hilz.orbita.modules.settings.imp.SliderSetting;

import hilz.orbita.util.ClientUtil;

import hilz.orbita.util.IMinecraft;

import hilz.orbita.util.animations.Animation;

import hilz.orbita.util.animations.Direction;

import hilz.orbita.util.animations.impl.EaseBackIn;

import hilz.orbita.util.drag.Dragging;

import hilz.orbita.util.font.Fonts;

import hilz.orbita.util.font.styled.StyledFont;

import hilz.orbita.util.misc.HudUtil;

import hilz.orbita.util.render.ColorUtil;

import hilz.orbita.util.render.RenderUtil;

import hilz.orbita.util.render.animation.AnimationMath;

import net.minecraft.client.Minecraft;

import net.minecraft.client.entity.player.AbstractClientPlayerEntity;

import net.minecraft.client.gui.DisplayEffectsScreen;

import net.minecraft.client.gui.screen.ChatScreen;

import net.minecraft.client.network.play.NetworkPlayerInfo;

import net.minecraft.client.renderer.texture.PotionSpriteUploader;

import net.minecraft.client.renderer.texture.TextureAtlasSprite;

import net.minecraft.client.resources.I18n;

import net.minecraft.entity.LivingEntity;

import net.minecraft.entity.player.PlayerEntity;

import net.minecraft.item.ItemStack;

import net.minecraft.item.Items;

import net.minecraft.potion.Effect;

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 java.awt.*;

import java.util.ArrayList;

import java.util.Arrays;

import java.util.Collection;

import java.util.Comparator;

import java.util.concurrent.atomic.AtomicReference;

import java.util.regex.Pattern;



@FunctionAnnotation(name="Display", type= Type.Render)

public class Hud

        extends Function {

    public static MultiBoxSetting elements = new MultiBoxSetting("Elements",

            new BooleanOption("Active Target", true),

            new BooleanOption("Timer Indicator", true),

            new BooleanOption("Logo", true),

            new BooleanOption("Coordinates", true),

            new BooleanOption("Speed", true),

            new BooleanOption("Effects", true),

            new BooleanOption("Active Binds", true),

            new BooleanOption("Active Staff", true),

            new BooleanOption("Armor", true),

            new BooleanOption("Cooldown", true));



    private final SliderSetting offsetEffects = new SliderSetting("\u0420\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432", 24.0f, 23.0f, 26.0f, 0.1f).setVisible(() -> elements.get(5));

    final Dragging TargetHUD = Initilization.createDrag(this, "TargetHUD7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging TimerHUD = Initilization.createDrag(this, "TimerHUD7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging Logo = Initilization.createDrag(this, "Logo7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging Coords = Initilization.createDrag(this, "Coords7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging BPS = Initilization.createDrag(this, "BPS7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging Effects = Initilization.createDrag(this, "Effects7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging KeyBinds = Initilization.createDrag(this, "KeyBinds7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging StaffActive = Initilization.createDrag(this, "StaffActive7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging Cooldown = Initilization.createDrag(this, "Cooldown7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    int activeStaff = 0;

    private final Pattern namePattern = Pattern.compile("^\\w{3,16}$");

    int activeBind = 0;

    float heightAnimation = 0.0f;

    private float perc;

    private final Animation targetHudAnimation = new EaseBackIn(270, 1.0, 1.5f);

    private double scale = 0.0;

    private LivingEntity target = null;

    float health = 0.0f;

    float absorpation = 0.0f;



    public Hud() {

        this.addSettings(elements, this.offsetEffects);

    }



    [USER=1367676]@override[/USER]

    public void onEvent(Event event) {

        if (event instanceof EventRender) {

            EventRender eventRender = (EventRender)event;

            MatrixStack stack = eventRender.matrixStack;

            if (elements.get(0)) {

                this.TargetHUD(stack);

            }

            if (elements.get(1)) {

                this.TimerHUD(stack);

            }

            if (elements.get(2)) {

                this.Logo(stack);

            }

            if (elements.get(3)) {

                this.Coords(stack);

            }

            if (elements.get(4)) {

                this.BPS(stack);

            }

            if (elements.get(5)) {

                this.Effects(stack);

            }

            if (elements.get(6)) {

                this.KeyBinds(stack);

            }

            if (elements.get(7)) {

                this.StaffActive(stack);

            }

            if (elements.get(8)) {

                this.ArmorHUD(stack, eventRender);

            }

        }

    }



    public void ArmorHUD(MatrixStack stack, EventRender eventRender) {

        int off;

        int count = 0;

        for (int i = 0; i < Hud.mc.player.inventory.getSizeInventory(); ++i) {

            ItemStack s = Hud.mc.player.inventory.getStackInSlot(i);

            if (s.getItem() != Items.TOTEM_OF_UNDYING) continue;

            ++count;

        }

        float xPos = (float)eventRender.scaledResolution.scaledWidth() / 2.0f;

        float yPos = eventRender.scaledResolution.scaledHeight();

        boolean totemInInv = Hud.mc.player.inventory.mainInventory.stream().map(ItemStack::getItem).toList().contains(Items.TOTEM_OF_UNDYING);

        int n = off = totemInInv ? 5 : 0;

        if (Hud.mc.player.isCreative()) {

            yPos += 17.0f;

        }

        for (ItemStack s : Hud.mc.player.inventory.armorInventory) {

            ESPFunction.drawItemStack(s, xPos - (float)off + 74.0f * ((float)Hud.mc.gameSettings.guiScale / 2.0f), yPos - 56.0f * ((float)Hud.mc.gameSettings.guiScale / 2.0f), null, false);

            off += 15;

        }

        if (totemInInv) {

            ESPFunction.drawItemStack(new ItemStack(Items.TOTEM_OF_UNDYING), xPos - (float)off + 73.0f * ((float)Hud.mc.gameSettings.guiScale / 2.0f), yPos - 56.0f * ((float)Hud.mc.gameSettings.guiScale / 2.0f), String.valueOf(count), false);

        }

    }



    public void StaffActive(MatrixStack stack) {

        float x = this.StaffActive.getX();

        float y = this.StaffActive.getY();

        float offset = 9.0f;

        float height2 = 20.5f;

        float width2 = 100.0f;

        height2 += offset * (float)this.activeStaff - 4.0f;

        float xStaff = x + 26.0f;

        if (this.activeStaff == 0) {

            height2 -= 1.5f;

            width2 -= 25.0f;

            xStaff -= 12.5f;

        }



        RenderUtil.Render2D.drawRoundedRect(x,y,width2,height2,3.5f,ColorUtil.rgba(27, 25, 41, 255));

        RenderUtil.Render2D.drawShadow(x,y,width2 + 5,15,19, ColorUtil.getColorStyle(255));

        StyledFont small1 = Fonts.sfbold[15];

        small1.drawString(stack, "Staff List", (double)xStaff - 23.0f, (double)(y + 5.0f), new Color(255, 255, 255, 255).getRGB());

        int i = 0;

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

            String name = team.getMembershipCollection().toString();

            if (!this.namePattern.matcher(name = name.substring(1, name.length() - 1)).matches()) continue;

            boolean vanish = true;

            boolean near = false;

            boolean active = false;

            for (AbstractClientPlayerEntity player : Hud.mc.world.getPlayers()) {

                if (!player.getNameClear().equals(name)) continue;

                near = true;

            }

            for (NetworkPlayerInfo info : mc.getConnection().getPlayerInfoMap()) {

                if (!info.getGameProfile().getName().equals(name)) continue;

                vanish = false;

                if (near) continue;

                active = true;

            }

            if (!vanish && !Managment.STAFF_MANAGER.isStaff(name)) continue;

            String Name2 = name.substring(0, Math.min(name.length(), 10));

            StyledFont small = Fonts.sfbold[13];

            StyledFont small2 = Fonts.sfbold[14];

            float yText = y + 17.0f;

            small2.drawString(stack, Name2, (double)(x + 4.0f), (double)yText, new Color(255, 255, 255, 255).getRGB());

            if (vanish) {

                small.drawString(stack, "Spectator", (double)(x + 63.5f), (double)yText, new Color(231, 52, 52, 255).getRGB());

            } else if (active) {

                small.drawString(stack, "Online", (double)(x + 74f), (double)yText, new Color(116, 236, 114, 255).getRGB());

            } else if (near) {

                small.drawString(stack, "Near", (double)(x + 80.8f), (double)yText, new Color(255, 251, 0, 255).getRGB());

            }

            y += offset;

            ++i;

        }

        this.activeStaff = i;

        this.StaffActive.setWidth(width2);

        this.StaffActive.setHeight(height2);

    }



    public void KeyBinds(MatrixStack stack) {

        float x = this.KeyBinds.getX();

        float y = this.KeyBinds.getY();

        float offset = 10f;

        float height2 = 20.0f;

        float width2 = 75.0f;

        height2 += offset * (float)this.activeBind - 5.0f;

        if (this.activeBind == 0) {

            height2 -= 1.0f;

        }

        RenderUtil.Render2D.drawRoundedCorner(x, y, width2, this.heightAnimation, 3.5f, ColorUtil.rgba(27, 25, 41, 255));

        RenderUtil.Render2D.drawShadow(x,y,width2 + 5,15,19, ColorUtil.rgba(27, 25, 41, 222));

        StyledFont small1 = Fonts.sfbold[15];

        small1.drawString(stack, "Hotkeys", (x + 5.0f), (y + 5.0f), new Color(255, 255, 255, 255).getRGB());

        int i = 0;

        for (Function f : Managment.FUNCTION_MANAGER.getFunctions()) {

            String text;

            if (f.bind == 0 || !f.state || (text = ClientUtil.getKey(f.bind)) == null) continue;

            StyledFont small = Fonts.sfbold[13];

            String bindText = text.toUpperCase();

            float yText = y + 17.0f;

            RenderUtil.SmartScissor.push();

            RenderUtil.SmartScissor.setFromComponentCoordinates(x, y, width2, this.heightAnimation);

            small.drawString(stack, f.name, (x + 4.0f), yText, new Color(255, 255, 255, 255).getRGB());

            small.drawString(stack, "On", (x + 62.0f), yText, new Color(255, 255, 255, 255).getRGB());

            RenderUtil.SmartScissor.unset();

            RenderUtil.SmartScissor.pop();

            y += offset;

            ++i;

        }

        this.heightAnimation = AnimationMath.fast(this.heightAnimation, height2, 11.0f);

        this.activeBind = i;

        this.KeyBinds.setWidth(width2);

        this.KeyBinds.setHeight(height2);

    }



    public void Effects(MatrixStack stack) {

        float x = 3;

        float y = 40;

        float offset = this.offsetEffects.getValue().floatValue();

        float height2 = 21.3f;

        StyledFont small = Fonts.msSemiBold[13];

        int counterEffect = 0;

        for (EffectInstance effectInstance : Hud.mc.player.getActivePotionEffects()) {

            String levelpotion = String.valueOf(effectInstance.getAmplifier() + 1);

            float textWidthBonus = 27.3f;

            if (levelpotion.contains("1")) {

                levelpotion = "";

                textWidthBonus -= 5.0f;

            }

            String durationText = EffectUtils.getPotionDurationString(effectInstance, 1.0f);

            String text = I18n.format(effectInstance.getEffectName(), new Object[0]);

            float textWidth = small.getWidth(text + effectInstance.getAmplifier() + levelpotion) + textWidthBonus - 0.6f;

            RenderUtil.Render2D.drawRoundedCorner(x, y, textWidth, height2, 3.0f, ColorUtil.rgba(27, 25, 41, 255));

            small.drawString(stack, text + " " + levelpotion, (double)(x + 22.3f), (double)(y + 5.5f), new Color(255, 255, 255, 255).getRGB());

            small.drawString(stack, durationText, (double)(x + 22.3f), (double)(y + 13.5f), new Color(255, 255, 255, 255).getRGB());

            PotionSpriteUploader potionspriteuploader = mc.getPotionSpriteUploader();

            Effect effect = effectInstance.getPotion();

            TextureAtlasSprite textureatlassprite = potionspriteuploader.getSprite(effect);

            mc.getTextureManager().bindTexture(textureatlassprite.getAtlasTexture().getTextureLocation());

            DisplayEffectsScreen.blit(stack, (int)(x + 2.0f), (int)y + 2, 10, 18, 18, textureatlassprite);

            y += offset;

            ++counterEffect;

            this.Effects.setWidth(textWidth);

        }

        float setHeight = offset / 8.0f * (float)counterEffect;

        this.Effects.setHeight(height2 * (float)counterEffect + setHeight);

    }



    public void BPS(MatrixStack stack) {

        float x = 3;

        float y = 507;

        float height2 = 15.0f;

        StyledFont small = Fonts.msSemiBold[14];

        String text = "Speed: " + String.format("%.2f", Math.hypot(mc.player.getPosX() - mc.player.prevPosX, mc.player.getPosZ() - mc.player.prevPosZ) * 20.0);

        float textWidth = small.getWidth(text) + 8.5f;

        RenderUtil.Render2D.drawRoundedCorner(x, y, textWidth, height2, 3.0f, ColorUtil.rgba(27, 25, 41, 255));

        RenderUtil.Render2D.drawShadow(x,y,textWidth + 5,15,19, ColorUtil.getColorStyle(255));

        small.drawString(stack, text, (x + 4.5f), (double)y + 6.3, new Color(255, 255, 255, 255).getRGB());

        this.BPS.setWidth(textWidth);

        this.BPS.setHeight(height2);

    }



    public void Coords(MatrixStack stack) {

        float x = 3;

        float y = 524;

        float height2 = 15.0f;

        StyledFont small = Fonts.msSemiBold[14];

        int X = (int)Hud.mc.player.getPosX();

        int Y = (int)Hud.mc.player.getPosY();

        int Z2 = (int)Hud.mc.player.getPosZ();

        String text = "Coords: X: " + X + " Y: " + Y + " Z: " + Z2;

        float textWidth = small.getWidth(text) + 8.5f;

        RenderUtil.Render2D.drawRoundedCorner(x, y, textWidth, height2, 3.0f, new Color(27,25,41,255).getRGB());

        RenderUtil.Render2D.drawShadow(x,y,textWidth + 5,15,19, ColorUtil.getColorStyle(255));

        small.drawString(stack, text, (x + 4.5f), (y + 6.0f), new Color(255, 255, 255, 255).getRGB());

        this.Coords.setWidth(textWidth);

        this.Coords.setHeight(height2);

    }



    public void Logo(MatrixStack stack) {

        float x = 3;

        float y = 3;

        float height2 = 17.0f;



        String text = "" + HudUtil.serverIP();

        String fps = "" + Minecraft.debugFPS;

        String tit = "starside free";

        float textWidth = Fonts.sfbold[18].getWidth(text) + 12;

        RenderUtil.Render2D.drawRoundedCorner(x, y, textWidth, height2, 3.5f, new Color(27,25,41,255).getRGB());

        RenderUtil.Render2D.drawShadow(x,y,textWidth + 5,15,19, ColorUtil.rgba(27, 25, 41, 222));

        RenderUtil.Render2D.drawRoundedCorner(x + 0, y + 18, textWidth, height2, 3.5f, new Color(27,25,41,255).getRGB());

        RenderUtil.Render2D.drawShadow(x,y,textWidth + 5,15,19, ColorUtil.rgba(27, 25, 41, 222));

        RenderUtil.Render2D.drawRoundedCorner(x + 438f, y + 1.0f, textWidth, height2, 3.5f, new Color(27,25,41,255).getRGB());

        RenderUtil.Render2D.drawShadow(x + 438f,y + 1.0f,textWidth + 5.0f,15,19, ColorUtil.rgba(27, 25, 41, 222));

        Fonts.sfbold[18].drawString(stack, "" + HudUtil.serverIP(), x + 3.0f, y + 5.5f, new Color(255, 255, 255, 255).getRGB());

        Fonts.sfbold[18].drawString(stack, "StarSide Free" , x + 450.0f, y + 5.5f, new Color(255, 255, 255, 255).getRGB());

        Fonts.sfbold[18].drawString(stack, "fps " + Minecraft.debugFPS + " | " + "ping " + HudUtil.calculatePing(), x + 3.0f, y + 23f, new Color(255, 255, 255, 255).getRGB());

        this.Logo.setWidth(textWidth);

        this.Logo.setHeight(height2);

    }



    public void TimerHUD(MatrixStack stack) {

        float x = this.TimerHUD.getX();

        float y = this.TimerHUD.getY();

        float width2 = 71.0f;

        float height2 = 25.0f;

        float quotient = Managment.FUNCTION_MANAGER.timerFunction.maxViolation / Managment.FUNCTION_MANAGER.timerFunction.timerAmount.getValue().floatValue();

        float minimumValue = Math.min(Managment.FUNCTION_MANAGER.timerFunction.getViolation(), quotient);

        this.perc = AnimationMath.lerp(this.perc, (quotient - minimumValue) / quotient, 7.0f);

        String text = (int)(this.perc * 100.0f) + "%";

        RenderUtil.Render2D.drawRoundedCorner(x, y, width2, height2, 3, new Color(0, 0, 0, 195).getRGB());

        RenderUtil.Render2D.drawRoundedCorner(x + 5.0f, y + 14.0f, 61.0f, 8.0f, 0.0f, new Color(23, 23, 23, 196).getRGB());

        RenderUtil.Render2D.drawRoundedCorner(x + 5.0f, y + 14.0f, 61.0f * this.perc, 8.0f, 3.0f, ColorUtil.getColorStyle(0.0f));

        Fonts.msSemiBold[16].drawString(stack, "Timer ", (double)(x + 23.5f), (double)(y + 7.4f), new Color(255, 255, 255, 255).getRGB());

        if (this.perc * 100.0f < 10.0f) {

//            Fonts.msSemiBold[13].drawString(stack, text, (double)(x + 55.0f), (double)(y + 7.4f), new Color(255, 255, 255, 255).getRGB());

        } else if (this.perc * 100.0f == 100.0f) {

//            Fonts.msSemiBold[13].drawString(stack, text, (double)(x + 49.5f), (double)(y + 7.4f), new Color(255, 255, 255, 255).getRGB());

        } else {

//            Fonts.msSemiBold[13].drawString(stack, text, (double)(x + 51.5f), (double)(y + 7.4f), new Color(255, 255, 255, 255).getRGB());

        }

        this.TimerHUD.setWidth(width2);

        this.TimerHUD.setHeight(height2);

    }



    public void TargetHUD(MatrixStack stack) {

        float x = this.TargetHUD.getX();

        float y = this.TargetHUD.getY();

        float width2 = 115.0f;

        float height2 = 50.0f;

        float widthFace = 50.0f;

        this.target = this.getTarget(this.target);

        this.targetHudAnimation.setDuration(280);

        this.scale = this.targetHudAnimation.getOutput();

        if (this.scale == 0.0) {

            this.target = null;

        }

        if (this.target == null) {

            return;

        }

        GlStateManager.pushMatrix();

        AnimationMath.sizeAnimation(x + width2 / 2.0f, y + 15.0f, this.scale);

        RenderUtil.Render2D.drawRoundedCorner(x, y, width2 - 5, height2, 3.0f, ColorUtil.rgba(27, 25, 41, 255));

        RenderUtil.Render2D.drawShadow(x,y,width2 + 5,15,19, ColorUtil.getColorStyle(255));

        if (this.target instanceof PlayerEntity) {

            RenderUtil.Render2D.drawFace(x + 2.5f, y + 4, 8.0f, 8.0f, 8.0f, 8.0f, widthFace - 20, height2 - 20, 64.0f, 64.0f, (AbstractClientPlayerEntity)this.target);

        }

        float xHP = x + widthFace + 3.8f;

        float yHP = y + 21.3f;

        float widthHP = 52.0f;

        this.health = AnimationMath.fast(this.health, this.target.getHealth() / this.target.getMaxHealth(), 6.0f);

        this.health = MathHelper.clamp(this.health, 0.0f, 1.0f);

        this.absorpation = AnimationMath.fast(this.absorpation, this.target.getAbsorptionAmount() / this.target.getMaxHealth(), 6.0f);

        this.absorpation = MathHelper.clamp(this.absorpation, 0.0f, 1.0f);

        RenderUtil.Render2D.drawRoundedCorner(xHP - 52, yHP + 17, 106.0f * this.health, 9f, 1f, ColorUtil.getColorStyle(0.0f));

        RenderUtil.Render2D.drawShadow(x,y,width2 + 5,15,19, ColorUtil.getColorStyle(255));

        RenderUtil.Render2D.drawRoundedCorner(xHP - 52, yHP + 17, 106.0f * this.absorpation, 9f, 1f, new Color(222, 211, 14, 255).getRGB());

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

        RenderUtil.SmartScissor.push();

        RenderUtil.SmartScissor.setFromComponentCoordinates(x, y, width2 - 6.0f, height2);

        Fonts.msSemiBold[16].drawString(stack, targetName, (double)xHP - 5, (double)(yHP - 17.3f), new Color(255, 255, 255, 255).getRGB());

        RenderUtil.SmartScissor.unset();

        RenderUtil.SmartScissor.pop();

        String HP = String.valueOf(this.target.getHealth() + this.target.getAbsorptionAmount());

        String StringHP = HP.substring(0, Math.min(HP.length(), 4));

        if (this.target.getHealth() + this.target.getAbsorptionAmount() < 10.0f) {

            StringHP = HP.substring(0, Math.min(HP.length(), 3));

        }

        Fonts.msSemiBold[14].drawString(stack, "Health: " + StringHP, (double)xHP - 20, (double)(yHP + 8.5f), new Color(255, 255, 255, 255).getRGB());

        this.drawItemStack(x + 35, y + 13.0f, 10.5f, 0.7f);

        GlStateManager.popMatrix();

        this.TargetHUD.setWidth(width2);

        this.TargetHUD.setHeight(height2);

    }



    private void drawItemStack(float x, float y, float offset, float scaleValue) {

        ArrayList<ItemStack> stackList = new ArrayList<ItemStack>(Arrays.asList(this.target.getHeldItemMainhand(), this.target.getHeldItemOffhand()));

        stackList.addAll((Collection)this.target.getArmorInventoryList());

        AtomicReference<Float> posX = new AtomicReference<Float>(Float.valueOf(x));

        stackList.stream().filter(stack -> !stack.isEmpty()).forEach(stack -> HudUtil.drawItemStack(stack, posX.getAndAccumulate(Float.valueOf(offset), Float::sum).floatValue(), y, true, true, scaleValue));

    }



    private LivingEntity getTarget(LivingEntity nullTarget) {

        LivingEntity target = nullTarget;

        FunctionManager functionManager = Managment.FUNCTION_MANAGER;

        if (functionManager.auraNew.getTarget() instanceof LivingEntity) {

            FunctionManager functionManager2 = Managment.FUNCTION_MANAGER;

            target = functionManager2.auraNew.getTarget();

            this.targetHudAnimation.setDirection(Direction.FORWARDS);

        } else if (IMinecraft.mc.currentScreen instanceof ChatScreen) {

            target = IMinecraft.mc.player;

            this.targetHudAnimation.setDirection(Direction.FORWARDS);

        } else {

            this.targetHudAnimation.setDirection(Direction.BACKWARDS);

        }

        return target;

    }
Это пиздец
 
делал худ на орбите, переделал худ, так же сливаю худ фришки, знаю легко это сделать но на премке жёстче
ss -
Пожалуйста, авторизуйтесь для просмотра ссылки.

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

hud:
Expand Collapse Copy
package hilz.orbita.modules.impl.render;



import com.mojang.blaze3d.matrix.MatrixStack;

import com.mojang.blaze3d.platform.GlStateManager;

import hilz.orbita.Initilization;

import hilz.orbita.events.Event;

import hilz.orbita.events.impl.render.EventRender;

import hilz.orbita.managment.Managment;

import hilz.orbita.modules.Function;

import hilz.orbita.modules.FunctionAnnotation;

import hilz.orbita.modules.FunctionManager;

import hilz.orbita.modules.Type;

import hilz.orbita.modules.settings.imp.BooleanOption;

import hilz.orbita.modules.settings.imp.MultiBoxSetting;

import hilz.orbita.modules.settings.imp.SliderSetting;

import hilz.orbita.util.ClientUtil;

import hilz.orbita.util.IMinecraft;

import hilz.orbita.util.animations.Animation;

import hilz.orbita.util.animations.Direction;

import hilz.orbita.util.animations.impl.EaseBackIn;

import hilz.orbita.util.drag.Dragging;

import hilz.orbita.util.font.Fonts;

import hilz.orbita.util.font.styled.StyledFont;

import hilz.orbita.util.misc.HudUtil;

import hilz.orbita.util.render.ColorUtil;

import hilz.orbita.util.render.RenderUtil;

import hilz.orbita.util.render.animation.AnimationMath;

import net.minecraft.client.Minecraft;

import net.minecraft.client.entity.player.AbstractClientPlayerEntity;

import net.minecraft.client.gui.DisplayEffectsScreen;

import net.minecraft.client.gui.screen.ChatScreen;

import net.minecraft.client.network.play.NetworkPlayerInfo;

import net.minecraft.client.renderer.texture.PotionSpriteUploader;

import net.minecraft.client.renderer.texture.TextureAtlasSprite;

import net.minecraft.client.resources.I18n;

import net.minecraft.entity.LivingEntity;

import net.minecraft.entity.player.PlayerEntity;

import net.minecraft.item.ItemStack;

import net.minecraft.item.Items;

import net.minecraft.potion.Effect;

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 java.awt.*;

import java.util.ArrayList;

import java.util.Arrays;

import java.util.Collection;

import java.util.Comparator;

import java.util.concurrent.atomic.AtomicReference;

import java.util.regex.Pattern;



@FunctionAnnotation(name="Display", type= Type.Render)

public class Hud

        extends Function {

    public static MultiBoxSetting elements = new MultiBoxSetting("Elements",

            new BooleanOption("Active Target", true),

            new BooleanOption("Timer Indicator", true),

            new BooleanOption("Logo", true),

            new BooleanOption("Coordinates", true),

            new BooleanOption("Speed", true),

            new BooleanOption("Effects", true),

            new BooleanOption("Active Binds", true),

            new BooleanOption("Active Staff", true),

            new BooleanOption("Armor", true),

            new BooleanOption("Cooldown", true));



    private final SliderSetting offsetEffects = new SliderSetting("\u0420\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432", 24.0f, 23.0f, 26.0f, 0.1f).setVisible(() -> elements.get(5));

    final Dragging TargetHUD = Initilization.createDrag(this, "TargetHUD7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging TimerHUD = Initilization.createDrag(this, "TimerHUD7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging Logo = Initilization.createDrag(this, "Logo7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging Coords = Initilization.createDrag(this, "Coords7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging BPS = Initilization.createDrag(this, "BPS7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging Effects = Initilization.createDrag(this, "Effects7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging KeyBinds = Initilization.createDrag(this, "KeyBinds7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging StaffActive = Initilization.createDrag(this, "StaffActive7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    final Dragging Cooldown = Initilization.createDrag(this, "Cooldown7317", mc.getMainWindow().scaledWidth() / 2, (float)mc.getMainWindow().scaledHeight() / 2.0f);

    int activeStaff = 0;

    private final Pattern namePattern = Pattern.compile("^\\w{3,16}$");

    int activeBind = 0;

    float heightAnimation = 0.0f;

    private float perc;

    private final Animation targetHudAnimation = new EaseBackIn(270, 1.0, 1.5f);

    private double scale = 0.0;

    private LivingEntity target = null;

    float health = 0.0f;

    float absorpation = 0.0f;



    public Hud() {

        this.addSettings(elements, this.offsetEffects);

    }



    [USER=1367676]@override[/USER]

    public void onEvent(Event event) {

        if (event instanceof EventRender) {

            EventRender eventRender = (EventRender)event;

            MatrixStack stack = eventRender.matrixStack;

            if (elements.get(0)) {

                this.TargetHUD(stack);

            }

            if (elements.get(1)) {

                this.TimerHUD(stack);

            }

            if (elements.get(2)) {

                this.Logo(stack);

            }

            if (elements.get(3)) {

                this.Coords(stack);

            }

            if (elements.get(4)) {

                this.BPS(stack);

            }

            if (elements.get(5)) {

                this.Effects(stack);

            }

            if (elements.get(6)) {

                this.KeyBinds(stack);

            }

            if (elements.get(7)) {

                this.StaffActive(stack);

            }

            if (elements.get(8)) {

                this.ArmorHUD(stack, eventRender);

            }

        }

    }



    public void ArmorHUD(MatrixStack stack, EventRender eventRender) {

        int off;

        int count = 0;

        for (int i = 0; i < Hud.mc.player.inventory.getSizeInventory(); ++i) {

            ItemStack s = Hud.mc.player.inventory.getStackInSlot(i);

            if (s.getItem() != Items.TOTEM_OF_UNDYING) continue;

            ++count;

        }

        float xPos = (float)eventRender.scaledResolution.scaledWidth() / 2.0f;

        float yPos = eventRender.scaledResolution.scaledHeight();

        boolean totemInInv = Hud.mc.player.inventory.mainInventory.stream().map(ItemStack::getItem).toList().contains(Items.TOTEM_OF_UNDYING);

        int n = off = totemInInv ? 5 : 0;

        if (Hud.mc.player.isCreative()) {

            yPos += 17.0f;

        }

        for (ItemStack s : Hud.mc.player.inventory.armorInventory) {

            ESPFunction.drawItemStack(s, xPos - (float)off + 74.0f * ((float)Hud.mc.gameSettings.guiScale / 2.0f), yPos - 56.0f * ((float)Hud.mc.gameSettings.guiScale / 2.0f), null, false);

            off += 15;

        }

        if (totemInInv) {

            ESPFunction.drawItemStack(new ItemStack(Items.TOTEM_OF_UNDYING), xPos - (float)off + 73.0f * ((float)Hud.mc.gameSettings.guiScale / 2.0f), yPos - 56.0f * ((float)Hud.mc.gameSettings.guiScale / 2.0f), String.valueOf(count), false);

        }

    }



    public void StaffActive(MatrixStack stack) {

        float x = this.StaffActive.getX();

        float y = this.StaffActive.getY();

        float offset = 9.0f;

        float height2 = 20.5f;

        float width2 = 100.0f;

        height2 += offset * (float)this.activeStaff - 4.0f;

        float xStaff = x + 26.0f;

        if (this.activeStaff == 0) {

            height2 -= 1.5f;

            width2 -= 25.0f;

            xStaff -= 12.5f;

        }



        RenderUtil.Render2D.drawRoundedRect(x,y,width2,height2,3.5f,ColorUtil.rgba(27, 25, 41, 255));

        RenderUtil.Render2D.drawShadow(x,y,width2 + 5,15,19, ColorUtil.getColorStyle(255));

        StyledFont small1 = Fonts.sfbold[15];

        small1.drawString(stack, "Staff List", (double)xStaff - 23.0f, (double)(y + 5.0f), new Color(255, 255, 255, 255).getRGB());

        int i = 0;

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

            String name = team.getMembershipCollection().toString();

            if (!this.namePattern.matcher(name = name.substring(1, name.length() - 1)).matches()) continue;

            boolean vanish = true;

            boolean near = false;

            boolean active = false;

            for (AbstractClientPlayerEntity player : Hud.mc.world.getPlayers()) {

                if (!player.getNameClear().equals(name)) continue;

                near = true;

            }

            for (NetworkPlayerInfo info : mc.getConnection().getPlayerInfoMap()) {

                if (!info.getGameProfile().getName().equals(name)) continue;

                vanish = false;

                if (near) continue;

                active = true;

            }

            if (!vanish && !Managment.STAFF_MANAGER.isStaff(name)) continue;

            String Name2 = name.substring(0, Math.min(name.length(), 10));

            StyledFont small = Fonts.sfbold[13];

            StyledFont small2 = Fonts.sfbold[14];

            float yText = y + 17.0f;

            small2.drawString(stack, Name2, (double)(x + 4.0f), (double)yText, new Color(255, 255, 255, 255).getRGB());

            if (vanish) {

                small.drawString(stack, "Spectator", (double)(x + 63.5f), (double)yText, new Color(231, 52, 52, 255).getRGB());

            } else if (active) {

                small.drawString(stack, "Online", (double)(x + 74f), (double)yText, new Color(116, 236, 114, 255).getRGB());

            } else if (near) {

                small.drawString(stack, "Near", (double)(x + 80.8f), (double)yText, new Color(255, 251, 0, 255).getRGB());

            }

            y += offset;

            ++i;

        }

        this.activeStaff = i;

        this.StaffActive.setWidth(width2);

        this.StaffActive.setHeight(height2);

    }



    public void KeyBinds(MatrixStack stack) {

        float x = this.KeyBinds.getX();

        float y = this.KeyBinds.getY();

        float offset = 10f;

        float height2 = 20.0f;

        float width2 = 75.0f;

        height2 += offset * (float)this.activeBind - 5.0f;

        if (this.activeBind == 0) {

            height2 -= 1.0f;

        }

        RenderUtil.Render2D.drawRoundedCorner(x, y, width2, this.heightAnimation, 3.5f, ColorUtil.rgba(27, 25, 41, 255));

        RenderUtil.Render2D.drawShadow(x,y,width2 + 5,15,19, ColorUtil.rgba(27, 25, 41, 222));

        StyledFont small1 = Fonts.sfbold[15];

        small1.drawString(stack, "Hotkeys", (x + 5.0f), (y + 5.0f), new Color(255, 255, 255, 255).getRGB());

        int i = 0;

        for (Function f : Managment.FUNCTION_MANAGER.getFunctions()) {

            String text;

            if (f.bind == 0 || !f.state || (text = ClientUtil.getKey(f.bind)) == null) continue;

            StyledFont small = Fonts.sfbold[13];

            String bindText = text.toUpperCase();

            float yText = y + 17.0f;

            RenderUtil.SmartScissor.push();

            RenderUtil.SmartScissor.setFromComponentCoordinates(x, y, width2, this.heightAnimation);

            small.drawString(stack, f.name, (x + 4.0f), yText, new Color(255, 255, 255, 255).getRGB());

            small.drawString(stack, "On", (x + 62.0f), yText, new Color(255, 255, 255, 255).getRGB());

            RenderUtil.SmartScissor.unset();

            RenderUtil.SmartScissor.pop();

            y += offset;

            ++i;

        }

        this.heightAnimation = AnimationMath.fast(this.heightAnimation, height2, 11.0f);

        this.activeBind = i;

        this.KeyBinds.setWidth(width2);

        this.KeyBinds.setHeight(height2);

    }



    public void Effects(MatrixStack stack) {

        float x = 3;

        float y = 40;

        float offset = this.offsetEffects.getValue().floatValue();

        float height2 = 21.3f;

        StyledFont small = Fonts.msSemiBold[13];

        int counterEffect = 0;

        for (EffectInstance effectInstance : Hud.mc.player.getActivePotionEffects()) {

            String levelpotion = String.valueOf(effectInstance.getAmplifier() + 1);

            float textWidthBonus = 27.3f;

            if (levelpotion.contains("1")) {

                levelpotion = "";

                textWidthBonus -= 5.0f;

            }

            String durationText = EffectUtils.getPotionDurationString(effectInstance, 1.0f);

            String text = I18n.format(effectInstance.getEffectName(), new Object[0]);

            float textWidth = small.getWidth(text + effectInstance.getAmplifier() + levelpotion) + textWidthBonus - 0.6f;

            RenderUtil.Render2D.drawRoundedCorner(x, y, textWidth, height2, 3.0f, ColorUtil.rgba(27, 25, 41, 255));

            small.drawString(stack, text + " " + levelpotion, (double)(x + 22.3f), (double)(y + 5.5f), new Color(255, 255, 255, 255).getRGB());

            small.drawString(stack, durationText, (double)(x + 22.3f), (double)(y + 13.5f), new Color(255, 255, 255, 255).getRGB());

            PotionSpriteUploader potionspriteuploader = mc.getPotionSpriteUploader();

            Effect effect = effectInstance.getPotion();

            TextureAtlasSprite textureatlassprite = potionspriteuploader.getSprite(effect);

            mc.getTextureManager().bindTexture(textureatlassprite.getAtlasTexture().getTextureLocation());

            DisplayEffectsScreen.blit(stack, (int)(x + 2.0f), (int)y + 2, 10, 18, 18, textureatlassprite);

            y += offset;

            ++counterEffect;

            this.Effects.setWidth(textWidth);

        }

        float setHeight = offset / 8.0f * (float)counterEffect;

        this.Effects.setHeight(height2 * (float)counterEffect + setHeight);

    }



    public void BPS(MatrixStack stack) {

        float x = 3;

        float y = 507;

        float height2 = 15.0f;

        StyledFont small = Fonts.msSemiBold[14];

        String text = "Speed: " + String.format("%.2f", Math.hypot(mc.player.getPosX() - mc.player.prevPosX, mc.player.getPosZ() - mc.player.prevPosZ) * 20.0);

        float textWidth = small.getWidth(text) + 8.5f;

        RenderUtil.Render2D.drawRoundedCorner(x, y, textWidth, height2, 3.0f, ColorUtil.rgba(27, 25, 41, 255));

        RenderUtil.Render2D.drawShadow(x,y,textWidth + 5,15,19, ColorUtil.getColorStyle(255));

        small.drawString(stack, text, (x + 4.5f), (double)y + 6.3, new Color(255, 255, 255, 255).getRGB());

        this.BPS.setWidth(textWidth);

        this.BPS.setHeight(height2);

    }



    public void Coords(MatrixStack stack) {

        float x = 3;

        float y = 524;

        float height2 = 15.0f;

        StyledFont small = Fonts.msSemiBold[14];

        int X = (int)Hud.mc.player.getPosX();

        int Y = (int)Hud.mc.player.getPosY();

        int Z2 = (int)Hud.mc.player.getPosZ();

        String text = "Coords: X: " + X + " Y: " + Y + " Z: " + Z2;

        float textWidth = small.getWidth(text) + 8.5f;

        RenderUtil.Render2D.drawRoundedCorner(x, y, textWidth, height2, 3.0f, new Color(27,25,41,255).getRGB());

        RenderUtil.Render2D.drawShadow(x,y,textWidth + 5,15,19, ColorUtil.getColorStyle(255));

        small.drawString(stack, text, (x + 4.5f), (y + 6.0f), new Color(255, 255, 255, 255).getRGB());

        this.Coords.setWidth(textWidth);

        this.Coords.setHeight(height2);

    }



    public void Logo(MatrixStack stack) {

        float x = 3;

        float y = 3;

        float height2 = 17.0f;



        String text = "" + HudUtil.serverIP();

        String fps = "" + Minecraft.debugFPS;

        String tit = "starside free";

        float textWidth = Fonts.sfbold[18].getWidth(text) + 12;

        RenderUtil.Render2D.drawRoundedCorner(x, y, textWidth, height2, 3.5f, new Color(27,25,41,255).getRGB());

        RenderUtil.Render2D.drawShadow(x,y,textWidth + 5,15,19, ColorUtil.rgba(27, 25, 41, 222));

        RenderUtil.Render2D.drawRoundedCorner(x + 0, y + 18, textWidth, height2, 3.5f, new Color(27,25,41,255).getRGB());

        RenderUtil.Render2D.drawShadow(x,y,textWidth + 5,15,19, ColorUtil.rgba(27, 25, 41, 222));

        RenderUtil.Render2D.drawRoundedCorner(x + 438f, y + 1.0f, textWidth, height2, 3.5f, new Color(27,25,41,255).getRGB());

        RenderUtil.Render2D.drawShadow(x + 438f,y + 1.0f,textWidth + 5.0f,15,19, ColorUtil.rgba(27, 25, 41, 222));

        Fonts.sfbold[18].drawString(stack, "" + HudUtil.serverIP(), x + 3.0f, y + 5.5f, new Color(255, 255, 255, 255).getRGB());

        Fonts.sfbold[18].drawString(stack, "StarSide Free" , x + 450.0f, y + 5.5f, new Color(255, 255, 255, 255).getRGB());

        Fonts.sfbold[18].drawString(stack, "fps " + Minecraft.debugFPS + " | " + "ping " + HudUtil.calculatePing(), x + 3.0f, y + 23f, new Color(255, 255, 255, 255).getRGB());

        this.Logo.setWidth(textWidth);

        this.Logo.setHeight(height2);

    }



    public void TimerHUD(MatrixStack stack) {

        float x = this.TimerHUD.getX();

        float y = this.TimerHUD.getY();

        float width2 = 71.0f;

        float height2 = 25.0f;

        float quotient = Managment.FUNCTION_MANAGER.timerFunction.maxViolation / Managment.FUNCTION_MANAGER.timerFunction.timerAmount.getValue().floatValue();

        float minimumValue = Math.min(Managment.FUNCTION_MANAGER.timerFunction.getViolation(), quotient);

        this.perc = AnimationMath.lerp(this.perc, (quotient - minimumValue) / quotient, 7.0f);

        String text = (int)(this.perc * 100.0f) + "%";

        RenderUtil.Render2D.drawRoundedCorner(x, y, width2, height2, 3, new Color(0, 0, 0, 195).getRGB());

        RenderUtil.Render2D.drawRoundedCorner(x + 5.0f, y + 14.0f, 61.0f, 8.0f, 0.0f, new Color(23, 23, 23, 196).getRGB());

        RenderUtil.Render2D.drawRoundedCorner(x + 5.0f, y + 14.0f, 61.0f * this.perc, 8.0f, 3.0f, ColorUtil.getColorStyle(0.0f));

        Fonts.msSemiBold[16].drawString(stack, "Timer ", (double)(x + 23.5f), (double)(y + 7.4f), new Color(255, 255, 255, 255).getRGB());

        if (this.perc * 100.0f < 10.0f) {

//            Fonts.msSemiBold[13].drawString(stack, text, (double)(x + 55.0f), (double)(y + 7.4f), new Color(255, 255, 255, 255).getRGB());

        } else if (this.perc * 100.0f == 100.0f) {

//            Fonts.msSemiBold[13].drawString(stack, text, (double)(x + 49.5f), (double)(y + 7.4f), new Color(255, 255, 255, 255).getRGB());

        } else {

//            Fonts.msSemiBold[13].drawString(stack, text, (double)(x + 51.5f), (double)(y + 7.4f), new Color(255, 255, 255, 255).getRGB());

        }

        this.TimerHUD.setWidth(width2);

        this.TimerHUD.setHeight(height2);

    }



    public void TargetHUD(MatrixStack stack) {

        float x = this.TargetHUD.getX();

        float y = this.TargetHUD.getY();

        float width2 = 115.0f;

        float height2 = 50.0f;

        float widthFace = 50.0f;

        this.target = this.getTarget(this.target);

        this.targetHudAnimation.setDuration(280);

        this.scale = this.targetHudAnimation.getOutput();

        if (this.scale == 0.0) {

            this.target = null;

        }

        if (this.target == null) {

            return;

        }

        GlStateManager.pushMatrix();

        AnimationMath.sizeAnimation(x + width2 / 2.0f, y + 15.0f, this.scale);

        RenderUtil.Render2D.drawRoundedCorner(x, y, width2 - 5, height2, 3.0f, ColorUtil.rgba(27, 25, 41, 255));

        RenderUtil.Render2D.drawShadow(x,y,width2 + 5,15,19, ColorUtil.getColorStyle(255));

        if (this.target instanceof PlayerEntity) {

            RenderUtil.Render2D.drawFace(x + 2.5f, y + 4, 8.0f, 8.0f, 8.0f, 8.0f, widthFace - 20, height2 - 20, 64.0f, 64.0f, (AbstractClientPlayerEntity)this.target);

        }

        float xHP = x + widthFace + 3.8f;

        float yHP = y + 21.3f;

        float widthHP = 52.0f;

        this.health = AnimationMath.fast(this.health, this.target.getHealth() / this.target.getMaxHealth(), 6.0f);

        this.health = MathHelper.clamp(this.health, 0.0f, 1.0f);

        this.absorpation = AnimationMath.fast(this.absorpation, this.target.getAbsorptionAmount() / this.target.getMaxHealth(), 6.0f);

        this.absorpation = MathHelper.clamp(this.absorpation, 0.0f, 1.0f);

        RenderUtil.Render2D.drawRoundedCorner(xHP - 52, yHP + 17, 106.0f * this.health, 9f, 1f, ColorUtil.getColorStyle(0.0f));

        RenderUtil.Render2D.drawShadow(x,y,width2 + 5,15,19, ColorUtil.getColorStyle(255));

        RenderUtil.Render2D.drawRoundedCorner(xHP - 52, yHP + 17, 106.0f * this.absorpation, 9f, 1f, new Color(222, 211, 14, 255).getRGB());

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

        RenderUtil.SmartScissor.push();

        RenderUtil.SmartScissor.setFromComponentCoordinates(x, y, width2 - 6.0f, height2);

        Fonts.msSemiBold[16].drawString(stack, targetName, (double)xHP - 5, (double)(yHP - 17.3f), new Color(255, 255, 255, 255).getRGB());

        RenderUtil.SmartScissor.unset();

        RenderUtil.SmartScissor.pop();

        String HP = String.valueOf(this.target.getHealth() + this.target.getAbsorptionAmount());

        String StringHP = HP.substring(0, Math.min(HP.length(), 4));

        if (this.target.getHealth() + this.target.getAbsorptionAmount() < 10.0f) {

            StringHP = HP.substring(0, Math.min(HP.length(), 3));

        }

        Fonts.msSemiBold[14].drawString(stack, "Health: " + StringHP, (double)xHP - 20, (double)(yHP + 8.5f), new Color(255, 255, 255, 255).getRGB());

        this.drawItemStack(x + 35, y + 13.0f, 10.5f, 0.7f);

        GlStateManager.popMatrix();

        this.TargetHUD.setWidth(width2);

        this.TargetHUD.setHeight(height2);

    }



    private void drawItemStack(float x, float y, float offset, float scaleValue) {

        ArrayList<ItemStack> stackList = new ArrayList<ItemStack>(Arrays.asList(this.target.getHeldItemMainhand(), this.target.getHeldItemOffhand()));

        stackList.addAll((Collection)this.target.getArmorInventoryList());

        AtomicReference<Float> posX = new AtomicReference<Float>(Float.valueOf(x));

        stackList.stream().filter(stack -> !stack.isEmpty()).forEach(stack -> HudUtil.drawItemStack(stack, posX.getAndAccumulate(Float.valueOf(offset), Float::sum).floatValue(), y, true, true, scaleValue));

    }



    private LivingEntity getTarget(LivingEntity nullTarget) {

        LivingEntity target = nullTarget;

        FunctionManager functionManager = Managment.FUNCTION_MANAGER;

        if (functionManager.auraNew.getTarget() instanceof LivingEntity) {

            FunctionManager functionManager2 = Managment.FUNCTION_MANAGER;

            target = functionManager2.auraNew.getTarget();

            this.targetHudAnimation.setDirection(Direction.FORWARDS);

        } else if (IMinecraft.mc.currentScreen instanceof ChatScreen) {

            target = IMinecraft.mc.player;

            this.targetHudAnimation.setDirection(Direction.FORWARDS);

        } else {

            this.targetHudAnimation.setDirection(Direction.BACKWARDS);

        }

        return target;

    }
ебать говно
 
Назад
Сверху Снизу