Исходник Фиговый Hud | Expensive 2.0

Начинающий
Статус
Оффлайн
Регистрация
17 Май 2023
Сообщения
221
Реакции[?]
2
Поинты[?]
1K
чисто делайте ctrl + c, ctrl + v
pasta:
package wtf.expensive.modules.impl.render;

import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.MainWindow;
import net.minecraft.client.gui.screen.ChatScreen;
import net.minecraft.util.math.vector.Vector4f;
import wtf.expensive.Initilization;
import wtf.expensive.events.Event;
import wtf.expensive.events.impl.render.EventRender;
import wtf.expensive.managment.Managment;
import wtf.expensive.modules.Function;
import wtf.expensive.modules.FunctionAnnotation;
import wtf.expensive.modules.Type;
import wtf.expensive.modules.settings.imp.BooleanOption;
import wtf.expensive.modules.settings.imp.MultiBoxSetting;
import wtf.expensive.modules.settings.imp.SliderSetting;
import wtf.expensive.ui.midnight.DarkWhite;
import wtf.expensive.util.ClientUtil;
import wtf.expensive.util.animations.Animation;
import wtf.expensive.util.animations.Direction;
import wtf.expensive.util.animations.impl.EaseBackIn;
import wtf.expensive.util.drag.Dragging;
import wtf.expensive.util.font.Fonts;
import wtf.expensive.util.font.styled.StyledFont;
import wtf.expensive.util.render.ColorUtil;
import wtf.expensive.util.render.GaussianBlur;
import wtf.expensive.util.render.RenderUtil;
import wtf.expensive.util.render.StencilUtil;
import wtf.expensive.util.render.animation.AnimationMath;

import java.text.SimpleDateFormat;
import java.util.*;

@FunctionAnnotation(name = "на югейм", type = Type.Render)
public class HudSelfcode extends Function {

    public final MultiBoxSetting elementi = new MultiBoxSetting("Elements",
            new BooleanOption("Watermark", true),
            new BooleanOption("KeyBinds", true),
            new BooleanOption("Position", true)
    );

    private final SliderSetting radiusglow = new SliderSetting("Радиус Теней", 5, 1, 15, 1);

    public HudSelfcode() {
        addSettings(elementi, radiusglow);
    }
    //

    int[] colors = new int[360];
    final float cWidth = 4;
    MainWindow window;

    //шрифты
    final StyledFont medium = Fonts.msMedium[16];
    final StyledFont small = Fonts.msMedium[14];
    // _______________________________________________________________________________________________________________

    // ТУТ ЕСЛИ ЧЕ ДРАГИ
    final Dragging waterMarka = Initilization.createDrag(this, "Watermarka", 5, 5);
    final Dragging keyBinds = Initilization.createDrag(this, "KeyBinds", 10, 100);
    final Dragging positiOn = Initilization.createDrag(this, "Position", 5, 505);
    // _______________________________________________________________________________________________________________

    // А ТУТ ЕСЛИ ЧЕ АНИМАЦИЙ ЕЗКА НЕСЧАСТНАЯ
    Animation cordsAnimation = new EaseBackIn(400, 1, 1.5f);
    Animation cordsAnimationOutline = new EaseBackIn(400, 1, 1.5f);
    Animation waterAnimation = new EaseBackIn(400, 1, 1.5f);
    Animation waterAnimationOutline = new EaseBackIn(400, 1, 1.5f);
    // _______________________________________________________________________________________________________________

    @Override
    public void onEvent(Event event) {
        if (mc.player == null || mc.world == null) return;
        if (event instanceof EventRender e && e.isRender2D()) {
            for (int i = 0; i < colors.length; i++) {
                colors[i] = Managment.STYLE_MANAGER.getCurrentStyle().getColor(i);
            }

            window = e.scaledResolution;

            final int radiusglow = this.radiusglow.getValue().intValue();
            final MatrixStack matrixStack = e.matrixStack;


            //рендер
            if (elementi.get(0)) renderWatermark(matrixStack, radiusglow);
            if (elementi.get(1)) renderKeyBinds(matrixStack, radiusglow); // если че отрисовку типа КЕЙБИНДЫ ДРАГ было лень делать
            if (elementi.get(2)) renderCoordinates(matrixStack, radiusglow);
            // _______________________________________________________________________________________________________________

        }
    }

    // ватермарка

    private double scale1 = 0.0D;
    private double scale2 = 0.0D;
    private void renderWatermark(MatrixStack matrixStack, int radiusglow) {

        float x = waterMarka.getX();
        float y = waterMarka.getY();

        Date time = new Date();
        SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm:ss");

        int width = 30;
        int height = 20;

        StyledFont font = Fonts.msRegular[23];


        GlStateManager.pushMatrix();
        AnimationMath.sizeAnimation(x + (100 / 2), y + (38 / 2), scale1);
        RenderUtil.Render2D.drawShadow(x,y,width + font.getWidth("Ultimate") - 20,height,radiusglow, DarkWhite.backColor);
        font.drawString(matrixStack, "Ultimate", x + 5, y + 5, DarkWhite.textColor);

        RenderUtil.Render2D.drawShadow(x + font.getWidth("Ultimate") + 15,y,width + font.getWidth("FPS: " + mc.debugFPS) - 20,height, radiusglow, DarkWhite.backColor);
        font.drawString(matrixStack, "FPS: " + mc.debugFPS, x + 5 + font.getWidth("Ultimate") + 15, y + 5, DarkWhite.textColor);

        RenderUtil.Render2D.drawShadow(x + font.getWidth("Ultimate") + 30 + font.getWidth("FPS: " + mc.debugFPS),y,width + font.getWidth(dateFormat.format(time.getTime())) - 20,height,radiusglow, DarkWhite.backColor);
        font.drawString(matrixStack, dateFormat.format(time.getTime()), x + 5 + font.getWidth("Ultimate") + 30 + font.getWidth("FPS: " + mc.debugFPS), y + 5, DarkWhite.textColor);
        GlStateManager.popMatrix();

        GlStateManager.pushMatrix();
        AnimationMath.sizeAnimation(x + (100 / 2), y + (38 / 2), scale2);

        GaussianBlur.startBlur();
        RenderUtil.Render2D.drawShadow(x,y,width + font.getWidth("Ultimate" + "FPS: " + mc.debugFPS + dateFormat.format(time.getTime())) + 5,height,radiusglow, ColorUtil.rgba(0,0,0,255));
        GaussianBlur.endBlur(5, 1);


        StencilUtil.initStencilToWrite();
        RenderUtil.Render2D.drawRoundedCorner(x, y, width + font.getWidth("Ultimate" + "FPS: " + mc.debugFPS + dateFormat.format(time.getTime())) + 5, height, new Vector4f(15, 0, 0, 0), -1);
        StencilUtil.readStencilBuffer(0);
        RenderUtil.Render2D.drawShadow(x, y, width + font.getWidth("Ultimate" + "FPS: " + mc.debugFPS + dateFormat.format(time.getTime())) + 5, height, 0, ColorUtil.getColorStyle(0), ColorUtil.getColorStyle(90), ColorUtil.getColorStyle(180), ColorUtil.getColorStyle(270));
        RenderUtil.Render2D.drawGradientRound(x - 0.25F, y - 0.25f, width + font.getWidth("Ultimate" + "FPS: " + mc.debugFPS + dateFormat.format(time.getTime())) + 5 + 0.5f, height + 0.5f, 0, ColorUtil.getColorStyle(0), ColorUtil.getColorStyle(90), ColorUtil.getColorStyle(180), ColorUtil.getColorStyle(270));
        StencilUtil.uninitStencilBuffer();
        font.drawString(matrixStack, "WATERMARKA DRAG", x + 15, y + 5, DarkWhite.textColor);
        GlStateManager.popMatrix();


        waterMarka.setWidth(width + font.getWidth("Ultimate" + "FPS: " + mc.debugFPS + dateFormat.format(time.getTime())) + 5);
        waterMarka.setHeight(height);

        if (mc.currentScreen instanceof ChatScreen) {
            waterAnimation.setDirection(Direction.BACKWARDS);
            waterAnimationOutline.setDirection(Direction.FORWARDS);
        } else {
            waterAnimation.setDirection(Direction.FORWARDS);
            waterAnimationOutline.setDirection(Direction.BACKWARDS);
        }
    }

    // Кейбинды
    float kbHeight = 0;
    float kbWidth = 100;

    float kbWidthAnimation = 0, kbHeightAnimation = 0;

