Исходник ClickGui и 2 Худа | expensive 3.1

Начинающий
Статус
Оффлайн
Регистрация
23 Авг 2024
Сообщения
16
Реакции[?]
0
Поинты[?]
0

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

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

Спасибо!

Первая моя визуальная работа, поэтому решил слить на лучший сайт.

Сливаю ClickGui и 2 худа с выбором через HUD, так же здесь показ армора автоматически переходит в вертикальное положение когда у края экрана по X.
Можно поставить шейдер (тень) в функции ClickGui, а так же выбрать режим "Белый" или "Клиентский". Так же имеется недоделанная панель с музыкой кому надо тот доделает. Темы открываются на пнг с карандашиком. Тх был взят с другого худа, но визуально переделан. Снизу еще сделаны типо волн (статические).

Возможно я еще, что то забыл добавить, так, что пишите в дс - baveko

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


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



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



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



HUD.java:
package xii.infinity.client.functions.impl.render;

import com.google.common.eventbus.Subscribe;
import xii.infinity.client.Infinity;
import xii.infinity.client.events.EventDisplay;
import xii.infinity.client.events.EventUpdate;
import xii.infinity.client.functions.api.Category;
import xii.infinity.client.functions.api.FunctionRegister;
import xii.infinity.client.functions.api.Module;
import xii.infinity.client.functions.settings.impl.BooleanSetting;
import xii.infinity.client.functions.settings.impl.ModeListSetting;
import xii.infinity.client.functions.settings.impl.ModeSetting;
import xii.infinity.client.ui.display.impl.*;
import xii.infinity.client.ui.styles.StyleManager;
import xii.infinity.client.utils.drag.Dragging;
import xii.infinity.client.utils.render.ColorUtils;
import lombok.AccessLevel;
import lombok.experimental.FieldDefaults;

@FieldDefaults(level = AccessLevel.PRIVATE)
@FunctionRegister(name = "HUD", type = Category.Render)
public class HUD extends Module {
    private static HUD instances;

    private final ModeSetting hudMode = new ModeSetting("HUD Mode", "HUD-1", "HUD-1","HUD-2");

    private final ModeListSetting elements = new ModeListSetting("Элементы",
            new BooleanSetting("Ватермарка", true),
            new BooleanSetting("Список модулей", true),
            new BooleanSetting("Координаты", true),
            new BooleanSetting("Эффекты", true),
            new BooleanSetting("Список модерации", true),
            new BooleanSetting("Активные бинды", true),
            new BooleanSetting("Активный таргет", true),
            new BooleanSetting("Броня", true),
            new BooleanSetting("Кулдавны", true),
            new BooleanSetting("Инвентарь", true),
            new BooleanSetting("Кей-Строкес", true)



            );

    final WatermarkRenderer4 watermarkRenderer;
    final ArrayListRenderer3 arrayListRenderer;
    final CoordsRenderer coordsRenderer;
    final PotionRenderer4 potionRenderer;
    final CoolDown cooldowns;

    final KeyBindRenderer4 keyBindRenderer;
    final TargetInfoRenderer4 targetInfoRenderer;
    final SeeInventoryRenderer3 inve;
    final KeyStrokes keys;


    final ArmorRenderer3 armorRenderer;
    final StaffListRenderer4 staffListRenderer;

    public static HUD getInstances() {
        return instances;
    }

    public static void setInstances(HUD instances) {
        HUD.instances = instances;
    }

    @Subscribe
    private void onUpdate(EventUpdate e) {
        if (mc.gameSettings.showDebugInfo) {
            return;
        }

        if (elements.getValueByName("Список модерации").get()) staffListRenderer.update(e);
        if (elements.getValueByName("Список модулей").get()) arrayListRenderer.update(e);
    }


    @Subscribe
    private void onDisplay(EventDisplay e) {
        if (mc.gameSettings.showDebugInfo || e.getType() != EventDisplay.Type.POST) {
            return;
        }

        if (elements.getValueByName("Координаты").get()) coordsRenderer.render(e);
        if (elements.getValueByName("Эффекты").get()) potionRenderer.render(e);
        if (elements.getValueByName("Ватермарка").get()) watermarkRenderer.render(e);
        if (elements.getValueByName("Список модулей").get()) arrayListRenderer.render(e);
        if (elements.getValueByName("Активные бинды").get()) keyBindRenderer.render(e);
        if (elements.getValueByName("Список модерации").get()) staffListRenderer.render(e);
        if (elements.getValueByName("Активный таргет").get()) targetInfoRenderer.render(e);
        if (elements.getValueByName("Кулдавны").get()) cooldowns.render(e);
        if (elements.getValueByName("Инвентарь").get()) inve.render(e);
        if (elements.getValueByName("Кей-Строкес").get()) keys.render(e);
        if (elements.getValueByName("Броня").get()) armorRenderer.render(e);





    }

    public HUD() {
        watermarkRenderer = new WatermarkRenderer4();
        arrayListRenderer = new ArrayListRenderer3();
        coordsRenderer = new CoordsRenderer();
        Dragging key = Infinity.getInstance().createDrag(this, "Key", 185, 100);
        Dragging inves = Infinity.getInstance().createDrag(this, "Inventory", 278, 100);
        Dragging cooldown = Infinity.getInstance().createDrag(this, "Cooldown", 350, 100);
        Dragging armor2 = Infinity.getInstance().createDrag(this, "Armor", 350, 5);
        Dragging potions = Infinity.getInstance().createDrag(this, "Potions", 278, 5);
        Dragging keyBinds = Infinity.getInstance().createDrag(this, "KeyBinds", 185, 5);
        Dragging dragging = Infinity.getInstance().createDrag(this, "TargetHUD", 74, 128);
        Dragging staffList = Infinity.getInstance().createDrag(this, "StaffList", 96, 5);
        armorRenderer = new ArmorRenderer3(armor2);

        potionRenderer = new PotionRenderer4(potions);
        cooldowns = new CoolDown(cooldown);
        keyBindRenderer = new KeyBindRenderer4(keyBinds);

        keys = new KeyStrokes(key);
        staffListRenderer = new StaffListRenderer4(staffList);
        targetInfoRenderer = new TargetInfoRenderer4(dragging);
        inve = new SeeInventoryRenderer3(inves);
        instances = this;

        addSettings( hudMode,elements );

    }

    public static int getColor(int index) {
        StyleManager styleManager = Infinity.getInstance().getStyleManager();
        return ColorUtils.gradient(styleManager.getCurrentStyle().getFirstColor().getRGB(), styleManager.getCurrentStyle().getSecondColor().getRGB(), index * 16, 10);
    }

    public static int getColor(int index, float mult) {
        StyleManager styleManager = Infinity.getInstance().getStyleManager();
        return ColorUtils.gradient(styleManager.getCurrentStyle().getFirstColor().getRGB(), styleManager.getCurrentStyle().getSecondColor().getRGB(), (int) (index * mult), 10);
    }

    public static int getColor(int firstColor, int secondColor, int index, float mult) {
        return ColorUtils.gradient(firstColor, secondColor, (int) (index * mult), 10);
    }
    public boolean isHud2() {
        return "HUD-2".equalsIgnoreCase(hudMode.get());
    }
}

RenderUtils:


RenderUtils:
package net.optifine.render;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import org.lwjgl.opengl.GL12;
import xii.infinity.client.Infinity;
import xii.infinity.client.utils.render.ColorUtils;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.BufferBuilder;
import net.minecraft.client.renderer.RenderTypeBuffers;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import org.lwjgl.opengl.GL11;

import java.util.ArrayList;
import java.util.List;

import static org.lwjgl.opengl.GL11.*;
import static org.lwjgl.opengl.GL11.GL_LINE_STRIP;

public class RenderUtils
{
    private static boolean flushRenderBuffers = true;
    private static Minecraft mc = Minecraft.getInstance();

    public static boolean setFlushRenderBuffers(boolean flushRenderBuffers)
    {
        boolean flag = RenderUtils.flushRenderBuffers;
        RenderUtils.flushRenderBuffers = flushRenderBuffers;
        return flag;
    }

    public static boolean isFlushRenderBuffers()
    {
        return flushRenderBuffers;
    }

    public static void flushRenderBuffers()
    {
        if (flushRenderBuffers)
        {
            RenderTypeBuffers rendertypebuffers = mc.getRenderTypeBuffers();
            rendertypebuffers.getBufferSource().flushRenderBuffers();
            rendertypebuffers.getCrumblingBufferSource().flushRenderBuffers();
        }
    }

    public static void drawBlockBox(BlockPos blockPos, int color) {
        drawBox(new AxisAlignedBB(blockPos).offset(-mc.getRenderManager().info.getProjectedView().x, -mc.getRenderManager().info.getProjectedView().y, -mc.getRenderManager().info.getProjectedView().z), color);
    }

    public static void drawBox(AxisAlignedBB bb, int color) {
        GL11.glPushMatrix();
        GL11.glDisable(GL11.GL_TEXTURE_2D);
        GL11.glDisable(GL_DEPTH_TEST);
        GL11.glEnable(GL_LINE_SMOOTH);
        GL11.glLineWidth(1);
        float[] rgb = ColorUtils.rgba(color);
        GlStateManager.color4f(rgb[0], rgb[1], rgb[2], rgb[3]);
        Tessellator tessellator = Tessellator.getInstance();
        BufferBuilder vertexbuffer = tessellator.getBuffer();
        vertexbuffer.begin(3, DefaultVertexFormats.POSITION);
        vertexbuffer.pos(bb.minX, bb.minY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.minY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.minY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.minY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.minY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        tessellator.draw();
        vertexbuffer.begin(3, DefaultVertexFormats.POSITION);
        vertexbuffer.pos(bb.minX, bb.maxY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.maxY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.maxY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.maxY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.maxY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        tessellator.draw();
        vertexbuffer.begin(1, DefaultVertexFormats.POSITION);
        vertexbuffer.pos(bb.minX, bb.minY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.maxY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.minY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.maxY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.minY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.maxY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.minY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.maxY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        tessellator.draw();
        GlStateManager.color4f(rgb[0], rgb[1], rgb[2], rgb[3]);
        GL11.glEnable(GL11.GL_TEXTURE_2D);
        GL11.glEnable(GL_DEPTH_TEST);
        GL11.glDisable(GL_LINE_SMOOTH);
        GL11.glPopMatrix();

    }
    public static void renderClientRect3(MatrixStack matrix, float x, float y, float width, float height, boolean expand, double expanded, int color, int i) {
        renderClientRect(matrix, x, y, width, height , expand, expanded, color, 128);
    }
    public static void renderClientRect2(MatrixStack matrix, float x, float y, float width, float height, boolean expand, double expanded, int color, int i) {
        renderClientRect4(matrix, x, y, width, height , expand, expanded, color, 128);
    }

    public static void renderClientRect(MatrixStack matrix, float x, float y, float width, float height, boolean expand, double expanded, int color, int alphaPC) {
        // Extract color components
        int red = (color >> 16) & 0xFF;
        int green = (color >> 8) & 0xFF;
        int blue = color & 0xFF;
        int alpha = alphaPC;

        int color1 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color2 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color3 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color4 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);

        boolean bloom = true;
        float round = Infinity.getInstance().round();
        float shadow = Infinity.getInstance().shadow();
        int zeroC1 = ColorUtils.multAlpha(color1, 0.F);
        int zeroC2 = ColorUtils.multAlpha(color2, 0.F);
        int zeroC3 = ColorUtils.multAlpha(color3, 0.F);
        int zeroC4 = ColorUtils.multAlpha(color4, 0.F);
        int halfC1 = ColorUtils.multAlpha(color1, .5F);
        int halfC2 = ColorUtils.multAlpha(color2, .5F);
        int halfC3 = ColorUtils.multAlpha(color3, .5F);
        int halfC4 = ColorUtils.multAlpha(color4, .5F);
        int overY1C = ColorUtils.overCol(color1, color2);
        int overY2C = ColorUtils.overCol(color4, color3);
        int overX1C = ColorUtils.overCol(color1, color4);
        int overX2C = ColorUtils.overCol(color2, color3);

        // Draw rounded rectangle with shadows
        RectUtil.drawRoundedRectShadowed(matrix, x, y, x + width, y + height, round, shadow, halfC1, halfC2, halfC3, halfC4, bloom, true, false, true);

        // Draw darkened version for effect
        float dark = 0.35F;
        RectUtil.drawRoundedRectShadowed(matrix, x, y, x + width, y + height, round, .5F, ColorUtils.multDark(color1, dark), ColorUtils.multDark(color2, dark), ColorUtils.multDark(color3, dark), ColorUtils.multDark(color4, dark), false, false, true, true);

        List<RectUtil.Vec2fColored> list = new ArrayList<>();
        if (expand) {
            list.add(new RectUtil.Vec2fColored(x + 2, y + (float) expanded, zeroC1));
            list.add(new RectUtil.Vec2fColored(x + width / 2F, y + (float) expanded, overY1C));
            list.add(new RectUtil.Vec2fColored(x + width - 2, y + (float) expanded, zeroC2));
            GL12.glLineWidth(2);
            RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);
            GL12.glPointSize(1);
        }

        // Draw edges
        float lineOff = 0;
        GL12.glLineWidth(2);

        // Top line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + round, y + lineOff, zeroC1));
        list.add(new RectUtil.Vec2fColored(x + width / 2F, y + lineOff, overY1C));
        list.add(new RectUtil.Vec2fColored(x + width - round, y + lineOff, zeroC2));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Bottom line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + round, y + height - lineOff, zeroC4));
        list.add(new RectUtil.Vec2fColored(x + width / 2F, y + height - lineOff, overY2C));
        list.add(new RectUtil.Vec2fColored(x + width - round, y + height - lineOff, zeroC3));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Left line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + round, zeroC1));
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + height / 2F, overX1C));
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + height - round, zeroC4));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Right line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + round, zeroC2));
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + height / 2F, overX2C));
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + height - round, zeroC3));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        GL12.glLineWidth(1);

        // Parameters for wave
        // Параметры для волны
        float waveHeight = 10.0F; // Высота волны
        float frequency = 0.1F;   // Частота волны
        float amplitude = 5.0F;   // Амплитуда волны
        float speedFactor = 300.0F; // Коэффициент замедления (чем больше, тем медленнее)

// Получить текущее время в миллисекундах
        float time = System.currentTimeMillis() % 10000; // Простой эффект на основе времени

// Нарисовать динамическую волнистую линию внизу прямоугольника
        drawDynamicWavyLine(matrix, x, y + height, width, waveHeight, frequency, amplitude, color, bloom, time, speedFactor);

    }


    // Метод для рисования динамической волны
    // Метод для рисования динамической волны
    private static void drawDynamicWavyLine(MatrixStack matrix, float x, float y, float width, float waveHeight, float frequency, float amplitude, int color, boolean bloom, float time, float speedFactor) {
        List<RectUtil.Vec2fColored> list = new ArrayList<>();
        float step = width / 200; // Уменьшение шага для более точной отрисовки
        float halfWidth = width / 2;
        float startX = x;
        float endX = x + width;

        // Параметры для непрерывного эффекта
        float waveOffset = (float) ((time / speedFactor) % (2 * Math.PI));

        // Параметры волны
        float baseAmplitude = amplitude * (0.5F + 0.5F * (float) Math.sin(waveOffset));
        float frequencyStep = frequency * step;

        for (float currentX = startX; currentX <= endX; currentX += step) {
            // Расчет смещения Y для плавного перехода
            float dynamicAmplitude = baseAmplitude * (0.5F + 0.5F * (float) Math.sin(waveOffset));
            float offsetY = (float) (Math.sin((currentX - startX) * frequencyStep + waveOffset) * dynamicAmplitude);

            list.add(new RectUtil.Vec2fColored(currentX, y + offsetY, color));
        }

        // Плавное соединение волны
        float endOffsetY = (float) (Math.sin((endX - startX) * frequencyStep + waveOffset) * baseAmplitude);
        list.add(new RectUtil.Vec2fColored(endX, y + endOffsetY, color));

        // Рисование линии
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);
    }



    public static void renderClientRect4(MatrixStack matrix, float x, float y, float width, float height, boolean expand, double expanded, int color, int alphaPC) {
        // Extract color components
        int red = (color >> 16) & 0xFF;
        int green = (color >> 8) & 0xFF;
        int blue = color & 0xFF;
        int alpha = alphaPC;

        int color1 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color2 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color3 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color4 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);

        boolean bloom = true;
        float round = Infinity.getInstance().round();
        float shadow = Infinity.getInstance().shadow();
        int zeroC1 = ColorUtils.multAlpha(color1, 0.F);
        int zeroC2 = ColorUtils.multAlpha(color2, 0.F);
        int zeroC3 = ColorUtils.multAlpha(color3, 0.F);
        int zeroC4 = ColorUtils.multAlpha(color4, 0.F);
        int halfC1 = ColorUtils.multAlpha(color1, .5F);
        int halfC2 = ColorUtils.multAlpha(color2, .5F);
        int halfC3 = ColorUtils.multAlpha(color3, .5F);
        int halfC4 = ColorUtils.multAlpha(color4, .5F);
        int overY1C = ColorUtils.overCol(color1, color2);
        int overY2C = ColorUtils.overCol(color4, color3);
        int overX1C = ColorUtils.overCol(color1, color4);
        int overX2C = ColorUtils.overCol(color2, color3);

        // Draw rounded rectangle with shadows
        RectUtil.drawRoundedRectShadowed(matrix, x, y, x + width, y + height, round, shadow, halfC1, halfC2, halfC3, halfC4, bloom, true, false, true);

        // Draw darkened version for effect
        float dark = 0.35F;
        RectUtil.drawRoundedRectShadowed(matrix, x, y, x + width, y + height, round, .5F, ColorUtils.multDark(color1, dark), ColorUtils.multDark(color2, dark), ColorUtils.multDark(color3, dark), ColorUtils.multDark(color4, dark), false, false, true, true);

        List<RectUtil.Vec2fColored> list = new ArrayList<>();
        if (expand) {
            list.add(new RectUtil.Vec2fColored(x + 2, y + (float) expanded, zeroC1));
            list.add(new RectUtil.Vec2fColored(x + width / 2F, y + (float) expanded, overY1C));
            list.add(new RectUtil.Vec2fColored(x + width - 2, y + (float) expanded, zeroC2));
            GL12.glLineWidth(2);
            RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);
            GL12.glPointSize(1);
        }

        // Draw edges
        float lineOff = 0;
        GL12.glLineWidth(2);

        // Top line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + round, y + lineOff, zeroC1));
        list.add(new RectUtil.Vec2fColored(x + width / 2F, y + lineOff, overY1C));
        list.add(new RectUtil.Vec2fColored(x + width - round, y + lineOff, zeroC2));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Bottom line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + round, y + height - lineOff, zeroC4));
        list.add(new RectUtil.Vec2fColored(x + width / 2F, y + height - lineOff, overY2C));
        list.add(new RectUtil.Vec2fColored(x + width - round, y + height - lineOff, zeroC3));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Left line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + round, zeroC1));
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + height / 2F, overX1C));
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + height - round, zeroC4));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Right line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + round, zeroC2));
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + height / 2F, overX2C));
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + height - round, zeroC3));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        GL12.glLineWidth(1);

        // Parameters for wave
        // Параметры для волны


    }

}

RectUtil:


RectUtil:
package net.optifine.render;

import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.experimental.UtilityClass;
import net.minecraft.client.renderer.entity.EntityRendererManager;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;

import net.minecraft.util.math.vector.Vector3d;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import xii.infinity.client.utils.render.ColorUtils;

import java.util.ArrayList;
import java.util.List;

import static org.lwjgl.opengl.GL11C.GL_LINE_STRIP;
import static xii.infinity.client.utils.client.IMinecraft.*;


@UtilityClass
@SuppressWarnings("unused")
public class RectUtil implements IRenderAccess {
    public final List<Vec2fColored> VERTEXES_COLORED = new ArrayList<>();
    public final List<Vec2f> VERTEXES = new ArrayList<>();
    int[] LEFT_UP = new int[]{-90, 0};
    int[] RIGHT_UP = new int[]{0, 90};
    int[] RIGHT_DOWN = new int[]{90, 180};
    int[] LEFT_DOWN = new int[]{180, 270};
    [USER=270918]@Getter[/USER]
    @AllArgsConstructor
    public class Vec2fColored {
        float x, y;
        int color;
    }
    public void setupRenderRect(boolean texture, boolean bloom) {
        if (texture) RenderSystem.enableTexture();
        else RenderSystem.disableTexture();
        RenderSystem.enableBlend();
        RenderSystem.disableAlphaTest();
        RenderSystem.defaultBlendFunc();
        RenderSystem.disableCull();
        RenderSystem.shadeModel(7425);

        RenderSystem.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, bloom ? GlStateManager.DestFactor.ONE_MINUS_CONSTANT_ALPHA : GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
        RenderSystem.disableAlphaTest();
        GL11.glHint(GL11.GL_POLYGON_SMOOTH_HINT, GL11.GL_NICEST);
        GL11.glEnable(GL11.GL_POINT_SMOOTH);
    }
    public void endRenderRect(boolean bloom) {
        RenderSystem.enableAlphaTest();
        if (bloom)
            RenderSystem.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);

        RenderSystem.shadeModel(7424);
        RenderSystem.enableCull();
        RenderSystem.enableAlphaTest();
        RenderSystem.enableTexture();

        RenderSystem.clearCurrentColor();
    }
    public Vec2fColored getOfVec3f(Vec2f vec2f, int color) {
        return new Vec2fColored(vec2f.getX(), vec2f.getY(), color);
    }
    public void drawVertexesList(MatrixStack matrix, List<Vec2fColored> vec2c, int begin, boolean texture, boolean bloom) {
        setupRenderRect(texture, bloom);
        buffer.begin(begin, texture ? DefaultVertexFormats.POSITION_TEX_COLOR : DefaultVertexFormats.POSITION_COLOR);
        int counter = 0;
        for (final Vec2fColored vec : vec2c) {
            float[] rgba = ColorUtils.getRGBAf(vec.getColor());
            buffer.pos(matrix.getLast().getMatrix(), vec.getX(), vec.getY(), 0);
            if (texture) buffer.tex(counter == 0 || counter == 3 ? 0 : 1, counter == 0 || counter == 1 ? 0 : 1);
            buffer.color(rgba[0], rgba[1], rgba[2], rgba[3]);
            buffer.endVertex();
            counter++;
        }
        tessellator.draw();
        endRenderRect(bloom);
    }    public void drawRect(MatrixStack matrix, float x, float y, float x2, float y2, int color1, int color2, int color3, int color4, boolean bloom, boolean texture) {
        VERTEXES_COLORED.clear();
        VERTEXES_COLORED.add(new Vec2fColored(x, y, color1));
        VERTEXES_COLORED.add(new Vec2fColored(x2, y, color2));
        VERTEXES_COLORED.add(new Vec2fColored(x2, y2, color3));
        VERTEXES_COLORED.add(new Vec2fColored(x, y2, color4));
        drawVertexesList(matrix, VERTEXES_COLORED, GL11.GL_POLYGON, texture, bloom);
    }
    public List<Vec2f> generateRadiusCircledVertexes(MatrixStack matrix, float x, float y, double radius1, double radius2, double startRadius, double endRadius, double step, boolean doublepart) {
        VERTEXES.clear();
        double radius = startRadius;
        while (radius <= endRadius) {
            if (radius > endRadius) radius = endRadius;
            float x1 = (float) (Math.sin(Math.toRadians(radius)) * radius1);
            float y1 = (float) (-Math.cos(Math.toRadians(radius)) * radius1);
            VERTEXES.add(new Vec2f(x + x1, y + y1));
            if (doublepart) {
                x1 = (float) (Math.sin(Math.toRadians(radius)) * radius2);
                y1 = (float) (-Math.cos(Math.toRadians(radius)) * radius2);
                VERTEXES.add(new Vec2f(x + x1, y + y1));
            }
            radius += step;
        }
        return VERTEXES;
    }
    public void drawDuadsSegment(MatrixStack matrix, float x, float y, double radius, double expand, int color, int color2, boolean bloom, int[] side) {
        VERTEXES_COLORED.clear();
        int index = 0;
        for (Vec2f vec2f : generateRadiusCircledVertexes(matrix, x, y, radius, radius + expand, side[0], side[1], 9, true)) {
            VERTEXES_COLORED.add(getOfVec3f(vec2f, index % 2 == 1 ? color2 : color));
            ++index;
        }
        drawVertexesList(matrix, VERTEXES_COLORED, GL12.GL_TRIANGLE_STRIP, false, bloom);
    }
    public void drawShadowSegment(MatrixStack matrix, float x, float y, double radius, int color, boolean sageColor, int[] side, boolean bloom) {
        int color2 = sageColor ? 0 : ColorUtils.replAlpha(color, 0);
        drawDuadsSegment(matrix, x, y, 0, radius, color, color2, bloom, side);
    }

    public void drawShadowSegment(MatrixStack matrix, float x, float y, double radiusRound, double radiusShadow, int color, boolean sageColor, int[] side, boolean bloom) {
        int color2 = sageColor ? 0 : ColorUtils.replAlpha(color, 0);
        drawDuadsSegment(matrix, x, y, radiusRound, radiusShadow, color, color2, bloom, side);
    }

    public void drawRoundSegment(MatrixStack matrix, float x, float y, double radius, int color, int[] side, boolean bloom) {
        drawDuadsSegment(matrix, x, y, 0, radius, color, color, bloom, side);
    }

    public void drawRoundSegment(MatrixStack matrix, float x, float y, double radius, int color, int[] side) {
        drawDuadsSegment(matrix, x, y, 0, radius, color, color, false, side);
    }

    public void drawShadowSegment(MatrixStack matrix, float x, float y, double radius, int color, boolean sageColor, int[] side) {
        drawShadowSegment(matrix, x, y, radius, color, sageColor, side, false);
    }

    public void drawShadowSegmentsExtract(MatrixStack matrix, float x, float y, float x2, float y2, double radiusStart, double radiusEnd, int color1, int color2, int color3, int color4, boolean sageColor, boolean bloom) {
        drawShadowSegment(matrix, x, y, radiusStart, radiusEnd, color1, sageColor, LEFT_UP, bloom);
        drawShadowSegment(matrix, x2, y, radiusStart, radiusEnd, color2, sageColor, RIGHT_UP, bloom);
        drawShadowSegment(matrix, x2, y2, radiusStart, radiusEnd, color3, sageColor, RIGHT_DOWN, bloom);
        drawShadowSegment(matrix, x, y2, radiusStart, radiusEnd, color4, sageColor, LEFT_DOWN, bloom);
    }
    public void drawLimitersSegments(MatrixStack matrix, float x, float y, float x2, float y2, float radius, float appendOffsets, int color1, int color2, int color3, int color4, boolean sageColor, boolean retainZero, boolean bloom) {
        int c5 = retainZero ? sageColor ? 0 : ColorUtils.replAlpha(color1, 0) : color1;
        int c6 = retainZero ? sageColor ? 0 : ColorUtils.replAlpha(color2, 0) : color2;
        int c7 = retainZero ? sageColor ? 0 : ColorUtils.replAlpha(color3, 0) : color3;
        int c8 = retainZero ? sageColor ? 0 : ColorUtils.replAlpha(color4, 0) : color4;
   
        drawRect(matrix, x + appendOffsets, y - radius, x2 - appendOffsets, y, c5, c6, color2, color1, bloom, false);
   
        drawRect(matrix, x + appendOffsets, y2, x2 - appendOffsets, y2 + radius, color4, color3, c7, c8, bloom, false);
   
        drawRect(matrix, x - radius, y + appendOffsets, x, y2 - appendOffsets, c5, color1, color4, c8, bloom, false);
   
        drawRect(matrix, x2, y + appendOffsets, x2 + radius, y2 - appendOffsets, color2, c6, c7, color3, bloom, false);
    }
    public void drawRoundSegments(MatrixStack matrix, float x, float y, float x2, float y2, double radius, int color1, int color2, int color3, int color4, boolean bloom) {
        drawRoundSegment(matrix, x, y, radius, color1, LEFT_UP, bloom);
        drawRoundSegment(matrix, x2, y, radius, color2, RIGHT_UP, bloom);
        drawRoundSegment(matrix, x2, y2, radius, color3, RIGHT_DOWN, bloom);
        drawRoundSegment(matrix, x, y2, radius, color4, LEFT_DOWN, bloom);
    }
    public void drawRoundedRectShadowed(MatrixStack matrix, float x, float y, float x2, float y2, float round, float shadowSize, int color1, int color2, int color3, int color4, boolean bloom, boolean sageColor, boolean rect, boolean shadow) {
        float roundMax = Math.max(x2 - x, y2 - y);
        round = Math.max(Math.min(round, roundMax), 0);
        shadowSize = Math.max(shadowSize, 0);

        x += round;
        y += round;
        x2 -= round;
        y2 -= round;
        if (rect) {
            drawRect(matrix, x, y, x2, y2, color1, color2, color3, color4, bloom, false);
            if (round != 0) {
                drawLimitersSegments(matrix, x, y, x2, y2, round, 0, color1, color2, color3, color4, false, false, bloom);
                drawRoundSegments(matrix, x, y, x2, y2, round, color1, color2, color3, color4, bloom);
            }
        }
        if (shadow && shadowSize > 0) {
            drawLimitersSegments(matrix, x - round, y - round, x2 + round, y2 + round, shadowSize, round, color1, color2, color3, color4, sageColor, true, bloom);
            drawShadowSegmentsExtract(matrix, x, y, x2, y2, round, shadowSize, color1, color2, color3, color4, sageColor, bloom);
        }
    }
    public void drawRect(MatrixStack matrix, float x, float y, float x2, float y2, int color, boolean bloom) {
        drawRect(matrix, x, y, x2, y2, color, color, color, color, bloom, false);
    }

    public void drawRect(MatrixStack matrix, float x, float y, float x2, float y2, int color) {
        drawRect(matrix, x, y, x2, y2, color, false);
    }

    public void setupOrientationMatrix(MatrixStack matrix, double x, double y, double z) {
        float partialTicks = mc.getRenderPartialTicks();
        EntityRendererManager rendererManager = mc.getRenderManager();
        final Vector3d renderPos = rendererManager.info.getProjectedView();
        boolean flag = mc.gameSettings.getPointOfView().func_243192_a() || mc.gameSettings.getPointOfView().func_243194_c().func_243193_b();
        matrix.translate(x - renderPos.x, y - renderPos.y, z - renderPos.z);
    }
    public void drawWavyLine(MatrixStack matrix, float x, float y, float width, float waveHeight, float frequency, float amplitude, int color, boolean bloom, float time) {
        VERTEXES_COLORED.clear();

        float step = width / 100;
        float halfWidth = width / 2;
        float startX = x;
        float endX = x + width;

        for (float currentX = startX; currentX <= endX; currentX += step) {
       
            float offsetY = (float) (Math.sin((currentX - halfWidth) * frequency + time) * amplitude);
            int currentColor = color;

            VERTEXES_COLORED.add(new Vec2fColored(currentX, y + offsetY, currentColor));
        }

   
        VERTEXES_COLORED.add(new Vec2fColored(endX, y, color));

        drawVertexesList(matrix, VERTEXES_COLORED, GL_LINE_STRIP, false, bloom);
    }

}

