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

HvH Legend
Пользователь
Статус
Оффлайн
Регистрация
23 Окт 2022
Сообщения
395
Реакции[?]
97
Поинты[?]
27K
Первая моя визуальная работа, поэтому решил слить на лучший сайт.

Сливаю 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;
    }
}
Очень красиво, респект
 
Начинающий
Статус
Оффлайн
Регистрация
2 Фев 2024
Сообщения
151
Реакции[?]
0
Поинты[?]
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;
    }
}
бавеко ебать, не плохо получилось
 
Начинающий
Статус
Оффлайн
Регистрация
23 Авг 2024
Сообщения
16
Реакции[?]
0
Поинты[?]
0
Забыл еще класc 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());
    }
}
его регать во функциях
 
Начинающий
Статус
Оффлайн
Регистрация
3 Май 2024
Сообщения
181
Реакции[?]
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;
    }
}
дай картинки пж
 
Начинающий
Статус
Оффлайн
Регистрация
23 Авг 2024
Сообщения
16
Реакции[?]
0
Поинты[?]
0
дай картинки пж
Пожалуйста, авторизуйтесь для просмотра ссылки.

кто просил ColorUtils


ColorUtils:
package xii.infinity.client.utils.render;

import lombok.experimental.UtilityClass;
import net.minecraft.util.math.MathHelper;

import com.mojang.blaze3d.systems.RenderSystem;

import xii.infinity.client.functions.impl.render.HUD;
import xii.infinity.client.utils.math.MathUtil;

import java.awt.*;

import static xii.infinity.client.utils.render.ColorUtils.IntColor.*;

@UtilityClass
public class ColorUtils {

    public final int green = new Color(64, 255, 64).getRGB();
    public final int yellow = new Color(255, 255, 64).getRGB();
    public final int white = new Color(255, 255, 255).getRGB();

    public final int orange = new Color(255, 128, 32).getRGB();
    public final int red = new Color(255, 64, 64).getRGB();
    public static int blue = new Color(0, 255, 246).getRGB();
    public static int black = new Color(0, 0, 0).getRGB();

    public static int rgb(int r, int g, int b) {
        return 255 << 24 | r << 16 | g << 8 | b;
    }

    public static int rgba(int r, int g, int b, int a) {
        return a << 24 | r << 16 | g << 8 | b;
    }
    public int multAlpha(int c, float apc) {
        return getColor(red(c), green(c), blue(c), (float) alpha(c) * apc);
    }
     public int replAlpha(int c, int a) {
        return getColor(red(c), green(c), blue(c), a);
    }
    public int multDark(int c, float brpc) {
        return getColor((float) red(c) * brpc, (float) green(c) * brpc, (float) blue(c) * brpc, (float) alpha(c));
    }
    public static void setAlphaColor(final int color, final float alpha) {
        final float red = (float) (color >> 16 & 255) / 255.0F;
        final float green = (float) (color >> 8 & 255) / 255.0F;
        final float blue = (float) (color & 255) / 255.0F;
        RenderSystem.color4f(red, green, blue, alpha);
    }

    public static int getColor(int index) {
         return HUD.getColor(index);
    }
    public void drawPereliv(float x, float y, float width, float height, float radius, int color) {
        DisplayUtils.drawRoundedRect(x, y, height, width, 0.1f, ColorUtils.rgba(21, 21, 21, 255));
        DisplayUtils.drawShadow(x , y , width, height, 2,
                ColorUtils.setAlpha(ColorUtils.getColor(255), 100), 2444);
    }

    public static void setColor(int color) {
        setAlphaColor(color, (float) (color >> 24 & 255) / 255.0F);
    }

    public static int toColor(String hexColor) {
        int argb = Integer.parseInt(hexColor.substring(1), 16);
        return setAlpha(argb, 255);
    }
    public static int setAlpha(int color, int alpha) {
        return (color & 0x00ffffff) | (alpha << 24);
    }

    public static float[] rgba(final int color) {
        return new float[] {
                (color >> 16 & 0xFF) / 255f,
                (color >> 8 & 0xFF) / 255f,
                (color & 0xFF) / 255f,
                (color >> 24 & 0xFF) / 255f
        };
    }

    public static int red(int c) {
        return c >> 16 & 255;
    }

    public static int green(int c) {
        return c >> 8 & 255;
    }

    public static int blue(int c) {
        return c & 255;
    }

    public static int alpha(int c) {
        return c >> 24 & 255;
    }
    public int getColor(float r, float g, float b, float a) {
        return new Color((int) r, (int) g, (int) b, (int) a).getRGB();
    }


    public int overCol(int c1, int c2, float pc01) {
        return getColor((float) red(c1) * (1 - pc01) + (float) red(c2) * pc01, (float) green(c1) * (1 - pc01) + (float) green(c2) * pc01, (float) blue(c1) * (1 - pc01) + (float) blue(c2) * pc01, (float) alpha(c1) * (1 - pc01) + (float) alpha(c2) * pc01);
    }

    public int overCol(int c1, int c2) {
        return overCol(c1, c2, 0.5f);
    }

    public static float[] getRGBAf(int c) {
        return new float[]{(float)red(c) / 255.0F, (float)green(c) / 255.0F, (float)blue(c) / 255.0F, (float)alpha(c) / 255.0F};
    }

    public static class IntColor {

        public static float[] rgb(final int color) {
            return new float[]{
                    (color >> 16 & 0xFF) / 255f,
                    (color >> 8 & 0xFF) / 255f,
                    (color & 0xFF) / 255f,
                    (color >> 24 & 0xFF) / 255f
            };
        }

