Вопрос Нет функций в клик гуи(пустой клик гуи но кликабельный)

Начинающий
Статус
Онлайн
Регистрация
31 Июл 2024
Сообщения
19
Реакции[?]
0
Поинты[?]
0

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

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

Спасибо!

Гуи просто пустой, но если тыкать в пустые места(где должны быть функции) то они вкл, ошибку указывал в 101 строчке, вот код и краш лог
CrashReport:
java.lang.NullPointerException: Cannot invoke "eva.ware.ui.clickgui.components.SearchField.isEmpty()" because "this.searchField" is null
    at eva.ware.ui.clickgui.DropDown.isSearching(DropDown.java:102)
    at eva.ware.ui.clickgui.DropDown.searchCheck(DropDown.java:114)
    at eva.ware.ui.clickgui.Panel.drawComponents(Panel.java:135)
    at eva.ware.ui.clickgui.Panel.render(Panel.java:89)
    at eva.ware.ui.clickgui.ClickGuiScreen.render(ClickGuiScreen.java:228)
    at net.minecraft.client.renderer.GameRenderer.updateCameraAndRender(GameRenderer.java:783)
    at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:981)
    at net.minecraft.client.Minecraft.run(Minecraft.java:572)
    at net.minecraft.client.main.Main.main(Main.java:186)
    at Start.main(Start.java:11)
DropDown:
// DropDown.java

package eva.ware.ui.clickgui;

import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;

import eva.ware.Evaware;
import eva.ware.manager.Theme;
import eva.ware.modules.api.Category;
import eva.ware.modules.impl.visual.ClickGui;
import eva.ware.ui.clickgui.components.SearchField;

import eva.ware.utils.animations.easing.CompactAnimation;
import eva.ware.utils.animations.easing.Easing;
import eva.ware.utils.client.ClientUtility;
import eva.ware.utils.client.IMinecraft;


import eva.ware.utils.math.MathUtility;
import eva.ware.utils.math.TimerUtility;
import eva.ware.utils.math.Vector2i;
import eva.ware.utils.render.Cursors;
import eva.ware.utils.render.color.ColorUtility;
import eva.ware.utils.render.engine2d.RenderUtility;
import eva.ware.utils.render.other.*;
import lombok.Getter;
import net.minecraft.client.MainWindow;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.text.ITextComponent;
import org.lwjgl.glfw.GLFW;
import ru.hogoshi.Animation;
import ru.hogoshi.util.Easings;


import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Stream;

public class DropDown extends Screen implements IMinecraft {

    public SearchField searchField;


    private static final Animation gradientAnimation = new Animation();
    private final List<Panel> panels = new ArrayList<>();

    [USER=270918]@Getter[/USER]
    private static final Animation globalAnim = new Animation();
    [USER=270918]@Getter[/USER]
    private static Animation animation = new Animation();
    [USER=270918]@Getter[/USER]
    private static final Animation imageAnimation = new Animation();
    private boolean exit = false, open = false;

    private static final CompactAnimation scaleAnimation = new CompactAnimation(Easing.EASE_IN_QUAD, 200);
    private static final CompactAnimation psChanAnimation = new CompactAnimation(Easing.LINEAR, 700);
    private static final CompactAnimation psChanOverlayAnimation = new CompactAnimation(Easing.LINEAR, 1400);
    private final TimerUtility psChatYAnimTimer = new TimerUtility();
    private final TimerUtility psChatOverlayAnimTimer = new TimerUtility();

    public DropDown(ITextComponent titleIn) {
        super(titleIn);
        this.searchField = new SearchField(3, ClientUtility.calc(mc.getMainWindow().getScaledHeight()) - 19, 70, 16, "Поиск");
        for (Category category : Category.values()) {
            panels.add(new Panel(category));
        }
    }

    [USER=1367676]@override[/USER]
    public boolean isPauseScreen() {
        return false;
    }

    [USER=1367676]@override[/USER]
    protected void init() {
        gradientAnimation.animate(1, 0.25f, Easings.EXPO_OUT);
        imageAnimation.animate(1, 0.5, Easings.BACK_OUT);
        int windowWidth = ClientUtility.calc(mc.getMainWindow().getScaledWidth());
        int windowHeight = ClientUtility.calc(mc.getMainWindow().getScaledHeight());

        float x = (windowWidth / 2f) - (60);
        float y = windowHeight / 2.1f + (510 / 2f) / 2.1f + 30;
        ClickGui clickGui = Evaware.getInst().getModuleManager().getClickGui();

        searchField = new SearchField((int) x, (int) y, 120, 20, "Поиск");

        exit = false;
        open = true;

        animation.animate(1, 0.25f, Easings.EXPO_OUT);
        super.init();
    }