Vec2f:


Vec2f:
package net.optifine.render;

public class Vec2f {
    public float x;
    public float y;

    public float getX() {
        return this.x;
    }

    public float getY() {
        return this.y;
    }

    public Vec2f(float x, float y) {
        this.x = x;
        this.y = y;
    }
}

ClickGui



ClickGui:
package xii.infinity.client.functions.impl.render;

import lombok.Getter;
import xii.infinity.client.functions.api.Category;
import xii.infinity.client.functions.api.Module;
import xii.infinity.client.functions.api.FunctionRegister;
import xii.infinity.client.functions.settings.impl.BooleanSetting;
import xii.infinity.client.functions.settings.impl.ModeSetting;

@FunctionRegister(name = "ClickGui", type = Category.Render)
public class ClickGui extends Module {
    [USER=270918]@Getter[/USER]
    private static ClickGui instance;
    private final BooleanSetting glow = new BooleanSetting("Шейдер", true);
    final ModeSetting mode = new ModeSetting("Цвет гуи", "Клиентский", "Клиентский", "Белый");

    public ClickGui() {
        toggle();
        instance = this;
        addSettings(glow);
        addSettings(mode);
    }

    public String getMode() {
        return mode.get();
    }

    public boolean getGlow() {
        return glow.get();
    }


    @Override
    public boolean onEnable() {
        super.onDisable();

        return false;
    }

    public boolean isWhiteMode() {
        return "Белый".equalsIgnoreCase(mode.get());
    }
}
ClickGui регать во функциях (FunctionRegistory)
 
Последнее редактирование:
Начинающий
Статус
Оффлайн
Регистрация
19 Фев 2024
Сообщения
79
Реакции[?]
0
Поинты[?]
0
для первой визуальной это вообще топчик, продолжай в том же духе
 
Начинающий
Статус
Оффлайн
Регистрация
29 Мар 2024
Сообщения
165
Реакции[?]
2
Поинты[?]
0
реально неплохо, но как будто гуи слишком резкое чтоли, если закруглить углы, то было бы вообще ахуенно!
 
Забаненный
Статус
Оффлайн
Регистрация
6 Окт 2022
Сообщения
85
Реакции[?]
0
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Первая моя визуальная работа, поэтому решил слить на лучший сайт.

Сливаю ClickGui и 2 худа с выбором через HUD, так же здесь показ армора автоматически переходит в вертикальное положение когда у края экрана по X.
Можно поставить шейдер (тень) в функции ClickGui, а так же выбрать режим "Белый" или "Клиентский". Так же имеется недоделанная панель с музыкой кому надо тот доделает. Темы открываются на пнг с карандашиком. Тх был взят с другого худа, но визуально переделан. Снизу еще сделаны типо волн (статические).

Возможно я еще, что то забыл добавить, так, что пишите в дс - baveko

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


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



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



HUD.java:
package xii.infinity.client.functions.impl.render;

import com.google.common.eventbus.Subscribe;
import xii.infinity.client.Infinity;
import xii.infinity.client.events.EventDisplay;
import xii.infinity.client.events.EventUpdate;
import xii.infinity.client.functions.api.Category;
import xii.infinity.client.functions.api.FunctionRegister;
import xii.infinity.client.functions.api.Module;
import xii.infinity.client.functions.settings.impl.BooleanSetting;
import xii.infinity.client.functions.settings.impl.ModeListSetting;
import xii.infinity.client.functions.settings.impl.ModeSetting;
import xii.infinity.client.ui.display.impl.*;
import xii.infinity.client.ui.styles.StyleManager;
import xii.infinity.client.utils.drag.Dragging;
import xii.infinity.client.utils.render.ColorUtils;
import lombok.AccessLevel;
import lombok.experimental.FieldDefaults;

@FieldDefaults(level = AccessLevel.PRIVATE)
@FunctionRegister(name = "HUD", type = Category.Render)
public class HUD extends Module {
    private static HUD instances;

    private final ModeSetting hudMode = new ModeSetting("HUD Mode", "HUD-1", "HUD-1","HUD-2");

    private final ModeListSetting elements = new ModeListSetting("Элементы",
            new BooleanSetting("Ватермарка", true),
            new BooleanSetting("Список модулей", true),
            new BooleanSetting("Координаты", true),
            new BooleanSetting("Эффекты", true),
            new BooleanSetting("Список модерации", true),
            new BooleanSetting("Активные бинды", true),
            new BooleanSetting("Активный таргет", true),
            new BooleanSetting("Броня", true),
            new BooleanSetting("Кулдавны", true),
            new BooleanSetting("Инвентарь", true),
            new BooleanSetting("Кей-Строкес", true)



            );

    final WatermarkRenderer4 watermarkRenderer;
    final ArrayListRenderer3 arrayListRenderer;
    final CoordsRenderer coordsRenderer;
    final PotionRenderer4 potionRenderer;
    final CoolDown cooldowns;

    final KeyBindRenderer4 keyBindRenderer;
    final TargetInfoRenderer4 targetInfoRenderer;
    final SeeInventoryRenderer3 inve;
    final KeyStrokes keys;


    final ArmorRenderer3 armorRenderer;
    final StaffListRenderer4 staffListRenderer;

    public static HUD getInstances() {
        return instances;
    }

    public static void setInstances(HUD instances) {
        HUD.instances = instances;
    }

    @Subscribe
    private void onUpdate(EventUpdate e) {
        if (mc.gameSettings.showDebugInfo) {
            return;
        }

        if (elements.getValueByName("Список модерации").get()) staffListRenderer.update(e);
        if (elements.getValueByName("Список модулей").get()) arrayListRenderer.update(e);
    }


    @Subscribe
    private void onDisplay(EventDisplay e) {
        if (mc.gameSettings.showDebugInfo || e.getType() != EventDisplay.Type.POST) {
            return;
        }

        if (elements.getValueByName("Координаты").get()) coordsRenderer.render(e);
        if (elements.getValueByName("Эффекты").get()) potionRenderer.render(e);
        if (elements.getValueByName("Ватермарка").get()) watermarkRenderer.render(e);
        if (elements.getValueByName("Список модулей").get()) arrayListRenderer.render(e);
        if (elements.getValueByName("Активные бинды").get()) keyBindRenderer.render(e);
        if (elements.getValueByName("Список модерации").get()) staffListRenderer.render(e);
        if (elements.getValueByName("Активный таргет").get()) targetInfoRenderer.render(e);
        if (elements.getValueByName("Кулдавны").get()) cooldowns.render(e);
        if (elements.getValueByName("Инвентарь").get()) inve.render(e);
        if (elements.getValueByName("Кей-Строкес").get()) keys.render(e);
        if (elements.getValueByName("Броня").get()) armorRenderer.render(e);





    }

    public HUD() {
        watermarkRenderer = new WatermarkRenderer4();
        arrayListRenderer = new ArrayListRenderer3();
        coordsRenderer = new CoordsRenderer();
        Dragging key = Infinity.getInstance().createDrag(this, "Key", 185, 100);
        Dragging inves = Infinity.getInstance().createDrag(this, "Inventory", 278, 100);
        Dragging cooldown = Infinity.getInstance().createDrag(this, "Cooldown", 350, 100);
        Dragging armor2 = Infinity.getInstance().createDrag(this, "Armor", 350, 5);
        Dragging potions = Infinity.getInstance().createDrag(this, "Potions", 278, 5);
        Dragging keyBinds = Infinity.getInstance().createDrag(this, "KeyBinds", 185, 5);
        Dragging dragging = Infinity.getInstance().createDrag(this, "TargetHUD", 74, 128);
        Dragging staffList = Infinity.getInstance().createDrag(this, "StaffList", 96, 5);
        armorRenderer = new ArmorRenderer3(armor2);

        potionRenderer = new PotionRenderer4(potions);
        cooldowns = new CoolDown(cooldown);
        keyBindRenderer = new KeyBindRenderer4(keyBinds);

        keys = new KeyStrokes(key);
        staffListRenderer = new StaffListRenderer4(staffList);
        targetInfoRenderer = new TargetInfoRenderer4(dragging);
        inve = new SeeInventoryRenderer3(inves);
        instances = this;

        addSettings( hudMode,elements );

    }

    public static int getColor(int index) {
        StyleManager styleManager = Infinity.getInstance().getStyleManager();
        return ColorUtils.gradient(styleManager.getCurrentStyle().getFirstColor().getRGB(), styleManager.getCurrentStyle().getSecondColor().getRGB(), index * 16, 10);
    }

    public static int getColor(int index, float mult) {
        StyleManager styleManager = Infinity.getInstance().getStyleManager();
        return ColorUtils.gradient(styleManager.getCurrentStyle().getFirstColor().getRGB(), styleManager.getCurrentStyle().getSecondColor().getRGB(), (int) (index * mult), 10);
    }

    public static int getColor(int firstColor, int secondColor, int index, float mult) {
        return ColorUtils.gradient(firstColor, secondColor, (int) (index * mult), 10);
    }
    public boolean isHud2() {
        return "HUD-2".equalsIgnoreCase(hudMode.get());
    }
}

RenderUtils:


RenderUtils:
package net.optifine.render;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import org.lwjgl.opengl.GL12;
import xii.infinity.client.Infinity;
import xii.infinity.client.utils.render.ColorUtils;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.BufferBuilder;
import net.minecraft.client.renderer.RenderTypeBuffers;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import org.lwjgl.opengl.GL11;

import java.util.ArrayList;
import java.util.List;

import static org.lwjgl.opengl.GL11.*;
import static org.lwjgl.opengl.GL11.GL_LINE_STRIP;

public class RenderUtils
{
    private static boolean flushRenderBuffers = true;
    private static Minecraft mc = Minecraft.getInstance();

    public static boolean setFlushRenderBuffers(boolean flushRenderBuffers)
    {
        boolean flag = RenderUtils.flushRenderBuffers;
        RenderUtils.flushRenderBuffers = flushRenderBuffers;
        return flag;
    }

    public static boolean isFlushRenderBuffers()
    {
        return flushRenderBuffers;
    }

    public static void flushRenderBuffers()
    {
        if (flushRenderBuffers)
        {
            RenderTypeBuffers rendertypebuffers = mc.getRenderTypeBuffers();
            rendertypebuffers.getBufferSource().flushRenderBuffers();
            rendertypebuffers.getCrumblingBufferSource().flushRenderBuffers();
        }
    }

    public static void drawBlockBox(BlockPos blockPos, int color) {
        drawBox(new AxisAlignedBB(blockPos).offset(-mc.getRenderManager().info.getProjectedView().x, -mc.getRenderManager().info.getProjectedView().y, -mc.getRenderManager().info.getProjectedView().z), color);
    }

    public static void drawBox(AxisAlignedBB bb, int color) {
        GL11.glPushMatrix();
        GL11.glDisable(GL11.GL_TEXTURE_2D);
        GL11.glDisable(GL_DEPTH_TEST);
        GL11.glEnable(GL_LINE_SMOOTH);
        GL11.glLineWidth(1);
        float[] rgb = ColorUtils.rgba(color);
        GlStateManager.color4f(rgb[0], rgb[1], rgb[2], rgb[3]);
        Tessellator tessellator = Tessellator.getInstance();
        BufferBuilder vertexbuffer = tessellator.getBuffer();
        vertexbuffer.begin(3, DefaultVertexFormats.POSITION);
        vertexbuffer.pos(bb.minX, bb.minY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.minY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.minY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.minY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.minY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        tessellator.draw();
        vertexbuffer.begin(3, DefaultVertexFormats.POSITION);
        vertexbuffer.pos(bb.minX, bb.maxY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.maxY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.maxY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.maxY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.maxY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        tessellator.draw();
        vertexbuffer.begin(1, DefaultVertexFormats.POSITION);
        vertexbuffer.pos(bb.minX, bb.minY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.maxY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.minY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.maxY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.minY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.maxY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.minY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.maxY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        tessellator.draw();
        GlStateManager.color4f(rgb[0], rgb[1], rgb[2], rgb[3]);
        GL11.glEnable(GL11.GL_TEXTURE_2D);
        GL11.glEnable(GL_DEPTH_TEST);
        GL11.glDisable(GL_LINE_SMOOTH);
        GL11.glPopMatrix();

    }
    public static void renderClientRect3(MatrixStack matrix, float x, float y, float width, float height, boolean expand, double expanded, int color, int i) {
        renderClientRect(matrix, x, y, width, height , expand, expanded, color, 128);
    }
    public static void renderClientRect2(MatrixStack matrix, float x, float y, float width, float height, boolean expand, double expanded, int color, int i) {
        renderClientRect4(matrix, x, y, width, height , expand, expanded, color, 128);
    }

    public static void renderClientRect(MatrixStack matrix, float x, float y, float width, float height, boolean expand, double expanded, int color, int alphaPC) {
        // Extract color components
        int red = (color >> 16) & 0xFF;
        int green = (color >> 8) & 0xFF;
        int blue = color & 0xFF;
        int alpha = alphaPC;

        int color1 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color2 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color3 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color4 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);

        boolean bloom = true;
        float round = Infinity.getInstance().round();
        float shadow = Infinity.getInstance().shadow();
        int zeroC1 = ColorUtils.multAlpha(color1, 0.F);
        int zeroC2 = ColorUtils.multAlpha(color2, 0.F);
        int zeroC3 = ColorUtils.multAlpha(color3, 0.F);
        int zeroC4 = ColorUtils.multAlpha(color4, 0.F);
        int halfC1 = ColorUtils.multAlpha(color1, .5F);
        int halfC2 = ColorUtils.multAlpha(color2, .5F);
        int halfC3 = ColorUtils.multAlpha(color3, .5F);
        int halfC4 = ColorUtils.multAlpha(color4, .5F);
        int overY1C = ColorUtils.overCol(color1, color2);
        int overY2C = ColorUtils.overCol(color4, color3);
        int overX1C = ColorUtils.overCol(color1, color4);
        int overX2C = ColorUtils.overCol(color2, color3);

        // Draw rounded rectangle with shadows
        RectUtil.drawRoundedRectShadowed(matrix, x, y, x + width, y + height, round, shadow, halfC1, halfC2, halfC3, halfC4, bloom, true, false, true);

        // Draw darkened version for effect
        float dark = 0.35F;
        RectUtil.drawRoundedRectShadowed(matrix, x, y, x + width, y + height, round, .5F, ColorUtils.multDark(color1, dark), ColorUtils.multDark(color2, dark), ColorUtils.multDark(color3, dark), ColorUtils.multDark(color4, dark), false, false, true, true);

        List<RectUtil.Vec2fColored> list = new ArrayList<>();
        if (expand) {
            list.add(new RectUtil.Vec2fColored(x + 2, y + (float) expanded, zeroC1));
            list.add(new RectUtil.Vec2fColored(x + width / 2F, y + (float) expanded, overY1C));
            list.add(new RectUtil.Vec2fColored(x + width - 2, y + (float) expanded, zeroC2));
            GL12.glLineWidth(2);
            RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);
            GL12.glPointSize(1);
        }

        // Draw edges
        float lineOff = 0;
        GL12.glLineWidth(2);

        // Top line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + round, y + lineOff, zeroC1));
        list.add(new RectUtil.Vec2fColored(x + width / 2F, y + lineOff, overY1C));
        list.add(new RectUtil.Vec2fColored(x + width - round, y + lineOff, zeroC2));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Bottom line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + round, y + height - lineOff, zeroC4));
        list.add(new RectUtil.Vec2fColored(x + width / 2F, y + height - lineOff, overY2C));
        list.add(new RectUtil.Vec2fColored(x + width - round, y + height - lineOff, zeroC3));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Left line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + round, zeroC1));
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + height / 2F, overX1C));
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + height - round, zeroC4));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Right line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + round, zeroC2));
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + height / 2F, overX2C));
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + height - round, zeroC3));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        GL12.glLineWidth(1);

        // Parameters for wave
        // Параметры для волны
        float waveHeight = 10.0F; // Высота волны
        float frequency = 0.1F;   // Частота волны
        float amplitude = 5.0F;   // Амплитуда волны
        float speedFactor = 300.0F; // Коэффициент замедления (чем больше, тем медленнее)

// Получить текущее время в миллисекундах
        float time = System.currentTimeMillis() % 10000; // Простой эффект на основе времени

// Нарисовать динамическую волнистую линию внизу прямоугольника
        drawDynamicWavyLine(matrix, x, y + height, width, waveHeight, frequency, amplitude, color, bloom, time, speedFactor);

    }


    // Метод для рисования динамической волны
    // Метод для рисования динамической волны
    private static void drawDynamicWavyLine(MatrixStack matrix, float x, float y, float width, float waveHeight, float frequency, float amplitude, int color, boolean bloom, float time, float speedFactor) {
        List<RectUtil.Vec2fColored> list = new ArrayList<>();
        float step = width / 200; // Уменьшение шага для более точной отрисовки
        float halfWidth = width / 2;
        float startX = x;
        float endX = x + width;

        // Параметры для непрерывного эффекта
        float waveOffset = (float) ((time / speedFactor) % (2 * Math.PI));

        // Параметры волны
        float baseAmplitude = amplitude * (0.5F + 0.5F * (float) Math.sin(waveOffset));
        float frequencyStep = frequency * step;

        for (float currentX = startX; currentX <= endX; currentX += step) {
            // Расчет смещения Y для плавного перехода
            float dynamicAmplitude = baseAmplitude * (0.5F + 0.5F * (float) Math.sin(waveOffset));
            float offsetY = (float) (Math.sin((currentX - startX) * frequencyStep + waveOffset) * dynamicAmplitude);

            list.add(new RectUtil.Vec2fColored(currentX, y + offsetY, color));
        }

        // Плавное соединение волны
        float endOffsetY = (float) (Math.sin((endX - startX) * frequencyStep + waveOffset) * baseAmplitude);
        list.add(new RectUtil.Vec2fColored(endX, y + endOffsetY, color));

        // Рисование линии
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);
    }



    public static void renderClientRect4(MatrixStack matrix, float x, float y, float width, float height, boolean expand, double expanded, int color, int alphaPC) {
        // Extract color components
        int red = (color >> 16) & 0xFF;
        int green = (color >> 8) & 0xFF;
        int blue = color & 0xFF;
        int alpha = alphaPC;

        int color1 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color2 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color3 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color4 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);

        boolean bloom = true;
        float round = Infinity.getInstance().round();
        float shadow = Infinity.getInstance().shadow();
        int zeroC1 = ColorUtils.multAlpha(color1, 0.F);
        int zeroC2 = ColorUtils.multAlpha(color2, 0.F);
        int zeroC3 = ColorUtils.multAlpha(color3, 0.F);
        int zeroC4 = ColorUtils.multAlpha(color4, 0.F);
        int halfC1 = ColorUtils.multAlpha(color1, .5F);
        int halfC2 = ColorUtils.multAlpha(color2, .5F);
        int halfC3 = ColorUtils.multAlpha(color3, .5F);
        int halfC4 = ColorUtils.multAlpha(color4, .5F);
        int overY1C = ColorUtils.overCol(color1, color2);
        int overY2C = ColorUtils.overCol(color4, color3);
        int overX1C = ColorUtils.overCol(color1, color4);
        int overX2C = ColorUtils.overCol(color2, color3);

        // Draw rounded rectangle with shadows
        RectUtil.drawRoundedRectShadowed(matrix, x, y, x + width, y + height, round, shadow, halfC1, halfC2, halfC3, halfC4, bloom, true, false, true);

        // Draw darkened version for effect
        float dark = 0.35F;
        RectUtil.drawRoundedRectShadowed(matrix, x, y, x + width, y + height, round, .5F, ColorUtils.multDark(color1, dark), ColorUtils.multDark(color2, dark), ColorUtils.multDark(color3, dark), ColorUtils.multDark(color4, dark), false, false, true, true);

        List<RectUtil.Vec2fColored> list = new ArrayList<>();
        if (expand) {
            list.add(new RectUtil.Vec2fColored(x + 2, y + (float) expanded, zeroC1));
            list.add(new RectUtil.Vec2fColored(x + width / 2F, y + (float) expanded, overY1C));
            list.add(new RectUtil.Vec2fColored(x + width - 2, y + (float) expanded, zeroC2));
            GL12.glLineWidth(2);
            RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);
            GL12.glPointSize(1);
        }

        // Draw edges
        float lineOff = 0;
        GL12.glLineWidth(2);

        // Top line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + round, y + lineOff, zeroC1));
        list.add(new RectUtil.Vec2fColored(x + width / 2F, y + lineOff, overY1C));
        list.add(new RectUtil.Vec2fColored(x + width - round, y + lineOff, zeroC2));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Bottom line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + round, y + height - lineOff, zeroC4));
        list.add(new RectUtil.Vec2fColored(x + width / 2F, y + height - lineOff, overY2C));
        list.add(new RectUtil.Vec2fColored(x + width - round, y + height - lineOff, zeroC3));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Left line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + round, zeroC1));
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + height / 2F, overX1C));
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + height - round, zeroC4));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Right line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + round, zeroC2));
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + height / 2F, overX2C));
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + height - round, zeroC3));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        GL12.glLineWidth(1);

        // Parameters for wave
        // Параметры для волны


    }

}

RectUtil:


RectUtil:
package net.optifine.render;

import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.experimental.UtilityClass;
import net.minecraft.client.renderer.entity.EntityRendererManager;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;

import net.minecraft.util.math.vector.Vector3d;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import xii.infinity.client.utils.render.ColorUtils;

import java.util.ArrayList;
import java.util.List;

import static org.lwjgl.opengl.GL11C.GL_LINE_STRIP;
import static xii.infinity.client.utils.client.IMinecraft.*;


@UtilityClass
@SuppressWarnings("unused")
public class RectUtil implements IRenderAccess {
    public final List<Vec2fColored> VERTEXES_COLORED = new ArrayList<>();
    public final List<Vec2f> VERTEXES = new ArrayList<>();
    int[] LEFT_UP = new int[]{-90, 0};
    int[] RIGHT_UP = new int[]{0, 90};
    int[] RIGHT_DOWN = new int[]{90, 180};
    int[] LEFT_DOWN = new int[]{180, 270};
    [USER=270918]@Getter[/USER]
    @AllArgsConstructor
    public class Vec2fColored {
        float x, y;
        int color;
    }
    public void setupRenderRect(boolean texture, boolean bloom) {
        if (texture) RenderSystem.enableTexture();
        else RenderSystem.disableTexture();
        RenderSystem.enableBlend();
        RenderSystem.disableAlphaTest();
        RenderSystem.defaultBlendFunc();
        RenderSystem.disableCull();
        RenderSystem.shadeModel(7425);

        RenderSystem.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, bloom ? GlStateManager.DestFactor.ONE_MINUS_CONSTANT_ALPHA : GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
        RenderSystem.disableAlphaTest();
        GL11.glHint(GL11.GL_POLYGON_SMOOTH_HINT, GL11.GL_NICEST);
        GL11.glEnable(GL11.GL_POINT_SMOOTH);
    }
    public void endRenderRect(boolean bloom) {
        RenderSystem.enableAlphaTest();
        if (bloom)
            RenderSystem.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);

        RenderSystem.shadeModel(7424);
        RenderSystem.enableCull();
        RenderSystem.enableAlphaTest();
        RenderSystem.enableTexture();