        public static int rgba(final int r,
                               final int g,
                               final int b,
                               final int a) {
            return a << 24 | r << 16 | g << 8 | b;
        }

        public static int rgb(int r, int g, int b) {
            return 255 << 24 | r << 16 | g << 8 | b;
        }


        public static int getRed(final int hex) {
            return hex >> 16 & 255;
        }

        public static int getGreen(final int hex) {
            return hex >> 8 & 255;
        }

        public static int getBlue(final int hex) {
            return hex & 255;
        }

        public static int getAlpha(final int hex) {
            return hex >> 24 & 255;
        }
    }
    public static int interpolateColor(int color1, int color2, float amount) {
        amount = Math.min(1, Math.max(0, amount));

        int red1 = getRed(color1);
        int green1 = getGreen(color1);
        int blue1 = getBlue(color1);
        int alpha1 = getAlpha(color1);

        int red2 = getRed(color2);
        int green2 = getGreen(color2);
        int blue2 = getBlue(color2);
        int alpha2 = getAlpha(color2);

        int interpolatedRed = interpolateInt(red1, red2, amount);
        int interpolatedGreen = interpolateInt(green1, green2, amount);
        int interpolatedBlue = interpolateInt(blue1, blue2, amount);
        int interpolatedAlpha = interpolateInt(alpha1, alpha2, amount);

        return (interpolatedAlpha << 24) | (interpolatedRed << 16) | (interpolatedGreen << 8) | interpolatedBlue;
    }
    public static int interpolateInt(int oldValue, int newValue, double interpolationValue) {
        return interpolateD(oldValue, newValue, (float) interpolationValue).intValue();
    } public static Double interpolateD(double oldValue, double newValue, double interpolationValue) {
        return (oldValue + (newValue - oldValue) * interpolationValue);
    }



    public static int gradient(int start, int end, int index, int speed) {
        int angle = (int) ((System.currentTimeMillis() / speed + index) % 360);
        angle = (angle > 180 ? 360 - angle : angle) + 180;
        int color = interpolate(start, end, MathHelper.clamp(angle / 180f - 1, 0, 1));
        float[] hs = rgba(color);
        float[] hsb = Color.RGBtoHSB((int) (hs[0] * 255), (int) (hs[1] * 255), (int) (hs[2] * 255), null);

        hsb[1] *= 1.5F;
        hsb[1] = Math.min(hsb[1], 1.0f);

        return Color.HSBtoRGB(hsb[0], hsb[1], hsb[2]);
    }
    public static int darkenColor(int color, float factor) {
        int r = (color >> 16) & 0xFF;
        int g = (color >> 8) & 0xFF;
        int b = color & 0xFF;

        r = Math.max((int) (r * (1 - factor)), 0);
        g = Math.max((int) (g * (1 - factor)), 0);
        b = Math.max((int) (b * (1 - factor)), 0);

        return (color & 0xFF000000) | (r << 16) | (g << 8) | b;
    }

    public static int interpolate(int start, int end, float value) {
        float[] startColor = rgba(start);
        float[] endColor = rgba(end);

        return rgba((int) MathUtil.interpolate(startColor[0] * 255, endColor[0] * 255, value),
                (int) MathUtil.interpolate(startColor[1] * 255, endColor[1] * 255, value),
                (int) MathUtil.interpolate(startColor[2] * 255, endColor[2] * 255, value),
                (int) MathUtil.interpolate(startColor[3] * 255, endColor[3] * 255, value));
    }


}
 
Начинающий
Статус
Оффлайн
Регистрация
10 Фев 2023
Сообщения
375
Реакции[?]
0
Поинты[?]
1K
Первая моя визуальная работа, поэтому решил слить на лучший сайт.

Сливаю 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)
хоть чет годное на експе, (пойду делать свой рич 1.16🤣)
 
Начинающий
Статус
Оффлайн
Регистрация
5 Май 2023
Сообщения
116
Реакции[?]
0
Поинты[?]
0
Бля у меня Module непонятный нету
Там надо ренеймить, если хочешь я могу тему залить, там те просто папку надо будет кинуть и все, а то многие так и не смогли запастить
 
Начинающий
Статус
Оффлайн
Регистрация
3 Июл 2024
Сообщения
10
Реакции[?]
0
Поинты[?]
0
Там надо ренеймить, если хочешь я могу тему залить, там те просто папку надо будет кинуть и все, а то многие так и не смогли запастить
о давай спасёшь меня кароче заного пасту делать
 
Начинающий
Статус
Оффлайн
Регистрация
27 Июн 2024
Сообщения
139
Реакции[?]
0
Поинты[?]
0
Первая моя визуальная работа, поэтому решил слить на лучший сайт.

Сливаю 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)
Можешь сделать гайд как это поставить?
 
Начинающий
Статус
Оффлайн
Регистрация
4 Июн 2024
Сообщения
43
Реакции[?]
0
Поинты[?]
0
Первая моя визуальная работа, поэтому решил слить на лучший сайт.

Сливаю 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)
прикольно
 
Read Only
Статус
Оффлайн
Регистрация
18 Мар 2023
Сообщения
52
Реакции[?]
0
Поинты[?]
0
Первая моя визуальная работа, поэтому решил слить на лучший сайт.

Сливаю 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)
у меня нету худа на экране просто как фиксануть??
 
Сверху Снизу