    public static float scale = 1.0f;

    public boolean isSearching() {
        if (searchField != null) {
            return searchField.isEmpty();
        } else {
            System.err.println("Error: searchField is null in isSearching()");
            return false;
        }
    }


    public String getSearchText() {

        return searchField.getText();

    }

    public boolean searchCheck(String text) {

            return isSearching() && !text
                    .replaceAll(" ", "")
                    .toLowerCase()
                    .contains(getSearchText()
                            .replaceAll(" ", "")
                            .toLowerCase());

    }

    [USER=1367676]@override[/USER]
    public void closeScreen() {
        super.closeScreen();
        GLFW.glfwSetCursor(Minecraft.getInstance().getMainWindow().getHandle(), Cursors.ARROW);
    }

    [USER=1367676]@override[/USER]
    public boolean mouseScrolled(double mouseX, double mouseY, double delta) {
        Vector2i fixMouse = adjustMouseCoordinates((int) mouseX, (int) mouseY);

        Vector2i fix = ClientUtility.getMouse(fixMouse.getX(), fixMouse.getY());
        mouseX = fix.getX();
        mouseY = fix.getY();

        for (Panel panel : panels) {
            if (MathUtility.isHovered((float) mouseX, (float) mouseY, panel.getX(), panel.getY(), panel.getWidth(),
                    panel.getHeight())) {
                panel.setScroll((float) (panel.getScroll() + (delta * 20)));
            }
        }

        return super.mouseScrolled(mouseX, mouseY, delta);
    }

    [USER=1367676]@override[/USER]
    public boolean charTyped(char codePoint, int modifiers) {
        if (searchField.charTyped(codePoint, modifiers)) {
            return true;
        }

        for (Panel panel : panels) {
            panel.charTyped(codePoint, modifiers);
        }
        return super.charTyped(codePoint, modifiers);
    }