        RenderSystem.clearCurrentColor();
    }
    public Vec2fColored getOfVec3f(Vec2f vec2f, int color) {
        return new Vec2fColored(vec2f.getX(), vec2f.getY(), color);
    }
    public void drawVertexesList(MatrixStack matrix, List<Vec2fColored> vec2c, int begin, boolean texture, boolean bloom) {
        setupRenderRect(texture, bloom);
        buffer.begin(begin, texture ? DefaultVertexFormats.POSITION_TEX_COLOR : DefaultVertexFormats.POSITION_COLOR);
        int counter = 0;
        for (final Vec2fColored vec : vec2c) {
            float[] rgba = ColorUtils.getRGBAf(vec.getColor());
            buffer.pos(matrix.getLast().getMatrix(), vec.getX(), vec.getY(), 0);
            if (texture) buffer.tex(counter == 0 || counter == 3 ? 0 : 1, counter == 0 || counter == 1 ? 0 : 1);
            buffer.color(rgba[0], rgba[1], rgba[2], rgba[3]);
            buffer.endVertex();
            counter++;
        }
        tessellator.draw();
        endRenderRect(bloom);
    }    public void drawRect(MatrixStack matrix, float x, float y, float x2, float y2, int color1, int color2, int color3, int color4, boolean bloom, boolean texture) {
        VERTEXES_COLORED.clear();
        VERTEXES_COLORED.add(new Vec2fColored(x, y, color1));
        VERTEXES_COLORED.add(new Vec2fColored(x2, y, color2));
        VERTEXES_COLORED.add(new Vec2fColored(x2, y2, color3));
        VERTEXES_COLORED.add(new Vec2fColored(x, y2, color4));
        drawVertexesList(matrix, VERTEXES_COLORED, GL11.GL_POLYGON, texture, bloom);
    }
    public List<Vec2f> generateRadiusCircledVertexes(MatrixStack matrix, float x, float y, double radius1, double radius2, double startRadius, double endRadius, double step, boolean doublepart) {
        VERTEXES.clear();
        double radius = startRadius;
        while (radius <= endRadius) {
            if (radius > endRadius) radius = endRadius;
            float x1 = (float) (Math.sin(Math.toRadians(radius)) * radius1);
            float y1 = (float) (-Math.cos(Math.toRadians(radius)) * radius1);
            VERTEXES.add(new Vec2f(x + x1, y + y1));
            if (doublepart) {
                x1 = (float) (Math.sin(Math.toRadians(radius)) * radius2);
                y1 = (float) (-Math.cos(Math.toRadians(radius)) * radius2);
                VERTEXES.add(new Vec2f(x + x1, y + y1));
            }
            radius += step;
        }
        return VERTEXES;
    }
    public void drawDuadsSegment(MatrixStack matrix, float x, float y, double radius, double expand, int color, int color2, boolean bloom, int[] side) {
        VERTEXES_COLORED.clear();
        int index = 0;
        for (Vec2f vec2f : generateRadiusCircledVertexes(matrix, x, y, radius, radius + expand, side[0], side[1], 9, true)) {
            VERTEXES_COLORED.add(getOfVec3f(vec2f, index % 2 == 1 ? color2 : color));
            ++index;
        }
        drawVertexesList(matrix, VERTEXES_COLORED, GL12.GL_TRIANGLE_STRIP, false, bloom);
    }
    public void drawShadowSegment(MatrixStack matrix, float x, float y, double radius, int color, boolean sageColor, int[] side, boolean bloom) {
        int color2 = sageColor ? 0 : ColorUtils.replAlpha(color, 0);
        drawDuadsSegment(matrix, x, y, 0, radius, color, color2, bloom, side);
    }

    public void drawShadowSegment(MatrixStack matrix, float x, float y, double radiusRound, double radiusShadow, int color, boolean sageColor, int[] side, boolean bloom) {
        int color2 = sageColor ? 0 : ColorUtils.replAlpha(color, 0);
        drawDuadsSegment(matrix, x, y, radiusRound, radiusShadow, color, color2, bloom, side);
    }

    public void drawRoundSegment(MatrixStack matrix, float x, float y, double radius, int color, int[] side, boolean bloom) {
        drawDuadsSegment(matrix, x, y, 0, radius, color, color, bloom, side);
    }

    public void drawRoundSegment(MatrixStack matrix, float x, float y, double radius, int color, int[] side) {
        drawDuadsSegment(matrix, x, y, 0, radius, color, color, false, side);
    }

    public void drawShadowSegment(MatrixStack matrix, float x, float y, double radius, int color, boolean sageColor, int[] side) {
        drawShadowSegment(matrix, x, y, radius, color, sageColor, side, false);
    }

    public void drawShadowSegmentsExtract(MatrixStack matrix, float x, float y, float x2, float y2, double radiusStart, double radiusEnd, int color1, int color2, int color3, int color4, boolean sageColor, boolean bloom) {
        drawShadowSegment(matrix, x, y, radiusStart, radiusEnd, color1, sageColor, LEFT_UP, bloom);
        drawShadowSegment(matrix, x2, y, radiusStart, radiusEnd, color2, sageColor, RIGHT_UP, bloom);
        drawShadowSegment(matrix, x2, y2, radiusStart, radiusEnd, color3, sageColor, RIGHT_DOWN, bloom);
        drawShadowSegment(matrix, x, y2, radiusStart, radiusEnd, color4, sageColor, LEFT_DOWN, bloom);
    }
    public void drawLimitersSegments(MatrixStack matrix, float x, float y, float x2, float y2, float radius, float appendOffsets, int color1, int color2, int color3, int color4, boolean sageColor, boolean retainZero, boolean bloom) {
        int c5 = retainZero ? sageColor ? 0 : ColorUtils.replAlpha(color1, 0) : color1;
        int c6 = retainZero ? sageColor ? 0 : ColorUtils.replAlpha(color2, 0) : color2;
        int c7 = retainZero ? sageColor ? 0 : ColorUtils.replAlpha(color3, 0) : color3;
        int c8 = retainZero ? sageColor ? 0 : ColorUtils.replAlpha(color4, 0) : color4;
      
        drawRect(matrix, x + appendOffsets, y - radius, x2 - appendOffsets, y, c5, c6, color2, color1, bloom, false);
      
        drawRect(matrix, x + appendOffsets, y2, x2 - appendOffsets, y2 + radius, color4, color3, c7, c8, bloom, false);
      
        drawRect(matrix, x - radius, y + appendOffsets, x, y2 - appendOffsets, c5, color1, color4, c8, bloom, false);
      
        drawRect(matrix, x2, y + appendOffsets, x2 + radius, y2 - appendOffsets, color2, c6, c7, color3, bloom, false);
    }
    public void drawRoundSegments(MatrixStack matrix, float x, float y, float x2, float y2, double radius, int color1, int color2, int color3, int color4, boolean bloom) {
        drawRoundSegment(matrix, x, y, radius, color1, LEFT_UP, bloom);
        drawRoundSegment(matrix, x2, y, radius, color2, RIGHT_UP, bloom);
        drawRoundSegment(matrix, x2, y2, radius, color3, RIGHT_DOWN, bloom);
        drawRoundSegment(matrix, x, y2, radius, color4, LEFT_DOWN, bloom);
    }
    public void drawRoundedRectShadowed(MatrixStack matrix, float x, float y, float x2, float y2, float round, float shadowSize, int color1, int color2, int color3, int color4, boolean bloom, boolean sageColor, boolean rect, boolean shadow) {
        float roundMax = Math.max(x2 - x, y2 - y);
        round = Math.max(Math.min(round, roundMax), 0);
        shadowSize = Math.max(shadowSize, 0);

        x += round;
        y += round;
        x2 -= round;
        y2 -= round;
        if (rect) {
            drawRect(matrix, x, y, x2, y2, color1, color2, color3, color4, bloom, false);
            if (round != 0) {
                drawLimitersSegments(matrix, x, y, x2, y2, round, 0, color1, color2, color3, color4, false, false, bloom);
                drawRoundSegments(matrix, x, y, x2, y2, round, color1, color2, color3, color4, bloom);
            }
        }
        if (shadow && shadowSize > 0) {
            drawLimitersSegments(matrix, x - round, y - round, x2 + round, y2 + round, shadowSize, round, color1, color2, color3, color4, sageColor, true, bloom);
            drawShadowSegmentsExtract(matrix, x, y, x2, y2, round, shadowSize, color1, color2, color3, color4, sageColor, bloom);
        }
    }
    public void drawRect(MatrixStack matrix, float x, float y, float x2, float y2, int color, boolean bloom) {
        drawRect(matrix, x, y, x2, y2, color, color, color, color, bloom, false);
    }

    public void drawRect(MatrixStack matrix, float x, float y, float x2, float y2, int color) {
        drawRect(matrix, x, y, x2, y2, color, false);
    }

    public void setupOrientationMatrix(MatrixStack matrix, double x, double y, double z) {
        float partialTicks = mc.getRenderPartialTicks();
        EntityRendererManager rendererManager = mc.getRenderManager();
        final Vector3d renderPos = rendererManager.info.getProjectedView();
        boolean flag = mc.gameSettings.getPointOfView().func_243192_a() || mc.gameSettings.getPointOfView().func_243194_c().func_243193_b();
        matrix.translate(x - renderPos.x, y - renderPos.y, z - renderPos.z);
    }
    public void drawWavyLine(MatrixStack matrix, float x, float y, float width, float waveHeight, float frequency, float amplitude, int color, boolean bloom, float time) {
        VERTEXES_COLORED.clear();

        float step = width / 100;
        float halfWidth = width / 2;
        float startX = x;
        float endX = x + width;

        for (float currentX = startX; currentX <= endX; currentX += step) {
          
            float offsetY = (float) (Math.sin((currentX - halfWidth) * frequency + time) * amplitude);
            int currentColor = color;

            VERTEXES_COLORED.add(new Vec2fColored(currentX, y + offsetY, currentColor));
        }

      
        VERTEXES_COLORED.add(new Vec2fColored(endX, y, color));

        drawVertexesList(matrix, VERTEXES_COLORED, GL_LINE_STRIP, false, bloom);
    }

}

Vec2f:


Vec2f:
package net.optifine.render;

public class Vec2f {
    public float x;
    public float y;

    public float getX() {
        return this.x;
    }

    public float getY() {
        return this.y;
    }

    public Vec2f(float x, float y) {
        this.x = x;
        this.y = y;
    }
}
/DEL excellent
 
Начинающий
Статус
Оффлайн
Регистрация
20 Авг 2024
Сообщения
73
Реакции[?]
0
Поинты[?]
0
За гуи +REP а вот худ нужно немного проработать и то тчо ты смог с темами сделать ты просто БОГ потому что я таким не занимался но думал что-то похожее сделать спс за идею в рендеринге тем
 
Забаненный
Статус
Оффлайн
Регистрация
6 Окт 2022
Сообщения
85
Реакции[?]
0
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Начинающий
Статус
Оффлайн
Регистрация
16 Дек 2023
Сообщения
523
Реакции[?]
8
Поинты[?]
4K
Первая моя визуальная работа, поэтому решил слить на лучший сайт.

Сливаю ClickGui и 2 худа с выбором через HUD, так же здесь показ армора автоматически переходит в вертикальное положение когда у края экрана по X.
Можно поставить шейдер (тень) в функции ClickGui, а так же выбрать режим "Белый" или "Клиентский". Так же имеется недоделанная панель с музыкой кому надо тот доделает. Темы открываются на пнг с карандашиком. Тх был взят с другого худа, но визуально переделан. Снизу еще сделаны типо волн (статические).

Возможно я еще, что то забыл добавить, так, что пишите в дс - baveko

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


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



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



HUD.java:
package xii.infinity.client.functions.impl.render;

import com.google.common.eventbus.Subscribe;
import xii.infinity.client.Infinity;
import xii.infinity.client.events.EventDisplay;
import xii.infinity.client.events.EventUpdate;
import xii.infinity.client.functions.api.Category;
import xii.infinity.client.functions.api.FunctionRegister;
import xii.infinity.client.functions.api.Module;
import xii.infinity.client.functions.settings.impl.BooleanSetting;
import xii.infinity.client.functions.settings.impl.ModeListSetting;
import xii.infinity.client.functions.settings.impl.ModeSetting;
import xii.infinity.client.ui.display.impl.*;
import xii.infinity.client.ui.styles.StyleManager;
import xii.infinity.client.utils.drag.Dragging;
import xii.infinity.client.utils.render.ColorUtils;
import lombok.AccessLevel;
import lombok.experimental.FieldDefaults;

@FieldDefaults(level = AccessLevel.PRIVATE)
@FunctionRegister(name = "HUD", type = Category.Render)
public class HUD extends Module {
    private static HUD instances;

    private final ModeSetting hudMode = new ModeSetting("HUD Mode", "HUD-1", "HUD-1","HUD-2");

    private final ModeListSetting elements = new ModeListSetting("Элементы",
            new BooleanSetting("Ватермарка", true),
            new BooleanSetting("Список модулей", true),
            new BooleanSetting("Координаты", true),
            new BooleanSetting("Эффекты", true),
            new BooleanSetting("Список модерации", true),
            new BooleanSetting("Активные бинды", true),
            new BooleanSetting("Активный таргет", true),
            new BooleanSetting("Броня", true),
            new BooleanSetting("Кулдавны", true),
            new BooleanSetting("Инвентарь", true),
            new BooleanSetting("Кей-Строкес", true)



            );

    final WatermarkRenderer4 watermarkRenderer;
    final ArrayListRenderer3 arrayListRenderer;
    final CoordsRenderer coordsRenderer;
    final PotionRenderer4 potionRenderer;
    final CoolDown cooldowns;

    final KeyBindRenderer4 keyBindRenderer;
    final TargetInfoRenderer4 targetInfoRenderer;
    final SeeInventoryRenderer3 inve;
    final KeyStrokes keys;


    final ArmorRenderer3 armorRenderer;
    final StaffListRenderer4 staffListRenderer;

    public static HUD getInstances() {
        return instances;
    }

    public static void setInstances(HUD instances) {
        HUD.instances = instances;
    }

    @Subscribe
    private void onUpdate(EventUpdate e) {
        if (mc.gameSettings.showDebugInfo) {
            return;
        }

        if (elements.getValueByName("Список модерации").get()) staffListRenderer.update(e);
        if (elements.getValueByName("Список модулей").get()) arrayListRenderer.update(e);
    }


    @Subscribe
    private void onDisplay(EventDisplay e) {
        if (mc.gameSettings.showDebugInfo || e.getType() != EventDisplay.Type.POST) {
            return;
        }

        if (elements.getValueByName("Координаты").get()) coordsRenderer.render(e);
        if (elements.getValueByName("Эффекты").get()) potionRenderer.render(e);
        if (elements.getValueByName("Ватермарка").get()) watermarkRenderer.render(e);
        if (elements.getValueByName("Список модулей").get()) arrayListRenderer.render(e);
        if (elements.getValueByName("Активные бинды").get()) keyBindRenderer.render(e);
        if (elements.getValueByName("Список модерации").get()) staffListRenderer.render(e);
        if (elements.getValueByName("Активный таргет").get()) targetInfoRenderer.render(e);
        if (elements.getValueByName("Кулдавны").get()) cooldowns.render(e);
        if (elements.getValueByName("Инвентарь").get()) inve.render(e);
        if (elements.getValueByName("Кей-Строкес").get()) keys.render(e);
        if (elements.getValueByName("Броня").get()) armorRenderer.render(e);





    }

    public HUD() {
        watermarkRenderer = new WatermarkRenderer4();
        arrayListRenderer = new ArrayListRenderer3();
        coordsRenderer = new CoordsRenderer();
        Dragging key = Infinity.getInstance().createDrag(this, "Key", 185, 100);
        Dragging inves = Infinity.getInstance().createDrag(this, "Inventory", 278, 100);
        Dragging cooldown = Infinity.getInstance().createDrag(this, "Cooldown", 350, 100);
        Dragging armor2 = Infinity.getInstance().createDrag(this, "Armor", 350, 5);
        Dragging potions = Infinity.getInstance().createDrag(this, "Potions", 278, 5);
        Dragging keyBinds = Infinity.getInstance().createDrag(this, "KeyBinds", 185, 5);
        Dragging dragging = Infinity.getInstance().createDrag(this, "TargetHUD", 74, 128);
        Dragging staffList = Infinity.getInstance().createDrag(this, "StaffList", 96, 5);
        armorRenderer = new ArmorRenderer3(armor2);

        potionRenderer = new PotionRenderer4(potions);
        cooldowns = new CoolDown(cooldown);
        keyBindRenderer = new KeyBindRenderer4(keyBinds);

        keys = new KeyStrokes(key);
        staffListRenderer = new StaffListRenderer4(staffList);
        targetInfoRenderer = new TargetInfoRenderer4(dragging);
        inve = new SeeInventoryRenderer3(inves);
        instances = this;

        addSettings( hudMode,elements );

    }

    public static int getColor(int index) {
        StyleManager styleManager = Infinity.getInstance().getStyleManager();
        return ColorUtils.gradient(styleManager.getCurrentStyle().getFirstColor().getRGB(), styleManager.getCurrentStyle().getSecondColor().getRGB(), index * 16, 10);
    }

    public static int getColor(int index, float mult) {
        StyleManager styleManager = Infinity.getInstance().getStyleManager();
        return ColorUtils.gradient(styleManager.getCurrentStyle().getFirstColor().getRGB(), styleManager.getCurrentStyle().getSecondColor().getRGB(), (int) (index * mult), 10);
    }

    public static int getColor(int firstColor, int secondColor, int index, float mult) {
        return ColorUtils.gradient(firstColor, secondColor, (int) (index * mult), 10);
    }
    public boolean isHud2() {
        return "HUD-2".equalsIgnoreCase(hudMode.get());
    }
}

RenderUtils:


RenderUtils:
package net.optifine.render;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import org.lwjgl.opengl.GL12;
import xii.infinity.client.Infinity;
import xii.infinity.client.utils.render.ColorUtils;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.BufferBuilder;
import net.minecraft.client.renderer.RenderTypeBuffers;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import org.lwjgl.opengl.GL11;

import java.util.ArrayList;
import java.util.List;

import static org.lwjgl.opengl.GL11.*;
import static org.lwjgl.opengl.GL11.GL_LINE_STRIP;

public class RenderUtils
{
    private static boolean flushRenderBuffers = true;
    private static Minecraft mc = Minecraft.getInstance();

    public static boolean setFlushRenderBuffers(boolean flushRenderBuffers)
    {
        boolean flag = RenderUtils.flushRenderBuffers;
        RenderUtils.flushRenderBuffers = flushRenderBuffers;
        return flag;
    }

    public static boolean isFlushRenderBuffers()
    {
        return flushRenderBuffers;
    }

    public static void flushRenderBuffers()
    {
        if (flushRenderBuffers)
        {
            RenderTypeBuffers rendertypebuffers = mc.getRenderTypeBuffers();
            rendertypebuffers.getBufferSource().flushRenderBuffers();
            rendertypebuffers.getCrumblingBufferSource().flushRenderBuffers();
        }
    }

    public static void drawBlockBox(BlockPos blockPos, int color) {
        drawBox(new AxisAlignedBB(blockPos).offset(-mc.getRenderManager().info.getProjectedView().x, -mc.getRenderManager().info.getProjectedView().y, -mc.getRenderManager().info.getProjectedView().z), color);
    }

    public static void drawBox(AxisAlignedBB bb, int color) {
        GL11.glPushMatrix();
        GL11.glDisable(GL11.GL_TEXTURE_2D);
        GL11.glDisable(GL_DEPTH_TEST);
        GL11.glEnable(GL_LINE_SMOOTH);
        GL11.glLineWidth(1);
        float[] rgb = ColorUtils.rgba(color);
        GlStateManager.color4f(rgb[0], rgb[1], rgb[2], rgb[3]);
        Tessellator tessellator = Tessellator.getInstance();
        BufferBuilder vertexbuffer = tessellator.getBuffer();
        vertexbuffer.begin(3, DefaultVertexFormats.POSITION);
        vertexbuffer.pos(bb.minX, bb.minY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.minY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.minY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.minY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.minY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        tessellator.draw();
        vertexbuffer.begin(3, DefaultVertexFormats.POSITION);
        vertexbuffer.pos(bb.minX, bb.maxY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.maxY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.maxY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.maxY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.maxY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        tessellator.draw();
        vertexbuffer.begin(1, DefaultVertexFormats.POSITION);
        vertexbuffer.pos(bb.minX, bb.minY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.maxY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.minY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.maxY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.minY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.maxY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.minY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.maxY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        tessellator.draw();
        GlStateManager.color4f(rgb[0], rgb[1], rgb[2], rgb[3]);
        GL11.glEnable(GL11.GL_TEXTURE_2D);
        GL11.glEnable(GL_DEPTH_TEST);
        GL11.glDisable(GL_LINE_SMOOTH);
        GL11.glPopMatrix();

    }
    public static void renderClientRect3(MatrixStack matrix, float x, float y, float width, float height, boolean expand, double expanded, int color, int i) {
        renderClientRect(matrix, x, y, width, height , expand, expanded, color, 128);
    }
    public static void renderClientRect2(MatrixStack matrix, float x, float y, float width, float height, boolean expand, double expanded, int color, int i) {
        renderClientRect4(matrix, x, y, width, height , expand, expanded, color, 128);
    }

    public static void renderClientRect(MatrixStack matrix, float x, float y, float width, float height, boolean expand, double expanded, int color, int alphaPC) {
        // Extract color components
        int red = (color >> 16) & 0xFF;
        int green = (color >> 8) & 0xFF;
        int blue = color & 0xFF;
        int alpha = alphaPC;

        int color1 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color2 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color3 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color4 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);

        boolean bloom = true;
        float round = Infinity.getInstance().round();
        float shadow = Infinity.getInstance().shadow();
        int zeroC1 = ColorUtils.multAlpha(color1, 0.F);
        int zeroC2 = ColorUtils.multAlpha(color2, 0.F);
        int zeroC3 = ColorUtils.multAlpha(color3, 0.F);
        int zeroC4 = ColorUtils.multAlpha(color4, 0.F);
        int halfC1 = ColorUtils.multAlpha(color1, .5F);
        int halfC2 = ColorUtils.multAlpha(color2, .5F);
        int halfC3 = ColorUtils.multAlpha(color3, .5F);
        int halfC4 = ColorUtils.multAlpha(color4, .5F);
        int overY1C = ColorUtils.overCol(color1, color2);
        int overY2C = ColorUtils.overCol(color4, color3);
        int overX1C = ColorUtils.overCol(color1, color4);
        int overX2C = ColorUtils.overCol(color2, color3);

        // Draw rounded rectangle with shadows
        RectUtil.drawRoundedRectShadowed(matrix, x, y, x + width, y + height, round, shadow, halfC1, halfC2, halfC3, halfC4, bloom, true, false, true);

        // Draw darkened version for effect
        float dark = 0.35F;
        RectUtil.drawRoundedRectShadowed(matrix, x, y, x + width, y + height, round, .5F, ColorUtils.multDark(color1, dark), ColorUtils.multDark(color2, dark), ColorUtils.multDark(color3, dark), ColorUtils.multDark(color4, dark), false, false, true, true);

        List<RectUtil.Vec2fColored> list = new ArrayList<>();
        if (expand) {
            list.add(new RectUtil.Vec2fColored(x + 2, y + (float) expanded, zeroC1));
            list.add(new RectUtil.Vec2fColored(x + width / 2F, y + (float) expanded, overY1C));
            list.add(new RectUtil.Vec2fColored(x + width - 2, y + (float) expanded, zeroC2));
            GL12.glLineWidth(2);
            RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);
            GL12.glPointSize(1);
        }

        // Draw edges
        float lineOff = 0;
        GL12.glLineWidth(2);

        // Top line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + round, y + lineOff, zeroC1));
        list.add(new RectUtil.Vec2fColored(x + width / 2F, y + lineOff, overY1C));
        list.add(new RectUtil.Vec2fColored(x + width - round, y + lineOff, zeroC2));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Bottom line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + round, y + height - lineOff, zeroC4));
        list.add(new RectUtil.Vec2fColored(x + width / 2F, y + height - lineOff, overY2C));
        list.add(new RectUtil.Vec2fColored(x + width - round, y + height - lineOff, zeroC3));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Left line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + round, zeroC1));
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + height / 2F, overX1C));
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + height - round, zeroC4));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Right line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + round, zeroC2));
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + height / 2F, overX2C));
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + height - round, zeroC3));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        GL12.glLineWidth(1);

        // Parameters for wave
        // Параметры для волны
        float waveHeight = 10.0F; // Высота волны
        float frequency = 0.1F;   // Частота волны
        float amplitude = 5.0F;   // Амплитуда волны
        float speedFactor = 300.0F; // Коэффициент замедления (чем больше, тем медленнее)

// Получить текущее время в миллисекундах
        float time = System.currentTimeMillis() % 10000; // Простой эффект на основе времени

// Нарисовать динамическую волнистую линию внизу прямоугольника
        drawDynamicWavyLine(matrix, x, y + height, width, waveHeight, frequency, amplitude, color, bloom, time, speedFactor);

    }


    // Метод для рисования динамической волны
    // Метод для рисования динамической волны
    private static void drawDynamicWavyLine(MatrixStack matrix, float x, float y, float width, float waveHeight, float frequency, float amplitude, int color, boolean bloom, float time, float speedFactor) {
        List<RectUtil.Vec2fColored> list = new ArrayList<>();
        float step = width / 200; // Уменьшение шага для более точной отрисовки
        float halfWidth = width / 2;
        float startX = x;
        float endX = x + width;

        // Параметры для непрерывного эффекта
        float waveOffset = (float) ((time / speedFactor) % (2 * Math.PI));

        // Параметры волны
        float baseAmplitude = amplitude * (0.5F + 0.5F * (float) Math.sin(waveOffset));
        float frequencyStep = frequency * step;

        for (float currentX = startX; currentX <= endX; currentX += step) {
            // Расчет смещения Y для плавного перехода
            float dynamicAmplitude = baseAmplitude * (0.5F + 0.5F * (float) Math.sin(waveOffset));
            float offsetY = (float) (Math.sin((currentX - startX) * frequencyStep + waveOffset) * dynamicAmplitude);

            list.add(new RectUtil.Vec2fColored(currentX, y + offsetY, color));
        }

        // Плавное соединение волны
        float endOffsetY = (float) (Math.sin((endX - startX) * frequencyStep + waveOffset) * baseAmplitude);
        list.add(new RectUtil.Vec2fColored(endX, y + endOffsetY, color));

        // Рисование линии
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);
    }



    public static void renderClientRect4(MatrixStack matrix, float x, float y, float width, float height, boolean expand, double expanded, int color, int alphaPC) {
        // Extract color components
        int red = (color >> 16) & 0xFF;
        int green = (color >> 8) & 0xFF;
        int blue = color & 0xFF;
        int alpha = alphaPC;

        int color1 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color2 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color3 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color4 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);

        boolean bloom = true;
        float round = Infinity.getInstance().round();
        float shadow = Infinity.getInstance().shadow();
        int zeroC1 = ColorUtils.multAlpha(color1, 0.F);
        int zeroC2 = ColorUtils.multAlpha(color2, 0.F);
        int zeroC3 = ColorUtils.multAlpha(color3, 0.F);
        int zeroC4 = ColorUtils.multAlpha(color4, 0.F);
        int halfC1 = ColorUtils.multAlpha(color1, .5F);
        int halfC2 = ColorUtils.multAlpha(color2, .5F);
        int halfC3 = ColorUtils.multAlpha(color3, .5F);
        int halfC4 = ColorUtils.multAlpha(color4, .5F);
        int overY1C = ColorUtils.overCol(color1, color2);
        int overY2C = ColorUtils.overCol(color4, color3);
        int overX1C = ColorUtils.overCol(color1, color4);
        int overX2C = ColorUtils.overCol(color2, color3);

        // Draw rounded rectangle with shadows
        RectUtil.drawRoundedRectShadowed(matrix, x, y, x + width, y + height, round, shadow, halfC1, halfC2, halfC3, halfC4, bloom, true, false, true);

        // Draw darkened version for effect
        float dark = 0.35F;
        RectUtil.drawRoundedRectShadowed(matrix, x, y, x + width, y + height, round, .5F, ColorUtils.multDark(color1, dark), ColorUtils.multDark(color2, dark), ColorUtils.multDark(color3, dark), ColorUtils.multDark(color4, dark), false, false, true, true);

        List<RectUtil.Vec2fColored> list = new ArrayList<>();
        if (expand) {
            list.add(new RectUtil.Vec2fColored(x + 2, y + (float) expanded, zeroC1));
            list.add(new RectUtil.Vec2fColored(x + width / 2F, y + (float) expanded, overY1C));
            list.add(new RectUtil.Vec2fColored(x + width - 2, y + (float) expanded, zeroC2));
            GL12.glLineWidth(2);
            RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);
            GL12.glPointSize(1);
        }

        // Draw edges
        float lineOff = 0;
        GL12.glLineWidth(2);

        // Top line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + round, y + lineOff, zeroC1));
        list.add(new RectUtil.Vec2fColored(x + width / 2F, y + lineOff, overY1C));
        list.add(new RectUtil.Vec2fColored(x + width - round, y + lineOff, zeroC2));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Bottom line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + round, y + height - lineOff, zeroC4));
        list.add(new RectUtil.Vec2fColored(x + width / 2F, y + height - lineOff, overY2C));
        list.add(new RectUtil.Vec2fColored(x + width - round, y + height - lineOff, zeroC3));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Left line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + round, zeroC1));
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + height / 2F, overX1C));
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + height - round, zeroC4));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Right line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + round, zeroC2));
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + height / 2F, overX2C));
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + height - round, zeroC3));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        GL12.glLineWidth(1);

        // Parameters for wave
        // Параметры для волны


    }

}