    private void renderKeyBinds(MatrixStack matrixStack, int radiusglow) {
        float posX = keyBinds.getX();
        float posY = keyBinds.getY();

        this.scale1 = cordsAnimation.getOutput();
        this.scale2 = cordsAnimationOutline.getOutput();


        int width = 100;
        int height = 15;

        RenderUtil.Render2D.drawShadow(posX,posY + 2,width,height,radiusglow, DarkWhite.backColor);

        medium.drawString(matrixStack, "Key Binds", posX + cWidth + 4 + 21, posY + 6 + 2, DarkWhite.textColor);

        RenderUtil.SmartScissor.push();
        RenderUtil.SmartScissor.setFromComponentCoordinates(posX, posY, kbWidthAnimation, kbHeightAnimation);
        int i = 0;
        for (Function f : Managment.FUNCTION_MANAGER.getFunctions()) {
            if (!f.state || f.bind == 0) continue;

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

            if (text.length() > 4) {
                text = text.substring(0,4) + "..";
            }
            String bindText = "[" + text.toUpperCase() + "]";
            float bindWidth = small.getWidth(bindText);
            String name = f.name;
            if (name.length() > 13) {
                name = name.substring(0,13) + "..";
            }

            RenderUtil.Render2D.drawShadow(posX + 1,posY + 19 + (i * 13),width - 2,height - 5,radiusglow, DarkWhite.backColor);

            kbWidth = Math.max(small.getWidth(bindText + f.bind + 5), 100);

            small.drawString(matrixStack, name, posX + cWidth, posY + 22 + (i * 13), DarkWhite.textColor);

            small.drawString(matrixStack, bindText, posX + cWidth + kbWidthAnimation - bindWidth - 8, posY + 22 + (i * 13), DarkWhite.textColor);

            i++;
        }
        RenderUtil.SmartScissor.unset();
        RenderUtil.SmartScissor.pop();

        kbHeight = 22 + (i * 13);
        this.kbHeightAnimation = AnimationMath.fast(this.kbHeightAnimation, kbHeight, 10);
        this.kbWidthAnimation = AnimationMath.fast(this.kbWidthAnimation, kbWidth, 10);

        keyBinds.setWidth(kbWidth);
        keyBinds.setHeight(kbHeight);
    }

    //координаты

    private void renderCoordinates(MatrixStack matrixStack, int radiusglow) {

        float x = positiOn.getX();
        float y = positiOn.getY();
        int width = 30;
        int height = 20;

        String pos = "Position: " + (int) mc.player.getPosX() + ", " + (int) mc.player.getPosY() + ", " + (int) mc.player.getPosZ();

        StyledFont font = Fonts.msRegular[23];

        GlStateManager.pushMatrix();
        AnimationMath.sizeAnimation(x + (100 / 2), y + (38 / 2), scale1);

        RenderUtil.Render2D.drawShadow(x,y,font.getWidth(pos) + 10,height,radiusglow, DarkWhite.backColor);
        font.drawString(matrixStack,pos, x + 5, y + 5, DarkWhite.textColor);

        GlStateManager.popMatrix();

        GlStateManager.pushMatrix();
        AnimationMath.sizeAnimation(x + (100 / 2), y + (38 / 2), scale2);

        GaussianBlur.startBlur();
        RenderUtil.Render2D.drawShadow(x,y,font.getWidth(pos) + 10,height,radiusglow, ColorUtil.rgba(0,0,0,255));
        GaussianBlur.endBlur(5, 1);


        StencilUtil.initStencilToWrite();
        RenderUtil.Render2D.drawRoundedCorner(x, y, font.getWidth(pos) + 10, height, new Vector4f(15, 0, 0, 0), -1);
        StencilUtil.readStencilBuffer(0);
        RenderUtil.Render2D.drawShadow(x, y, font.getWidth(pos) + 10, height, 0, ColorUtil.getColorStyle(0), ColorUtil.getColorStyle(90), ColorUtil.getColorStyle(180), ColorUtil.getColorStyle(270));
        RenderUtil.Render2D.drawGradientRound(x - 0.25F, y - 0.25f, font.getWidth(pos) + 0.5f + 10, height + 0.5f, 0, ColorUtil.getColorStyle(0), ColorUtil.getColorStyle(90), ColorUtil.getColorStyle(180), ColorUtil.getColorStyle(270));
        StencilUtil.uninitStencilBuffer();
        font.drawString(matrixStack, "POSITION DRAG", x + 15, y + 5, DarkWhite.textColor);
        GlStateManager.popMatrix();

        positiOn.setWidth(width + font.getWidth(pos));
        positiOn.setHeight(height);

        if (mc.currentScreen instanceof ChatScreen) {
            cordsAnimation.setDirection(Direction.BACKWARDS);
            cordsAnimationOutline.setDirection(Direction.FORWARDS);
        } else {
            cordsAnimation.setDirection(Direction.FORWARDS);
            cordsAnimationOutline.setDirection(Direction.BACKWARDS);
        }

    }
}

ss: 1709924469189.png1709924478254.png
 
Забаненный
Статус
Оффлайн
Регистрация
17 Фев 2024
Сообщения
21
Реакции[?]
0
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
щит код
 
Начинающий
Статус
Оффлайн
Регистрация
20 Дек 2023
Сообщения
126
Реакции[?]
0
Поинты[?]
0
чисто делайте ctrl + c, ctrl + v
pasta:
package wtf.expensive.modules.impl.render;

import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.MainWindow;
import net.minecraft.client.gui.screen.ChatScreen;
import net.minecraft.util.math.vector.Vector4f;
import wtf.expensive.Initilization;
import wtf.expensive.events.Event;
import wtf.expensive.events.impl.render.EventRender;
import wtf.expensive.managment.Managment;
import wtf.expensive.modules.Function;
import wtf.expensive.modules.FunctionAnnotation;
import wtf.expensive.modules.Type;
import wtf.expensive.modules.settings.imp.BooleanOption;
import wtf.expensive.modules.settings.imp.MultiBoxSetting;
import wtf.expensive.modules.settings.imp.SliderSetting;
import wtf.expensive.ui.midnight.DarkWhite;
import wtf.expensive.util.ClientUtil;
import wtf.expensive.util.animations.Animation;
import wtf.expensive.util.animations.Direction;
import wtf.expensive.util.animations.impl.EaseBackIn;
import wtf.expensive.util.drag.Dragging;
import wtf.expensive.util.font.Fonts;
import wtf.expensive.util.font.styled.StyledFont;
import wtf.expensive.util.render.ColorUtil;
import wtf.expensive.util.render.GaussianBlur;
import wtf.expensive.util.render.RenderUtil;
import wtf.expensive.util.render.StencilUtil;
import wtf.expensive.util.render.animation.AnimationMath;

import java.text.SimpleDateFormat;
import java.util.*;

@FunctionAnnotation(name = "на югейм", type = Type.Render)
public class HudSelfcode extends Function {

    public final MultiBoxSetting elementi = new MultiBoxSetting("Elements",
            new BooleanOption("Watermark", true),
            new BooleanOption("KeyBinds", true),
            new BooleanOption("Position", true)
    );

    private final SliderSetting radiusglow = new SliderSetting("Радиус Теней", 5, 1, 15, 1);

    public HudSelfcode() {
        addSettings(elementi, radiusglow);
    }
    //

    int[] colors = new int[360];
    final float cWidth = 4;
    MainWindow window;

    //шрифты
    final StyledFont medium = Fonts.msMedium[16];
    final StyledFont small = Fonts.msMedium[14];
    // _______________________________________________________________________________________________________________

    // ТУТ ЕСЛИ ЧЕ ДРАГИ
    final Dragging waterMarka = Initilization.createDrag(this, "Watermarka", 5, 5);
    final Dragging keyBinds = Initilization.createDrag(this, "KeyBinds", 10, 100);
    final Dragging positiOn = Initilization.createDrag(this, "Position", 5, 505);
    // _______________________________________________________________________________________________________________

    // А ТУТ ЕСЛИ ЧЕ АНИМАЦИЙ ЕЗКА НЕСЧАСТНАЯ
    Animation cordsAnimation = new EaseBackIn(400, 1, 1.5f);
    Animation cordsAnimationOutline = new EaseBackIn(400, 1, 1.5f);
    Animation waterAnimation = new EaseBackIn(400, 1, 1.5f);
    Animation waterAnimationOutline = new EaseBackIn(400, 1, 1.5f);
    // _______________________________________________________________________________________________________________