    [USER=1367676]@override[/USER]
    public void render(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) {
        ClickGui clickGui = Evaware.getInst().getModuleManager().getClickGui();
        KawaseBlur.blur.updateBlur(3, 3);
        mc.gameRenderer.setupOverlayRendering(2);
        Stream.of(animation, imageAnimation, gradientAnimation).forEach(Animation::update);
        boolean allow = !(animation.getValue() > 0.4);

        if (Stream.of(animation, imageAnimation, gradientAnimation).allMatch(anim -> anim.getValue() <= 0.1 && anim.isDone())) {
            closeScreen();
        }

        if (animation.getValue() < 0.1) {
            closeScreen();
        }


        final float off = 10;
        float width = panels.size() * (115 + off);

        updateScaleBasedOnScreenWidth();

        int windowWidth = ClientUtility.calc(mc.getMainWindow().getScaledWidth());
        int windowHeight = ClientUtility.calc(mc.getMainWindow().getScaledHeight());

        Vector2i fixMouse = adjustMouseCoordinates(mouseX, mouseY);

        Vector2i fix = ClientUtility.getMouse(fixMouse.getX(), fixMouse.getY());
        mouseX = fix.getX();
        mouseY = fix.getY();





        if (clickGui.blur.getValue()) {
            KawaseBlur.blur.updateBlur(clickGui.blurPower.getValue(), clickGui.blurPower.getValue().intValue());
        }

        if (clickGui.gradient.getValue()) {
            RenderUtility.drawRectHorizontalW(0, 0 - scaled().y / 4, Minecraft.getInstance().getMainWindow().getScaledWidth(), (Minecraft.getInstance().getMainWindow().getScaledHeight() + scaled().y / 3) / gradientAnimation.getValue(), ColorUtility.setAlpha(Theme.mainRectColor, (int) (255 * gradientAnimation.getValue())),ColorUtility.rgba(0,0,0,0 ));
        }


        if (ClickGui.images.getValue()) {
            GifUtility gifUtility = new GifUtility();
            String image = clickGui.imageType.getValue().toLowerCase();
            String path = "eva/images/gui/";
            String psChanOverlay = "eva/images/gui/pschan/ps_overlay.png";
            int totalFrames = 0;
            int frameDelay = 0;
            boolean fromZero = false;

            long durY = 700;
            long durOverlayAlpha = 1400;

            if (ClickGui.imageType.is("Miku")) {
                totalFrames = 9;
                frameDelay = 40;
            } else if (ClickGui.imageType.is("Novoura")) {
                totalFrames = 4;
                frameDelay = 80;
            }else if (ClickGui.imageType.is("cat")) {
                totalFrames = 8;
                frameDelay = 80;
            }

            if (ClickGui.imageType.is("PSChan")) {
                path = "eva/images/gui/pschan/";
                image = "ps_base";
            }

            if (Arrays.asList("Miku", "Novoura", "cat").contains(ClickGui.imageType.getValue())) {
                int i = gifUtility.getFrame(totalFrames, frameDelay, fromZero);
                path = "eva/images/gif/" + ClickGui.imageType.getValue().toLowerCase() + "/frame_" + i;
                image = "";
            }

            if (psChanAnimation.getValue() != 10 && !psChatYAnimTimer.isReached(durY)) {
                psChanAnimation.run(10);
            } if (psChanAnimation.getValue() != 0 && psChatYAnimTimer.isReached(durY)) {
                psChanAnimation.run(0);
            } if (psChatYAnimTimer.isReached(durY * 2)) {
                psChatYAnimTimer.reset();
            }

            if (psChanOverlayAnimation.getValue() != 255 && !psChatOverlayAnimTimer.isReached(durOverlayAlpha)) {
                psChanOverlayAnimation.run(255);
            } if (psChanOverlayAnimation.getValue() != 0 && psChatOverlayAnimTimer.isReached(durOverlayAlpha * 2)) {
                psChanOverlayAnimation.run(0);
            } if (psChatOverlayAnimTimer.isReached(durOverlayAlpha * 3)) {
                psChatOverlayAnimTimer.reset();
            }

            float offset = (float) (ClickGui.imageType.is("PSChan") ? psChanAnimation.getValue() : 0);
            float size = (float) ((512f / 2f) - 100 + 100 * imageAnimation.getValue());
            float x1 = (windowWidth - size);
            float x2 = (windowWidth);
            float y1 = (windowHeight - size);
            float y2 = (windowHeight);

            RenderUtility.drawImage(new ResourceLocation(path + image + ".png"), x1, y1 + offset, x2 - x1, y2 - y1, ColorUtility.reAlphaInt(-1, (int) ((255 * (imageAnimation.getValue())) * getAnimation().getValue())));

            if (ClickGui.imageType.is("PSChan")) {
                RenderUtility.drawImage(new ResourceLocation(psChanOverlay), x1, y1 + offset, x2 - x1, y2 - y1, ColorUtility.reAlphaInt(-1, (int) ((psChanOverlayAnimation.getValue() * getAnimation().getValue()))));
            }
        }





        Stencil.initStencilToWrite();
        GlStateManager.pushMatrix();
        GlStateManager.translatef(windowWidth / 2f, windowHeight / 2f, 0);
        GlStateManager.scaled(animation.getValue(), animation.getValue(), 1);
        GlStateManager.scaled(scale, scale, 1);
        GlStateManager.translatef(-windowWidth / 2f, -windowHeight / 2f, 0);



        GlStateManager.popMatrix();
        Stencil.readStencilBuffer(1);
        GlStateManager.bindTexture(KawaseBlur.blur.BLURRED.framebufferTexture);
        CustomFramebuffer.drawTexture();
        Stencil.uninitStencilBuffer();


        GlStateManager.pushMatrix();
        GlStateManager.translatef(windowWidth / 2f, windowHeight / 2f, 0);
        GlStateManager.scaled(animation.getValue(), animation.getValue(), 1);
        GlStateManager.scaled(scale, scale, 1);
        GlStateManager.translatef(-windowWidth / 2f, -windowHeight / 2f, 0);
        MainWindow mainWindow = mc.getMainWindow();

        for (Panel panel : panels) {
            panel.setY(windowHeight / 2f - (700 / 2) / 2f);
            panel.setX((windowWidth / 2f - 5) - (width / 2f) + panel.getCategory().ordinal() *
                    (116 + off) + off / 2f);
            float animationValue = (float) animation.getValue() * scale;

            float halfAnimationValueRest = (1 - animationValue) / 2f;

            float testX = panel.getX() + (panel.getWidth() * halfAnimationValueRest);
            float testY = panel.getY() + (panel.getHeight() * halfAnimationValueRest);
            float testW = panel.getWidth() * animationValue;
            float testH = panel.getHeight() * animationValue;

            testX = testX * animationValue + ((windowWidth - testW) *
                    halfAnimationValueRest);

            Scissor.push();
            Scissor.setFromComponentCoordinates(testX - 9, testY-9, testW+20, testH+20);
            panel.render(matrixStack, mouseX, mouseY);
            Scissor.unset();
            Scissor.pop();

        }

            searchField.render(matrixStack, mouseX, mouseY, partialTicks);



        GlStateManager.popMatrix();
        mc.gameRenderer.setupOverlayRendering();


    }