RectUtil:


RectUtil:
package net.optifine.render;

import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.experimental.UtilityClass;
import net.minecraft.client.renderer.entity.EntityRendererManager;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;

import net.minecraft.util.math.vector.Vector3d;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import xii.infinity.client.utils.render.ColorUtils;

import java.util.ArrayList;
import java.util.List;

import static org.lwjgl.opengl.GL11C.GL_LINE_STRIP;
import static xii.infinity.client.utils.client.IMinecraft.*;


@UtilityClass
@SuppressWarnings("unused")
public class RectUtil implements IRenderAccess {
    public final List<Vec2fColored> VERTEXES_COLORED = new ArrayList<>();
    public final List<Vec2f> VERTEXES = new ArrayList<>();
    int[] LEFT_UP = new int[]{-90, 0};
    int[] RIGHT_UP = new int[]{0, 90};
    int[] RIGHT_DOWN = new int[]{90, 180};
    int[] LEFT_DOWN = new int[]{180, 270};
    [USER=270918]@Getter[/USER]
    @AllArgsConstructor
    public class Vec2fColored {
        float x, y;
        int color;
    }
    public void setupRenderRect(boolean texture, boolean bloom) {
        if (texture) RenderSystem.enableTexture();
        else RenderSystem.disableTexture();
        RenderSystem.enableBlend();
        RenderSystem.disableAlphaTest();
        RenderSystem.defaultBlendFunc();
        RenderSystem.disableCull();
        RenderSystem.shadeModel(7425);

        RenderSystem.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, bloom ? GlStateManager.DestFactor.ONE_MINUS_CONSTANT_ALPHA : GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
        RenderSystem.disableAlphaTest();
        GL11.glHint(GL11.GL_POLYGON_SMOOTH_HINT, GL11.GL_NICEST);
        GL11.glEnable(GL11.GL_POINT_SMOOTH);
    }
    public void endRenderRect(boolean bloom) {
        RenderSystem.enableAlphaTest();
        if (bloom)
            RenderSystem.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);

        RenderSystem.shadeModel(7424);
        RenderSystem.enableCull();
        RenderSystem.enableAlphaTest();
        RenderSystem.enableTexture();

        RenderSystem.clearCurrentColor();
    }
    public Vec2fColored getOfVec3f(Vec2f vec2f, int color) {
        return new Vec2fColored(vec2f.getX(), vec2f.getY(), color);
    }
    public void drawVertexesList(MatrixStack matrix, List<Vec2fColored> vec2c, int begin, boolean texture, boolean bloom) {
        setupRenderRect(texture, bloom);
        buffer.begin(begin, texture ? DefaultVertexFormats.POSITION_TEX_COLOR : DefaultVertexFormats.POSITION_COLOR);
        int counter = 0;
        for (final Vec2fColored vec : vec2c) {
            float[] rgba = ColorUtils.getRGBAf(vec.getColor());
            buffer.pos(matrix.getLast().getMatrix(), vec.getX(), vec.getY(), 0);
            if (texture) buffer.tex(counter == 0 || counter == 3 ? 0 : 1, counter == 0 || counter == 1 ? 0 : 1);
            buffer.color(rgba[0], rgba[1], rgba[2], rgba[3]);
            buffer.endVertex();
            counter++;
        }
        tessellator.draw();
        endRenderRect(bloom);
    }    public void drawRect(MatrixStack matrix, float x, float y, float x2, float y2, int color1, int color2, int color3, int color4, boolean bloom, boolean texture) {
        VERTEXES_COLORED.clear();
        VERTEXES_COLORED.add(new Vec2fColored(x, y, color1));
        VERTEXES_COLORED.add(new Vec2fColored(x2, y, color2));
        VERTEXES_COLORED.add(new Vec2fColored(x2, y2, color3));
        VERTEXES_COLORED.add(new Vec2fColored(x, y2, color4));
        drawVertexesList(matrix, VERTEXES_COLORED, GL11.GL_POLYGON, texture, bloom);
    }
    public List<Vec2f> generateRadiusCircledVertexes(MatrixStack matrix, float x, float y, double radius1, double radius2, double startRadius, double endRadius, double step, boolean doublepart) {
        VERTEXES.clear();
        double radius = startRadius;
        while (radius <= endRadius) {
            if (radius > endRadius) radius = endRadius;
            float x1 = (float) (Math.sin(Math.toRadians(radius)) * radius1);
            float y1 = (float) (-Math.cos(Math.toRadians(radius)) * radius1);
            VERTEXES.add(new Vec2f(x + x1, y + y1));
            if (doublepart) {
                x1 = (float) (Math.sin(Math.toRadians(radius)) * radius2);
                y1 = (float) (-Math.cos(Math.toRadians(radius)) * radius2);
                VERTEXES.add(new Vec2f(x + x1, y + y1));
            }
            radius += step;
        }
        return VERTEXES;
    }
    public void drawDuadsSegment(MatrixStack matrix, float x, float y, double radius, double expand, int color, int color2, boolean bloom, int[] side) {
        VERTEXES_COLORED.clear();
        int index = 0;
        for (Vec2f vec2f : generateRadiusCircledVertexes(matrix, x, y, radius, radius + expand, side[0], side[1], 9, true)) {
            VERTEXES_COLORED.add(getOfVec3f(vec2f, index % 2 == 1 ? color2 : color));
            ++index;
        }
        drawVertexesList(matrix, VERTEXES_COLORED, GL12.GL_TRIANGLE_STRIP, false, bloom);
    }
    public void drawShadowSegment(MatrixStack matrix, float x, float y, double radius, int color, boolean sageColor, int[] side, boolean bloom) {
        int color2 = sageColor ? 0 : ColorUtils.replAlpha(color, 0);
        drawDuadsSegment(matrix, x, y, 0, radius, color, color2, bloom, side);
    }

    public void drawShadowSegment(MatrixStack matrix, float x, float y, double radiusRound, double radiusShadow, int color, boolean sageColor, int[] side, boolean bloom) {
        int color2 = sageColor ? 0 : ColorUtils.replAlpha(color, 0);
        drawDuadsSegment(matrix, x, y, radiusRound, radiusShadow, color, color2, bloom, side);
    }

    public void drawRoundSegment(MatrixStack matrix, float x, float y, double radius, int color, int[] side, boolean bloom) {
        drawDuadsSegment(matrix, x, y, 0, radius, color, color, bloom, side);
    }

    public void drawRoundSegment(MatrixStack matrix, float x, float y, double radius, int color, int[] side) {
        drawDuadsSegment(matrix, x, y, 0, radius, color, color, false, side);
    }

    public void drawShadowSegment(MatrixStack matrix, float x, float y, double radius, int color, boolean sageColor, int[] side) {
        drawShadowSegment(matrix, x, y, radius, color, sageColor, side, false);
    }

    public void drawShadowSegmentsExtract(MatrixStack matrix, float x, float y, float x2, float y2, double radiusStart, double radiusEnd, int color1, int color2, int color3, int color4, boolean sageColor, boolean bloom) {
        drawShadowSegment(matrix, x, y, radiusStart, radiusEnd, color1, sageColor, LEFT_UP, bloom);
        drawShadowSegment(matrix, x2, y, radiusStart, radiusEnd, color2, sageColor, RIGHT_UP, bloom);
        drawShadowSegment(matrix, x2, y2, radiusStart, radiusEnd, color3, sageColor, RIGHT_DOWN, bloom);
        drawShadowSegment(matrix, x, y2, radiusStart, radiusEnd, color4, sageColor, LEFT_DOWN, bloom);
    }
    public void drawLimitersSegments(MatrixStack matrix, float x, float y, float x2, float y2, float radius, float appendOffsets, int color1, int color2, int color3, int color4, boolean sageColor, boolean retainZero, boolean bloom) {
        int c5 = retainZero ? sageColor ? 0 : ColorUtils.replAlpha(color1, 0) : color1;
        int c6 = retainZero ? sageColor ? 0 : ColorUtils.replAlpha(color2, 0) : color2;
        int c7 = retainZero ? sageColor ? 0 : ColorUtils.replAlpha(color3, 0) : color3;
        int c8 = retainZero ? sageColor ? 0 : ColorUtils.replAlpha(color4, 0) : color4;
      
        drawRect(matrix, x + appendOffsets, y - radius, x2 - appendOffsets, y, c5, c6, color2, color1, bloom, false);
      
        drawRect(matrix, x + appendOffsets, y2, x2 - appendOffsets, y2 + radius, color4, color3, c7, c8, bloom, false);
      
        drawRect(matrix, x - radius, y + appendOffsets, x, y2 - appendOffsets, c5, color1, color4, c8, bloom, false);
      
        drawRect(matrix, x2, y + appendOffsets, x2 + radius, y2 - appendOffsets, color2, c6, c7, color3, bloom, false);
    }
    public void drawRoundSegments(MatrixStack matrix, float x, float y, float x2, float y2, double radius, int color1, int color2, int color3, int color4, boolean bloom) {
        drawRoundSegment(matrix, x, y, radius, color1, LEFT_UP, bloom);
        drawRoundSegment(matrix, x2, y, radius, color2, RIGHT_UP, bloom);
        drawRoundSegment(matrix, x2, y2, radius, color3, RIGHT_DOWN, bloom);
        drawRoundSegment(matrix, x, y2, radius, color4, LEFT_DOWN, bloom);
    }
    public void drawRoundedRectShadowed(MatrixStack matrix, float x, float y, float x2, float y2, float round, float shadowSize, int color1, int color2, int color3, int color4, boolean bloom, boolean sageColor, boolean rect, boolean shadow) {
        float roundMax = Math.max(x2 - x, y2 - y);
        round = Math.max(Math.min(round, roundMax), 0);
        shadowSize = Math.max(shadowSize, 0);

        x += round;
        y += round;
        x2 -= round;
        y2 -= round;
        if (rect) {
            drawRect(matrix, x, y, x2, y2, color1, color2, color3, color4, bloom, false);
            if (round != 0) {
                drawLimitersSegments(matrix, x, y, x2, y2, round, 0, color1, color2, color3, color4, false, false, bloom);
                drawRoundSegments(matrix, x, y, x2, y2, round, color1, color2, color3, color4, bloom);
            }
        }
        if (shadow && shadowSize > 0) {
            drawLimitersSegments(matrix, x - round, y - round, x2 + round, y2 + round, shadowSize, round, color1, color2, color3, color4, sageColor, true, bloom);
            drawShadowSegmentsExtract(matrix, x, y, x2, y2, round, shadowSize, color1, color2, color3, color4, sageColor, bloom);
        }
    }
    public void drawRect(MatrixStack matrix, float x, float y, float x2, float y2, int color, boolean bloom) {
        drawRect(matrix, x, y, x2, y2, color, color, color, color, bloom, false);
    }

    public void drawRect(MatrixStack matrix, float x, float y, float x2, float y2, int color) {
        drawRect(matrix, x, y, x2, y2, color, false);
    }

    public void setupOrientationMatrix(MatrixStack matrix, double x, double y, double z) {
        float partialTicks = mc.getRenderPartialTicks();
        EntityRendererManager rendererManager = mc.getRenderManager();
        final Vector3d renderPos = rendererManager.info.getProjectedView();
        boolean flag = mc.gameSettings.getPointOfView().func_243192_a() || mc.gameSettings.getPointOfView().func_243194_c().func_243193_b();
        matrix.translate(x - renderPos.x, y - renderPos.y, z - renderPos.z);
    }
    public void drawWavyLine(MatrixStack matrix, float x, float y, float width, float waveHeight, float frequency, float amplitude, int color, boolean bloom, float time) {
        VERTEXES_COLORED.clear();

        float step = width / 100;
        float halfWidth = width / 2;
        float startX = x;
        float endX = x + width;

        for (float currentX = startX; currentX <= endX; currentX += step) {
          
            float offsetY = (float) (Math.sin((currentX - halfWidth) * frequency + time) * amplitude);
            int currentColor = color;

            VERTEXES_COLORED.add(new Vec2fColored(currentX, y + offsetY, currentColor));
        }

      
        VERTEXES_COLORED.add(new Vec2fColored(endX, y, color));

        drawVertexesList(matrix, VERTEXES_COLORED, GL_LINE_STRIP, false, bloom);
    }

}

Vec2f:


Vec2f:
package net.optifine.render;

public class Vec2f {
    public float x;
    public float y;

    public float getX() {
        return this.x;
    }

    public float getY() {
        return this.y;
    }

    public Vec2f(float x, float y) {
        this.x = x;
        this.y = y;
    }
}
Утилки с Excellent перенес хахахаха
 
Начинающий
Статус
Оффлайн
Регистрация
12 Апр 2024
Сообщения
64
Реакции[?]
1
Поинты[?]
0
Первая моя визуальная работа, поэтому решил слить на лучший сайт.

Сливаю ClickGui и 2 худа с выбором через HUD, так же здесь показ армора автоматически переходит в вертикальное положение когда у края экрана по X.
Можно поставить шейдер (тень) в функции ClickGui, а так же выбрать режим "Белый" или "Клиентский". Так же имеется недоделанная панель с музыкой кому надо тот доделает. Темы открываются на пнг с карандашиком. Тх был взят с другого худа, но визуально переделан. Снизу еще сделаны типо волн (статические).

Возможно я еще, что то забыл добавить, так, что пишите в дс - baveko

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


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



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



HUD.java:
package xii.infinity.client.functions.impl.render;

import com.google.common.eventbus.Subscribe;
import xii.infinity.client.Infinity;
import xii.infinity.client.events.EventDisplay;
import xii.infinity.client.events.EventUpdate;
import xii.infinity.client.functions.api.Category;
import xii.infinity.client.functions.api.FunctionRegister;
import xii.infinity.client.functions.api.Module;
import xii.infinity.client.functions.settings.impl.BooleanSetting;
import xii.infinity.client.functions.settings.impl.ModeListSetting;
import xii.infinity.client.functions.settings.impl.ModeSetting;
import xii.infinity.client.ui.display.impl.*;
import xii.infinity.client.ui.styles.StyleManager;
import xii.infinity.client.utils.drag.Dragging;
import xii.infinity.client.utils.render.ColorUtils;
import lombok.AccessLevel;
import lombok.experimental.FieldDefaults;

@FieldDefaults(level = AccessLevel.PRIVATE)
@FunctionRegister(name = "HUD", type = Category.Render)
public class HUD extends Module {
    private static HUD instances;

    private final ModeSetting hudMode = new ModeSetting("HUD Mode", "HUD-1", "HUD-1","HUD-2");

    private final ModeListSetting elements = new ModeListSetting("Элементы",
            new BooleanSetting("Ватермарка", true),
            new BooleanSetting("Список модулей", true),
            new BooleanSetting("Координаты", true),
            new BooleanSetting("Эффекты", true),
            new BooleanSetting("Список модерации", true),
            new BooleanSetting("Активные бинды", true),
            new BooleanSetting("Активный таргет", true),
            new BooleanSetting("Броня", true),
            new BooleanSetting("Кулдавны", true),
            new BooleanSetting("Инвентарь", true),
            new BooleanSetting("Кей-Строкес", true)



            );

    final WatermarkRenderer4 watermarkRenderer;
    final ArrayListRenderer3 arrayListRenderer;
    final CoordsRenderer coordsRenderer;
    final PotionRenderer4 potionRenderer;
    final CoolDown cooldowns;

    final KeyBindRenderer4 keyBindRenderer;
    final TargetInfoRenderer4 targetInfoRenderer;
    final SeeInventoryRenderer3 inve;
    final KeyStrokes keys;


    final ArmorRenderer3 armorRenderer;
    final StaffListRenderer4 staffListRenderer;

    public static HUD getInstances() {
        return instances;
    }

    public static void setInstances(HUD instances) {
        HUD.instances = instances;
    }

    @Subscribe
    private void onUpdate(EventUpdate e) {
        if (mc.gameSettings.showDebugInfo) {
            return;
        }

        if (elements.getValueByName("Список модерации").get()) staffListRenderer.update(e);
        if (elements.getValueByName("Список модулей").get()) arrayListRenderer.update(e);
    }


    @Subscribe
    private void onDisplay(EventDisplay e) {
        if (mc.gameSettings.showDebugInfo || e.getType() != EventDisplay.Type.POST) {
            return;
        }

        if (elements.getValueByName("Координаты").get()) coordsRenderer.render(e);
        if (elements.getValueByName("Эффекты").get()) potionRenderer.render(e);
        if (elements.getValueByName("Ватермарка").get()) watermarkRenderer.render(e);
        if (elements.getValueByName("Список модулей").get()) arrayListRenderer.render(e);
        if (elements.getValueByName("Активные бинды").get()) keyBindRenderer.render(e);
        if (elements.getValueByName("Список модерации").get()) staffListRenderer.render(e);
        if (elements.getValueByName("Активный таргет").get()) targetInfoRenderer.render(e);
        if (elements.getValueByName("Кулдавны").get()) cooldowns.render(e);
        if (elements.getValueByName("Инвентарь").get()) inve.render(e);
        if (elements.getValueByName("Кей-Строкес").get()) keys.render(e);
        if (elements.getValueByName("Броня").get()) armorRenderer.render(e);





    }

    public HUD() {
        watermarkRenderer = new WatermarkRenderer4();
        arrayListRenderer = new ArrayListRenderer3();
        coordsRenderer = new CoordsRenderer();
        Dragging key = Infinity.getInstance().createDrag(this, "Key", 185, 100);
        Dragging inves = Infinity.getInstance().createDrag(this, "Inventory", 278, 100);
        Dragging cooldown = Infinity.getInstance().createDrag(this, "Cooldown", 350, 100);
        Dragging armor2 = Infinity.getInstance().createDrag(this, "Armor", 350, 5);
        Dragging potions = Infinity.getInstance().createDrag(this, "Potions", 278, 5);
        Dragging keyBinds = Infinity.getInstance().createDrag(this, "KeyBinds", 185, 5);
        Dragging dragging = Infinity.getInstance().createDrag(this, "TargetHUD", 74, 128);
        Dragging staffList = Infinity.getInstance().createDrag(this, "StaffList", 96, 5);
        armorRenderer = new ArmorRenderer3(armor2);

        potionRenderer = new PotionRenderer4(potions);
        cooldowns = new CoolDown(cooldown);
        keyBindRenderer = new KeyBindRenderer4(keyBinds);

        keys = new KeyStrokes(key);
        staffListRenderer = new StaffListRenderer4(staffList);
        targetInfoRenderer = new TargetInfoRenderer4(dragging);
        inve = new SeeInventoryRenderer3(inves);
        instances = this;

        addSettings( hudMode,elements );

    }

    public static int getColor(int index) {
        StyleManager styleManager = Infinity.getInstance().getStyleManager();
        return ColorUtils.gradient(styleManager.getCurrentStyle().getFirstColor().getRGB(), styleManager.getCurrentStyle().getSecondColor().getRGB(), index * 16, 10);
    }

    public static int getColor(int index, float mult) {
        StyleManager styleManager = Infinity.getInstance().getStyleManager();
        return ColorUtils.gradient(styleManager.getCurrentStyle().getFirstColor().getRGB(), styleManager.getCurrentStyle().getSecondColor().getRGB(), (int) (index * mult), 10);
    }

    public static int getColor(int firstColor, int secondColor, int index, float mult) {
        return ColorUtils.gradient(firstColor, secondColor, (int) (index * mult), 10);
    }
    public boolean isHud2() {
        return "HUD-2".equalsIgnoreCase(hudMode.get());
    }
}

RenderUtils:


RenderUtils:
package net.optifine.render;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import org.lwjgl.opengl.GL12;
import xii.infinity.client.Infinity;
import xii.infinity.client.utils.render.ColorUtils;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.BufferBuilder;
import net.minecraft.client.renderer.RenderTypeBuffers;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import org.lwjgl.opengl.GL11;

import java.util.ArrayList;
import java.util.List;

import static org.lwjgl.opengl.GL11.*;
import static org.lwjgl.opengl.GL11.GL_LINE_STRIP;

public class RenderUtils
{
    private static boolean flushRenderBuffers = true;
    private static Minecraft mc = Minecraft.getInstance();

    public static boolean setFlushRenderBuffers(boolean flushRenderBuffers)
    {
        boolean flag = RenderUtils.flushRenderBuffers;
        RenderUtils.flushRenderBuffers = flushRenderBuffers;
        return flag;
    }

    public static boolean isFlushRenderBuffers()
    {
        return flushRenderBuffers;
    }

    public static void flushRenderBuffers()
    {
        if (flushRenderBuffers)
        {
            RenderTypeBuffers rendertypebuffers = mc.getRenderTypeBuffers();
            rendertypebuffers.getBufferSource().flushRenderBuffers();
            rendertypebuffers.getCrumblingBufferSource().flushRenderBuffers();
        }
    }

    public static void drawBlockBox(BlockPos blockPos, int color) {
        drawBox(new AxisAlignedBB(blockPos).offset(-mc.getRenderManager().info.getProjectedView().x, -mc.getRenderManager().info.getProjectedView().y, -mc.getRenderManager().info.getProjectedView().z), color);
    }

    public static void drawBox(AxisAlignedBB bb, int color) {
        GL11.glPushMatrix();
        GL11.glDisable(GL11.GL_TEXTURE_2D);
        GL11.glDisable(GL_DEPTH_TEST);
        GL11.glEnable(GL_LINE_SMOOTH);
        GL11.glLineWidth(1);
        float[] rgb = ColorUtils.rgba(color);
        GlStateManager.color4f(rgb[0], rgb[1], rgb[2], rgb[3]);
        Tessellator tessellator = Tessellator.getInstance();
        BufferBuilder vertexbuffer = tessellator.getBuffer();
        vertexbuffer.begin(3, DefaultVertexFormats.POSITION);
        vertexbuffer.pos(bb.minX, bb.minY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.minY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.minY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.minY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.minY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        tessellator.draw();
        vertexbuffer.begin(3, DefaultVertexFormats.POSITION);
        vertexbuffer.pos(bb.minX, bb.maxY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.maxY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.maxY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.maxY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.maxY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        tessellator.draw();
        vertexbuffer.begin(1, DefaultVertexFormats.POSITION);
        vertexbuffer.pos(bb.minX, bb.minY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.maxY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.minY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.maxY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.minY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.maxY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.minY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.maxY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        tessellator.draw();
        GlStateManager.color4f(rgb[0], rgb[1], rgb[2], rgb[3]);
        GL11.glEnable(GL11.GL_TEXTURE_2D);
        GL11.glEnable(GL_DEPTH_TEST);
        GL11.glDisable(GL_LINE_SMOOTH);
        GL11.glPopMatrix();

    }
    public static void renderClientRect3(MatrixStack matrix, float x, float y, float width, float height, boolean expand, double expanded, int color, int i) {
        renderClientRect(matrix, x, y, width, height , expand, expanded, color, 128);
    }
    public static void renderClientRect2(MatrixStack matrix, float x, float y, float width, float height, boolean expand, double expanded, int color, int i) {
        renderClientRect4(matrix, x, y, width, height , expand, expanded, color, 128);
    }

    public static void renderClientRect(MatrixStack matrix, float x, float y, float width, float height, boolean expand, double expanded, int color, int alphaPC) {
        // Extract color components
        int red = (color >> 16) & 0xFF;
        int green = (color >> 8) & 0xFF;
        int blue = color & 0xFF;
        int alpha = alphaPC;

        int color1 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color2 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color3 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color4 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);

        boolean bloom = true;
        float round = Infinity.getInstance().round();
        float shadow = Infinity.getInstance().shadow();
        int zeroC1 = ColorUtils.multAlpha(color1, 0.F);
        int zeroC2 = ColorUtils.multAlpha(color2, 0.F);
        int zeroC3 = ColorUtils.multAlpha(color3, 0.F);
        int zeroC4 = ColorUtils.multAlpha(color4, 0.F);
        int halfC1 = ColorUtils.multAlpha(color1, .5F);
        int halfC2 = ColorUtils.multAlpha(color2, .5F);
        int halfC3 = ColorUtils.multAlpha(color3, .5F);
        int halfC4 = ColorUtils.multAlpha(color4, .5F);
        int overY1C = ColorUtils.overCol(color1, color2);
        int overY2C = ColorUtils.overCol(color4, color3);
        int overX1C = ColorUtils.overCol(color1, color4);
        int overX2C = ColorUtils.overCol(color2, color3);

        // Draw rounded rectangle with shadows
        RectUtil.drawRoundedRectShadowed(matrix, x, y, x + width, y + height, round, shadow, halfC1, halfC2, halfC3, halfC4, bloom, true, false, true);

        // Draw darkened version for effect
        float dark = 0.35F;
        RectUtil.drawRoundedRectShadowed(matrix, x, y, x + width, y + height, round, .5F, ColorUtils.multDark(color1, dark), ColorUtils.multDark(color2, dark), ColorUtils.multDark(color3, dark), ColorUtils.multDark(color4, dark), false, false, true, true);

        List<RectUtil.Vec2fColored> list = new ArrayList<>();
        if (expand) {
            list.add(new RectUtil.Vec2fColored(x + 2, y + (float) expanded, zeroC1));
            list.add(new RectUtil.Vec2fColored(x + width / 2F, y + (float) expanded, overY1C));
            list.add(new RectUtil.Vec2fColored(x + width - 2, y + (float) expanded, zeroC2));
            GL12.glLineWidth(2);
            RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);
            GL12.glPointSize(1);
        }

        // Draw edges
        float lineOff = 0;
        GL12.glLineWidth(2);

        // Top line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + round, y + lineOff, zeroC1));
        list.add(new RectUtil.Vec2fColored(x + width / 2F, y + lineOff, overY1C));
        list.add(new RectUtil.Vec2fColored(x + width - round, y + lineOff, zeroC2));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Bottom line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + round, y + height - lineOff, zeroC4));
        list.add(new RectUtil.Vec2fColored(x + width / 2F, y + height - lineOff, overY2C));
        list.add(new RectUtil.Vec2fColored(x + width - round, y + height - lineOff, zeroC3));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Left line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + round, zeroC1));
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + height / 2F, overX1C));
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + height - round, zeroC4));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Right line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + round, zeroC2));
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + height / 2F, overX2C));
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + height - round, zeroC3));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        GL12.glLineWidth(1);

        // Parameters for wave
        // Параметры для волны
        float waveHeight = 10.0F; // Высота волны
        float frequency = 0.1F;   // Частота волны
        float amplitude = 5.0F;   // Амплитуда волны
        float speedFactor = 300.0F; // Коэффициент замедления (чем больше, тем медленнее)

// Получить текущее время в миллисекундах
        float time = System.currentTimeMillis() % 10000; // Простой эффект на основе времени