    @Override
    public void onEvent(Event event) {
        if (mc.player == null || mc.world == null) return;
        if (event instanceof EventRender e && e.isRender2D()) {
            for (int i = 0; i < colors.length; i++) {
                colors[i] = Managment.STYLE_MANAGER.getCurrentStyle().getColor(i);
            }

            window = e.scaledResolution;

            final int radiusglow = this.radiusglow.getValue().intValue();
            final MatrixStack matrixStack = e.matrixStack;


            //рендер
            if (elementi.get(0)) renderWatermark(matrixStack, radiusglow);
            if (elementi.get(1)) renderKeyBinds(matrixStack, radiusglow); // если че отрисовку типа КЕЙБИНДЫ ДРАГ было лень делать
            if (elementi.get(2)) renderCoordinates(matrixStack, radiusglow);
            // _______________________________________________________________________________________________________________

        }
    }

    // ватермарка

    private double scale1 = 0.0D;
    private double scale2 = 0.0D;
    private void renderWatermark(MatrixStack matrixStack, int radiusglow) {

        float x = waterMarka.getX();
        float y = waterMarka.getY();

        Date time = new Date();
        SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm:ss");

        int width = 30;
        int height = 20;

        StyledFont font = Fonts.msRegular[23];


        GlStateManager.pushMatrix();
        AnimationMath.sizeAnimation(x + (100 / 2), y + (38 / 2), scale1);
        RenderUtil.Render2D.drawShadow(x,y,width + font.getWidth("Ultimate") - 20,height,radiusglow, DarkWhite.backColor);
        font.drawString(matrixStack, "Ultimate", x + 5, y + 5, DarkWhite.textColor);

        RenderUtil.Render2D.drawShadow(x + font.getWidth("Ultimate") + 15,y,width + font.getWidth("FPS: " + mc.debugFPS) - 20,height, radiusglow, DarkWhite.backColor);
        font.drawString(matrixStack, "FPS: " + mc.debugFPS, x + 5 + font.getWidth("Ultimate") + 15, y + 5, DarkWhite.textColor);

        RenderUtil.Render2D.drawShadow(x + font.getWidth("Ultimate") + 30 + font.getWidth("FPS: " + mc.debugFPS),y,width + font.getWidth(dateFormat.format(time.getTime())) - 20,height,radiusglow, DarkWhite.backColor);
        font.drawString(matrixStack, dateFormat.format(time.getTime()), x + 5 + font.getWidth("Ultimate") + 30 + font.getWidth("FPS: " + mc.debugFPS), y + 5, DarkWhite.textColor);
        GlStateManager.popMatrix();

        GlStateManager.pushMatrix();
        AnimationMath.sizeAnimation(x + (100 / 2), y + (38 / 2), scale2);

        GaussianBlur.startBlur();
        RenderUtil.Render2D.drawShadow(x,y,width + font.getWidth("Ultimate" + "FPS: " + mc.debugFPS + dateFormat.format(time.getTime())) + 5,height,radiusglow, ColorUtil.rgba(0,0,0,255));
        GaussianBlur.endBlur(5, 1);


        StencilUtil.initStencilToWrite();
        RenderUtil.Render2D.drawRoundedCorner(x, y, width + font.getWidth("Ultimate" + "FPS: " + mc.debugFPS + dateFormat.format(time.getTime())) + 5, height, new Vector4f(15, 0, 0, 0), -1);
        StencilUtil.readStencilBuffer(0);
        RenderUtil.Render2D.drawShadow(x, y, width + font.getWidth("Ultimate" + "FPS: " + mc.debugFPS + dateFormat.format(time.getTime())) + 5, height, 0, ColorUtil.getColorStyle(0), ColorUtil.getColorStyle(90), ColorUtil.getColorStyle(180), ColorUtil.getColorStyle(270));
        RenderUtil.Render2D.drawGradientRound(x - 0.25F, y - 0.25f, width + font.getWidth("Ultimate" + "FPS: " + mc.debugFPS + dateFormat.format(time.getTime())) + 5 + 0.5f, height + 0.5f, 0, ColorUtil.getColorStyle(0), ColorUtil.getColorStyle(90), ColorUtil.getColorStyle(180), ColorUtil.getColorStyle(270));
        StencilUtil.uninitStencilBuffer();
        font.drawString(matrixStack, "WATERMARKA DRAG", x + 15, y + 5, DarkWhite.textColor);
        GlStateManager.popMatrix();


        waterMarka.setWidth(width + font.getWidth("Ultimate" + "FPS: " + mc.debugFPS + dateFormat.format(time.getTime())) + 5);
        waterMarka.setHeight(height);

        if (mc.currentScreen instanceof ChatScreen) {
            waterAnimation.setDirection(Direction.BACKWARDS);
            waterAnimationOutline.setDirection(Direction.FORWARDS);
        } else {
            waterAnimation.setDirection(Direction.FORWARDS);
            waterAnimationOutline.setDirection(Direction.BACKWARDS);
        }
    }

    // Кейбинды
    float kbHeight = 0;
    float kbWidth = 100;

    float kbWidthAnimation = 0, kbHeightAnimation = 0;

    private void renderKeyBinds(MatrixStack matrixStack, int radiusglow) {
        float posX = keyBinds.getX();
        float posY = keyBinds.getY();

        this.scale1 = cordsAnimation.getOutput();
        this.scale2 = cordsAnimationOutline.getOutput();


        int width = 100;
        int height = 15;

        RenderUtil.Render2D.drawShadow(posX,posY + 2,width,height,radiusglow, DarkWhite.backColor);

        medium.drawString(matrixStack, "Key Binds", posX + cWidth + 4 + 21, posY + 6 + 2, DarkWhite.textColor);

        RenderUtil.SmartScissor.push();
        RenderUtil.SmartScissor.setFromComponentCoordinates(posX, posY, kbWidthAnimation, kbHeightAnimation);
        int i = 0;
        for (Function f : Managment.FUNCTION_MANAGER.getFunctions()) {
            if (!f.state || f.bind == 0) continue;

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

            if (text.length() > 4) {
                text = text.substring(0,4) + "..";
            }
            String bindText = "[" + text.toUpperCase() + "]";
            float bindWidth = small.getWidth(bindText);
            String name = f.name;
            if (name.length() > 13) {
                name = name.substring(0,13) + "..";
            }

            RenderUtil.Render2D.drawShadow(posX + 1,posY + 19 + (i * 13),width - 2,height - 5,radiusglow, DarkWhite.backColor);

            kbWidth = Math.max(small.getWidth(bindText + f.bind + 5), 100);

            small.drawString(matrixStack, name, posX + cWidth, posY + 22 + (i * 13), DarkWhite.textColor);

            small.drawString(matrixStack, bindText, posX + cWidth + kbWidthAnimation - bindWidth - 8, posY + 22 + (i * 13), DarkWhite.textColor);

            i++;
        }
        RenderUtil.SmartScissor.unset();
        RenderUtil.SmartScissor.pop();

        kbHeight = 22 + (i * 13);
        this.kbHeightAnimation = AnimationMath.fast(this.kbHeightAnimation, kbHeight, 10);
        this.kbWidthAnimation = AnimationMath.fast(this.kbWidthAnimation, kbWidth, 10);

        keyBinds.setWidth(kbWidth);
        keyBinds.setHeight(kbHeight);
    }

    //координаты