    private void updateScaleBasedOnScreenWidth() {
        final float PANEL_WIDTH = 115;
        final float MARGIN = 10;
        final float MIN_SCALE = 0.5f;

        float totalPanelWidth = panels.size() * (PANEL_WIDTH + MARGIN);
        float screenWidth = mc.getMainWindow().getScaledWidth();

        if (totalPanelWidth >= screenWidth) {
            scale = screenWidth / totalPanelWidth;
            scale = MathHelper.clamp(scale, MIN_SCALE, 1.0f);
        } else {
            scale = 1f;
        }
    }

    [USER=1367676]@override[/USER]
    public boolean keyPressed(int keyCode, int scanCode, int modifiers) {

            if (searchField.keyPressed(keyCode, scanCode, modifiers)) {
                return true;
            }

        for (Panel panel : panels) {
            panel.keyPressed(keyCode, scanCode, modifiers);
        }
        if (keyCode == GLFW.GLFW_KEY_ESCAPE) {
            animation = animation.animate(0, 0.25f, Easings.EXPO_OUT);
            imageAnimation.animate(0.0, 0.3, Easings.BACK_OUT);
            return false;
        }
        return super.keyPressed(keyCode, scanCode, modifiers);
    }

    private Vector2i adjustMouseCoordinates(int mouseX, int mouseY) {
        int windowWidth = mc.getMainWindow().getScaledWidth();
        int windowHeight = mc.getMainWindow().getScaledHeight();

        float adjustedMouseX = (mouseX - windowWidth / 2f) / scale + windowWidth / 2f;
        float adjustedMouseY = (mouseY - windowHeight / 2f) / scale + windowHeight / 2f;

        return new Vector2i((int) adjustedMouseX, (int) adjustedMouseY);
    }

    private double pathX(float mouseX, float scale) {
        if (scale == 1) return mouseX;
        int windowWidth = mc.getMainWindow().scaledWidth();
        int windowHeight = mc.getMainWindow().scaledHeight();
        mouseX /= (scale);
        mouseX -= (windowWidth / 2f) - (windowWidth / 2f) * (scale);
        return mouseX;
    }

    private double pathY(float mouseY, float scale) {
        if (scale == 1) return mouseY;
        int windowWidth = mc.getMainWindow().scaledWidth();
        int windowHeight = mc.getMainWindow().scaledHeight();
        mouseY /= scale;
        mouseY -= (windowHeight / 2f) - (windowHeight / 2f) * (scale);
        return mouseY;
    }

    [USER=1367676]@override[/USER]
    public boolean mouseClicked(double mouseX, double mouseY, int button) {
        Vector2i fixMouse = adjustMouseCoordinates((int) mouseX, (int) mouseY);

        Vector2i fix = ClientUtility.getMouse(fixMouse.getX(), fixMouse.getY());
        mouseX = fix.getX();
        mouseY = fix.getY();

            if (searchField.mouseClicked(mouseX, mouseY, button)) {
                return true;
            }

        for (Panel panel : panels) {
            panel.mouseClick((float) mouseX, (float) mouseY, button);
        }
        return super.mouseClicked(mouseX, mouseY, button);
    }

    [USER=1367676]@override[/USER]
    public boolean mouseReleased(double mouseX, double mouseY, int button) {
        Vector2i fixMouse = adjustMouseCoordinates((int) mouseX, (int) mouseY);

        Vector2i fix = ClientUtility.getMouse(fixMouse.getX(), fixMouse.getY());
        mouseX = fix.getX();
        mouseY = fix.getY();
        for (Panel panel : panels) {
            panel.mouseRelease((float) mouseX, (float) mouseY, button);
        }
        return super.mouseReleased(mouseX, mouseY, button);
    }

}
Вроде пофиксил а вроде нет но он в консоль ничего не пишет просто пустой гуи теперь, помогите пожалуйста!!!
 

Вложения