// Нарисовать динамическую волнистую линию внизу прямоугольника
        drawDynamicWavyLine(matrix, x, y + height, width, waveHeight, frequency, amplitude, color, bloom, time, speedFactor);

    }


    // Метод для рисования динамической волны
    // Метод для рисования динамической волны
    private static void drawDynamicWavyLine(MatrixStack matrix, float x, float y, float width, float waveHeight, float frequency, float amplitude, int color, boolean bloom, float time, float speedFactor) {
        List<RectUtil.Vec2fColored> list = new ArrayList<>();
        float step = width / 200; // Уменьшение шага для более точной отрисовки
        float halfWidth = width / 2;
        float startX = x;
        float endX = x + width;

        // Параметры для непрерывного эффекта
        float waveOffset = (float) ((time / speedFactor) % (2 * Math.PI));

        // Параметры волны
        float baseAmplitude = amplitude * (0.5F + 0.5F * (float) Math.sin(waveOffset));
        float frequencyStep = frequency * step;

        for (float currentX = startX; currentX <= endX; currentX += step) {
            // Расчет смещения Y для плавного перехода
            float dynamicAmplitude = baseAmplitude * (0.5F + 0.5F * (float) Math.sin(waveOffset));
            float offsetY = (float) (Math.sin((currentX - startX) * frequencyStep + waveOffset) * dynamicAmplitude);

            list.add(new RectUtil.Vec2fColored(currentX, y + offsetY, color));
        }

        // Плавное соединение волны
        float endOffsetY = (float) (Math.sin((endX - startX) * frequencyStep + waveOffset) * baseAmplitude);
        list.add(new RectUtil.Vec2fColored(endX, y + endOffsetY, color));

        // Рисование линии
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);
    }



    public static void renderClientRect4(MatrixStack matrix, float x, float y, float width, float height, boolean expand, double expanded, int color, int alphaPC) {
        // Extract color components
        int red = (color >> 16) & 0xFF;
        int green = (color >> 8) & 0xFF;
        int blue = color & 0xFF;
        int alpha = alphaPC;

        int color1 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color2 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color3 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color4 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);

        boolean bloom = true;
        float round = Infinity.getInstance().round();
        float shadow = Infinity.getInstance().shadow();
        int zeroC1 = ColorUtils.multAlpha(color1, 0.F);
        int zeroC2 = ColorUtils.multAlpha(color2, 0.F);
        int zeroC3 = ColorUtils.multAlpha(color3, 0.F);
        int zeroC4 = ColorUtils.multAlpha(color4, 0.F);
        int halfC1 = ColorUtils.multAlpha(color1, .5F);
        int halfC2 = ColorUtils.multAlpha(color2, .5F);
        int halfC3 = ColorUtils.multAlpha(color3, .5F);
        int halfC4 = ColorUtils.multAlpha(color4, .5F);
        int overY1C = ColorUtils.overCol(color1, color2);
        int overY2C = ColorUtils.overCol(color4, color3);
        int overX1C = ColorUtils.overCol(color1, color4);
        int overX2C = ColorUtils.overCol(color2, color3);

        // Draw rounded rectangle with shadows
        RectUtil.drawRoundedRectShadowed(matrix, x, y, x + width, y + height, round, shadow, halfC1, halfC2, halfC3, halfC4, bloom, true, false, true);

        // Draw darkened version for effect
        float dark = 0.35F;
        RectUtil.drawRoundedRectShadowed(matrix, x, y, x + width, y + height, round, .5F, ColorUtils.multDark(color1, dark), ColorUtils.multDark(color2, dark), ColorUtils.multDark(color3, dark), ColorUtils.multDark(color4, dark), false, false, true, true);

        List<RectUtil.Vec2fColored> list = new ArrayList<>();
        if (expand) {
            list.add(new RectUtil.Vec2fColored(x + 2, y + (float) expanded, zeroC1));
            list.add(new RectUtil.Vec2fColored(x + width / 2F, y + (float) expanded, overY1C));
            list.add(new RectUtil.Vec2fColored(x + width - 2, y + (float) expanded, zeroC2));
            GL12.glLineWidth(2);
            RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);
            GL12.glPointSize(1);
        }

        // Draw edges
        float lineOff = 0;
        GL12.glLineWidth(2);

        // Top line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + round, y + lineOff, zeroC1));
        list.add(new RectUtil.Vec2fColored(x + width / 2F, y + lineOff, overY1C));
        list.add(new RectUtil.Vec2fColored(x + width - round, y + lineOff, zeroC2));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Bottom line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + round, y + height - lineOff, zeroC4));
        list.add(new RectUtil.Vec2fColored(x + width / 2F, y + height - lineOff, overY2C));
        list.add(new RectUtil.Vec2fColored(x + width - round, y + height - lineOff, zeroC3));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Left line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + round, zeroC1));
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + height / 2F, overX1C));
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + height - round, zeroC4));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Right line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + round, zeroC2));
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + height / 2F, overX2C));
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + height - round, zeroC3));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        GL12.glLineWidth(1);

        // Parameters for wave
        // Параметры для волны


    }

}

RectUtil:


RectUtil:
package net.optifine.render;

import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.experimental.UtilityClass;
import net.minecraft.client.renderer.entity.EntityRendererManager;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;

import net.minecraft.util.math.vector.Vector3d;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import xii.infinity.client.utils.render.ColorUtils;

import java.util.ArrayList;
import java.util.List;

import static org.lwjgl.opengl.GL11C.GL_LINE_STRIP;
import static xii.infinity.client.utils.client.IMinecraft.*;


@UtilityClass
@SuppressWarnings("unused")
public class RectUtil implements IRenderAccess {
    public final List<Vec2fColored> VERTEXES_COLORED = new ArrayList<>();
    public final List<Vec2f> VERTEXES = new ArrayList<>();
    int[] LEFT_UP = new int[]{-90, 0};
    int[] RIGHT_UP = new int[]{0, 90};
    int[] RIGHT_DOWN = new int[]{90, 180};
    int[] LEFT_DOWN = new int[]{180, 270};
    [USER=270918]@Getter[/USER]
    @AllArgsConstructor
    public class Vec2fColored {
        float x, y;
        int color;
    }
    public void setupRenderRect(boolean texture, boolean bloom) {
        if (texture) RenderSystem.enableTexture();
        else RenderSystem.disableTexture();
        RenderSystem.enableBlend();
        RenderSystem.disableAlphaTest();
        RenderSystem.defaultBlendFunc();
        RenderSystem.disableCull();
        RenderSystem.shadeModel(7425);

        RenderSystem.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, bloom ? GlStateManager.DestFactor.ONE_MINUS_CONSTANT_ALPHA : GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
        RenderSystem.disableAlphaTest();
        GL11.glHint(GL11.GL_POLYGON_SMOOTH_HINT, GL11.GL_NICEST);
        GL11.glEnable(GL11.GL_POINT_SMOOTH);
    }
    public void endRenderRect(boolean bloom) {
        RenderSystem.enableAlphaTest();
        if (bloom)
            RenderSystem.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);

        RenderSystem.shadeModel(7424);
        RenderSystem.enableCull();
        RenderSystem.enableAlphaTest();
        RenderSystem.enableTexture();

        RenderSystem.clearCurrentColor();
    }
    public Vec2fColored getOfVec3f(Vec2f vec2f, int color) {
        return new Vec2fColored(vec2f.getX(), vec2f.getY(), color);
    }
    public void drawVertexesList(MatrixStack matrix, List<Vec2fColored> vec2c, int begin, boolean texture, boolean bloom) {
        setupRenderRect(texture, bloom);
        buffer.begin(begin, texture ? DefaultVertexFormats.POSITION_TEX_COLOR : DefaultVertexFormats.POSITION_COLOR);
        int counter = 0;
        for (final Vec2fColored vec : vec2c) {
            float[] rgba = ColorUtils.getRGBAf(vec.getColor());
            buffer.pos(matrix.getLast().getMatrix(), vec.getX(), vec.getY(), 0);
            if (texture) buffer.tex(counter == 0 || counter == 3 ? 0 : 1, counter == 0 || counter == 1 ? 0 : 1);
            buffer.color(rgba[0], rgba[1], rgba[2], rgba[3]);
            buffer.endVertex();
            counter++;
        }
        tessellator.draw();
        endRenderRect(bloom);
    }    public void drawRect(MatrixStack matrix, float x, float y, float x2, float y2, int color1, int color2, int color3, int color4, boolean bloom, boolean texture) {
        VERTEXES_COLORED.clear();
        VERTEXES_COLORED.add(new Vec2fColored(x, y, color1));
        VERTEXES_COLORED.add(new Vec2fColored(x2, y, color2));
        VERTEXES_COLORED.add(new Vec2fColored(x2, y2, color3));
        VERTEXES_COLORED.add(new Vec2fColored(x, y2, color4));
        drawVertexesList(matrix, VERTEXES_COLORED, GL11.GL_POLYGON, texture, bloom);
    }
    public List<Vec2f> generateRadiusCircledVertexes(MatrixStack matrix, float x, float y, double radius1, double radius2, double startRadius, double endRadius, double step, boolean doublepart) {
        VERTEXES.clear();
        double radius = startRadius;
        while (radius <= endRadius) {
            if (radius > endRadius) radius = endRadius;
            float x1 = (float) (Math.sin(Math.toRadians(radius)) * radius1);
            float y1 = (float) (-Math.cos(Math.toRadians(radius)) * radius1);
            VERTEXES.add(new Vec2f(x + x1, y + y1));
            if (doublepart) {
                x1 = (float) (Math.sin(Math.toRadians(radius)) * radius2);
                y1 = (float) (-Math.cos(Math.toRadians(radius)) * radius2);
                VERTEXES.add(new Vec2f(x + x1, y + y1));
            }
            radius += step;
        }
        return VERTEXES;
    }
    public void drawDuadsSegment(MatrixStack matrix, float x, float y, double radius, double expand, int color, int color2, boolean bloom, int[] side) {
        VERTEXES_COLORED.clear();
        int index = 0;
        for (Vec2f vec2f : generateRadiusCircledVertexes(matrix, x, y, radius, radius + expand, side[0], side[1], 9, true)) {
            VERTEXES_COLORED.add(getOfVec3f(vec2f, index % 2 == 1 ? color2 : color));
            ++index;
        }
        drawVertexesList(matrix, VERTEXES_COLORED, GL12.GL_TRIANGLE_STRIP, false, bloom);
    }
    public void drawShadowSegment(MatrixStack matrix, float x, float y, double radius, int color, boolean sageColor, int[] side, boolean bloom) {
        int color2 = sageColor ? 0 : ColorUtils.replAlpha(color, 0);
        drawDuadsSegment(matrix, x, y, 0, radius, color, color2, bloom, side);
    }

    public void drawShadowSegment(MatrixStack matrix, float x, float y, double radiusRound, double radiusShadow, int color, boolean sageColor, int[] side, boolean bloom) {
        int color2 = sageColor ? 0 : ColorUtils.replAlpha(color, 0);
        drawDuadsSegment(matrix, x, y, radiusRound, radiusShadow, color, color2, bloom, side);
    }

    public void drawRoundSegment(MatrixStack matrix, float x, float y, double radius, int color, int[] side, boolean bloom) {
        drawDuadsSegment(matrix, x, y, 0, radius, color, color, bloom, side);
    }

    public void drawRoundSegment(MatrixStack matrix, float x, float y, double radius, int color, int[] side) {
        drawDuadsSegment(matrix, x, y, 0, radius, color, color, false, side);
    }

    public void drawShadowSegment(MatrixStack matrix, float x, float y, double radius, int color, boolean sageColor, int[] side) {
        drawShadowSegment(matrix, x, y, radius, color, sageColor, side, false);
    }

    public void drawShadowSegmentsExtract(MatrixStack matrix, float x, float y, float x2, float y2, double radiusStart, double radiusEnd, int color1, int color2, int color3, int color4, boolean sageColor, boolean bloom) {
        drawShadowSegment(matrix, x, y, radiusStart, radiusEnd, color1, sageColor, LEFT_UP, bloom);
        drawShadowSegment(matrix, x2, y, radiusStart, radiusEnd, color2, sageColor, RIGHT_UP, bloom);
        drawShadowSegment(matrix, x2, y2, radiusStart, radiusEnd, color3, sageColor, RIGHT_DOWN, bloom);
        drawShadowSegment(matrix, x, y2, radiusStart, radiusEnd, color4, sageColor, LEFT_DOWN, bloom);
    }
    public void drawLimitersSegments(MatrixStack matrix, float x, float y, float x2, float y2, float radius, float appendOffsets, int color1, int color2, int color3, int color4, boolean sageColor, boolean retainZero, boolean bloom) {
        int c5 = retainZero ? sageColor ? 0 : ColorUtils.replAlpha(color1, 0) : color1;
        int c6 = retainZero ? sageColor ? 0 : ColorUtils.replAlpha(color2, 0) : color2;
        int c7 = retainZero ? sageColor ? 0 : ColorUtils.replAlpha(color3, 0) : color3;
        int c8 = retainZero ? sageColor ? 0 : ColorUtils.replAlpha(color4, 0) : color4;
      
        drawRect(matrix, x + appendOffsets, y - radius, x2 - appendOffsets, y, c5, c6, color2, color1, bloom, false);
      
        drawRect(matrix, x + appendOffsets, y2, x2 - appendOffsets, y2 + radius, color4, color3, c7, c8, bloom, false);
      
        drawRect(matrix, x - radius, y + appendOffsets, x, y2 - appendOffsets, c5, color1, color4, c8, bloom, false);
      
        drawRect(matrix, x2, y + appendOffsets, x2 + radius, y2 - appendOffsets, color2, c6, c7, color3, bloom, false);
    }
    public void drawRoundSegments(MatrixStack matrix, float x, float y, float x2, float y2, double radius, int color1, int color2, int color3, int color4, boolean bloom) {
        drawRoundSegment(matrix, x, y, radius, color1, LEFT_UP, bloom);
        drawRoundSegment(matrix, x2, y, radius, color2, RIGHT_UP, bloom);
        drawRoundSegment(matrix, x2, y2, radius, color3, RIGHT_DOWN, bloom);
        drawRoundSegment(matrix, x, y2, radius, color4, LEFT_DOWN, bloom);
    }
    public void drawRoundedRectShadowed(MatrixStack matrix, float x, float y, float x2, float y2, float round, float shadowSize, int color1, int color2, int color3, int color4, boolean bloom, boolean sageColor, boolean rect, boolean shadow) {
        float roundMax = Math.max(x2 - x, y2 - y);
        round = Math.max(Math.min(round, roundMax), 0);
        shadowSize = Math.max(shadowSize, 0);

        x += round;
        y += round;
        x2 -= round;
        y2 -= round;
        if (rect) {
            drawRect(matrix, x, y, x2, y2, color1, color2, color3, color4, bloom, false);
            if (round != 0) {
                drawLimitersSegments(matrix, x, y, x2, y2, round, 0, color1, color2, color3, color4, false, false, bloom);
                drawRoundSegments(matrix, x, y, x2, y2, round, color1, color2, color3, color4, bloom);
            }
        }
        if (shadow && shadowSize > 0) {
            drawLimitersSegments(matrix, x - round, y - round, x2 + round, y2 + round, shadowSize, round, color1, color2, color3, color4, sageColor, true, bloom);
            drawShadowSegmentsExtract(matrix, x, y, x2, y2, round, shadowSize, color1, color2, color3, color4, sageColor, bloom);
        }
    }
    public void drawRect(MatrixStack matrix, float x, float y, float x2, float y2, int color, boolean bloom) {
        drawRect(matrix, x, y, x2, y2, color, color, color, color, bloom, false);
    }

    public void drawRect(MatrixStack matrix, float x, float y, float x2, float y2, int color) {
        drawRect(matrix, x, y, x2, y2, color, false);
    }

    public void setupOrientationMatrix(MatrixStack matrix, double x, double y, double z) {
        float partialTicks = mc.getRenderPartialTicks();
        EntityRendererManager rendererManager = mc.getRenderManager();
        final Vector3d renderPos = rendererManager.info.getProjectedView();
        boolean flag = mc.gameSettings.getPointOfView().func_243192_a() || mc.gameSettings.getPointOfView().func_243194_c().func_243193_b();
        matrix.translate(x - renderPos.x, y - renderPos.y, z - renderPos.z);
    }
    public void drawWavyLine(MatrixStack matrix, float x, float y, float width, float waveHeight, float frequency, float amplitude, int color, boolean bloom, float time) {
        VERTEXES_COLORED.clear();

        float step = width / 100;
        float halfWidth = width / 2;
        float startX = x;
        float endX = x + width;

        for (float currentX = startX; currentX <= endX; currentX += step) {
          
            float offsetY = (float) (Math.sin((currentX - halfWidth) * frequency + time) * amplitude);
            int currentColor = color;

            VERTEXES_COLORED.add(new Vec2fColored(currentX, y + offsetY, currentColor));
        }

      
        VERTEXES_COLORED.add(new Vec2fColored(endX, y, color));

        drawVertexesList(matrix, VERTEXES_COLORED, GL_LINE_STRIP, false, bloom);
    }

}

Vec2f:


Vec2f:
package net.optifine.render;

public class Vec2f {
    public float x;
    public float y;

    public float getX() {
        return this.x;
    }

    public float getY() {
        return this.y;
    }

    public Vec2f(float x, float y) {
        this.x = x;
        this.y = y;
    }
}
+rep дичайшая имба автор заметь пжжж
 
Начинающий
Статус
Онлайн
Регистрация
3 Окт 2022
Сообщения
197
Реакции[?]
1
Поинты[?]
1K
Первая моя визуальная работа, поэтому решил слить на лучший сайт.

Сливаю ClickGui и 2 худа с выбором через HUD, так же здесь показ армора автоматически переходит в вертикальное положение когда у края экрана по X.
Можно поставить шейдер (тень) в функции ClickGui, а так же выбрать режим "Белый" или "Клиентский". Так же имеется недоделанная панель с музыкой кому надо тот доделает. Темы открываются на пнг с карандашиком. Тх был взят с другого худа, но визуально переделан. Снизу еще сделаны типо волн (статические).

Возможно я еще, что то забыл добавить, так, что пишите в дс - baveko

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


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



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



HUD.java:
package xii.infinity.client.functions.impl.render;

import com.google.common.eventbus.Subscribe;
import xii.infinity.client.Infinity;
import xii.infinity.client.events.EventDisplay;
import xii.infinity.client.events.EventUpdate;
import xii.infinity.client.functions.api.Category;
import xii.infinity.client.functions.api.FunctionRegister;
import xii.infinity.client.functions.api.Module;
import xii.infinity.client.functions.settings.impl.BooleanSetting;
import xii.infinity.client.functions.settings.impl.ModeListSetting;
import xii.infinity.client.functions.settings.impl.ModeSetting;
import xii.infinity.client.ui.display.impl.*;
import xii.infinity.client.ui.styles.StyleManager;
import xii.infinity.client.utils.drag.Dragging;
import xii.infinity.client.utils.render.ColorUtils;
import lombok.AccessLevel;
import lombok.experimental.FieldDefaults;

@FieldDefaults(level = AccessLevel.PRIVATE)
@FunctionRegister(name = "HUD", type = Category.Render)
public class HUD extends Module {
    private static HUD instances;

    private final ModeSetting hudMode = new ModeSetting("HUD Mode", "HUD-1", "HUD-1","HUD-2");

    private final ModeListSetting elements = new ModeListSetting("Элементы",
            new BooleanSetting("Ватермарка", true),
            new BooleanSetting("Список модулей", true),
            new BooleanSetting("Координаты", true),
            new BooleanSetting("Эффекты", true),
            new BooleanSetting("Список модерации", true),
            new BooleanSetting("Активные бинды", true),
            new BooleanSetting("Активный таргет", true),
            new BooleanSetting("Броня", true),
            new BooleanSetting("Кулдавны", true),
            new BooleanSetting("Инвентарь", true),
            new BooleanSetting("Кей-Строкес", true)



            );

    final WatermarkRenderer4 watermarkRenderer;
    final ArrayListRenderer3 arrayListRenderer;
    final CoordsRenderer coordsRenderer;
    final PotionRenderer4 potionRenderer;
    final CoolDown cooldowns;

    final KeyBindRenderer4 keyBindRenderer;
    final TargetInfoRenderer4 targetInfoRenderer;
    final SeeInventoryRenderer3 inve;
    final KeyStrokes keys;


    final ArmorRenderer3 armorRenderer;
    final StaffListRenderer4 staffListRenderer;

    public static HUD getInstances() {
        return instances;
    }

    public static void setInstances(HUD instances) {
        HUD.instances = instances;
    }

    @Subscribe
    private void onUpdate(EventUpdate e) {
        if (mc.gameSettings.showDebugInfo) {
            return;
        }

        if (elements.getValueByName("Список модерации").get()) staffListRenderer.update(e);
        if (elements.getValueByName("Список модулей").get()) arrayListRenderer.update(e);
    }


    @Subscribe
    private void onDisplay(EventDisplay e) {
        if (mc.gameSettings.showDebugInfo || e.getType() != EventDisplay.Type.POST) {
            return;
        }

        if (elements.getValueByName("Координаты").get()) coordsRenderer.render(e);
        if (elements.getValueByName("Эффекты").get()) potionRenderer.render(e);
        if (elements.getValueByName("Ватермарка").get()) watermarkRenderer.render(e);
        if (elements.getValueByName("Список модулей").get()) arrayListRenderer.render(e);
        if (elements.getValueByName("Активные бинды").get()) keyBindRenderer.render(e);
        if (elements.getValueByName("Список модерации").get()) staffListRenderer.render(e);
        if (elements.getValueByName("Активный таргет").get()) targetInfoRenderer.render(e);
        if (elements.getValueByName("Кулдавны").get()) cooldowns.render(e);
        if (elements.getValueByName("Инвентарь").get()) inve.render(e);
        if (elements.getValueByName("Кей-Строкес").get()) keys.render(e);
        if (elements.getValueByName("Броня").get()) armorRenderer.render(e);





    }

    public HUD() {
        watermarkRenderer = new WatermarkRenderer4();
        arrayListRenderer = new ArrayListRenderer3();
        coordsRenderer = new CoordsRenderer();
        Dragging key = Infinity.getInstance().createDrag(this, "Key", 185, 100);
        Dragging inves = Infinity.getInstance().createDrag(this, "Inventory", 278, 100);
        Dragging cooldown = Infinity.getInstance().createDrag(this, "Cooldown", 350, 100);
        Dragging armor2 = Infinity.getInstance().createDrag(this, "Armor", 350, 5);
        Dragging potions = Infinity.getInstance().createDrag(this, "Potions", 278, 5);
        Dragging keyBinds = Infinity.getInstance().createDrag(this, "KeyBinds", 185, 5);
        Dragging dragging = Infinity.getInstance().createDrag(this, "TargetHUD", 74, 128);
        Dragging staffList = Infinity.getInstance().createDrag(this, "StaffList", 96, 5);
        armorRenderer = new ArmorRenderer3(armor2);

        potionRenderer = new PotionRenderer4(potions);
        cooldowns = new CoolDown(cooldown);
        keyBindRenderer = new KeyBindRenderer4(keyBinds);

        keys = new KeyStrokes(key);
        staffListRenderer = new StaffListRenderer4(staffList);
        targetInfoRenderer = new TargetInfoRenderer4(dragging);
        inve = new SeeInventoryRenderer3(inves);
        instances = this;

        addSettings( hudMode,elements );

    }

    public static int getColor(int index) {
        StyleManager styleManager = Infinity.getInstance().getStyleManager();
        return ColorUtils.gradient(styleManager.getCurrentStyle().getFirstColor().getRGB(), styleManager.getCurrentStyle().getSecondColor().getRGB(), index * 16, 10);
    }

    public static int getColor(int index, float mult) {
        StyleManager styleManager = Infinity.getInstance().getStyleManager();
        return ColorUtils.gradient(styleManager.getCurrentStyle().getFirstColor().getRGB(), styleManager.getCurrentStyle().getSecondColor().getRGB(), (int) (index * mult), 10);
    }

    public static int getColor(int firstColor, int secondColor, int index, float mult) {
        return ColorUtils.gradient(firstColor, secondColor, (int) (index * mult), 10);
    }
    public boolean isHud2() {
        return "HUD-2".equalsIgnoreCase(hudMode.get());
    }
}

RenderUtils:


RenderUtils:
package net.optifine.render;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import org.lwjgl.opengl.GL12;
import xii.infinity.client.Infinity;
import xii.infinity.client.utils.render.ColorUtils;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.BufferBuilder;
import net.minecraft.client.renderer.RenderTypeBuffers;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import org.lwjgl.opengl.GL11;

import java.util.ArrayList;
import java.util.List;

import static org.lwjgl.opengl.GL11.*;
import static org.lwjgl.opengl.GL11.GL_LINE_STRIP;

public class RenderUtils
{
    private static boolean flushRenderBuffers = true;
    private static Minecraft mc = Minecraft.getInstance();

    public static boolean setFlushRenderBuffers(boolean flushRenderBuffers)
    {
        boolean flag = RenderUtils.flushRenderBuffers;
        RenderUtils.flushRenderBuffers = flushRenderBuffers;
        return flag;
    }

    public static boolean isFlushRenderBuffers()
    {
        return flushRenderBuffers;
    }

    public static void flushRenderBuffers()
    {
        if (flushRenderBuffers)
        {
            RenderTypeBuffers rendertypebuffers = mc.getRenderTypeBuffers();
            rendertypebuffers.getBufferSource().flushRenderBuffers();
            rendertypebuffers.getCrumblingBufferSource().flushRenderBuffers();
        }
    }

    public static void drawBlockBox(BlockPos blockPos, int color) {
        drawBox(new AxisAlignedBB(blockPos).offset(-mc.getRenderManager().info.getProjectedView().x, -mc.getRenderManager().info.getProjectedView().y, -mc.getRenderManager().info.getProjectedView().z), color);
    }

    public static void drawBox(AxisAlignedBB bb, int color) {
        GL11.glPushMatrix();
        GL11.glDisable(GL11.GL_TEXTURE_2D);
        GL11.glDisable(GL_DEPTH_TEST);
        GL11.glEnable(GL_LINE_SMOOTH);
        GL11.glLineWidth(1);
        float[] rgb = ColorUtils.rgba(color);
        GlStateManager.color4f(rgb[0], rgb[1], rgb[2], rgb[3]);
        Tessellator tessellator = Tessellator.getInstance();
        BufferBuilder vertexbuffer = tessellator.getBuffer();
        vertexbuffer.begin(3, DefaultVertexFormats.POSITION);
        vertexbuffer.pos(bb.minX, bb.minY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.minY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.minY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.minY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.minY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        tessellator.draw();
        vertexbuffer.begin(3, DefaultVertexFormats.POSITION);
        vertexbuffer.pos(bb.minX, bb.maxY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.maxY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.maxY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.maxY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.maxY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        tessellator.draw();
        vertexbuffer.begin(1, DefaultVertexFormats.POSITION);
        vertexbuffer.pos(bb.minX, bb.minY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.maxY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.minY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.maxY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.minY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.maxY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.minY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.maxY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        tessellator.draw();
        GlStateManager.color4f(rgb[0], rgb[1], rgb[2], rgb[3]);
        GL11.glEnable(GL11.GL_TEXTURE_2D);
        GL11.glEnable(GL_DEPTH_TEST);
        GL11.glDisable(GL_LINE_SMOOTH);
        GL11.glPopMatrix();

    }
    public static void renderClientRect3(MatrixStack matrix, float x, float y, float width, float height, boolean expand, double expanded, int color, int i) {
        renderClientRect(matrix, x, y, width, height , expand, expanded, color, 128);
    }
    public static void renderClientRect2(MatrixStack matrix, float x, float y, float width, float height, boolean expand, double expanded, int color, int i) {
        renderClientRect4(matrix, x, y, width, height , expand, expanded, color, 128);
    }

    public static void renderClientRect(MatrixStack matrix, float x, float y, float width, float height, boolean expand, double expanded, int color, int alphaPC) {
        // Extract color components
        int red = (color >> 16) & 0xFF;
        int green = (color >> 8) & 0xFF;
        int blue = color & 0xFF;
        int alpha = alphaPC;

        int color1 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color2 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color3 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color4 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);

        boolean bloom = true;
        float round = Infinity.getInstance().round();
        float shadow = Infinity.getInstance().shadow();
        int zeroC1 = ColorUtils.multAlpha(color1, 0.F);
        int zeroC2 = ColorUtils.multAlpha(color2, 0.F);
        int zeroC3 = ColorUtils.multAlpha(color3, 0.F);
        int zeroC4 = ColorUtils.multAlpha(color4, 0.F);
        int halfC1 = ColorUtils.multAlpha(color1, .5F);
        int halfC2 = ColorUtils.multAlpha(color2, .5F);
        int halfC3 = ColorUtils.multAlpha(color3, .5F);
        int halfC4 = ColorUtils.multAlpha(color4, .5F);
        int overY1C = ColorUtils.overCol(color1, color2);
        int overY2C = ColorUtils.overCol(color4, color3);
        int overX1C = ColorUtils.overCol(color1, color4);
        int overX2C = ColorUtils.overCol(color2, color3);

        // Draw rounded rectangle with shadows
        RectUtil.drawRoundedRectShadowed(matrix, x, y, x + width, y + height, round, shadow, halfC1, halfC2, halfC3, halfC4, bloom, true, false, true);

        // Draw darkened version for effect
        float dark = 0.35F;
        RectUtil.drawRoundedRectShadowed(matrix, x, y, x + width, y + height, round, .5F, ColorUtils.multDark(color1, dark), ColorUtils.multDark(color2, dark), ColorUtils.multDark(color3, dark), ColorUtils.multDark(color4, dark), false, false, true, true);

        List<RectUtil.Vec2fColored> list = new ArrayList<>();
        if (expand) {
            list.add(new RectUtil.Vec2fColored(x + 2, y + (float) expanded, zeroC1));
            list.add(new RectUtil.Vec2fColored(x + width / 2F, y + (float) expanded, overY1C));
            list.add(new RectUtil.Vec2fColored(x + width - 2, y + (float) expanded, zeroC2));
            GL12.glLineWidth(2);
            RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);
            GL12.glPointSize(1);
        }

        // Draw edges
        float lineOff = 0;
        GL12.glLineWidth(2);

        // Top line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + round, y + lineOff, zeroC1));
        list.add(new RectUtil.Vec2fColored(x + width / 2F, y + lineOff, overY1C));
        list.add(new RectUtil.Vec2fColored(x + width - round, y + lineOff, zeroC2));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Bottom line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + round, y + height - lineOff, zeroC4));
        list.add(new RectUtil.Vec2fColored(x + width / 2F, y + height - lineOff, overY2C));
        list.add(new RectUtil.Vec2fColored(x + width - round, y + height - lineOff, zeroC3));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Left line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + round, zeroC1));
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + height / 2F, overX1C));
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + height - round, zeroC4));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Right line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + round, zeroC2));
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + height / 2F, overX2C));
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + height - round, zeroC3));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        GL12.glLineWidth(1);

        // Parameters for wave
        // Параметры для волны
        float waveHeight = 10.0F; // Высота волны
        float frequency = 0.1F;   // Частота волны
        float amplitude = 5.0F;   // Амплитуда волны
        float speedFactor = 300.0F; // Коэффициент замедления (чем больше, тем медленнее)