    private void renderCoordinates(MatrixStack matrixStack, int radiusglow) {

        float x = positiOn.getX();
        float y = positiOn.getY();
        int width = 30;
        int height = 20;

        String pos = "Position: " + (int) mc.player.getPosX() + ", " + (int) mc.player.getPosY() + ", " + (int) mc.player.getPosZ();

        StyledFont font = Fonts.msRegular[23];

        GlStateManager.pushMatrix();
        AnimationMath.sizeAnimation(x + (100 / 2), y + (38 / 2), scale1);

        RenderUtil.Render2D.drawShadow(x,y,font.getWidth(pos) + 10,height,radiusglow, DarkWhite.backColor);
        font.drawString(matrixStack,pos, x + 5, y + 5, DarkWhite.textColor);

        GlStateManager.popMatrix();

        GlStateManager.pushMatrix();
        AnimationMath.sizeAnimation(x + (100 / 2), y + (38 / 2), scale2);

        GaussianBlur.startBlur();
        RenderUtil.Render2D.drawShadow(x,y,font.getWidth(pos) + 10,height,radiusglow, ColorUtil.rgba(0,0,0,255));
        GaussianBlur.endBlur(5, 1);


        StencilUtil.initStencilToWrite();
        RenderUtil.Render2D.drawRoundedCorner(x, y, font.getWidth(pos) + 10, height, new Vector4f(15, 0, 0, 0), -1);
        StencilUtil.readStencilBuffer(0);
        RenderUtil.Render2D.drawShadow(x, y, font.getWidth(pos) + 10, height, 0, ColorUtil.getColorStyle(0), ColorUtil.getColorStyle(90), ColorUtil.getColorStyle(180), ColorUtil.getColorStyle(270));
        RenderUtil.Render2D.drawGradientRound(x - 0.25F, y - 0.25f, font.getWidth(pos) + 0.5f + 10, height + 0.5f, 0, ColorUtil.getColorStyle(0), ColorUtil.getColorStyle(90), ColorUtil.getColorStyle(180), ColorUtil.getColorStyle(270));
        StencilUtil.uninitStencilBuffer();
        font.drawString(matrixStack, "POSITION DRAG", x + 15, y + 5, DarkWhite.textColor);
        GlStateManager.popMatrix();

        positiOn.setWidth(width + font.getWidth(pos));
        positiOn.setHeight(height);

        if (mc.currentScreen instanceof ChatScreen) {
            cordsAnimation.setDirection(Direction.BACKWARDS);
            cordsAnimationOutline.setDirection(Direction.FORWARDS);
        } else {
            cordsAnimation.setDirection(Direction.FORWARDS);
            cordsAnimationOutline.setDirection(Direction.BACKWARDS);
        }

    }
}

ss: Посмотреть вложение 272169Посмотреть вложение 272170
рил фиговый
 
ППХУДЕР
Начинающий
Статус
Оффлайн
Регистрация
10 Фев 2020
Сообщения
390
Реакции[?]
23
Поинты[?]
6K
чисто делайте ctrl + c, ctrl + v
pasta:
package wtf.expensive.modules.impl.render;

import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.MainWindow;
import net.minecraft.client.gui.screen.ChatScreen;
import net.minecraft.util.math.vector.Vector4f;
import wtf.expensive.Initilization;
import wtf.expensive.events.Event;
import wtf.expensive.events.impl.render.EventRender;
import wtf.expensive.managment.Managment;
import wtf.expensive.modules.Function;
import wtf.expensive.modules.FunctionAnnotation;
import wtf.expensive.modules.Type;
import wtf.expensive.modules.settings.imp.BooleanOption;
import wtf.expensive.modules.settings.imp.MultiBoxSetting;
import wtf.expensive.modules.settings.imp.SliderSetting;
import wtf.expensive.ui.midnight.DarkWhite;
import wtf.expensive.util.ClientUtil;
import wtf.expensive.util.animations.Animation;
import wtf.expensive.util.animations.Direction;
import wtf.expensive.util.animations.impl.EaseBackIn;
import wtf.expensive.util.drag.Dragging;
import wtf.expensive.util.font.Fonts;
import wtf.expensive.util.font.styled.StyledFont;
import wtf.expensive.util.render.ColorUtil;
import wtf.expensive.util.render.GaussianBlur;
import wtf.expensive.util.render.RenderUtil;
import wtf.expensive.util.render.StencilUtil;
import wtf.expensive.util.render.animation.AnimationMath;

import java.text.SimpleDateFormat;
import java.util.*;

@FunctionAnnotation(name = "на югейм", type = Type.Render)
public class HudSelfcode extends Function {

    public final MultiBoxSetting elementi = new MultiBoxSetting("Elements",
            new BooleanOption("Watermark", true),
            new BooleanOption("KeyBinds", true),
            new BooleanOption("Position", true)
    );

    private final SliderSetting radiusglow = new SliderSetting("Радиус Теней", 5, 1, 15, 1);

    public HudSelfcode() {
        addSettings(elementi, radiusglow);
    }
    //

    int[] colors = new int[360];
    final float cWidth = 4;
    MainWindow window;

    //шрифты
    final StyledFont medium = Fonts.msMedium[16];
    final StyledFont small = Fonts.msMedium[14];
    // _______________________________________________________________________________________________________________

    // ТУТ ЕСЛИ ЧЕ ДРАГИ
    final Dragging waterMarka = Initilization.createDrag(this, "Watermarka", 5, 5);
    final Dragging keyBinds = Initilization.createDrag(this, "KeyBinds", 10, 100);
    final Dragging positiOn = Initilization.createDrag(this, "Position", 5, 505);
    // _______________________________________________________________________________________________________________

    // А ТУТ ЕСЛИ ЧЕ АНИМАЦИЙ ЕЗКА НЕСЧАСТНАЯ
    Animation cordsAnimation = new EaseBackIn(400, 1, 1.5f);
    Animation cordsAnimationOutline = new EaseBackIn(400, 1, 1.5f);
    Animation waterAnimation = new EaseBackIn(400, 1, 1.5f);
    Animation waterAnimationOutline = new EaseBackIn(400, 1, 1.5f);
    // _______________________________________________________________________________________________________________

    @Override
    public void onEvent(Event event) {
        if (mc.player == null || mc.world == null) return;
        if (event instanceof EventRender e && e.isRender2D()) {
            for (int i = 0; i < colors.length; i++) {
                colors[i] = Managment.STYLE_MANAGER.getCurrentStyle().getColor(i);
            }

            window = e.scaledResolution;

            final int radiusglow = this.radiusglow.getValue().intValue();
            final MatrixStack matrixStack = e.matrixStack;


            //рендер
            if (elementi.get(0)) renderWatermark(matrixStack, radiusglow);
            if (elementi.get(1)) renderKeyBinds(matrixStack, radiusglow); // если че отрисовку типа КЕЙБИНДЫ ДРАГ было лень делать
            if (elementi.get(2)) renderCoordinates(matrixStack, radiusglow);
            // _______________________________________________________________________________________________________________

        }
    }

    // ватермарка

    private double scale1 = 0.0D;
    private double scale2 = 0.0D;
    private void renderWatermark(MatrixStack matrixStack, int radiusglow) {

        float x = waterMarka.getX();
        float y = waterMarka.getY();

        Date time = new Date();
        SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm:ss");

        int width = 30;
        int height = 20;

        StyledFont font = Fonts.msRegular[23];


        GlStateManager.pushMatrix();
        AnimationMath.sizeAnimation(x + (100 / 2), y + (38 / 2), scale1);
        RenderUtil.Render2D.drawShadow(x,y,width + font.getWidth("Ultimate") - 20,height,radiusglow, DarkWhite.backColor);
        font.drawString(matrixStack, "Ultimate", x + 5, y + 5, DarkWhite.textColor);

        RenderUtil.Render2D.drawShadow(x + font.getWidth("Ultimate") + 15,y,width + font.getWidth("FPS: " + mc.debugFPS) - 20,height, radiusglow, DarkWhite.backColor);
        font.drawString(matrixStack, "FPS: " + mc.debugFPS, x + 5 + font.getWidth("Ultimate") + 15, y + 5, DarkWhite.textColor);

        RenderUtil.Render2D.drawShadow(x + font.getWidth("Ultimate") + 30 + font.getWidth("FPS: " + mc.debugFPS),y,width + font.getWidth(dateFormat.format(time.getTime())) - 20,height,radiusglow, DarkWhite.backColor);
        font.drawString(matrixStack, dateFormat.format(time.getTime()), x + 5 + font.getWidth("Ultimate") + 30 + font.getWidth("FPS: " + mc.debugFPS), y + 5, DarkWhite.textColor);
        GlStateManager.popMatrix();

        GlStateManager.pushMatrix();
        AnimationMath.sizeAnimation(x + (100 / 2), y + (38 / 2), scale2);

        GaussianBlur.startBlur();
        RenderUtil.Render2D.drawShadow(x,y,width + font.getWidth("Ultimate" + "FPS: " + mc.debugFPS + dateFormat.format(time.getTime())) + 5,height,radiusglow, ColorUtil.rgba(0,0,0,255));
        GaussianBlur.endBlur(5, 1);


        StencilUtil.initStencilToWrite();
        RenderUtil.Render2D.drawRoundedCorner(x, y, width + font.getWidth("Ultimate" + "FPS: " + mc.debugFPS + dateFormat.format(time.getTime())) + 5, height, new Vector4f(15, 0, 0, 0), -1);
        StencilUtil.readStencilBuffer(0);
        RenderUtil.Render2D.drawShadow(x, y, width + font.getWidth("Ultimate" + "FPS: " + mc.debugFPS + dateFormat.format(time.getTime())) + 5, height, 0, ColorUtil.getColorStyle(0), ColorUtil.getColorStyle(90), ColorUtil.getColorStyle(180), ColorUtil.getColorStyle(270));
        RenderUtil.Render2D.drawGradientRound(x - 0.25F, y - 0.25f, width + font.getWidth("Ultimate" + "FPS: " + mc.debugFPS + dateFormat.format(time.getTime())) + 5 + 0.5f, height + 0.5f, 0, ColorUtil.getColorStyle(0), ColorUtil.getColorStyle(90), ColorUtil.getColorStyle(180), ColorUtil.getColorStyle(270));
        StencilUtil.uninitStencilBuffer();
        font.drawString(matrixStack, "WATERMARKA DRAG", x + 15, y + 5, DarkWhite.textColor);
        GlStateManager.popMatrix();


        waterMarka.setWidth(width + font.getWidth("Ultimate" + "FPS: " + mc.debugFPS + dateFormat.format(time.getTime())) + 5);
        waterMarka.setHeight(height);

        if (mc.currentScreen instanceof ChatScreen) {
            waterAnimation.setDirection(Direction.BACKWARDS);
            waterAnimationOutline.setDirection(Direction.FORWARDS);
        } else {
            waterAnimation.setDirection(Direction.FORWARDS);
            waterAnimationOutline.setDirection(Direction.BACKWARDS);
        }
    }