Начинающий
Статус
Оффлайн
Регистрация
16 Сен 2024
Сообщения
85
Реакции[?]
1
Поинты[?]
1K
Начинающий
Статус
Онлайн
Регистрация
31 Июл 2024
Сообщения
19
Реакции[?]
0
Поинты[?]
0
Начинающий
Статус
Оффлайн
Регистрация
8 Авг 2024
Сообщения
894
Реакции[?]
6
Поинты[?]
5K
Гуи просто пустой, но если тыкать в пустые места(где должны быть функции) то они вкл, ошибку указывал в 101 строчке, вот код и краш лог
CrashReport:
java.lang.NullPointerException: Cannot invoke "eva.ware.ui.clickgui.components.SearchField.isEmpty()" because "this.searchField" is null
    at eva.ware.ui.clickgui.DropDown.isSearching(DropDown.java:102)
    at eva.ware.ui.clickgui.DropDown.searchCheck(DropDown.java:114)
    at eva.ware.ui.clickgui.Panel.drawComponents(Panel.java:135)
    at eva.ware.ui.clickgui.Panel.render(Panel.java:89)
    at eva.ware.ui.clickgui.ClickGuiScreen.render(ClickGuiScreen.java:228)
    at net.minecraft.client.renderer.GameRenderer.updateCameraAndRender(GameRenderer.java:783)
    at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:981)
    at net.minecraft.client.Minecraft.run(Minecraft.java:572)
    at net.minecraft.client.main.Main.main(Main.java:186)
    at Start.main(Start.java:11)
DropDown:
// DropDown.java

package eva.ware.ui.clickgui;

import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;

import eva.ware.Evaware;
import eva.ware.manager.Theme;
import eva.ware.modules.api.Category;
import eva.ware.modules.impl.visual.ClickGui;
import eva.ware.ui.clickgui.components.SearchField;

import eva.ware.utils.animations.easing.CompactAnimation;
import eva.ware.utils.animations.easing.Easing;
import eva.ware.utils.client.ClientUtility;
import eva.ware.utils.client.IMinecraft;


import eva.ware.utils.math.MathUtility;
import eva.ware.utils.math.TimerUtility;
import eva.ware.utils.math.Vector2i;
import eva.ware.utils.render.Cursors;
import eva.ware.utils.render.color.ColorUtility;
import eva.ware.utils.render.engine2d.RenderUtility;
import eva.ware.utils.render.other.*;
import lombok.Getter;
import net.minecraft.client.MainWindow;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.text.ITextComponent;
import org.lwjgl.glfw.GLFW;
import ru.hogoshi.Animation;
import ru.hogoshi.util.Easings;


import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Stream;

public class DropDown extends Screen implements IMinecraft {

    public SearchField searchField;


    private static final Animation gradientAnimation = new Animation();
    private final List<Panel> panels = new ArrayList<>();

    [USER=270918]@Getter[/USER]
    private static final Animation globalAnim = new Animation();
    [USER=270918]@Getter[/USER]
    private static Animation animation = new Animation();
    [USER=270918]@Getter[/USER]
    private static final Animation imageAnimation = new Animation();
    private boolean exit = false, open = false;

    private static final CompactAnimation scaleAnimation = new CompactAnimation(Easing.EASE_IN_QUAD, 200);
    private static final CompactAnimation psChanAnimation = new CompactAnimation(Easing.LINEAR, 700);
    private static final CompactAnimation psChanOverlayAnimation = new CompactAnimation(Easing.LINEAR, 1400);
    private final TimerUtility psChatYAnimTimer = new TimerUtility();
    private final TimerUtility psChatOverlayAnimTimer = new TimerUtility();

    public DropDown(ITextComponent titleIn) {
        super(titleIn);
        this.searchField = new SearchField(3, ClientUtility.calc(mc.getMainWindow().getScaledHeight()) - 19, 70, 16, "Поиск");
        for (Category category : Category.values()) {
            panels.add(new Panel(category));
        }
    }

    [USER=1367676]@override[/USER]
    public boolean isPauseScreen() {
        return false;
    }

    [USER=1367676]@override[/USER]
    protected void init() {
        gradientAnimation.animate(1, 0.25f, Easings.EXPO_OUT);
        imageAnimation.animate(1, 0.5, Easings.BACK_OUT);
        int windowWidth = ClientUtility.calc(mc.getMainWindow().getScaledWidth());
        int windowHeight = ClientUtility.calc(mc.getMainWindow().getScaledHeight());

        float x = (windowWidth / 2f) - (60);
        float y = windowHeight / 2.1f + (510 / 2f) / 2.1f + 30;
        ClickGui clickGui = Evaware.getInst().getModuleManager().getClickGui();

        searchField = new SearchField((int) x, (int) y, 120, 20, "Поиск");

        exit = false;
        open = true;

        animation.animate(1, 0.25f, Easings.EXPO_OUT);
        super.init();
    }