// Получить текущее время в миллисекундах
        float time = System.currentTimeMillis() % 10000; // Простой эффект на основе времени

// Нарисовать динамическую волнистую линию внизу прямоугольника
        drawDynamicWavyLine(matrix, x, y + height, width, waveHeight, frequency, amplitude, color, bloom, time, speedFactor);

    }


    // Метод для рисования динамической волны
    // Метод для рисования динамической волны
    private static void drawDynamicWavyLine(MatrixStack matrix, float x, float y, float width, float waveHeight, float frequency, float amplitude, int color, boolean bloom, float time, float speedFactor) {
        List<RectUtil.Vec2fColored> list = new ArrayList<>();
        float step = width / 200; // Уменьшение шага для более точной отрисовки
        float halfWidth = width / 2;
        float startX = x;
        float endX = x + width;

        // Параметры для непрерывного эффекта
        float waveOffset = (float) ((time / speedFactor) % (2 * Math.PI));

        // Параметры волны
        float baseAmplitude = amplitude * (0.5F + 0.5F * (float) Math.sin(waveOffset));
        float frequencyStep = frequency * step;

        for (float currentX = startX; currentX <= endX; currentX += step) {
            // Расчет смещения Y для плавного перехода
            float dynamicAmplitude = baseAmplitude * (0.5F + 0.5F * (float) Math.sin(waveOffset));
            float offsetY = (float) (Math.sin((currentX - startX) * frequencyStep + waveOffset) * dynamicAmplitude);

            list.add(new RectUtil.Vec2fColored(currentX, y + offsetY, color));
        }

        // Плавное соединение волны
        float endOffsetY = (float) (Math.sin((endX - startX) * frequencyStep + waveOffset) * baseAmplitude);
        list.add(new RectUtil.Vec2fColored(endX, y + endOffsetY, color));

        // Рисование линии
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);
    }



    public static void renderClientRect4(MatrixStack matrix, float x, float y, float width, float height, boolean expand, double expanded, int color, int alphaPC) {
        // Extract color components
        int red = (color >> 16) & 0xFF;
        int green = (color >> 8) & 0xFF;
        int blue = color & 0xFF;
        int alpha = alphaPC;

        int color1 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color2 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color3 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color4 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);

        boolean bloom = true;
        float round = Infinity.getInstance().round();
        float shadow = Infinity.getInstance().shadow();
        int zeroC1 = ColorUtils.multAlpha(color1, 0.F);
        int zeroC2 = ColorUtils.multAlpha(color2, 0.F);
        int zeroC3 = ColorUtils.multAlpha(color3, 0.F);
        int zeroC4 = ColorUtils.multAlpha(color4, 0.F);
        int halfC1 = ColorUtils.multAlpha(color1, .5F);
        int halfC2 = ColorUtils.multAlpha(color2, .5F);
        int halfC3 = ColorUtils.multAlpha(color3, .5F);
        int halfC4 = ColorUtils.multAlpha(color4, .5F);
        int overY1C = ColorUtils.overCol(color1, color2);
        int overY2C = ColorUtils.overCol(color4, color3);
        int overX1C = ColorUtils.overCol(color1, color4);
        int overX2C = ColorUtils.overCol(color2, color3);

        // Draw rounded rectangle with shadows
        RectUtil.drawRoundedRectShadowed(matrix, x, y, x + width, y + height, round, shadow, halfC1, halfC2, halfC3, halfC4, bloom, true, false, true);

        // Draw darkened version for effect
        float dark = 0.35F;
        RectUtil.drawRoundedRectShadowed(matrix, x, y, x + width, y + height, round, .5F, ColorUtils.multDark(color1, dark), ColorUtils.multDark(color2, dark), ColorUtils.multDark(color3, dark), ColorUtils.multDark(color4, dark), false, false, true, true);

        List<RectUtil.Vec2fColored> list = new ArrayList<>();
        if (expand) {
            list.add(new RectUtil.Vec2fColored(x + 2, y + (float) expanded, zeroC1));
            list.add(new RectUtil.Vec2fColored(x + width / 2F, y + (float) expanded, overY1C));
            list.add(new RectUtil.Vec2fColored(x + width - 2, y + (float) expanded, zeroC2));
            GL12.glLineWidth(2);
            RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);
            GL12.glPointSize(1);
        }

        // Draw edges
        float lineOff = 0;
        GL12.glLineWidth(2);

        // Top line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + round, y + lineOff, zeroC1));
        list.add(new RectUtil.Vec2fColored(x + width / 2F, y + lineOff, overY1C));
        list.add(new RectUtil.Vec2fColored(x + width - round, y + lineOff, zeroC2));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Bottom line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + round, y + height - lineOff, zeroC4));
        list.add(new RectUtil.Vec2fColored(x + width / 2F, y + height - lineOff, overY2C));
        list.add(new RectUtil.Vec2fColored(x + width - round, y + height - lineOff, zeroC3));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Left line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + round, zeroC1));
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + height / 2F, overX1C));
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + height - round, zeroC4));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Right line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + round, zeroC2));
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + height / 2F, overX2C));
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + height - round, zeroC3));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        GL12.glLineWidth(1);

        // Parameters for wave
        // Параметры для волны


    }

}

RectUtil:


RectUtil:
package net.optifine.render;

import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.experimental.UtilityClass;
import net.minecraft.client.renderer.entity.EntityRendererManager;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;

import net.minecraft.util.math.vector.Vector3d;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import xii.infinity.client.utils.render.ColorUtils;

import java.util.ArrayList;
import java.util.List;

import static org.lwjgl.opengl.GL11C.GL_LINE_STRIP;
import static xii.infinity.client.utils.client.IMinecraft.*;


@UtilityClass
@SuppressWarnings("unused")
public class RectUtil implements IRenderAccess {
    public final List<Vec2fColored> VERTEXES_COLORED = new ArrayList<>();
    public final List<Vec2f> VERTEXES = new ArrayList<>();
    int[] LEFT_UP = new int[]{-90, 0};
    int[] RIGHT_UP = new int[]{0, 90};
    int[] RIGHT_DOWN = new int[]{90, 180};
    int[] LEFT_DOWN = new int[]{180, 270};
    [USER=270918]@Getter[/USER]
    @AllArgsConstructor
    public class Vec2fColored {
        float x, y;
        int color;
    }
    public void setupRenderRect(boolean texture, boolean bloom) {
        if (texture) RenderSystem.enableTexture();
        else RenderSystem.disableTexture();
        RenderSystem.enableBlend();
        RenderSystem.disableAlphaTest();
        RenderSystem.defaultBlendFunc();
        RenderSystem.disableCull();
        RenderSystem.shadeModel(7425);

        RenderSystem.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, bloom ? GlStateManager.DestFactor.ONE_MINUS_CONSTANT_ALPHA : GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
        RenderSystem.disableAlphaTest();
        GL11.glHint(GL11.GL_POLYGON_SMOOTH_HINT, GL11.GL_NICEST);
        GL11.glEnable(GL11.GL_POINT_SMOOTH);
    }
    public void endRenderRect(boolean bloom) {
        RenderSystem.enableAlphaTest();
        if (bloom)
            RenderSystem.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);

        RenderSystem.shadeModel(7424);
        RenderSystem.enableCull();
        RenderSystem.enableAlphaTest();
        RenderSystem.enableTexture();

        RenderSystem.clearCurrentColor();
    }
    public Vec2fColored getOfVec3f(Vec2f vec2f, int color) {
        return new Vec2fColored(vec2f.getX(), vec2f.getY(), color);
    }
    public void drawVertexesList(MatrixStack matrix, List<Vec2fColored> vec2c, int begin, boolean texture, boolean bloom) {
        setupRenderRect(texture, bloom);
        buffer.begin(begin, texture ? DefaultVertexFormats.POSITION_TEX_COLOR : DefaultVertexFormats.POSITION_COLOR);
        int counter = 0;
        for (final Vec2fColored vec : vec2c) {
            float[] rgba = ColorUtils.getRGBAf(vec.getColor());
            buffer.pos(matrix.getLast().getMatrix(), vec.getX(), vec.getY(), 0);
            if (texture) buffer.tex(counter == 0 || counter == 3 ? 0 : 1, counter == 0 || counter == 1 ? 0 : 1);
            buffer.color(rgba[0], rgba[1], rgba[2], rgba[3]);
            buffer.endVertex();
            counter++;
        }
        tessellator.draw();
        endRenderRect(bloom);
    }    public void drawRect(MatrixStack matrix, float x, float y, float x2, float y2, int color1, int color2, int color3, int color4, boolean bloom, boolean texture) {
        VERTEXES_COLORED.clear();
        VERTEXES_COLORED.add(new Vec2fColored(x, y, color1));
        VERTEXES_COLORED.add(new Vec2fColored(x2, y, color2));
        VERTEXES_COLORED.add(new Vec2fColored(x2, y2, color3));
        VERTEXES_COLORED.add(new Vec2fColored(x, y2, color4));
        drawVertexesList(matrix, VERTEXES_COLORED, GL11.GL_POLYGON, texture, bloom);
    }
    public List<Vec2f> generateRadiusCircledVertexes(MatrixStack matrix, float x, float y, double radius1, double radius2, double startRadius, double endRadius, double step, boolean doublepart) {
        VERTEXES.clear();
        double radius = startRadius;
        while (radius <= endRadius) {
            if (radius > endRadius) radius = endRadius;
            float x1 = (float) (Math.sin(Math.toRadians(radius)) * radius1);
            float y1 = (float) (-Math.cos(Math.toRadians(radius)) * radius1);
            VERTEXES.add(new Vec2f(x + x1, y + y1));
            if (doublepart) {
                x1 = (float) (Math.sin(Math.toRadians(radius)) * radius2);
                y1 = (float) (-Math.cos(Math.toRadians(radius)) * radius2);
                VERTEXES.add(new Vec2f(x + x1, y + y1));
            }
            radius += step;
        }
        return VERTEXES;
    }
    public void drawDuadsSegment(MatrixStack matrix, float x, float y, double radius, double expand, int color, int color2, boolean bloom, int[] side) {
        VERTEXES_COLORED.clear();
        int index = 0;
        for (Vec2f vec2f : generateRadiusCircledVertexes(matrix, x, y, radius, radius + expand, side[0], side[1], 9, true)) {
            VERTEXES_COLORED.add(getOfVec3f(vec2f, index % 2 == 1 ? color2 : color));
            ++index;
        }
        drawVertexesList(matrix, VERTEXES_COLORED, GL12.GL_TRIANGLE_STRIP, false, bloom);
    }
    public void drawShadowSegment(MatrixStack matrix, float x, float y, double radius, int color, boolean sageColor, int[] side, boolean bloom) {
        int color2 = sageColor ? 0 : ColorUtils.replAlpha(color, 0);
        drawDuadsSegment(matrix, x, y, 0, radius, color, color2, bloom, side);
    }

    public void drawShadowSegment(MatrixStack matrix, float x, float y, double radiusRound, double radiusShadow, int color, boolean sageColor, int[] side, boolean bloom) {
        int color2 = sageColor ? 0 : ColorUtils.replAlpha(color, 0);
        drawDuadsSegment(matrix, x, y, radiusRound, radiusShadow, color, color2, bloom, side);
    }

    public void drawRoundSegment(MatrixStack matrix, float x, float y, double radius, int color, int[] side, boolean bloom) {
        drawDuadsSegment(matrix, x, y, 0, radius, color, color, bloom, side);
    }

    public void drawRoundSegment(MatrixStack matrix, float x, float y, double radius, int color, int[] side) {
        drawDuadsSegment(matrix, x, y, 0, radius, color, color, false, side);
    }

    public void drawShadowSegment(MatrixStack matrix, float x, float y, double radius, int color, boolean sageColor, int[] side) {
        drawShadowSegment(matrix, x, y, radius, color, sageColor, side, false);
    }

    public void drawShadowSegmentsExtract(MatrixStack matrix, float x, float y, float x2, float y2, double radiusStart, double radiusEnd, int color1, int color2, int color3, int color4, boolean sageColor, boolean bloom) {
        drawShadowSegment(matrix, x, y, radiusStart, radiusEnd, color1, sageColor, LEFT_UP, bloom);
        drawShadowSegment(matrix, x2, y, radiusStart, radiusEnd, color2, sageColor, RIGHT_UP, bloom);
        drawShadowSegment(matrix, x2, y2, radiusStart, radiusEnd, color3, sageColor, RIGHT_DOWN, bloom);
        drawShadowSegment(matrix, x, y2, radiusStart, radiusEnd, color4, sageColor, LEFT_DOWN, bloom);
    }
    public void drawLimitersSegments(MatrixStack matrix, float x, float y, float x2, float y2, float radius, float appendOffsets, int color1, int color2, int color3, int color4, boolean sageColor, boolean retainZero, boolean bloom) {
        int c5 = retainZero ? sageColor ? 0 : ColorUtils.replAlpha(color1, 0) : color1;
        int c6 = retainZero ? sageColor ? 0 : ColorUtils.replAlpha(color2, 0) : color2;
        int c7 = retainZero ? sageColor ? 0 : ColorUtils.replAlpha(color3, 0) : color3;
        int c8 = retainZero ? sageColor ? 0 : ColorUtils.replAlpha(color4, 0) : color4;
      
        drawRect(matrix, x + appendOffsets, y - radius, x2 - appendOffsets, y, c5, c6, color2, color1, bloom, false);
      
        drawRect(matrix, x + appendOffsets, y2, x2 - appendOffsets, y2 + radius, color4, color3, c7, c8, bloom, false);
      
        drawRect(matrix, x - radius, y + appendOffsets, x, y2 - appendOffsets, c5, color1, color4, c8, bloom, false);
      
        drawRect(matrix, x2, y + appendOffsets, x2 + radius, y2 - appendOffsets, color2, c6, c7, color3, bloom, false);
    }
    public void drawRoundSegments(MatrixStack matrix, float x, float y, float x2, float y2, double radius, int color1, int color2, int color3, int color4, boolean bloom) {
        drawRoundSegment(matrix, x, y, radius, color1, LEFT_UP, bloom);
        drawRoundSegment(matrix, x2, y, radius, color2, RIGHT_UP, bloom);
        drawRoundSegment(matrix, x2, y2, radius, color3, RIGHT_DOWN, bloom);
        drawRoundSegment(matrix, x, y2, radius, color4, LEFT_DOWN, bloom);
    }
    public void drawRoundedRectShadowed(MatrixStack matrix, float x, float y, float x2, float y2, float round, float shadowSize, int color1, int color2, int color3, int color4, boolean bloom, boolean sageColor, boolean rect, boolean shadow) {
        float roundMax = Math.max(x2 - x, y2 - y);
        round = Math.max(Math.min(round, roundMax), 0);
        shadowSize = Math.max(shadowSize, 0);

        x += round;
        y += round;
        x2 -= round;
        y2 -= round;
        if (rect) {
            drawRect(matrix, x, y, x2, y2, color1, color2, color3, color4, bloom, false);
            if (round != 0) {
                drawLimitersSegments(matrix, x, y, x2, y2, round, 0, color1, color2, color3, color4, false, false, bloom);
                drawRoundSegments(matrix, x, y, x2, y2, round, color1, color2, color3, color4, bloom);
            }
        }
        if (shadow && shadowSize > 0) {
            drawLimitersSegments(matrix, x - round, y - round, x2 + round, y2 + round, shadowSize, round, color1, color2, color3, color4, sageColor, true, bloom);
            drawShadowSegmentsExtract(matrix, x, y, x2, y2, round, shadowSize, color1, color2, color3, color4, sageColor, bloom);
        }
    }
    public void drawRect(MatrixStack matrix, float x, float y, float x2, float y2, int color, boolean bloom) {
        drawRect(matrix, x, y, x2, y2, color, color, color, color, bloom, false);
    }

    public void drawRect(MatrixStack matrix, float x, float y, float x2, float y2, int color) {
        drawRect(matrix, x, y, x2, y2, color, false);
    }

    public void setupOrientationMatrix(MatrixStack matrix, double x, double y, double z) {
        float partialTicks = mc.getRenderPartialTicks();
        EntityRendererManager rendererManager = mc.getRenderManager();
        final Vector3d renderPos = rendererManager.info.getProjectedView();
        boolean flag = mc.gameSettings.getPointOfView().func_243192_a() || mc.gameSettings.getPointOfView().func_243194_c().func_243193_b();
        matrix.translate(x - renderPos.x, y - renderPos.y, z - renderPos.z);
    }
    public void drawWavyLine(MatrixStack matrix, float x, float y, float width, float waveHeight, float frequency, float amplitude, int color, boolean bloom, float time) {
        VERTEXES_COLORED.clear();

        float step = width / 100;
        float halfWidth = width / 2;
        float startX = x;
        float endX = x + width;

        for (float currentX = startX; currentX <= endX; currentX += step) {
          
            float offsetY = (float) (Math.sin((currentX - halfWidth) * frequency + time) * amplitude);
            int currentColor = color;

            VERTEXES_COLORED.add(new Vec2fColored(currentX, y + offsetY, currentColor));
        }

      
        VERTEXES_COLORED.add(new Vec2fColored(endX, y, color));

        drawVertexesList(matrix, VERTEXES_COLORED, GL_LINE_STRIP, false, bloom);
    }

}

Vec2f:


Vec2f:
package net.optifine.render;

public class Vec2f {
    public float x;
    public float y;

    public float getX() {
        return this.x;
    }

    public float getY() {
        return this.y;
    }

    public Vec2f(float x, float y) {
        this.x = x;
        this.y = y;
    }
}
Дай ColorUtil
 
Начинающий
Статус
Онлайн
Регистрация
29 Май 2024
Сообщения
573
Реакции[?]
2
Поинты[?]
1K
Первая моя визуальная работа, поэтому решил слить на лучший сайт.

Сливаю ClickGui и 2 худа с выбором через HUD, так же здесь показ армора автоматически переходит в вертикальное положение когда у края экрана по X.
Можно поставить шейдер (тень) в функции ClickGui, а так же выбрать режим "Белый" или "Клиентский". Так же имеется недоделанная панель с музыкой кому надо тот доделает. Темы открываются на пнг с карандашиком. Тх был взят с другого худа, но визуально переделан. Снизу еще сделаны типо волн (статические).

Возможно я еще, что то забыл добавить, так, что пишите в дс - baveko

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


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



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



HUD.java:
package xii.infinity.client.functions.impl.render;

import com.google.common.eventbus.Subscribe;
import xii.infinity.client.Infinity;
import xii.infinity.client.events.EventDisplay;
import xii.infinity.client.events.EventUpdate;
import xii.infinity.client.functions.api.Category;
import xii.infinity.client.functions.api.FunctionRegister;
import xii.infinity.client.functions.api.Module;
import xii.infinity.client.functions.settings.impl.BooleanSetting;
import xii.infinity.client.functions.settings.impl.ModeListSetting;
import xii.infinity.client.functions.settings.impl.ModeSetting;
import xii.infinity.client.ui.display.impl.*;
import xii.infinity.client.ui.styles.StyleManager;
import xii.infinity.client.utils.drag.Dragging;
import xii.infinity.client.utils.render.ColorUtils;
import lombok.AccessLevel;
import lombok.experimental.FieldDefaults;

@FieldDefaults(level = AccessLevel.PRIVATE)
@FunctionRegister(name = "HUD", type = Category.Render)
public class HUD extends Module {
    private static HUD instances;

    private final ModeSetting hudMode = new ModeSetting("HUD Mode", "HUD-1", "HUD-1","HUD-2");

    private final ModeListSetting elements = new ModeListSetting("Элементы",
            new BooleanSetting("Ватермарка", true),
            new BooleanSetting("Список модулей", true),
            new BooleanSetting("Координаты", true),
            new BooleanSetting("Эффекты", true),
            new BooleanSetting("Список модерации", true),
            new BooleanSetting("Активные бинды", true),
            new BooleanSetting("Активный таргет", true),
            new BooleanSetting("Броня", true),
            new BooleanSetting("Кулдавны", true),
            new BooleanSetting("Инвентарь", true),
            new BooleanSetting("Кей-Строкес", true)



            );

    final WatermarkRenderer4 watermarkRenderer;
    final ArrayListRenderer3 arrayListRenderer;
    final CoordsRenderer coordsRenderer;
    final PotionRenderer4 potionRenderer;
    final CoolDown cooldowns;

    final KeyBindRenderer4 keyBindRenderer;
    final TargetInfoRenderer4 targetInfoRenderer;
    final SeeInventoryRenderer3 inve;
    final KeyStrokes keys;


    final ArmorRenderer3 armorRenderer;
    final StaffListRenderer4 staffListRenderer;

    public static HUD getInstances() {
        return instances;
    }

    public static void setInstances(HUD instances) {
        HUD.instances = instances;
    }

    @Subscribe
    private void onUpdate(EventUpdate e) {
        if (mc.gameSettings.showDebugInfo) {
            return;
        }

        if (elements.getValueByName("Список модерации").get()) staffListRenderer.update(e);
        if (elements.getValueByName("Список модулей").get()) arrayListRenderer.update(e);
    }


    @Subscribe
    private void onDisplay(EventDisplay e) {
        if (mc.gameSettings.showDebugInfo || e.getType() != EventDisplay.Type.POST) {
            return;
        }

        if (elements.getValueByName("Координаты").get()) coordsRenderer.render(e);
        if (elements.getValueByName("Эффекты").get()) potionRenderer.render(e);
        if (elements.getValueByName("Ватермарка").get()) watermarkRenderer.render(e);
        if (elements.getValueByName("Список модулей").get()) arrayListRenderer.render(e);
        if (elements.getValueByName("Активные бинды").get()) keyBindRenderer.render(e);
        if (elements.getValueByName("Список модерации").get()) staffListRenderer.render(e);
        if (elements.getValueByName("Активный таргет").get()) targetInfoRenderer.render(e);
        if (elements.getValueByName("Кулдавны").get()) cooldowns.render(e);
        if (elements.getValueByName("Инвентарь").get()) inve.render(e);
        if (elements.getValueByName("Кей-Строкес").get()) keys.render(e);
        if (elements.getValueByName("Броня").get()) armorRenderer.render(e);





    }

    public HUD() {
        watermarkRenderer = new WatermarkRenderer4();
        arrayListRenderer = new ArrayListRenderer3();
        coordsRenderer = new CoordsRenderer();
        Dragging key = Infinity.getInstance().createDrag(this, "Key", 185, 100);
        Dragging inves = Infinity.getInstance().createDrag(this, "Inventory", 278, 100);
        Dragging cooldown = Infinity.getInstance().createDrag(this, "Cooldown", 350, 100);
        Dragging armor2 = Infinity.getInstance().createDrag(this, "Armor", 350, 5);
        Dragging potions = Infinity.getInstance().createDrag(this, "Potions", 278, 5);
        Dragging keyBinds = Infinity.getInstance().createDrag(this, "KeyBinds", 185, 5);
        Dragging dragging = Infinity.getInstance().createDrag(this, "TargetHUD", 74, 128);
        Dragging staffList = Infinity.getInstance().createDrag(this, "StaffList", 96, 5);
        armorRenderer = new ArmorRenderer3(armor2);

        potionRenderer = new PotionRenderer4(potions);
        cooldowns = new CoolDown(cooldown);
        keyBindRenderer = new KeyBindRenderer4(keyBinds);

        keys = new KeyStrokes(key);
        staffListRenderer = new StaffListRenderer4(staffList);
        targetInfoRenderer = new TargetInfoRenderer4(dragging);
        inve = new SeeInventoryRenderer3(inves);
        instances = this;

        addSettings( hudMode,elements );

    }

    public static int getColor(int index) {
        StyleManager styleManager = Infinity.getInstance().getStyleManager();
        return ColorUtils.gradient(styleManager.getCurrentStyle().getFirstColor().getRGB(), styleManager.getCurrentStyle().getSecondColor().getRGB(), index * 16, 10);
    }

    public static int getColor(int index, float mult) {
        StyleManager styleManager = Infinity.getInstance().getStyleManager();
        return ColorUtils.gradient(styleManager.getCurrentStyle().getFirstColor().getRGB(), styleManager.getCurrentStyle().getSecondColor().getRGB(), (int) (index * mult), 10);
    }

    public static int getColor(int firstColor, int secondColor, int index, float mult) {
        return ColorUtils.gradient(firstColor, secondColor, (int) (index * mult), 10);
    }
    public boolean isHud2() {
        return "HUD-2".equalsIgnoreCase(hudMode.get());
    }
}

RenderUtils:


RenderUtils:
package net.optifine.render;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import org.lwjgl.opengl.GL12;
import xii.infinity.client.Infinity;
import xii.infinity.client.utils.render.ColorUtils;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.BufferBuilder;
import net.minecraft.client.renderer.RenderTypeBuffers;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import org.lwjgl.opengl.GL11;

import java.util.ArrayList;
import java.util.List;

import static org.lwjgl.opengl.GL11.*;
import static org.lwjgl.opengl.GL11.GL_LINE_STRIP;

public class RenderUtils
{
    private static boolean flushRenderBuffers = true;
    private static Minecraft mc = Minecraft.getInstance();

    public static boolean setFlushRenderBuffers(boolean flushRenderBuffers)
    {
        boolean flag = RenderUtils.flushRenderBuffers;
        RenderUtils.flushRenderBuffers = flushRenderBuffers;
        return flag;
    }