    // Кейбинды
    float kbHeight = 0;
    float kbWidth = 100;

    float kbWidthAnimation = 0, kbHeightAnimation = 0;

    private void renderKeyBinds(MatrixStack matrixStack, int radiusglow) {
        float posX = keyBinds.getX();
        float posY = keyBinds.getY();

        this.scale1 = cordsAnimation.getOutput();
        this.scale2 = cordsAnimationOutline.getOutput();


        int width = 100;
        int height = 15;

        RenderUtil.Render2D.drawShadow(posX,posY + 2,width,height,radiusglow, DarkWhite.backColor);

        medium.drawString(matrixStack, "Key Binds", posX + cWidth + 4 + 21, posY + 6 + 2, DarkWhite.textColor);

        RenderUtil.SmartScissor.push();
        RenderUtil.SmartScissor.setFromComponentCoordinates(posX, posY, kbWidthAnimation, kbHeightAnimation);
        int i = 0;
        for (Function f : Managment.FUNCTION_MANAGER.getFunctions()) {
            if (!f.state || f.bind == 0) continue;

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

            if (text.length() > 4) {
                text = text.substring(0,4) + "..";
            }
            String bindText = "[" + text.toUpperCase() + "]";
            float bindWidth = small.getWidth(bindText);
            String name = f.name;
            if (name.length() > 13) {
                name = name.substring(0,13) + "..";
            }

            RenderUtil.Render2D.drawShadow(posX + 1,posY + 19 + (i * 13),width - 2,height - 5,radiusglow, DarkWhite.backColor);

            kbWidth = Math.max(small.getWidth(bindText + f.bind + 5), 100);

            small.drawString(matrixStack, name, posX + cWidth, posY + 22 + (i * 13), DarkWhite.textColor);

            small.drawString(matrixStack, bindText, posX + cWidth + kbWidthAnimation - bindWidth - 8, posY + 22 + (i * 13), DarkWhite.textColor);

            i++;
        }
        RenderUtil.SmartScissor.unset();
        RenderUtil.SmartScissor.pop();

        kbHeight = 22 + (i * 13);
        this.kbHeightAnimation = AnimationMath.fast(this.kbHeightAnimation, kbHeight, 10);
        this.kbWidthAnimation = AnimationMath.fast(this.kbWidthAnimation, kbWidth, 10);

        keyBinds.setWidth(kbWidth);
        keyBinds.setHeight(kbHeight);
    }

    //координаты

    private void renderCoordinates(MatrixStack matrixStack, int radiusglow) {

        float x = positiOn.getX();
        float y = positiOn.getY();
        int width = 30;
        int height = 20;

        String pos = "Position: " + (int) mc.player.getPosX() + ", " + (int) mc.player.getPosY() + ", " + (int) mc.player.getPosZ();

        StyledFont font = Fonts.msRegular[23];

        GlStateManager.pushMatrix();
        AnimationMath.sizeAnimation(x + (100 / 2), y + (38 / 2), scale1);

        RenderUtil.Render2D.drawShadow(x,y,font.getWidth(pos) + 10,height,radiusglow, DarkWhite.backColor);
        font.drawString(matrixStack,pos, x + 5, y + 5, DarkWhite.textColor);

        GlStateManager.popMatrix();

        GlStateManager.pushMatrix();
        AnimationMath.sizeAnimation(x + (100 / 2), y + (38 / 2), scale2);

        GaussianBlur.startBlur();
        RenderUtil.Render2D.drawShadow(x,y,font.getWidth(pos) + 10,height,radiusglow, ColorUtil.rgba(0,0,0,255));
        GaussianBlur.endBlur(5, 1);


        StencilUtil.initStencilToWrite();
        RenderUtil.Render2D.drawRoundedCorner(x, y, font.getWidth(pos) + 10, height, new Vector4f(15, 0, 0, 0), -1);
        StencilUtil.readStencilBuffer(0);
        RenderUtil.Render2D.drawShadow(x, y, font.getWidth(pos) + 10, height, 0, ColorUtil.getColorStyle(0), ColorUtil.getColorStyle(90), ColorUtil.getColorStyle(180), ColorUtil.getColorStyle(270));
        RenderUtil.Render2D.drawGradientRound(x - 0.25F, y - 0.25f, font.getWidth(pos) + 0.5f + 10, height + 0.5f, 0, ColorUtil.getColorStyle(0), ColorUtil.getColorStyle(90), ColorUtil.getColorStyle(180), ColorUtil.getColorStyle(270));
        StencilUtil.uninitStencilBuffer();
        font.drawString(matrixStack, "POSITION DRAG", x + 15, y + 5, DarkWhite.textColor);
        GlStateManager.popMatrix();

        positiOn.setWidth(width + font.getWidth(pos));
        positiOn.setHeight(height);

        if (mc.currentScreen instanceof ChatScreen) {
            cordsAnimation.setDirection(Direction.BACKWARDS);
            cordsAnimationOutline.setDirection(Direction.FORWARDS);
        } else {
            cordsAnimation.setDirection(Direction.FORWARDS);
            cordsAnimationOutline.setDirection(Direction.BACKWARDS);
        }

    }
}

ss: Посмотреть вложение 272169Посмотреть вложение 272170
а зачем ты это сюда выкладываешь если это1709996976094.png
 
Начинающий
Статус
Оффлайн
Регистрация
26 Фев 2024
Сообщения
353
Реакции[?]
0
Поинты[?]
0
чисто делайте ctrl + c, ctrl + v
pasta:
package wtf.expensive.modules.impl.render;

import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.MainWindow;
import net.minecraft.client.gui.screen.ChatScreen;
import net.minecraft.util.math.vector.Vector4f;
import wtf.expensive.Initilization;
import wtf.expensive.events.Event;
import wtf.expensive.events.impl.render.EventRender;
import wtf.expensive.managment.Managment;
import wtf.expensive.modules.Function;
import wtf.expensive.modules.FunctionAnnotation;
import wtf.expensive.modules.Type;
import wtf.expensive.modules.settings.imp.BooleanOption;
import wtf.expensive.modules.settings.imp.MultiBoxSetting;
import wtf.expensive.modules.settings.imp.SliderSetting;
import wtf.expensive.ui.midnight.DarkWhite;
import wtf.expensive.util.ClientUtil;
import wtf.expensive.util.animations.Animation;
import wtf.expensive.util.animations.Direction;
import wtf.expensive.util.animations.impl.EaseBackIn;
import wtf.expensive.util.drag.Dragging;
import wtf.expensive.util.font.Fonts;
import wtf.expensive.util.font.styled.StyledFont;
import wtf.expensive.util.render.ColorUtil;
import wtf.expensive.util.render.GaussianBlur;
import wtf.expensive.util.render.RenderUtil;
import wtf.expensive.util.render.StencilUtil;
import wtf.expensive.util.render.animation.AnimationMath;

import java.text.SimpleDateFormat;
import java.util.*;

@FunctionAnnotation(name = "на югейм", type = Type.Render)
public class HudSelfcode extends Function {