    public static float scale = 1.0f;

    public boolean isSearching() {
        if (searchField != null) {
            return searchField.isEmpty();
        } else {
            System.err.println("Error: searchField is null in isSearching()");
            return false;
        }
    }


    public String getSearchText() {

        return searchField.getText();

    }

    public boolean searchCheck(String text) {

            return isSearching() && !text
                    .replaceAll(" ", "")
                    .toLowerCase()
                    .contains(getSearchText()
                            .replaceAll(" ", "")
                            .toLowerCase());

    }

    [USER=1367676]@override[/USER]
    public void closeScreen() {
        super.closeScreen();
        GLFW.glfwSetCursor(Minecraft.getInstance().getMainWindow().getHandle(), Cursors.ARROW);
    }

    [USER=1367676]@override[/USER]
    public boolean mouseScrolled(double mouseX, double mouseY, double delta) {
        Vector2i fixMouse = adjustMouseCoordinates((int) mouseX, (int) mouseY);

        Vector2i fix = ClientUtility.getMouse(fixMouse.getX(), fixMouse.getY());
        mouseX = fix.getX();
        mouseY = fix.getY();

        for (Panel panel : panels) {
            if (MathUtility.isHovered((float) mouseX, (float) mouseY, panel.getX(), panel.getY(), panel.getWidth(),
                    panel.getHeight())) {
                panel.setScroll((float) (panel.getScroll() + (delta * 20)));
            }
        }

        return super.mouseScrolled(mouseX, mouseY, delta);
    }

    [USER=1367676]@override[/USER]
    public boolean charTyped(char codePoint, int modifiers) {
        if (searchField.charTyped(codePoint, modifiers)) {
            return true;
        }

        for (Panel panel : panels) {
            panel.charTyped(codePoint, modifiers);
        }
        return super.charTyped(codePoint, modifiers);
    }