    public static boolean isFlushRenderBuffers()
    {
        return flushRenderBuffers;
    }

    public static void flushRenderBuffers()
    {
        if (flushRenderBuffers)
        {
            RenderTypeBuffers rendertypebuffers = mc.getRenderTypeBuffers();
            rendertypebuffers.getBufferSource().flushRenderBuffers();
            rendertypebuffers.getCrumblingBufferSource().flushRenderBuffers();
        }
    }

    public static void drawBlockBox(BlockPos blockPos, int color) {
        drawBox(new AxisAlignedBB(blockPos).offset(-mc.getRenderManager().info.getProjectedView().x, -mc.getRenderManager().info.getProjectedView().y, -mc.getRenderManager().info.getProjectedView().z), color);
    }

    public static void drawBox(AxisAlignedBB bb, int color) {
        GL11.glPushMatrix();
        GL11.glDisable(GL11.GL_TEXTURE_2D);
        GL11.glDisable(GL_DEPTH_TEST);
        GL11.glEnable(GL_LINE_SMOOTH);
        GL11.glLineWidth(1);
        float[] rgb = ColorUtils.rgba(color);
        GlStateManager.color4f(rgb[0], rgb[1], rgb[2], rgb[3]);
        Tessellator tessellator = Tessellator.getInstance();
        BufferBuilder vertexbuffer = tessellator.getBuffer();
        vertexbuffer.begin(3, DefaultVertexFormats.POSITION);
        vertexbuffer.pos(bb.minX, bb.minY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.minY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.minY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.minY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.minY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        tessellator.draw();
        vertexbuffer.begin(3, DefaultVertexFormats.POSITION);
        vertexbuffer.pos(bb.minX, bb.maxY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.maxY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.maxY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.maxY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.maxY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        tessellator.draw();
        vertexbuffer.begin(1, DefaultVertexFormats.POSITION);
        vertexbuffer.pos(bb.minX, bb.minY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.maxY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.minY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.maxY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.minY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.maxY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.minY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.maxY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        tessellator.draw();
        GlStateManager.color4f(rgb[0], rgb[1], rgb[2], rgb[3]);
        GL11.glEnable(GL11.GL_TEXTURE_2D);
        GL11.glEnable(GL_DEPTH_TEST);
        GL11.glDisable(GL_LINE_SMOOTH);
        GL11.glPopMatrix();

    }
    public static void renderClientRect3(MatrixStack matrix, float x, float y, float width, float height, boolean expand, double expanded, int color, int i) {
        renderClientRect(matrix, x, y, width, height , expand, expanded, color, 128);
    }
    public static void renderClientRect2(MatrixStack matrix, float x, float y, float width, float height, boolean expand, double expanded, int color, int i) {
        renderClientRect4(matrix, x, y, width, height , expand, expanded, color, 128);
    }

    public static void renderClientRect(MatrixStack matrix, float x, float y, float width, float height, boolean expand, double expanded, int color, int alphaPC) {
        // Extract color components
        int red = (color >> 16) & 0xFF;
        int green = (color >> 8) & 0xFF;
        int blue = color & 0xFF;
        int alpha = alphaPC;

        int color1 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color2 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color3 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color4 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);

        boolean bloom = true;
        float round = Infinity.getInstance().round();
        float shadow = Infinity.getInstance().shadow();
        int zeroC1 = ColorUtils.multAlpha(color1, 0.F);
        int zeroC2 = ColorUtils.multAlpha(color2, 0.F);
        int zeroC3 = ColorUtils.multAlpha(color3, 0.F);
        int zeroC4 = ColorUtils.multAlpha(color4, 0.F);
        int halfC1 = ColorUtils.multAlpha(color1, .5F);
        int halfC2 = ColorUtils.multAlpha(color2, .5F);
        int halfC3 = ColorUtils.multAlpha(color3, .5F);
        int halfC4 = ColorUtils.multAlpha(color4, .5F);
        int overY1C = ColorUtils.overCol(color1, color2);
        int overY2C = ColorUtils.overCol(color4, color3);
        int overX1C = ColorUtils.overCol(color1, color4);
        int overX2C = ColorUtils.overCol(color2, color3);

        // Draw rounded rectangle with shadows
        RectUtil.drawRoundedRectShadowed(matrix, x, y, x + width, y + height, round, shadow, halfC1, halfC2, halfC3, halfC4, bloom, true, false, true);

        // Draw darkened version for effect
        float dark = 0.35F;
        RectUtil.drawRoundedRectShadowed(matrix, x, y, x + width, y + height, round, .5F, ColorUtils.multDark(color1, dark), ColorUtils.multDark(color2, dark), ColorUtils.multDark(color3, dark), ColorUtils.multDark(color4, dark), false, false, true, true);

        List<RectUtil.Vec2fColored> list = new ArrayList<>();
        if (expand) {
            list.add(new RectUtil.Vec2fColored(x + 2, y + (float) expanded, zeroC1));
            list.add(new RectUtil.Vec2fColored(x + width / 2F, y + (float) expanded, overY1C));
            list.add(new RectUtil.Vec2fColored(x + width - 2, y + (float) expanded, zeroC2));
            GL12.glLineWidth(2);
            RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);
            GL12.glPointSize(1);
        }

        // Draw edges
        float lineOff = 0;
        GL12.glLineWidth(2);

        // Top line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + round, y + lineOff, zeroC1));
        list.add(new RectUtil.Vec2fColored(x + width / 2F, y + lineOff, overY1C));
        list.add(new RectUtil.Vec2fColored(x + width - round, y + lineOff, zeroC2));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Bottom line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + round, y + height - lineOff, zeroC4));
        list.add(new RectUtil.Vec2fColored(x + width / 2F, y + height - lineOff, overY2C));
        list.add(new RectUtil.Vec2fColored(x + width - round, y + height - lineOff, zeroC3));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Left line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + round, zeroC1));
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + height / 2F, overX1C));
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + height - round, zeroC4));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Right line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + round, zeroC2));
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + height / 2F, overX2C));
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + height - round, zeroC3));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        GL12.glLineWidth(1);

        // Parameters for wave
        // Параметры для волны
        float waveHeight = 10.0F; // Высота волны
        float frequency = 0.1F;   // Частота волны
        float amplitude = 5.0F;   // Амплитуда волны
        float speedFactor = 300.0F; // Коэффициент замедления (чем больше, тем медленнее)

// Получить текущее время в миллисекундах
        float time = System.currentTimeMillis() % 10000; // Простой эффект на основе времени

// Нарисовать динамическую волнистую линию внизу прямоугольника
        drawDynamicWavyLine(matrix, x, y + height, width, waveHeight, frequency, amplitude, color, bloom, time, speedFactor);

    }


    // Метод для рисования динамической волны
    // Метод для рисования динамической волны
    private static void drawDynamicWavyLine(MatrixStack matrix, float x, float y, float width, float waveHeight, float frequency, float amplitude, int color, boolean bloom, float time, float speedFactor) {
        List<RectUtil.Vec2fColored> list = new ArrayList<>();
        float step = width / 200; // Уменьшение шага для более точной отрисовки
        float halfWidth = width / 2;
        float startX = x;
        float endX = x + width;

        // Параметры для непрерывного эффекта
        float waveOffset = (float) ((time / speedFactor) % (2 * Math.PI));

        // Параметры волны
        float baseAmplitude = amplitude * (0.5F + 0.5F * (float) Math.sin(waveOffset));
        float frequencyStep = frequency * step;

        for (float currentX = startX; currentX <= endX; currentX += step) {
            // Расчет смещения Y для плавного перехода
            float dynamicAmplitude = baseAmplitude * (0.5F + 0.5F * (float) Math.sin(waveOffset));
            float offsetY = (float) (Math.sin((currentX - startX) * frequencyStep + waveOffset) * dynamicAmplitude);

            list.add(new RectUtil.Vec2fColored(currentX, y + offsetY, color));
        }

        // Плавное соединение волны
        float endOffsetY = (float) (Math.sin((endX - startX) * frequencyStep + waveOffset) * baseAmplitude);
        list.add(new RectUtil.Vec2fColored(endX, y + endOffsetY, color));

        // Рисование линии
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);
    }



    public static void renderClientRect4(MatrixStack matrix, float x, float y, float width, float height, boolean expand, double expanded, int color, int alphaPC) {
        // Extract color components
        int red = (color >> 16) & 0xFF;
        int green = (color >> 8) & 0xFF;
        int blue = color & 0xFF;
        int alpha = alphaPC;

        int color1 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color2 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color3 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color4 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);

        boolean bloom = true;
        float round = Infinity.getInstance().round();
        float shadow = Infinity.getInstance().shadow();
        int zeroC1 = ColorUtils.multAlpha(color1, 0.F);
        int zeroC2 = ColorUtils.multAlpha(color2, 0.F);
        int zeroC3 = ColorUtils.multAlpha(color3, 0.F);
        int zeroC4 = ColorUtils.multAlpha(color4, 0.F);
        int halfC1 = ColorUtils.multAlpha(color1, .5F);
        int halfC2 = ColorUtils.multAlpha(color2, .5F);
        int halfC3 = ColorUtils.multAlpha(color3, .5F);
        int halfC4 = ColorUtils.multAlpha(color4, .5F);
        int overY1C = ColorUtils.overCol(color1, color2);
        int overY2C = ColorUtils.overCol(color4, color3);
        int overX1C = ColorUtils.overCol(color1, color4);
        int overX2C = ColorUtils.overCol(color2, color3);

        // Draw rounded rectangle with shadows
        RectUtil.drawRoundedRectShadowed(matrix, x, y, x + width, y + height, round, shadow, halfC1, halfC2, halfC3, halfC4, bloom, true, false, true);

        // Draw darkened version for effect
        float dark = 0.35F;
        RectUtil.drawRoundedRectShadowed(matrix, x, y, x + width, y + height, round, .5F, ColorUtils.multDark(color1, dark), ColorUtils.multDark(color2, dark), ColorUtils.multDark(color3, dark), ColorUtils.multDark(color4, dark), false, false, true, true);

        List<RectUtil.Vec2fColored> list = new ArrayList<>();
        if (expand) {
            list.add(new RectUtil.Vec2fColored(x + 2, y + (float) expanded, zeroC1));
            list.add(new RectUtil.Vec2fColored(x + width / 2F, y + (float) expanded, overY1C));
            list.add(new RectUtil.Vec2fColored(x + width - 2, y + (float) expanded, zeroC2));
            GL12.glLineWidth(2);
            RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);
            GL12.glPointSize(1);
        }

        // Draw edges
        float lineOff = 0;
        GL12.glLineWidth(2);

        // Top line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + round, y + lineOff, zeroC1));
        list.add(new RectUtil.Vec2fColored(x + width / 2F, y + lineOff, overY1C));
        list.add(new RectUtil.Vec2fColored(x + width - round, y + lineOff, zeroC2));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Bottom line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + round, y + height - lineOff, zeroC4));
        list.add(new RectUtil.Vec2fColored(x + width / 2F, y + height - lineOff, overY2C));
        list.add(new RectUtil.Vec2fColored(x + width - round, y + height - lineOff, zeroC3));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Left line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + round, zeroC1));
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + height / 2F, overX1C));
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + height - round, zeroC4));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Right line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + round, zeroC2));
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + height / 2F, overX2C));
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + height - round, zeroC3));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        GL12.glLineWidth(1);

        // Parameters for wave
        // Параметры для волны


    }

}

RectUtil:


RectUtil:
package net.optifine.render;

import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.experimental.UtilityClass;
import net.minecraft.client.renderer.entity.EntityRendererManager;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;

import net.minecraft.util.math.vector.Vector3d;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import xii.infinity.client.utils.render.ColorUtils;

import java.util.ArrayList;
import java.util.List;

import static org.lwjgl.opengl.GL11C.GL_LINE_STRIP;
import static xii.infinity.client.utils.client.IMinecraft.*;


@UtilityClass
@SuppressWarnings("unused")
public class RectUtil implements IRenderAccess {
    public final List<Vec2fColored> VERTEXES_COLORED = new ArrayList<>();
    public final List<Vec2f> VERTEXES = new ArrayList<>();
    int[] LEFT_UP = new int[]{-90, 0};
    int[] RIGHT_UP = new int[]{0, 90};
    int[] RIGHT_DOWN = new int[]{90, 180};
    int[] LEFT_DOWN = new int[]{180, 270};
    [USER=270918]@Getter[/USER]
    @AllArgsConstructor
    public class Vec2fColored {
        float x, y;
        int color;
    }
    public void setupRenderRect(boolean texture, boolean bloom) {
        if (texture) RenderSystem.enableTexture();
        else RenderSystem.disableTexture();
        RenderSystem.enableBlend();
        RenderSystem.disableAlphaTest();
        RenderSystem.defaultBlendFunc();
        RenderSystem.disableCull();
        RenderSystem.shadeModel(7425);

        RenderSystem.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, bloom ? GlStateManager.DestFactor.ONE_MINUS_CONSTANT_ALPHA : GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
        RenderSystem.disableAlphaTest();
        GL11.glHint(GL11.GL_POLYGON_SMOOTH_HINT, GL11.GL_NICEST);
        GL11.glEnable(GL11.GL_POINT_SMOOTH);
    }
    public void endRenderRect(boolean bloom) {
        RenderSystem.enableAlphaTest();
        if (bloom)
            RenderSystem.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);

        RenderSystem.shadeModel(7424);
        RenderSystem.enableCull();
        RenderSystem.enableAlphaTest();
        RenderSystem.enableTexture();

        RenderSystem.clearCurrentColor();
    }
    public Vec2fColored getOfVec3f(Vec2f vec2f, int color) {
        return new Vec2fColored(vec2f.getX(), vec2f.getY(), color);
    }
    public void drawVertexesList(MatrixStack matrix, List<Vec2fColored> vec2c, int begin, boolean texture, boolean bloom) {
        setupRenderRect(texture, bloom);
        buffer.begin(begin, texture ? DefaultVertexFormats.POSITION_TEX_COLOR : DefaultVertexFormats.POSITION_COLOR);
        int counter = 0;
        for (final Vec2fColored vec : vec2c) {
            float[] rgba = ColorUtils.getRGBAf(vec.getColor());
            buffer.pos(matrix.getLast().getMatrix(), vec.getX(), vec.getY(), 0);
            if (texture) buffer.tex(counter == 0 || counter == 3 ? 0 : 1, counter == 0 || counter == 1 ? 0 : 1);
            buffer.color(rgba[0], rgba[1], rgba[2], rgba[3]);
            buffer.endVertex();
            counter++;
        }
        tessellator.draw();
        endRenderRect(bloom);
    }    public void drawRect(MatrixStack matrix, float x, float y, float x2, float y2, int color1, int color2, int color3, int color4, boolean bloom, boolean texture) {
        VERTEXES_COLORED.clear();
        VERTEXES_COLORED.add(new Vec2fColored(x, y, color1));
        VERTEXES_COLORED.add(new Vec2fColored(x2, y, color2));
        VERTEXES_COLORED.add(new Vec2fColored(x2, y2, color3));
        VERTEXES_COLORED.add(new Vec2fColored(x, y2, color4));
        drawVertexesList(matrix, VERTEXES_COLORED, GL11.GL_POLYGON, texture, bloom);
    }
    public List<Vec2f> generateRadiusCircledVertexes(MatrixStack matrix, float x, float y, double radius1, double radius2, double startRadius, double endRadius, double step, boolean doublepart) {
        VERTEXES.clear();
        double radius = startRadius;
        while (radius <= endRadius) {
            if (radius > endRadius) radius = endRadius;
            float x1 = (float) (Math.sin(Math.toRadians(radius)) * radius1);
            float y1 = (float) (-Math.cos(Math.toRadians(radius)) * radius1);
            VERTEXES.add(new Vec2f(x + x1, y + y1));
            if (doublepart) {
                x1 = (float) (Math.sin(Math.toRadians(radius)) * radius2);
                y1 = (float) (-Math.cos(Math.toRadians(radius)) * radius2);
                VERTEXES.add(new Vec2f(x + x1, y + y1));
            }
            radius += step;
        }
        return VERTEXES;
    }
    public void drawDuadsSegment(MatrixStack matrix, float x, float y, double radius, double expand, int color, int color2, boolean bloom, int[] side) {
        VERTEXES_COLORED.clear();
        int index = 0;
        for (Vec2f vec2f : generateRadiusCircledVertexes(matrix, x, y, radius, radius + expand, side[0], side[1], 9, true)) {
            VERTEXES_COLORED.add(getOfVec3f(vec2f, index % 2 == 1 ? color2 : color));
            ++index;
        }
        drawVertexesList(matrix, VERTEXES_COLORED, GL12.GL_TRIANGLE_STRIP, false, bloom);
    }
    public void drawShadowSegment(MatrixStack matrix, float x, float y, double radius, int color, boolean sageColor, int[] side, boolean bloom) {
        int color2 = sageColor ? 0 : ColorUtils.replAlpha(color, 0);
        drawDuadsSegment(matrix, x, y, 0, radius, color, color2, bloom, side);
    }

    public void drawShadowSegment(MatrixStack matrix, float x, float y, double radiusRound, double radiusShadow, int color, boolean sageColor, int[] side, boolean bloom) {
        int color2 = sageColor ? 0 : ColorUtils.replAlpha(color, 0);
        drawDuadsSegment(matrix, x, y, radiusRound, radiusShadow, color, color2, bloom, side);
    }

    public void drawRoundSegment(MatrixStack matrix, float x, float y, double radius, int color, int[] side, boolean bloom) {
        drawDuadsSegment(matrix, x, y, 0, radius, color, color, bloom, side);
    }

    public void drawRoundSegment(MatrixStack matrix, float x, float y, double radius, int color, int[] side) {
        drawDuadsSegment(matrix, x, y, 0, radius, color, color, false, side);
    }

    public void drawShadowSegment(MatrixStack matrix, float x, float y, double radius, int color, boolean sageColor, int[] side) {
        drawShadowSegment(matrix, x, y, radius, color, sageColor, side, false);
    }

    public void drawShadowSegmentsExtract(MatrixStack matrix, float x, float y, float x2, float y2, double radiusStart, double radiusEnd, int color1, int color2, int color3, int color4, boolean sageColor, boolean bloom) {
        drawShadowSegment(matrix, x, y, radiusStart, radiusEnd, color1, sageColor, LEFT_UP, bloom);
        drawShadowSegment(matrix, x2, y, radiusStart, radiusEnd, color2, sageColor, RIGHT_UP, bloom);
        drawShadowSegment(matrix, x2, y2, radiusStart, radiusEnd, color3, sageColor, RIGHT_DOWN, bloom);
        drawShadowSegment(matrix, x, y2, radiusStart, radiusEnd, color4, sageColor, LEFT_DOWN, bloom);
    }
    public void drawLimitersSegments(MatrixStack matrix, float x, float y, float x2, float y2, float radius, float appendOffsets, int color1, int color2, int color3, int color4, boolean sageColor, boolean retainZero, boolean bloom) {
        int c5 = retainZero ? sageColor ? 0 : ColorUtils.replAlpha(color1, 0) : color1;
        int c6 = retainZero ? sageColor ? 0 : ColorUtils.replAlpha(color2, 0) : color2;
        int c7 = retainZero ? sageColor ? 0 : ColorUtils.replAlpha(color3, 0) : color3;
        int c8 = retainZero ? sageColor ? 0 : ColorUtils.replAlpha(color4, 0) : color4;
       
        drawRect(matrix, x + appendOffsets, y - radius, x2 - appendOffsets, y, c5, c6, color2, color1, bloom, false);
       
        drawRect(matrix, x + appendOffsets, y2, x2 - appendOffsets, y2 + radius, color4, color3, c7, c8, bloom, false);
       
        drawRect(matrix, x - radius, y + appendOffsets, x, y2 - appendOffsets, c5, color1, color4, c8, bloom, false);
       
        drawRect(matrix, x2, y + appendOffsets, x2 + radius, y2 - appendOffsets, color2, c6, c7, color3, bloom, false);
    }
    public void drawRoundSegments(MatrixStack matrix, float x, float y, float x2, float y2, double radius, int color1, int color2, int color3, int color4, boolean bloom) {
        drawRoundSegment(matrix, x, y, radius, color1, LEFT_UP, bloom);
        drawRoundSegment(matrix, x2, y, radius, color2, RIGHT_UP, bloom);
        drawRoundSegment(matrix, x2, y2, radius, color3, RIGHT_DOWN, bloom);
        drawRoundSegment(matrix, x, y2, radius, color4, LEFT_DOWN, bloom);
    }
    public void drawRoundedRectShadowed(MatrixStack matrix, float x, float y, float x2, float y2, float round, float shadowSize, int color1, int color2, int color3, int color4, boolean bloom, boolean sageColor, boolean rect, boolean shadow) {
        float roundMax = Math.max(x2 - x, y2 - y);
        round = Math.max(Math.min(round, roundMax), 0);
        shadowSize = Math.max(shadowSize, 0);

        x += round;
        y += round;
        x2 -= round;
        y2 -= round;
        if (rect) {
            drawRect(matrix, x, y, x2, y2, color1, color2, color3, color4, bloom, false);
            if (round != 0) {
                drawLimitersSegments(matrix, x, y, x2, y2, round, 0, color1, color2, color3, color4, false, false, bloom);
                drawRoundSegments(matrix, x, y, x2, y2, round, color1, color2, color3, color4, bloom);
            }
        }
        if (shadow && shadowSize > 0) {
            drawLimitersSegments(matrix, x - round, y - round, x2 + round, y2 + round, shadowSize, round, color1, color2, color3, color4, sageColor, true, bloom);
            drawShadowSegmentsExtract(matrix, x, y, x2, y2, round, shadowSize, color1, color2, color3, color4, sageColor, bloom);
        }
    }
    public void drawRect(MatrixStack matrix, float x, float y, float x2, float y2, int color, boolean bloom) {
        drawRect(matrix, x, y, x2, y2, color, color, color, color, bloom, false);
    }

    public void drawRect(MatrixStack matrix, float x, float y, float x2, float y2, int color) {
        drawRect(matrix, x, y, x2, y2, color, false);
    }

    public void setupOrientationMatrix(MatrixStack matrix, double x, double y, double z) {
        float partialTicks = mc.getRenderPartialTicks();
        EntityRendererManager rendererManager = mc.getRenderManager();
        final Vector3d renderPos = rendererManager.info.getProjectedView();
        boolean flag = mc.gameSettings.getPointOfView().func_243192_a() || mc.gameSettings.getPointOfView().func_243194_c().func_243193_b();
        matrix.translate(x - renderPos.x, y - renderPos.y, z - renderPos.z);
    }
    public void drawWavyLine(MatrixStack matrix, float x, float y, float width, float waveHeight, float frequency, float amplitude, int color, boolean bloom, float time) {
        VERTEXES_COLORED.clear();

        float step = width / 100;
        float halfWidth = width / 2;
        float startX = x;
        float endX = x + width;

        for (float currentX = startX; currentX <= endX; currentX += step) {
           
            float offsetY = (float) (Math.sin((currentX - halfWidth) * frequency + time) * amplitude);
            int currentColor = color;

            VERTEXES_COLORED.add(new Vec2fColored(currentX, y + offsetY, currentColor));
        }

       
        VERTEXES_COLORED.add(new Vec2fColored(endX, y, color));

        drawVertexesList(matrix, VERTEXES_COLORED, GL_LINE_STRIP, false, bloom);
    }

}

Vec2f:


Vec2f:
package net.optifine.render;

public class Vec2f {
    public float x;
    public float y;

    public float getX() {
        return this.x;
    }

    public float getY() {
        return this.y;
    }

    public Vec2f(float x, float y) {
        this.x = x;
        this.y = y;
    }
}
Ну ваще кайфар
 
Забаненный
Статус
Оффлайн
Регистрация
10 Май 2023
Сообщения
825
Реакции[?]
9
Поинты[?]
3K
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Первая моя визуальная работа, поэтому решил слить на лучший сайт.

Сливаю ClickGui и 2 худа с выбором через HUD, так же здесь показ армора автоматически переходит в вертикальное положение когда у края экрана по X.
Можно поставить шейдер (тень) в функции ClickGui, а так же выбрать режим "Белый" или "Клиентский". Так же имеется недоделанная панель с музыкой кому надо тот доделает. Темы открываются на пнг с карандашиком. Тх был взят с другого худа, но визуально переделан. Снизу еще сделаны типо волн (статические).

Возможно я еще, что то забыл добавить, так, что пишите в дс - baveko

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


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



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



HUD.java:
package xii.infinity.client.functions.impl.render;

import com.google.common.eventbus.Subscribe;
import xii.infinity.client.Infinity;
import xii.infinity.client.events.EventDisplay;
import xii.infinity.client.events.EventUpdate;
import xii.infinity.client.functions.api.Category;
import xii.infinity.client.functions.api.FunctionRegister;
import xii.infinity.client.functions.api.Module;
import xii.infinity.client.functions.settings.impl.BooleanSetting;
import xii.infinity.client.functions.settings.impl.ModeListSetting;
import xii.infinity.client.functions.settings.impl.ModeSetting;
import xii.infinity.client.ui.display.impl.*;
import xii.infinity.client.ui.styles.StyleManager;
import xii.infinity.client.utils.drag.Dragging;
import xii.infinity.client.utils.render.ColorUtils;
import lombok.AccessLevel;
import lombok.experimental.FieldDefaults;

@FieldDefaults(level = AccessLevel.PRIVATE)
@FunctionRegister(name = "HUD", type = Category.Render)
public class HUD extends Module {
    private static HUD instances;

    private final ModeSetting hudMode = new ModeSetting("HUD Mode", "HUD-1", "HUD-1","HUD-2");

    private final ModeListSetting elements = new ModeListSetting("Элементы",
            new BooleanSetting("Ватермарка", true),
            new BooleanSetting("Список модулей", true),
            new BooleanSetting("Координаты", true),
            new BooleanSetting("Эффекты", true),
            new BooleanSetting("Список модерации", true),
            new BooleanSetting("Активные бинды", true),
            new BooleanSetting("Активный таргет", true),
            new BooleanSetting("Броня", true),
            new BooleanSetting("Кулдавны", true),
            new BooleanSetting("Инвентарь", true),
            new BooleanSetting("Кей-Строкес", true)



            );

    final WatermarkRenderer4 watermarkRenderer;
    final ArrayListRenderer3 arrayListRenderer;
    final CoordsRenderer coordsRenderer;
    final PotionRenderer4 potionRenderer;
    final CoolDown cooldowns;

    final KeyBindRenderer4 keyBindRenderer;
    final TargetInfoRenderer4 targetInfoRenderer;
    final SeeInventoryRenderer3 inve;
    final KeyStrokes keys;


    final ArmorRenderer3 armorRenderer;
    final StaffListRenderer4 staffListRenderer;

    public static HUD getInstances() {
        return instances;
    }

    public static void setInstances(HUD instances) {
        HUD.instances = instances;
    }

    @Subscribe
    private void onUpdate(EventUpdate e) {
        if (mc.gameSettings.showDebugInfo) {
            return;
        }

        if (elements.getValueByName("Список модерации").get()) staffListRenderer.update(e);
        if (elements.getValueByName("Список модулей").get()) arrayListRenderer.update(e);
    }


    @Subscribe
    private void onDisplay(EventDisplay e) {
        if (mc.gameSettings.showDebugInfo || e.getType() != EventDisplay.Type.POST) {
            return;
        }

        if (elements.getValueByName("Координаты").get()) coordsRenderer.render(e);
        if (elements.getValueByName("Эффекты").get()) potionRenderer.render(e);
        if (elements.getValueByName("Ватермарка").get()) watermarkRenderer.render(e);
        if (elements.getValueByName("Список модулей").get()) arrayListRenderer.render(e);
        if (elements.getValueByName("Активные бинды").get()) keyBindRenderer.render(e);
        if (elements.getValueByName("Список модерации").get()) staffListRenderer.render(e);
        if (elements.getValueByName("Активный таргет").get()) targetInfoRenderer.render(e);
        if (elements.getValueByName("Кулдавны").get()) cooldowns.render(e);
        if (elements.getValueByName("Инвентарь").get()) inve.render(e);
        if (elements.getValueByName("Кей-Строкес").get()) keys.render(e);
        if (elements.getValueByName("Броня").get()) armorRenderer.render(e);





    }