    public final MultiBoxSetting elementi = new MultiBoxSetting("Elements",
            new BooleanOption("Watermark", true),
            new BooleanOption("KeyBinds", true),
            new BooleanOption("Position", true)
    );

    private final SliderSetting radiusglow = new SliderSetting("Радиус Теней", 5, 1, 15, 1);

    public HudSelfcode() {
        addSettings(elementi, radiusglow);
    }
    //

    int[] colors = new int[360];
    final float cWidth = 4;
    MainWindow window;

    //шрифты
    final StyledFont medium = Fonts.msMedium[16];
    final StyledFont small = Fonts.msMedium[14];
    // _______________________________________________________________________________________________________________

    // ТУТ ЕСЛИ ЧЕ ДРАГИ
    final Dragging waterMarka = Initilization.createDrag(this, "Watermarka", 5, 5);
    final Dragging keyBinds = Initilization.createDrag(this, "KeyBinds", 10, 100);
    final Dragging positiOn = Initilization.createDrag(this, "Position", 5, 505);
    // _______________________________________________________________________________________________________________

    // А ТУТ ЕСЛИ ЧЕ АНИМАЦИЙ ЕЗКА НЕСЧАСТНАЯ
    Animation cordsAnimation = new EaseBackIn(400, 1, 1.5f);
    Animation cordsAnimationOutline = new EaseBackIn(400, 1, 1.5f);
    Animation waterAnimation = new EaseBackIn(400, 1, 1.5f);
    Animation waterAnimationOutline = new EaseBackIn(400, 1, 1.5f);
    // _______________________________________________________________________________________________________________

    @Override
    public void onEvent(Event event) {
        if (mc.player == null || mc.world == null) return;
        if (event instanceof EventRender e && e.isRender2D()) {
            for (int i = 0; i < colors.length; i++) {
                colors[i] = Managment.STYLE_MANAGER.getCurrentStyle().getColor(i);
            }

            window = e.scaledResolution;

            final int radiusglow = this.radiusglow.getValue().intValue();
            final MatrixStack matrixStack = e.matrixStack;


            //рендер
            if (elementi.get(0)) renderWatermark(matrixStack, radiusglow);
            if (elementi.get(1)) renderKeyBinds(matrixStack, radiusglow); // если че отрисовку типа КЕЙБИНДЫ ДРАГ было лень делать
            if (elementi.get(2)) renderCoordinates(matrixStack, radiusglow);
            // _______________________________________________________________________________________________________________

        }
    }

    // ватермарка

    private double scale1 = 0.0D;
    private double scale2 = 0.0D;
    private void renderWatermark(MatrixStack matrixStack, int radiusglow) {

        float x = waterMarka.getX();
        float y = waterMarka.getY();

        Date time = new Date();
        SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm:ss");

        int width = 30;
        int height = 20;

        StyledFont font = Fonts.msRegular[23];


        GlStateManager.pushMatrix();
        AnimationMath.sizeAnimation(x + (100 / 2), y + (38 / 2), scale1);
        RenderUtil.Render2D.drawShadow(x,y,width + font.getWidth("Ultimate") - 20,height,radiusglow, DarkWhite.backColor);
        font.drawString(matrixStack, "Ultimate", x + 5, y + 5, DarkWhite.textColor);

        RenderUtil.Render2D.drawShadow(x + font.getWidth("Ultimate") + 15,y,width + font.getWidth("FPS: " + mc.debugFPS) - 20,height, radiusglow, DarkWhite.backColor);
        font.drawString(matrixStack, "FPS: " + mc.debugFPS, x + 5 + font.getWidth("Ultimate") + 15, y + 5, DarkWhite.textColor);

        RenderUtil.Render2D.drawShadow(x + font.getWidth("Ultimate") + 30 + font.getWidth("FPS: " + mc.debugFPS),y,width + font.getWidth(dateFormat.format(time.getTime())) - 20,height,radiusglow, DarkWhite.backColor);
        font.drawString(matrixStack, dateFormat.format(time.getTime()), x + 5 + font.getWidth("Ultimate") + 30 + font.getWidth("FPS: " + mc.debugFPS), y + 5, DarkWhite.textColor);
        GlStateManager.popMatrix();

        GlStateManager.pushMatrix();
        AnimationMath.sizeAnimation(x + (100 / 2), y + (38 / 2), scale2);

        GaussianBlur.startBlur();
        RenderUtil.Render2D.drawShadow(x,y,width + font.getWidth("Ultimate" + "FPS: " + mc.debugFPS + dateFormat.format(time.getTime())) + 5,height,radiusglow, ColorUtil.rgba(0,0,0,255));
        GaussianBlur.endBlur(5, 1);


        StencilUtil.initStencilToWrite();
        RenderUtil.Render2D.drawRoundedCorner(x, y, width + font.getWidth("Ultimate" + "FPS: " + mc.debugFPS + dateFormat.format(time.getTime())) + 5, height, new Vector4f(15, 0, 0, 0), -1);
        StencilUtil.readStencilBuffer(0);
        RenderUtil.Render2D.drawShadow(x, y, width + font.getWidth("Ultimate" + "FPS: " + mc.debugFPS + dateFormat.format(time.getTime())) + 5, height, 0, ColorUtil.getColorStyle(0), ColorUtil.getColorStyle(90), ColorUtil.getColorStyle(180), ColorUtil.getColorStyle(270));
        RenderUtil.Render2D.drawGradientRound(x - 0.25F, y - 0.25f, width + font.getWidth("Ultimate" + "FPS: " + mc.debugFPS + dateFormat.format(time.getTime())) + 5 + 0.5f, height + 0.5f, 0, ColorUtil.getColorStyle(0), ColorUtil.getColorStyle(90), ColorUtil.getColorStyle(180), ColorUtil.getColorStyle(270));
        StencilUtil.uninitStencilBuffer();
        font.drawString(matrixStack, "WATERMARKA DRAG", x + 15, y + 5, DarkWhite.textColor);
        GlStateManager.popMatrix();


        waterMarka.setWidth(width + font.getWidth("Ultimate" + "FPS: " + mc.debugFPS + dateFormat.format(time.getTime())) + 5);
        waterMarka.setHeight(height);

        if (mc.currentScreen instanceof ChatScreen) {
            waterAnimation.setDirection(Direction.BACKWARDS);
            waterAnimationOutline.setDirection(Direction.FORWARDS);
        } else {
            waterAnimation.setDirection(Direction.FORWARDS);
            waterAnimationOutline.setDirection(Direction.BACKWARDS);
        }
    }

    // Кейбинды
    float kbHeight = 0;
    float kbWidth = 100;

    float kbWidthAnimation = 0, kbHeightAnimation = 0;

    private void renderKeyBinds(MatrixStack matrixStack, int radiusglow) {
        float posX = keyBinds.getX();
        float posY = keyBinds.getY();

        this.scale1 = cordsAnimation.getOutput();
        this.scale2 = cordsAnimationOutline.getOutput();


        int width = 100;
        int height = 15;

        RenderUtil.Render2D.drawShadow(posX,posY + 2,width,height,radiusglow, DarkWhite.backColor);

        medium.drawString(matrixStack, "Key Binds", posX + cWidth + 4 + 21, posY + 6 + 2, DarkWhite.textColor);

        RenderUtil.SmartScissor.push();
        RenderUtil.SmartScissor.setFromComponentCoordinates(posX, posY, kbWidthAnimation, kbHeightAnimation);
        int i = 0;
        for (Function f : Managment.FUNCTION_MANAGER.getFunctions()) {
            if (!f.state || f.bind == 0) continue;

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

            if (text.length() > 4) {
                text = text.substring(0,4) + "..";
            }
            String bindText = "[" + text.toUpperCase() + "]";
            float bindWidth = small.getWidth(bindText);
            String name = f.name;
            if (name.length() > 13) {
                name = name.substring(0,13) + "..";
            }

            RenderUtil.Render2D.drawShadow(posX + 1,posY + 19 + (i * 13),width - 2,height - 5,radiusglow, DarkWhite.backColor);

            kbWidth = Math.max(small.getWidth(bindText + f.bind + 5), 100);

            small.drawString(matrixStack, name, posX + cWidth, posY + 22 + (i * 13), DarkWhite.textColor);

            small.drawString(matrixStack, bindText, posX + cWidth + kbWidthAnimation - bindWidth - 8, posY + 22 + (i * 13), DarkWhite.textColor);

            i++;
        }
        RenderUtil.SmartScissor.unset();
        RenderUtil.SmartScissor.pop();

        kbHeight = 22 + (i * 13);
        this.kbHeightAnimation = AnimationMath.fast(this.kbHeightAnimation, kbHeight, 10);
        this.kbWidthAnimation = AnimationMath.fast(this.kbWidthAnimation, kbWidth, 10);

        keyBinds.setWidth(kbWidth);
        keyBinds.setHeight(kbHeight);
    }