    [USER=1367676]@override[/USER]
    public void render(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) {
        ClickGui clickGui = Evaware.getInst().getModuleManager().getClickGui();
        KawaseBlur.blur.updateBlur(3, 3);
        mc.gameRenderer.setupOverlayRendering(2);
        Stream.of(animation, imageAnimation, gradientAnimation).forEach(Animation::update);
        boolean allow = !(animation.getValue() > 0.4);

        if (Stream.of(animation, imageAnimation, gradientAnimation).allMatch(anim -> anim.getValue() <= 0.1 && anim.isDone())) {
            closeScreen();
        }

        if (animation.getValue() < 0.1) {
            closeScreen();
        }


        final float off = 10;
        float width = panels.size() * (115 + off);

        updateScaleBasedOnScreenWidth();

        int windowWidth = ClientUtility.calc(mc.getMainWindow().getScaledWidth());
        int windowHeight = ClientUtility.calc(mc.getMainWindow().getScaledHeight());

        Vector2i fixMouse = adjustMouseCoordinates(mouseX, mouseY);

        Vector2i fix = ClientUtility.getMouse(fixMouse.getX(), fixMouse.getY());
        mouseX = fix.getX();
        mouseY = fix.getY();





        if (clickGui.blur.getValue()) {
            KawaseBlur.blur.updateBlur(clickGui.blurPower.getValue(), clickGui.blurPower.getValue().intValue());
        }

        if (clickGui.gradient.getValue()) {
            RenderUtility.drawRectHorizontalW(0, 0 - scaled().y / 4, Minecraft.getInstance().getMainWindow().getScaledWidth(), (Minecraft.getInstance().getMainWindow().getScaledHeight() + scaled().y / 3) / gradientAnimation.getValue(), ColorUtility.setAlpha(Theme.mainRectColor, (int) (255 * gradientAnimation.getValue())),ColorUtility.rgba(0,0,0,0 ));
        }


        if (ClickGui.images.getValue()) {
            GifUtility gifUtility = new GifUtility();
            String image = clickGui.imageType.getValue().toLowerCase();
            String path = "eva/images/gui/";
            String psChanOverlay = "eva/images/gui/pschan/ps_overlay.png";
            int totalFrames = 0;
            int frameDelay = 0;
            boolean fromZero = false;

            long durY = 700;
            long durOverlayAlpha = 1400;

            if (ClickGui.imageType.is("Miku")) {
                totalFrames = 9;
                frameDelay = 40;
            } else if (ClickGui.imageType.is("Novoura")) {
                totalFrames = 4;
                frameDelay = 80;
            }else if (ClickGui.imageType.is("cat")) {
                totalFrames = 8;
                frameDelay = 80;
            }

            if (ClickGui.imageType.is("PSChan")) {
                path = "eva/images/gui/pschan/";
                image = "ps_base";
            }

            if (Arrays.asList("Miku", "Novoura", "cat").contains(ClickGui.imageType.getValue())) {
                int i = gifUtility.getFrame(totalFrames, frameDelay, fromZero);
                path = "eva/images/gif/" + ClickGui.imageType.getValue().toLowerCase() + "/frame_" + i;
                image = "";
            }

            if (psChanAnimation.getValue() != 10 && !psChatYAnimTimer.isReached(durY)) {
                psChanAnimation.run(10);
            } if (psChanAnimation.getValue() != 0 && psChatYAnimTimer.isReached(durY)) {
                psChanAnimation.run(0);
            } if (psChatYAnimTimer.isReached(durY * 2)) {
                psChatYAnimTimer.reset();
            }

            if (psChanOverlayAnimation.getValue() != 255 && !psChatOverlayAnimTimer.isReached(durOverlayAlpha)) {
                psChanOverlayAnimation.run(255);
            } if (psChanOverlayAnimation.getValue() != 0 && psChatOverlayAnimTimer.isReached(durOverlayAlpha * 2)) {
                psChanOverlayAnimation.run(0);
            } if (psChatOverlayAnimTimer.isReached(durOverlayAlpha * 3)) {
                psChatOverlayAnimTimer.reset();
            }

            float offset = (float) (ClickGui.imageType.is("PSChan") ? psChanAnimation.getValue() : 0);
            float size = (float) ((512f / 2f) - 100 + 100 * imageAnimation.getValue());
            float x1 = (windowWidth - size);
            float x2 = (windowWidth);
            float y1 = (windowHeight - size);
            float y2 = (windowHeight);

            RenderUtility.drawImage(new ResourceLocation(path + image + ".png"), x1, y1 + offset, x2 - x1, y2 - y1, ColorUtility.reAlphaInt(-1, (int) ((255 * (imageAnimation.getValue())) * getAnimation().getValue())));

            if (ClickGui.imageType.is("PSChan")) {
                RenderUtility.drawImage(new ResourceLocation(psChanOverlay), x1, y1 + offset, x2 - x1, y2 - y1, ColorUtility.reAlphaInt(-1, (int) ((psChanOverlayAnimation.getValue() * getAnimation().getValue()))));
            }
        }





        Stencil.initStencilToWrite();
        GlStateManager.pushMatrix();
        GlStateManager.translatef(windowWidth / 2f, windowHeight / 2f, 0);
        GlStateManager.scaled(animation.getValue(), animation.getValue(), 1);
        GlStateManager.scaled(scale, scale, 1);
        GlStateManager.translatef(-windowWidth / 2f, -windowHeight / 2f, 0);



        GlStateManager.popMatrix();
        Stencil.readStencilBuffer(1);
        GlStateManager.bindTexture(KawaseBlur.blur.BLURRED.framebufferTexture);
        CustomFramebuffer.drawTexture();
        Stencil.uninitStencilBuffer();


        GlStateManager.pushMatrix();
        GlStateManager.translatef(windowWidth / 2f, windowHeight / 2f, 0);
        GlStateManager.scaled(animation.getValue(), animation.getValue(), 1);
        GlStateManager.scaled(scale, scale, 1);
        GlStateManager.translatef(-windowWidth / 2f, -windowHeight / 2f, 0);
        MainWindow mainWindow = mc.getMainWindow();

        for (Panel panel : panels) {
            panel.setY(windowHeight / 2f - (700 / 2) / 2f);
            panel.setX((windowWidth / 2f - 5) - (width / 2f) + panel.getCategory().ordinal() *
                    (116 + off) + off / 2f);
            float animationValue = (float) animation.getValue() * scale;

            float halfAnimationValueRest = (1 - animationValue) / 2f;

            float testX = panel.getX() + (panel.getWidth() * halfAnimationValueRest);
            float testY = panel.getY() + (panel.getHeight() * halfAnimationValueRest);
            float testW = panel.getWidth() * animationValue;
            float testH = panel.getHeight() * animationValue;

            testX = testX * animationValue + ((windowWidth - testW) *
                    halfAnimationValueRest);

            Scissor.push();
            Scissor.setFromComponentCoordinates(testX - 9, testY-9, testW+20, testH+20);
            panel.render(matrixStack, mouseX, mouseY);
            Scissor.unset();
            Scissor.pop();

        }

            searchField.render(matrixStack, mouseX, mouseY, partialTicks);



        GlStateManager.popMatrix();
        mc.gameRenderer.setupOverlayRendering();


    }