    public HUD() {
        watermarkRenderer = new WatermarkRenderer4();
        arrayListRenderer = new ArrayListRenderer3();
        coordsRenderer = new CoordsRenderer();
        Dragging key = Infinity.getInstance().createDrag(this, "Key", 185, 100);
        Dragging inves = Infinity.getInstance().createDrag(this, "Inventory", 278, 100);
        Dragging cooldown = Infinity.getInstance().createDrag(this, "Cooldown", 350, 100);
        Dragging armor2 = Infinity.getInstance().createDrag(this, "Armor", 350, 5);
        Dragging potions = Infinity.getInstance().createDrag(this, "Potions", 278, 5);
        Dragging keyBinds = Infinity.getInstance().createDrag(this, "KeyBinds", 185, 5);
        Dragging dragging = Infinity.getInstance().createDrag(this, "TargetHUD", 74, 128);
        Dragging staffList = Infinity.getInstance().createDrag(this, "StaffList", 96, 5);
        armorRenderer = new ArmorRenderer3(armor2);

        potionRenderer = new PotionRenderer4(potions);
        cooldowns = new CoolDown(cooldown);
        keyBindRenderer = new KeyBindRenderer4(keyBinds);

        keys = new KeyStrokes(key);
        staffListRenderer = new StaffListRenderer4(staffList);
        targetInfoRenderer = new TargetInfoRenderer4(dragging);
        inve = new SeeInventoryRenderer3(inves);
        instances = this;

        addSettings( hudMode,elements );

    }

    public static int getColor(int index) {
        StyleManager styleManager = Infinity.getInstance().getStyleManager();
        return ColorUtils.gradient(styleManager.getCurrentStyle().getFirstColor().getRGB(), styleManager.getCurrentStyle().getSecondColor().getRGB(), index * 16, 10);
    }

    public static int getColor(int index, float mult) {
        StyleManager styleManager = Infinity.getInstance().getStyleManager();
        return ColorUtils.gradient(styleManager.getCurrentStyle().getFirstColor().getRGB(), styleManager.getCurrentStyle().getSecondColor().getRGB(), (int) (index * mult), 10);
    }

    public static int getColor(int firstColor, int secondColor, int index, float mult) {
        return ColorUtils.gradient(firstColor, secondColor, (int) (index * mult), 10);
    }
    public boolean isHud2() {
        return "HUD-2".equalsIgnoreCase(hudMode.get());
    }
}

RenderUtils:


RenderUtils:
package net.optifine.render;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import org.lwjgl.opengl.GL12;
import xii.infinity.client.Infinity;
import xii.infinity.client.utils.render.ColorUtils;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.BufferBuilder;
import net.minecraft.client.renderer.RenderTypeBuffers;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import org.lwjgl.opengl.GL11;

import java.util.ArrayList;
import java.util.List;

import static org.lwjgl.opengl.GL11.*;
import static org.lwjgl.opengl.GL11.GL_LINE_STRIP;

public class RenderUtils
{
    private static boolean flushRenderBuffers = true;
    private static Minecraft mc = Minecraft.getInstance();

    public static boolean setFlushRenderBuffers(boolean flushRenderBuffers)
    {
        boolean flag = RenderUtils.flushRenderBuffers;
        RenderUtils.flushRenderBuffers = flushRenderBuffers;
        return flag;
    }

    public static boolean isFlushRenderBuffers()
    {
        return flushRenderBuffers;
    }

    public static void flushRenderBuffers()
    {
        if (flushRenderBuffers)
        {
            RenderTypeBuffers rendertypebuffers = mc.getRenderTypeBuffers();
            rendertypebuffers.getBufferSource().flushRenderBuffers();
            rendertypebuffers.getCrumblingBufferSource().flushRenderBuffers();
        }
    }

    public static void drawBlockBox(BlockPos blockPos, int color) {
        drawBox(new AxisAlignedBB(blockPos).offset(-mc.getRenderManager().info.getProjectedView().x, -mc.getRenderManager().info.getProjectedView().y, -mc.getRenderManager().info.getProjectedView().z), color);
    }

    public static void drawBox(AxisAlignedBB bb, int color) {
        GL11.glPushMatrix();
        GL11.glDisable(GL11.GL_TEXTURE_2D);
        GL11.glDisable(GL_DEPTH_TEST);
        GL11.glEnable(GL_LINE_SMOOTH);
        GL11.glLineWidth(1);
        float[] rgb = ColorUtils.rgba(color);
        GlStateManager.color4f(rgb[0], rgb[1], rgb[2], rgb[3]);
        Tessellator tessellator = Tessellator.getInstance();
        BufferBuilder vertexbuffer = tessellator.getBuffer();
        vertexbuffer.begin(3, DefaultVertexFormats.POSITION);
        vertexbuffer.pos(bb.minX, bb.minY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.minY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.minY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.minY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.minY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        tessellator.draw();
        vertexbuffer.begin(3, DefaultVertexFormats.POSITION);
        vertexbuffer.pos(bb.minX, bb.maxY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.maxY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.maxY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.maxY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.maxY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        tessellator.draw();
        vertexbuffer.begin(1, DefaultVertexFormats.POSITION);
        vertexbuffer.pos(bb.minX, bb.minY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.maxY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.minY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.maxY, bb.minZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.minY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.maxX, bb.maxY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.minY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        vertexbuffer.pos(bb.minX, bb.maxY, bb.maxZ).color(rgb[0], rgb[1], rgb[2], rgb[3]).endVertex();
        tessellator.draw();
        GlStateManager.color4f(rgb[0], rgb[1], rgb[2], rgb[3]);
        GL11.glEnable(GL11.GL_TEXTURE_2D);
        GL11.glEnable(GL_DEPTH_TEST);
        GL11.glDisable(GL_LINE_SMOOTH);
        GL11.glPopMatrix();

    }
    public static void renderClientRect3(MatrixStack matrix, float x, float y, float width, float height, boolean expand, double expanded, int color, int i) {
        renderClientRect(matrix, x, y, width, height , expand, expanded, color, 128);
    }
    public static void renderClientRect2(MatrixStack matrix, float x, float y, float width, float height, boolean expand, double expanded, int color, int i) {
        renderClientRect4(matrix, x, y, width, height , expand, expanded, color, 128);
    }

    public static void renderClientRect(MatrixStack matrix, float x, float y, float width, float height, boolean expand, double expanded, int color, int alphaPC) {
        // Extract color components
        int red = (color >> 16) & 0xFF;
        int green = (color >> 8) & 0xFF;
        int blue = color & 0xFF;
        int alpha = alphaPC;

        int color1 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color2 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color3 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color4 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);

        boolean bloom = true;
        float round = Infinity.getInstance().round();
        float shadow = Infinity.getInstance().shadow();
        int zeroC1 = ColorUtils.multAlpha(color1, 0.F);
        int zeroC2 = ColorUtils.multAlpha(color2, 0.F);
        int zeroC3 = ColorUtils.multAlpha(color3, 0.F);
        int zeroC4 = ColorUtils.multAlpha(color4, 0.F);
        int halfC1 = ColorUtils.multAlpha(color1, .5F);
        int halfC2 = ColorUtils.multAlpha(color2, .5F);
        int halfC3 = ColorUtils.multAlpha(color3, .5F);
        int halfC4 = ColorUtils.multAlpha(color4, .5F);
        int overY1C = ColorUtils.overCol(color1, color2);
        int overY2C = ColorUtils.overCol(color4, color3);
        int overX1C = ColorUtils.overCol(color1, color4);
        int overX2C = ColorUtils.overCol(color2, color3);

        // Draw rounded rectangle with shadows
        RectUtil.drawRoundedRectShadowed(matrix, x, y, x + width, y + height, round, shadow, halfC1, halfC2, halfC3, halfC4, bloom, true, false, true);

        // Draw darkened version for effect
        float dark = 0.35F;
        RectUtil.drawRoundedRectShadowed(matrix, x, y, x + width, y + height, round, .5F, ColorUtils.multDark(color1, dark), ColorUtils.multDark(color2, dark), ColorUtils.multDark(color3, dark), ColorUtils.multDark(color4, dark), false, false, true, true);

        List<RectUtil.Vec2fColored> list = new ArrayList<>();
        if (expand) {
            list.add(new RectUtil.Vec2fColored(x + 2, y + (float) expanded, zeroC1));
            list.add(new RectUtil.Vec2fColored(x + width / 2F, y + (float) expanded, overY1C));
            list.add(new RectUtil.Vec2fColored(x + width - 2, y + (float) expanded, zeroC2));
            GL12.glLineWidth(2);
            RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);
            GL12.glPointSize(1);
        }

        // Draw edges
        float lineOff = 0;
        GL12.glLineWidth(2);

        // Top line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + round, y + lineOff, zeroC1));
        list.add(new RectUtil.Vec2fColored(x + width / 2F, y + lineOff, overY1C));
        list.add(new RectUtil.Vec2fColored(x + width - round, y + lineOff, zeroC2));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Bottom line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + round, y + height - lineOff, zeroC4));
        list.add(new RectUtil.Vec2fColored(x + width / 2F, y + height - lineOff, overY2C));
        list.add(new RectUtil.Vec2fColored(x + width - round, y + height - lineOff, zeroC3));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Left line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + round, zeroC1));
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + height / 2F, overX1C));
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + height - round, zeroC4));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Right line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + round, zeroC2));
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + height / 2F, overX2C));
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + height - round, zeroC3));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        GL12.glLineWidth(1);

        // Parameters for wave
        // Параметры для волны
        float waveHeight = 10.0F; // Высота волны
        float frequency = 0.1F;   // Частота волны
        float amplitude = 5.0F;   // Амплитуда волны
        float speedFactor = 300.0F; // Коэффициент замедления (чем больше, тем медленнее)

// Получить текущее время в миллисекундах
        float time = System.currentTimeMillis() % 10000; // Простой эффект на основе времени

// Нарисовать динамическую волнистую линию внизу прямоугольника
        drawDynamicWavyLine(matrix, x, y + height, width, waveHeight, frequency, amplitude, color, bloom, time, speedFactor);

    }


    // Метод для рисования динамической волны
    // Метод для рисования динамической волны
    private static void drawDynamicWavyLine(MatrixStack matrix, float x, float y, float width, float waveHeight, float frequency, float amplitude, int color, boolean bloom, float time, float speedFactor) {
        List<RectUtil.Vec2fColored> list = new ArrayList<>();
        float step = width / 200; // Уменьшение шага для более точной отрисовки
        float halfWidth = width / 2;
        float startX = x;
        float endX = x + width;

        // Параметры для непрерывного эффекта
        float waveOffset = (float) ((time / speedFactor) % (2 * Math.PI));

        // Параметры волны
        float baseAmplitude = amplitude * (0.5F + 0.5F * (float) Math.sin(waveOffset));
        float frequencyStep = frequency * step;

        for (float currentX = startX; currentX <= endX; currentX += step) {
            // Расчет смещения Y для плавного перехода
            float dynamicAmplitude = baseAmplitude * (0.5F + 0.5F * (float) Math.sin(waveOffset));
            float offsetY = (float) (Math.sin((currentX - startX) * frequencyStep + waveOffset) * dynamicAmplitude);

            list.add(new RectUtil.Vec2fColored(currentX, y + offsetY, color));
        }

        // Плавное соединение волны
        float endOffsetY = (float) (Math.sin((endX - startX) * frequencyStep + waveOffset) * baseAmplitude);
        list.add(new RectUtil.Vec2fColored(endX, y + endOffsetY, color));

        // Рисование линии
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);
    }



    public static void renderClientRect4(MatrixStack matrix, float x, float y, float width, float height, boolean expand, double expanded, int color, int alphaPC) {
        // Extract color components
        int red = (color >> 16) & 0xFF;
        int green = (color >> 8) & 0xFF;
        int blue = color & 0xFF;
        int alpha = alphaPC;

        int color1 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color2 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color3 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);
        int color4 = ColorUtils.setAlpha(ColorUtils.rgb(red, green, blue), alpha);

        boolean bloom = true;
        float round = Infinity.getInstance().round();
        float shadow = Infinity.getInstance().shadow();
        int zeroC1 = ColorUtils.multAlpha(color1, 0.F);
        int zeroC2 = ColorUtils.multAlpha(color2, 0.F);
        int zeroC3 = ColorUtils.multAlpha(color3, 0.F);
        int zeroC4 = ColorUtils.multAlpha(color4, 0.F);
        int halfC1 = ColorUtils.multAlpha(color1, .5F);
        int halfC2 = ColorUtils.multAlpha(color2, .5F);
        int halfC3 = ColorUtils.multAlpha(color3, .5F);
        int halfC4 = ColorUtils.multAlpha(color4, .5F);
        int overY1C = ColorUtils.overCol(color1, color2);
        int overY2C = ColorUtils.overCol(color4, color3);
        int overX1C = ColorUtils.overCol(color1, color4);
        int overX2C = ColorUtils.overCol(color2, color3);

        // Draw rounded rectangle with shadows
        RectUtil.drawRoundedRectShadowed(matrix, x, y, x + width, y + height, round, shadow, halfC1, halfC2, halfC3, halfC4, bloom, true, false, true);

        // Draw darkened version for effect
        float dark = 0.35F;
        RectUtil.drawRoundedRectShadowed(matrix, x, y, x + width, y + height, round, .5F, ColorUtils.multDark(color1, dark), ColorUtils.multDark(color2, dark), ColorUtils.multDark(color3, dark), ColorUtils.multDark(color4, dark), false, false, true, true);

        List<RectUtil.Vec2fColored> list = new ArrayList<>();
        if (expand) {
            list.add(new RectUtil.Vec2fColored(x + 2, y + (float) expanded, zeroC1));
            list.add(new RectUtil.Vec2fColored(x + width / 2F, y + (float) expanded, overY1C));
            list.add(new RectUtil.Vec2fColored(x + width - 2, y + (float) expanded, zeroC2));
            GL12.glLineWidth(2);
            RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);
            GL12.glPointSize(1);
        }

        // Draw edges
        float lineOff = 0;
        GL12.glLineWidth(2);

        // Top line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + round, y + lineOff, zeroC1));
        list.add(new RectUtil.Vec2fColored(x + width / 2F, y + lineOff, overY1C));
        list.add(new RectUtil.Vec2fColored(x + width - round, y + lineOff, zeroC2));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Bottom line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + round, y + height - lineOff, zeroC4));
        list.add(new RectUtil.Vec2fColored(x + width / 2F, y + height - lineOff, overY2C));
        list.add(new RectUtil.Vec2fColored(x + width - round, y + height - lineOff, zeroC3));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Left line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + round, zeroC1));
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + height / 2F, overX1C));
        list.add(new RectUtil.Vec2fColored(x + lineOff, y + height - round, zeroC4));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        // Right line
        list.clear();
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + round, zeroC2));
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + height / 2F, overX2C));
        list.add(new RectUtil.Vec2fColored(x + width - lineOff, y + height - round, zeroC3));
        RectUtil.drawVertexesList(matrix, list, GL_LINE_STRIP, false, bloom);

        GL12.glLineWidth(1);

        // Parameters for wave
        // Параметры для волны


    }

}

RectUtil:


RectUtil:
package net.optifine.render;

import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.experimental.UtilityClass;
import net.minecraft.client.renderer.entity.EntityRendererManager;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;

import net.minecraft.util.math.vector.Vector3d;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import xii.infinity.client.utils.render.ColorUtils;

import java.util.ArrayList;
import java.util.List;

import static org.lwjgl.opengl.GL11C.GL_LINE_STRIP;
import static xii.infinity.client.utils.client.IMinecraft.*;


@UtilityClass
@SuppressWarnings("unused")
public class RectUtil implements IRenderAccess {
    public final List<Vec2fColored> VERTEXES_COLORED = new ArrayList<>();
    public final List<Vec2f> VERTEXES = new ArrayList<>();
    int[] LEFT_UP = new int[]{-90, 0};
    int[] RIGHT_UP = new int[]{0, 90};
    int[] RIGHT_DOWN = new int[]{90, 180};
    int[] LEFT_DOWN = new int[]{180, 270};
    [USER=270918]@Getter[/USER]
    @AllArgsConstructor
    public class Vec2fColored {
        float x, y;
        int color;
    }
    public void setupRenderRect(boolean texture, boolean bloom) {
        if (texture) RenderSystem.enableTexture();
        else RenderSystem.disableTexture();
        RenderSystem.enableBlend();
        RenderSystem.disableAlphaTest();
        RenderSystem.defaultBlendFunc();
        RenderSystem.disableCull();
        RenderSystem.shadeModel(7425);

        RenderSystem.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, bloom ? GlStateManager.DestFactor.ONE_MINUS_CONSTANT_ALPHA : GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
        RenderSystem.disableAlphaTest();
        GL11.glHint(GL11.GL_POLYGON_SMOOTH_HINT, GL11.GL_NICEST);
        GL11.glEnable(GL11.GL_POINT_SMOOTH);
    }
    public void endRenderRect(boolean bloom) {
        RenderSystem.enableAlphaTest();
        if (bloom)
            RenderSystem.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);

        RenderSystem.shadeModel(7424);
        RenderSystem.enableCull();
        RenderSystem.enableAlphaTest();
        RenderSystem.enableTexture();

        RenderSystem.clearCurrentColor();
    }
    public Vec2fColored getOfVec3f(Vec2f vec2f, int color) {
        return new Vec2fColored(vec2f.getX(), vec2f.getY(), color);
    }
    public void drawVertexesList(MatrixStack matrix, List<Vec2fColored> vec2c, int begin, boolean texture, boolean bloom) {
        setupRenderRect(texture, bloom);
        buffer.begin(begin, texture ? DefaultVertexFormats.POSITION_TEX_COLOR : DefaultVertexFormats.POSITION_COLOR);
        int counter = 0;
        for (final Vec2fColored vec : vec2c) {
            float[] rgba = ColorUtils.getRGBAf(vec.getColor());
            buffer.pos(matrix.getLast().getMatrix(), vec.getX(), vec.getY(), 0);
            if (texture) buffer.tex(counter == 0 || counter == 3 ? 0 : 1, counter == 0 || counter == 1 ? 0 : 1);
            buffer.color(rgba[0], rgba[1], rgba[2], rgba[3]);
            buffer.endVertex();
            counter++;
        }
        tessellator.draw();
        endRenderRect(bloom);
    }    public void drawRect(MatrixStack matrix, float x, float y, float x2, float y2, int color1, int color2, int color3, int color4, boolean bloom, boolean texture) {
        VERTEXES_COLORED.clear();
        VERTEXES_COLORED.add(new Vec2fColored(x, y, color1));
        VERTEXES_COLORED.add(new Vec2fColored(x2, y, color2));
        VERTEXES_COLORED.add(new Vec2fColored(x2, y2, color3));
        VERTEXES_COLORED.add(new Vec2fColored(x, y2, color4));
        drawVertexesList(matrix, VERTEXES_COLORED, GL11.GL_POLYGON, texture, bloom);
    }
    public List<Vec2f> generateRadiusCircledVertexes(MatrixStack matrix, float x, float y, double radius1, double radius2, double startRadius, double endRadius, double step, boolean doublepart) {
        VERTEXES.clear();
        double radius = startRadius;
        while (radius <= endRadius) {
            if (radius > endRadius) radius = endRadius;
            float x1 = (float) (Math.sin(Math.toRadians(radius)) * radius1);
            float y1 = (float) (-Math.cos(Math.toRadians(radius)) * radius1);
            VERTEXES.add(new Vec2f(x + x1, y + y1));
            if (doublepart) {
                x1 = (float) (Math.sin(Math.toRadians(radius)) * radius2);
                y1 = (float) (-Math.cos(Math.toRadians(radius)) * radius2);
                VERTEXES.add(new Vec2f(x + x1, y + y1));
            }
            radius += step;
        }
        return VERTEXES;
    }
    public void drawDuadsSegment(MatrixStack matrix, float x, float y, double radius, double expand, int color, int color2, boolean bloom, int[] side) {
        VERTEXES_COLORED.clear();
        int index = 0;
        for (Vec2f vec2f : generateRadiusCircledVertexes(matrix, x, y, radius, radius + expand, side[0], side[1], 9, true)) {
            VERTEXES_COLORED.add(getOfVec3f(vec2f, index % 2 == 1 ? color2 : color));
            ++index;
        }
        drawVertexesList(matrix, VERTEXES_COLORED, GL12.GL_TRIANGLE_STRIP, false, bloom);
    }
    public void drawShadowSegment(MatrixStack matrix, float x, float y, double radius, int color, boolean sageColor, int[] side, boolean bloom) {
        int color2 = sageColor ? 0 : ColorUtils.replAlpha(color, 0);
        drawDuadsSegment(matrix, x, y, 0, radius, color, color2, bloom, side);
    }

    public void drawShadowSegment(MatrixStack matrix, float x, float y, double radiusRound, double radiusShadow, int color, boolean sageColor, int[] side, boolean bloom) {
        int color2 = sageColor ? 0 : ColorUtils.replAlpha(color, 0);
        drawDuadsSegment(matrix, x, y, radiusRound, radiusShadow, color, color2, bloom, side);
    }

    public void drawRoundSegment(MatrixStack matrix, float x, float y, double radius, int color, int[] side, boolean bloom) {
        drawDuadsSegment(matrix, x, y, 0, radius, color, color, bloom, side);
    }

    public void drawRoundSegment(MatrixStack matrix, float x, float y, double radius, int color, int[] side) {
        drawDuadsSegment(matrix, x, y, 0, radius, color, color, false, side);
    }

    public void drawShadowSegment(MatrixStack matrix, float x, float y, double radius, int color, boolean sageColor, int[] side) {
        drawShadowSegment(matrix, x, y, radius, color, sageColor, side, false);
    }

    public void drawShadowSegmentsExtract(MatrixStack matrix, float x, float y, float x2, float y2, double radiusStart, double radiusEnd, int color1, int color2, int color3, int color4, boolean sageColor, boolean bloom) {
        drawShadowSegment(matrix, x, y, radiusStart, radiusEnd, color1, sageColor, LEFT_UP, bloom);
        drawShadowSegment(matrix, x2, y, radiusStart, radiusEnd, color2, sageColor, RIGHT_UP, bloom);
        drawShadowSegment(matrix, x2, y2, radiusStart, radiusEnd, color3, sageColor, RIGHT_DOWN, bloom);
        drawShadowSegment(matrix, x, y2, radiusStart, radiusEnd, color4, sageColor, LEFT_DOWN, bloom);
    }
    public void drawLimitersSegments(MatrixStack matrix, float x, float y, float x2, float y2, float radius, float appendOffsets, int color1, int color2, int color3, int color4, boolean sageColor, boolean retainZero, boolean bloom) {
        int c5 = retainZero ? sageColor ? 0 : ColorUtils.replAlpha(color1, 0) : color1;
        int c6 = retainZero ? sageColor ? 0 : ColorUtils.replAlpha(color2, 0) : color2;
        int c7 = retainZero ? sageColor ? 0 : ColorUtils.replAlpha(color3, 0) : color3;
        int c8 = retainZero ? sageColor ? 0 : ColorUtils.replAlpha(color4, 0) : color4;
      
        drawRect(matrix, x + appendOffsets, y - radius, x2 - appendOffsets, y, c5, c6, color2, color1, bloom, false);
      
        drawRect(matrix, x + appendOffsets, y2, x2 - appendOffsets, y2 + radius, color4, color3, c7, c8, bloom, false);
      
        drawRect(matrix, x - radius, y + appendOffsets, x, y2 - appendOffsets, c5, color1, color4, c8, bloom, false);
      
        drawRect(matrix, x2, y + appendOffsets, x2 + radius, y2 - appendOffsets, color2, c6, c7, color3, bloom, false);
    }
    public void drawRoundSegments(MatrixStack matrix, float x, float y, float x2, float y2, double radius, int color1, int color2, int color3, int color4, boolean bloom) {
        drawRoundSegment(matrix, x, y, radius, color1, LEFT_UP, bloom);
        drawRoundSegment(matrix, x2, y, radius, color2, RIGHT_UP, bloom);
        drawRoundSegment(matrix, x2, y2, radius, color3, RIGHT_DOWN, bloom);
        drawRoundSegment(matrix, x, y2, radius, color4, LEFT_DOWN, bloom);
    }
    public void drawRoundedRectShadowed(MatrixStack matrix, float x, float y, float x2, float y2, float round, float shadowSize, int color1, int color2, int color3, int color4, boolean bloom, boolean sageColor, boolean rect, boolean shadow) {
        float roundMax = Math.max(x2 - x, y2 - y);
        round = Math.max(Math.min(round, roundMax), 0);
        shadowSize = Math.max(shadowSize, 0);

        x += round;
        y += round;
        x2 -= round;
        y2 -= round;
        if (rect) {
            drawRect(matrix, x, y, x2, y2, color1, color2, color3, color4, bloom, false);
            if (round != 0) {
                drawLimitersSegments(matrix, x, y, x2, y2, round, 0, color1, color2, color3, color4, false, false, bloom);
                drawRoundSegments(matrix, x, y, x2, y2, round, color1, color2, color3, color4, bloom);
            }
        }
        if (shadow && shadowSize > 0) {
            drawLimitersSegments(matrix, x - round, y - round, x2 + round, y2 + round, shadowSize, round, color1, color2, color3, color4, sageColor, true, bloom);
            drawShadowSegmentsExtract(matrix, x, y, x2, y2, round, shadowSize, color1, color2, color3, color4, sageColor, bloom);
        }
    }
    public void drawRect(MatrixStack matrix, float x, float y, float x2, float y2, int color, boolean bloom) {
        drawRect(matrix, x, y, x2, y2, color, color, color, color, bloom, false);
    }

    public void drawRect(MatrixStack matrix, float x, float y, float x2, float y2, int color) {
        drawRect(matrix, x, y, x2, y2, color, false);
    }

    public void setupOrientationMatrix(MatrixStack matrix, double x, double y, double z) {
        float partialTicks = mc.getRenderPartialTicks();
        EntityRendererManager rendererManager = mc.getRenderManager();
        final Vector3d renderPos = rendererManager.info.getProjectedView();
        boolean flag = mc.gameSettings.getPointOfView().func_243192_a() || mc.gameSettings.getPointOfView().func_243194_c().func_243193_b();
        matrix.translate(x - renderPos.x, y - renderPos.y, z - renderPos.z);
    }
    public void drawWavyLine(MatrixStack matrix, float x, float y, float width, float waveHeight, float frequency, float amplitude, int color, boolean bloom, float time) {
        VERTEXES_COLORED.clear();

        float step = width / 100;
        float halfWidth = width / 2;
        float startX = x;
        float endX = x + width;

        for (float currentX = startX; currentX <= endX; currentX += step) {
          
            float offsetY = (float) (Math.sin((currentX - halfWidth) * frequency + time) * amplitude);
            int currentColor = color;

            VERTEXES_COLORED.add(new Vec2fColored(currentX, y + offsetY, currentColor));
        }

      
        VERTEXES_COLORED.add(new Vec2fColored(endX, y, color));

        drawVertexesList(matrix, VERTEXES_COLORED, GL_LINE_STRIP, false, bloom);
    }

}

Vec2f:


Vec2f:
package net.optifine.render;

public class Vec2f {
    public float x;
    public float y;

    public float getX() {
        return this.x;
    }

    public float getY() {
        return this.y;
    }

    public Vec2f(float x, float y) {
        this.x = x;
        this.y = y;
    }
}
Theme Editor красивый
 
Забаненный
Статус
Оффлайн
Регистрация
6 Окт 2022
Сообщения
85
Реакции[?]
0
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Сверху Снизу