    //координаты

    private void renderCoordinates(MatrixStack matrixStack, int radiusglow) {

        float x = positiOn.getX();
        float y = positiOn.getY();
        int width = 30;
        int height = 20;

        String pos = "Position: " + (int) mc.player.getPosX() + ", " + (int) mc.player.getPosY() + ", " + (int) mc.player.getPosZ();

        StyledFont font = Fonts.msRegular[23];

        GlStateManager.pushMatrix();
        AnimationMath.sizeAnimation(x + (100 / 2), y + (38 / 2), scale1);

        RenderUtil.Render2D.drawShadow(x,y,font.getWidth(pos) + 10,height,radiusglow, DarkWhite.backColor);
        font.drawString(matrixStack,pos, x + 5, y + 5, DarkWhite.textColor);

        GlStateManager.popMatrix();

        GlStateManager.pushMatrix();
        AnimationMath.sizeAnimation(x + (100 / 2), y + (38 / 2), scale2);

        GaussianBlur.startBlur();
        RenderUtil.Render2D.drawShadow(x,y,font.getWidth(pos) + 10,height,radiusglow, ColorUtil.rgba(0,0,0,255));
        GaussianBlur.endBlur(5, 1);


        StencilUtil.initStencilToWrite();
        RenderUtil.Render2D.drawRoundedCorner(x, y, font.getWidth(pos) + 10, height, new Vector4f(15, 0, 0, 0), -1);
        StencilUtil.readStencilBuffer(0);
        RenderUtil.Render2D.drawShadow(x, y, font.getWidth(pos) + 10, height, 0, ColorUtil.getColorStyle(0), ColorUtil.getColorStyle(90), ColorUtil.getColorStyle(180), ColorUtil.getColorStyle(270));
        RenderUtil.Render2D.drawGradientRound(x - 0.25F, y - 0.25f, font.getWidth(pos) + 0.5f + 10, height + 0.5f, 0, ColorUtil.getColorStyle(0), ColorUtil.getColorStyle(90), ColorUtil.getColorStyle(180), ColorUtil.getColorStyle(270));
        StencilUtil.uninitStencilBuffer();
        font.drawString(matrixStack, "POSITION DRAG", x + 15, y + 5, DarkWhite.textColor);
        GlStateManager.popMatrix();

        positiOn.setWidth(width + font.getWidth(pos));
        positiOn.setHeight(height);

        if (mc.currentScreen instanceof ChatScreen) {
            cordsAnimation.setDirection(Direction.BACKWARDS);
            cordsAnimationOutline.setDirection(Direction.FORWARDS);
        } else {
            cordsAnimation.setDirection(Direction.FORWARDS);
            cordsAnimationOutline.setDirection(Direction.BACKWARDS);
        }

    }
}

ss: Посмотреть вложение 272169Посмотреть вложение 272170
просто cntrl +c cntrl + v :4Head:
ну хотя ладно я ренеймер схаваю
 

Вложения

Начинающий
Статус
Оффлайн
Регистрация
8 Фев 2024
Сообщения
126
Реакции[?]
0
Поинты[?]
0
Не хуйня мне нравиться почему мб потому что я пастер и говноед(не в обиду кодеру мне рил нравится худ)
 
Начинающий
Статус
Оффлайн
Регистрация
26 Фев 2024
Сообщения
353
Реакции[?]
0
Поинты[?]
0
чисто делайте ctrl + c, ctrl + v
pasta:
package wtf.expensive.modules.impl.render;

import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.MainWindow;
import net.minecraft.client.gui.screen.ChatScreen;
import net.minecraft.util.math.vector.Vector4f;
import wtf.expensive.Initilization;
import wtf.expensive.events.Event;
import wtf.expensive.events.impl.render.EventRender;
import wtf.expensive.managment.Managment;
import wtf.expensive.modules.Function;
import wtf.expensive.modules.FunctionAnnotation;
import wtf.expensive.modules.Type;
import wtf.expensive.modules.settings.imp.BooleanOption;
import wtf.expensive.modules.settings.imp.MultiBoxSetting;
import wtf.expensive.modules.settings.imp.SliderSetting;
import wtf.expensive.ui.midnight.DarkWhite;
import wtf.expensive.util.ClientUtil;
import wtf.expensive.util.animations.Animation;
import wtf.expensive.util.animations.Direction;
import wtf.expensive.util.animations.impl.EaseBackIn;
import wtf.expensive.util.drag.Dragging;
import wtf.expensive.util.font.Fonts;
import wtf.expensive.util.font.styled.StyledFont;
import wtf.expensive.util.render.ColorUtil;
import wtf.expensive.util.render.GaussianBlur;
import wtf.expensive.util.render.RenderUtil;
import wtf.expensive.util.render.StencilUtil;
import wtf.expensive.util.render.animation.AnimationMath;

import java.text.SimpleDateFormat;
import java.util.*;

@FunctionAnnotation(name = "на югейм", type = Type.Render)
public class HudSelfcode extends Function {

    public final MultiBoxSetting elementi = new MultiBoxSetting("Elements",
            new BooleanOption("Watermark", true),
            new BooleanOption("KeyBinds", true),
            new BooleanOption("Position", true)
    );

    private final SliderSetting radiusglow = new SliderSetting("Радиус Теней", 5, 1, 15, 1);

    public HudSelfcode() {
        addSettings(elementi, radiusglow);
    }
    //

    int[] colors = new int[360];
    final float cWidth = 4;
    MainWindow window;

    //шрифты
    final StyledFont medium = Fonts.msMedium[16];
    final StyledFont small = Fonts.msMedium[14];
    // _______________________________________________________________________________________________________________

    // ТУТ ЕСЛИ ЧЕ ДРАГИ
    final Dragging waterMarka = Initilization.createDrag(this, "Watermarka", 5, 5);
    final Dragging keyBinds = Initilization.createDrag(this, "KeyBinds", 10, 100);
    final Dragging positiOn = Initilization.createDrag(this, "Position", 5, 505);
    // _______________________________________________________________________________________________________________

    // А ТУТ ЕСЛИ ЧЕ АНИМАЦИЙ ЕЗКА НЕСЧАСТНАЯ
    Animation cordsAnimation = new EaseBackIn(400, 1, 1.5f);
    Animation cordsAnimationOutline = new EaseBackIn(400, 1, 1.5f);
    Animation waterAnimation = new EaseBackIn(400, 1, 1.5f);
    Animation waterAnimationOutline = new EaseBackIn(400, 1, 1.5f);
    // _______________________________________________________________________________________________________________

    @Override
    public void onEvent(Event event) {
        if (mc.player == null || mc.world == null) return;
        if (event instanceof EventRender e && e.isRender2D()) {
            for (int i = 0; i < colors.length; i++) {
                colors[i] = Managment.STYLE_MANAGER.getCurrentStyle().getColor(i);
            }

            window = e.scaledResolution;

            final int radiusglow = this.radiusglow.getValue().intValue();
            final MatrixStack matrixStack = e.matrixStack;


            //рендер
            if (elementi.get(0)) renderWatermark(matrixStack, radiusglow);
            if (elementi.get(1)) renderKeyBinds(matrixStack, radiusglow); // если че отрисовку типа КЕЙБИНДЫ ДРАГ было лень делать
            if (elementi.get(2)) renderCoordinates(matrixStack, radiusglow);
            // _______________________________________________________________________________________________________________

        }
    }

    // ватермарка