    private void updateScaleBasedOnScreenWidth() {
        final float PANEL_WIDTH = 115;
        final float MARGIN = 10;
        final float MIN_SCALE = 0.5f;

        float totalPanelWidth = panels.size() * (PANEL_WIDTH + MARGIN);
        float screenWidth = mc.getMainWindow().getScaledWidth();

        if (totalPanelWidth >= screenWidth) {
            scale = screenWidth / totalPanelWidth;
            scale = MathHelper.clamp(scale, MIN_SCALE, 1.0f);
        } else {
            scale = 1f;
        }
    }

    [USER=1367676]@override[/USER]
    public boolean keyPressed(int keyCode, int scanCode, int modifiers) {

            if (searchField.keyPressed(keyCode, scanCode, modifiers)) {
                return true;
            }

        for (Panel panel : panels) {
            panel.keyPressed(keyCode, scanCode, modifiers);
        }
        if (keyCode == GLFW.GLFW_KEY_ESCAPE) {
            animation = animation.animate(0, 0.25f, Easings.EXPO_OUT);
            imageAnimation.animate(0.0, 0.3, Easings.BACK_OUT);
            return false;
        }
        return super.keyPressed(keyCode, scanCode, modifiers);
    }

    private Vector2i adjustMouseCoordinates(int mouseX, int mouseY) {
        int windowWidth = mc.getMainWindow().getScaledWidth();
        int windowHeight = mc.getMainWindow().getScaledHeight();

        float adjustedMouseX = (mouseX - windowWidth / 2f) / scale + windowWidth / 2f;
        float adjustedMouseY = (mouseY - windowHeight / 2f) / scale + windowHeight / 2f;

        return new Vector2i((int) adjustedMouseX, (int) adjustedMouseY);
    }

    private double pathX(float mouseX, float scale) {
        if (scale == 1) return mouseX;
        int windowWidth = mc.getMainWindow().scaledWidth();
        int windowHeight = mc.getMainWindow().scaledHeight();
        mouseX /= (scale);
        mouseX -= (windowWidth / 2f) - (windowWidth / 2f) * (scale);
        return mouseX;
    }

    private double pathY(float mouseY, float scale) {
        if (scale == 1) return mouseY;
        int windowWidth = mc.getMainWindow().scaledWidth();
        int windowHeight = mc.getMainWindow().scaledHeight();
        mouseY /= scale;
        mouseY -= (windowHeight / 2f) - (windowHeight / 2f) * (scale);
        return mouseY;
    }

    [USER=1367676]@override[/USER]
    public boolean mouseClicked(double mouseX, double mouseY, int button) {
        Vector2i fixMouse = adjustMouseCoordinates((int) mouseX, (int) mouseY);

        Vector2i fix = ClientUtility.getMouse(fixMouse.getX(), fixMouse.getY());
        mouseX = fix.getX();
        mouseY = fix.getY();

            if (searchField.mouseClicked(mouseX, mouseY, button)) {
                return true;
            }

        for (Panel panel : panels) {
            panel.mouseClick((float) mouseX, (float) mouseY, button);
        }
        return super.mouseClicked(mouseX, mouseY, button);
    }

    [USER=1367676]@override[/USER]
    public boolean mouseReleased(double mouseX, double mouseY, int button) {
        Vector2i fixMouse = adjustMouseCoordinates((int) mouseX, (int) mouseY);

        Vector2i fix = ClientUtility.getMouse(fixMouse.getX(), fixMouse.getY());
        mouseX = fix.getX();
        mouseY = fix.getY();
        for (Panel panel : panels) {
            panel.mouseRelease((float) mouseX, (float) mouseY, button);
        }
        return super.mouseReleased(mouseX, mouseY, button);
    }

}
Вроде пофиксил а вроде нет но он в консоль ничего не пишет просто пустой гуи теперь, помогите пожалуйста!!!
нуу я думаю не надо пастить
а вообще ориг код гуишки посмотри и поищи отличия
1742233048777.png
хахахахха
 
Начинающий
Статус
Онлайн
Регистрация
31 Июл 2024
Сообщения
19
Реакции[?]
0
Поинты[?]
0
Сверху Снизу