    private double scale1 = 0.0D;
    private double scale2 = 0.0D;
    private void renderWatermark(MatrixStack matrixStack, int radiusglow) {

        float x = waterMarka.getX();
        float y = waterMarka.getY();

        Date time = new Date();
        SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm:ss");

        int width = 30;
        int height = 20;

        StyledFont font = Fonts.msRegular[23];


        GlStateManager.pushMatrix();
        AnimationMath.sizeAnimation(x + (100 / 2), y + (38 / 2), scale1);
        RenderUtil.Render2D.drawShadow(x,y,width + font.getWidth("Ultimate") - 20,height,radiusglow, DarkWhite.backColor);
        font.drawString(matrixStack, "Ultimate", x + 5, y + 5, DarkWhite.textColor);

        RenderUtil.Render2D.drawShadow(x + font.getWidth("Ultimate") + 15,y,width + font.getWidth("FPS: " + mc.debugFPS) - 20,height, radiusglow, DarkWhite.backColor);
        font.drawString(matrixStack, "FPS: " + mc.debugFPS, x + 5 + font.getWidth("Ultimate") + 15, y + 5, DarkWhite.textColor);

        RenderUtil.Render2D.drawShadow(x + font.getWidth("Ultimate") + 30 + font.getWidth("FPS: " + mc.debugFPS),y,width + font.getWidth(dateFormat.format(time.getTime())) - 20,height,radiusglow, DarkWhite.backColor);
        font.drawString(matrixStack, dateFormat.format(time.getTime()), x + 5 + font.getWidth("Ultimate") + 30 + font.getWidth("FPS: " + mc.debugFPS), y + 5, DarkWhite.textColor);
        GlStateManager.popMatrix();

        GlStateManager.pushMatrix();
        AnimationMath.sizeAnimation(x + (100 / 2), y + (38 / 2), scale2);

        GaussianBlur.startBlur();
        RenderUtil.Render2D.drawShadow(x,y,width + font.getWidth("Ultimate" + "FPS: " + mc.debugFPS + dateFormat.format(time.getTime())) + 5,height,radiusglow, ColorUtil.rgba(0,0,0,255));
        GaussianBlur.endBlur(5, 1);


        StencilUtil.initStencilToWrite();
        RenderUtil.Render2D.drawRoundedCorner(x, y, width + font.getWidth("Ultimate" + "FPS: " + mc.debugFPS + dateFormat.format(time.getTime())) + 5, height, new Vector4f(15, 0, 0, 0), -1);
        StencilUtil.readStencilBuffer(0);
        RenderUtil.Render2D.drawShadow(x, y, width + font.getWidth("Ultimate" + "FPS: " + mc.debugFPS + dateFormat.format(time.getTime())) + 5, height, 0, ColorUtil.getColorStyle(0), ColorUtil.getColorStyle(90), ColorUtil.getColorStyle(180), ColorUtil.getColorStyle(270));
        RenderUtil.Render2D.drawGradientRound(x - 0.25F, y - 0.25f, width + font.getWidth("Ultimate" + "FPS: " + mc.debugFPS + dateFormat.format(time.getTime())) + 5 + 0.5f, height + 0.5f, 0, ColorUtil.getColorStyle(0), ColorUtil.getColorStyle(90), ColorUtil.getColorStyle(180), ColorUtil.getColorStyle(270));
        StencilUtil.uninitStencilBuffer();
        font.drawString(matrixStack, "WATERMARKA DRAG", x + 15, y + 5, DarkWhite.textColor);
        GlStateManager.popMatrix();


        waterMarka.setWidth(width + font.getWidth("Ultimate" + "FPS: " + mc.debugFPS + dateFormat.format(time.getTime())) + 5);
        waterMarka.setHeight(height);

        if (mc.currentScreen instanceof ChatScreen) {
            waterAnimation.setDirection(Direction.BACKWARDS);
            waterAnimationOutline.setDirection(Direction.FORWARDS);
        } else {
            waterAnimation.setDirection(Direction.FORWARDS);
            waterAnimationOutline.setDirection(Direction.BACKWARDS);
        }
    }

    // Кейбинды
    float kbHeight = 0;
    float kbWidth = 100;

    float kbWidthAnimation = 0, kbHeightAnimation = 0;

    private void renderKeyBinds(MatrixStack matrixStack, int radiusglow) {
        float posX = keyBinds.getX();
        float posY = keyBinds.getY();

        this.scale1 = cordsAnimation.getOutput();
        this.scale2 = cordsAnimationOutline.getOutput();


        int width = 100;
        int height = 15;

        RenderUtil.Render2D.drawShadow(posX,posY + 2,width,height,radiusglow, DarkWhite.backColor);

        medium.drawString(matrixStack, "Key Binds", posX + cWidth + 4 + 21, posY + 6 + 2, DarkWhite.textColor);

        RenderUtil.SmartScissor.push();
        RenderUtil.SmartScissor.setFromComponentCoordinates(posX, posY, kbWidthAnimation, kbHeightAnimation);
        int i = 0;
        for (Function f : Managment.FUNCTION_MANAGER.getFunctions()) {
            if (!f.state || f.bind == 0) continue;

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

            if (text.length() > 4) {
                text = text.substring(0,4) + "..";
            }
            String bindText = "[" + text.toUpperCase() + "]";
            float bindWidth = small.getWidth(bindText);
            String name = f.name;
            if (name.length() > 13) {
                name = name.substring(0,13) + "..";
            }

            RenderUtil.Render2D.drawShadow(posX + 1,posY + 19 + (i * 13),width - 2,height - 5,radiusglow, DarkWhite.backColor);

            kbWidth = Math.max(small.getWidth(bindText + f.bind + 5), 100);

            small.drawString(matrixStack, name, posX + cWidth, posY + 22 + (i * 13), DarkWhite.textColor);

            small.drawString(matrixStack, bindText, posX + cWidth + kbWidthAnimation - bindWidth - 8, posY + 22 + (i * 13), DarkWhite.textColor);

            i++;
        }
        RenderUtil.SmartScissor.unset();
        RenderUtil.SmartScissor.pop();

        kbHeight = 22 + (i * 13);
        this.kbHeightAnimation = AnimationMath.fast(this.kbHeightAnimation, kbHeight, 10);
        this.kbWidthAnimation = AnimationMath.fast(this.kbWidthAnimation, kbWidth, 10);

        keyBinds.setWidth(kbWidth);
        keyBinds.setHeight(kbHeight);
    }

    //координаты

    private void renderCoordinates(MatrixStack matrixStack, int radiusglow) {

        float x = positiOn.getX();
        float y = positiOn.getY();
        int width = 30;
        int height = 20;

        String pos = "Position: " + (int) mc.player.getPosX() + ", " + (int) mc.player.getPosY() + ", " + (int) mc.player.getPosZ();

        StyledFont font = Fonts.msRegular[23];

        GlStateManager.pushMatrix();
        AnimationMath.sizeAnimation(x + (100 / 2), y + (38 / 2), scale1);

        RenderUtil.Render2D.drawShadow(x,y,font.getWidth(pos) + 10,height,radiusglow, DarkWhite.backColor);
        font.drawString(matrixStack,pos, x + 5, y + 5, DarkWhite.textColor);

        GlStateManager.popMatrix();

        GlStateManager.pushMatrix();
        AnimationMath.sizeAnimation(x + (100 / 2), y + (38 / 2), scale2);

        GaussianBlur.startBlur();
        RenderUtil.Render2D.drawShadow(x,y,font.getWidth(pos) + 10,height,radiusglow, ColorUtil.rgba(0,0,0,255));
        GaussianBlur.endBlur(5, 1);


        StencilUtil.initStencilToWrite();
        RenderUtil.Render2D.drawRoundedCorner(x, y, font.getWidth(pos) + 10, height, new Vector4f(15, 0, 0, 0), -1);
        StencilUtil.readStencilBuffer(0);
        RenderUtil.Render2D.drawShadow(x, y, font.getWidth(pos) + 10, height, 0, ColorUtil.getColorStyle(0), ColorUtil.getColorStyle(90), ColorUtil.getColorStyle(180), ColorUtil.getColorStyle(270));
        RenderUtil.Render2D.drawGradientRound(x - 0.25F, y - 0.25f, font.getWidth(pos) + 0.5f + 10, height + 0.5f, 0, ColorUtil.getColorStyle(0), ColorUtil.getColorStyle(90), ColorUtil.getColorStyle(180), ColorUtil.getColorStyle(270));
        StencilUtil.uninitStencilBuffer();
        font.drawString(matrixStack, "POSITION DRAG", x + 15, y + 5, DarkWhite.textColor);
        GlStateManager.popMatrix();

        positiOn.setWidth(width + font.getWidth(pos));
        positiOn.setHeight(height);

        if (mc.currentScreen instanceof ChatScreen) {
            cordsAnimation.setDirection(Direction.BACKWARDS);
            cordsAnimationOutline.setDirection(Direction.FORWARDS);
        } else {
            cordsAnimation.setDirection(Direction.FORWARDS);
            cordsAnimationOutline.setDirection(Direction.BACKWARDS);
        }

    }
}

ss: Посмотреть вложение 272169Посмотреть вложение 272170
Памагити как фиксить текст колор и бак колор
 
Сверху Снизу