Исходник MainScreen nevernight (exp 3.1)

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

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

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

Спасибо!

а чо низя?

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


Java:
package ua.nevernight.ui.mainmenu;

import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.ThreadLocalRandom;
import net.minecraft.client.MainWindow;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screen.MultiplayerScreen;
import net.minecraft.client.gui.screen.OptionsScreen;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.screen.WorldSelectionScreen;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.text.ITextComponent;
import ru.hogoshi.Animation;
import ua.nevernight.nevernight;
import ua.nevernight.utils.client.ClientUtil;
import ua.nevernight.utils.client.IMinecraft;
import ua.nevernight.utils.client.Vec2i;
import ua.nevernight.utils.math.MathUtil;
import ua.nevernight.utils.math.StopWatch;
import ua.nevernight.utils.render.ColorUtils;
import ua.nevernight.utils.render.DisplayUtils;
import ua.nevernight.utils.render.KawaseBlur;
import ua.nevernight.utils.render.Stencil;
import ua.nevernight.utils.render.font.Fonts;

public class MainScreen
extends Screen
implements IMinecraft {
    private final ResourceLocation backmenu = new ResourceLocation("nevernight/images/backmenu.png");
    private final List<Button> buttons = new ArrayList<Button>();
    private static final CopyOnWriteArrayList<Particle> particles = new CopyOnWriteArrayList();
    private final StopWatch stopWatch = new StopWatch();
    static boolean start = false;
    public static final ResourceLocation button = new ResourceLocation("nevernight/images/button.png");

    public MainScreen() {
        super(ITextComponent.getTextComponentOrEmpty(""));
    }

    @Override
    public void init(Minecraft minecraft, int n, int n2) {
        super.init(minecraft, n, n2);
        float f = 175.0f;
        for (Particle particle : particles) {
            particle.y = ThreadLocalRandom.current().nextInt(-5, n2);
        }
        int n3 = "\u67d1\u4fe3".length();
        int n4 = "\u523f\u6d67\u502e".length();
        float f2 = (float)ClientUtil.calc(n) / 2.0f - f / 2.0f + 10.0f;
        float f3 = Math.round((float)ClientUtil.calc(n2) / 2.0f + 1.0f);
        this.buttons.clear();
        int n5 = "\u6cc3\u5b5e\u6e95\u7093".length();
        int n6 = "\u5559\u56b6\u5d4c\u671f\u5f4e".length();
        int n7 = "\u5932\u70a8\u5169\u50b6".length();
        int n8 = "\u6414".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 + 9.0f, f - 75.0f, 23.0f, "\u041e\u0434\u0438\u043d\u043e\u0447\u043d\u0430\u044f \u0438\u0433\u0440\u0430", () -> {
            int n = "\u57fd\u6d79\u58cf\u5c4a\u5a82".length();
            int n2 = "\u5a09\u67a5\u5c40\u540b\u6524".length();
            int n3 = "\u62ca\u6501\u5b4f\u636e\u58c0".length();
            mc.displayGuiScreen(new WorldSelectionScreen(this));
        }));
        int n9 = "\u63ba\u5b0d".length();
        int n10 = "\u59b5\u6224\u6532\u4ed6\u563c".length();
        f3 += 39.0f;
        int n11 = "\u6bf0\u68b5\u5461\u5223".length();
        int n12 = "\u6372\u6389".length();
        int n13 = "\u617b".length();
        int n14 = "\u6d2c\u5101".length();
        int n15 = "\u6497\u506c".length();
        int n16 = "\u6e94\u6423".length();
        int n17 = "\u574f\u59ef".length();
        int n18 = "\u629a\u6a80\u6dd7".length();
        int n19 = "\u5395\u70a8".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 - 6.5f, f - 75.0f, 23.0f, "\u0421\u0435\u0442\u0435\u0432\u0430\u044f \u0438\u0433\u0440\u0430", () -> {
            int n = "\u624a\u5ce2\u7084".length();
            int n2 = "\u4f15\u57f6\u69dd\u5980".length();
            int n3 = "\u58d9\u5a89".length();
            mc.displayGuiScreen(new MultiplayerScreen(this));
        }));
        int n20 = "\u4e7c\u510f\u5c2e\u57d8".length();
        int n21 = "\u544a\u5f1b\u55e4\u629e\u53be".length();
        int n22 = "\u6606\u5a19".length();
        f3 += 39.0f;
        int n23 = "\u6c00\u6d26\u5dc4\u5241\u67a6".length();
        int n24 = "\u5b26\u6c65\u67dc\u5d8a".length();
        int n25 = "\u4e5c\u520e\u50e4\u63f3\u6d24".length();
        int n26 = "\u6df6\u6bc6\u55b6".length();
        int n27 = "\u5fd6\u5cd9".length();
        int n28 = "\u4fba\u54c8".length();
        int n29 = "\u5a4e".length();
        int n30 = "\u5b42".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 - 22.0f, f - 75.0f, 23.0f, "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438", () -> {
            int n = "\u6394\u5f20".length();
            int n2 = "\u679d\u5a27\u65b1".length();
            mc.displayGuiScreen(new OptionsScreen(this, MainScreen.mc.gameSettings));
        }));
        int n31 = "\u5f49\u5132".length();
        int n32 = "\u6ccd".length();
        int n33 = "\u598c\u606a".length();
        int n34 = "\u651f".length();
        int n35 = "\u6d95\u5b46".length();
        int n36 = "\u64b7".length();
        int n37 = "\u56cd".length();
        int n38 = "\u6039\u5900".length();
        int n39 = "\u683a".length();
        int n40 = "\u4e43".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 - 22.0f + 23.5f, f - 75.0f, 23.0f, "\u0412\u044b\u0445\u043e\u0434", () -> Minecraft.getInstance().shutdown()));
        int n41 = "\u53c4\u6477\u4e29".length();
        int n42 = "\u5a76".length();
    }

    @Override
    public boolean mouseScrolled(double d, double d2, double d3) {
        nevernight.getInstance().getAltWidget().updateScroll((int)d, (int)d2, (float)d3);
        return super.mouseScrolled(d, d2, d3);
    }

    @Override
    public void render(MatrixStack matrixStack, int n, int n2, float f) {
        boolean bl;
        super.render(matrixStack, n, n2, f);
        if (this.stopWatch.isReached(100L)) {
            int n3 = "\u6ed0\u6297".length();
            int n4 = "\u58be".length();
            int n5 = "\u61a8\u5c79\u6143".length();
            particles.add(new Particle());
            int n6 = "\u6cb4\u6aa4\u5ed3\u519f\u5286".length();
            int n7 = "\u5e42\u6ba7\u61dc".length();
            int n8 = "\u6912\u6730\u4f6c".length();
            this.stopWatch.reset();
        }
        MainWindow mainWindow = mc.getMainWindow();
        int n9 = ClientUtil.calc(mainWindow.getScaledWidth());
        int n10 = ClientUtil.calc(mainWindow.getScaledHeight());
        int n11 = 960;
        int n12 = 540;
        int n13 = "\u5126\u5f3c\u6a7c".length();
        int n14 = "\u54e8\u6b48\u5a11\u64f0".length();
        int n15 = "\u4fd8".length();
        int n16 = (n9 - n11) / 2;
        int n17 = "\u644b".length();
        int n18 = "\u5843\u5fbc".length();
        int n19 = (n10 - n12) / 2 + 50;
        boolean bl2 = bl = mainWindow.getWidth() < 900 && mainWindow.getHeight() < 900;
        if (bl) {
            n19 += 50;
        }
        DisplayUtils.drawRoundedRect(-10.0f, -10.0f, (float)(this.width + 1000), (float)(this.height + 1000), 0.0f, ColorUtils.rgba(25, 25, 25, 200));
        MainScreen.mc.gameRenderer.setupOverlayRendering(2);
        KawaseBlur.blur.updateBlur(3.0f, 4);
        this.drawButtons(matrixStack, n, n2, f);
        nevernight.getInstance().getAltWidget().render(matrixStack, n, n2);
        MainScreen.mc.gameRenderer.setupOverlayRendering();
    }

    @Override
    public boolean charTyped(char c, int n) {
        nevernight.getInstance().getAltWidget().onChar(c);
        return super.charTyped(c, n);
    }

    @Override
    public boolean keyPressed(int n, int n2, int n3) {
        nevernight.getInstance().getAltWidget().onKey(n);
        return false;
    }

    @Override
    public boolean mouseClicked(double d, double d2, int n) {
        Vec2i vec2i = ClientUtil.getMouse((int)d, (int)d2);
        this.buttons.forEach(button -> button.click(vec2i.getX(), vec2i.getY(), n));
        nevernight.getInstance().getAltWidget().click(vec2i.getX(), vec2i.getY(), n);
        return super.mouseClicked(d, d2, n);
    }

    private void drawButtons(MatrixStack matrixStack, int n, int n2, float f) {
        this.buttons.forEach(button -> button.render(matrixStack, n, n2, f));
    }

    private class Particle {
        private final float x = ThreadLocalRandom.current().nextInt(0, IMinecraft.mc.getMainWindow().getScaledWidth());
        private float y = 0.0f;
        private float size = 0.0f;

        public void update() {
            int n = "\u5a40\u6260".length();
            int n2 = "\u5147\u5b0b".length();
            this.y += 1.0f;
        }

        public void render(MatrixStack matrixStack) {
            int n = "\u5e44".length();
            this.size += 0.1f;
            GlStateManager.pushMatrix();
            GlStateManager.translated((double)this.x + Math.sin((float)System.nanoTime() / 1.0E9f) * 5.0, this.y, 0.0);
            GlStateManager.rotatef(this.size * 20.0f, 0.0f, 0.0f, 1.0f);
            GlStateManager.translated(-((double)this.x + Math.sin((float)System.nanoTime() / 1.0E9f) * 5.0), -this.y, 0.0);
            int n2 = "\u62ec\u68df\u60e7\u6f0b".length();
            int n3 = "\u63b9\u6173\u5a50\u625f".length();
            float f = 1.0f - MathHelper.clamp(this.y / (float)IMinecraft.mc.getMainWindow().getScaledHeight(), 0.0f, 1.0f);
            int n4 = "\u6d0f\u5833\u5f0f\u6f80\u4f24".length();
            int n5 = "\u6d99\u582b\u6b3a\u57ee".length();
            this.y += 1.0f;
            Fonts.damage.drawText(matrixStack, "A", (float)((double)this.x + Math.sin((float)System.nanoTime() / 1.0E9f) * 5.0), this.y, -1, MathHelper.clamp(this.size * f, 0.0f, 9.0f));
            GlStateManager.popMatrix();
            if (this.y >= (float)IMinecraft.mc.getMainWindow().getScaledHeight()) {
                particles.remove(this);
                int n6 = "\u57c7\u4f0e\u5cc3".length();
                int n7 = "\u7069\u6514\u6cc0\u63b0\u59cf".length();
                int n8 = "\u64da\u674b\u6bec\u5fd9\u5a5f".length();
            }
        }
    }

    private class Button {
        private final float x;
        private final float y;
        private final float width;
        private final float height;
        private String text;
        private Runnable action;

        public void render(MatrixStack matrixStack, int n, int n2, float f) {
            Stencil.initStencilToWrite();
            int n3 = "\u6881".length();
            int n4 = "\u6a5d\u6239".length();
            int n5 = "\u515a\u5f08\u558f".length();
            int n6 = "\u5e05\u5666".length();
            DisplayUtils.drawRoundedRect(this.x, this.y + 2.0f - 25.0f, this.width, this.height, 5.0f, ColorUtils.rgba(25, 25, 25, 250));
            Stencil.readStencilBuffer(1);
            Stencil.uninitStencilBuffer();
            int n7 = "\u6326\u522a".length();
            int n8 = "\u69ec\u55d7".length();
            int n9 = "\u65b3".length();
            Animation animation = new Animation();
            int n10 = ColorUtils.rgb(255, 255, 255);
            int n11 = "\u4f45\u5a52\u639c".length();
            int n12 = "\u4efb\u61e8\u553a\u5633".length();
            int n13 = "\u5a8c\u5330\u5aed\u5c2b".length();
            int n14 = "\u535c".length();
            if (MathUtil.isHovered(n, n2, this.x, this.y - 30.0f, this.width + 50.0f, this.height)) {
                // empty if block
            }
            int n15 = ColorUtils.rgba(0, 0, 0, 100);
            int n16 = "\u500a\u5b2c\u67f7".length();
            int n17 = "\u6f02\u596f\u6e07\u62cc".length();
            if (MathUtil.isHovered(n, n2, this.x, this.y - 30.0f, this.width + 20.0f, this.height)) {
                n15 = ColorUtils.rgba(255, 255, 255, 50);
            }
            int n18 = "\u5da0".length();
            int n19 = "\u6a45\u4f68\u638e".length();
            int n20 = "\u67ce\u701c".length();
            int n21 = "\u664d\u60f9\u5328\u6d3e".length();
            int n22 = "\u675e\u5a2d".length();
            DisplayUtils.drawShadow(this.x - 25.0f, this.y - 30.0f, this.width + 50.0f, this.height, 5, ColorUtils.getColor(0));
            int n23 = "\u54eb\u5bdc".length();
            int n24 = "\u5524\u6e1a\u6654\u6717".length();
            int n25 = "\u68e9\u585e\u70b8".length();
            int n26 = "\u5f82\u50bf\u5d58\u56e1".length();
            int n27 = "\u5be7\u5e04\u50e8\u6159".length();
            int n28 = "\u69e1\u69ba\u58fa".length();
            DisplayUtils.drawShadow(this.x - 25.0f, this.y - 30.0f, this.width + 50.0f, this.height, 6, ColorUtils.rgba(25, 25, 25, 250));
            int n29 = "\u5682\u6a50\u5e2d\u61e9\u5148".length();
            int n30 = "\u5100".length();
            int n31 = "\u5a0e\u529d\u5344".length();
            int n32 = "\u6002\u68e1\u6a42".length();
            int n33 = "\u566a\u6c3a\u540a\u6760".length();
            DisplayUtils.drawRoundedRect(this.x - 25.0f, this.y - 30.0f, this.width + 50.0f, this.height, 3.0f, n15);
            int n34 = "\u6e66\u4fd5".length();
            int n35 = "\u68fe\u54a2\u51ba\u569d".length();
            int n36 = "\u4f44\u5fca".length();
            int n37 = "\u6d69".length();
            int n38 = "\u4fd6\u6f96\u5a46".length();
            int n39 = "\u58ad\u6294\u6b8d\u5077".length();
            int n40 = "\u5230\u6e5c".length();
            Fonts.sfMedium.drawCenteredText(matrixStack, this.text, this.x + this.width / 2.0f, this.y - 30.0f - 2.5f + this.height / 2.0f - 5.5f + 3.5f, ColorUtils.rgb(255, 255, 255), 8.0f);
        }

        public void click(int n, int n2, int n3) {
            int n4 = "\u69e2\u6bff\u6c21\u59d0\u57db".length();
            if (MathUtil.isHovered(n, n2, this.x, this.y - 30.0f, this.width, this.height)) {
                this.action.run();
            }
        }

        public Button(float f, float f2, float f3, float f4, String string, Runnable runnable) {
            this.x = f;
            this.y = f2;
            this.width = f3;
            this.height = f4;
            this.text = string;
            this.action = runnable;
        }

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

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

        public float getWidth() {
            return this.width;
        }

        public float getHeight() {
            return this.height;
        }
    }
}
 
Начинающий
Статус
Оффлайн
Регистрация
23 Апр 2024
Сообщения
256
Реакции[?]
0
Поинты[?]
1K
а чо низя?

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


Java:
package ua.nevernight.ui.mainmenu;

import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.ThreadLocalRandom;
import net.minecraft.client.MainWindow;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screen.MultiplayerScreen;
import net.minecraft.client.gui.screen.OptionsScreen;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.screen.WorldSelectionScreen;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.text.ITextComponent;
import ru.hogoshi.Animation;
import ua.nevernight.nevernight;
import ua.nevernight.utils.client.ClientUtil;
import ua.nevernight.utils.client.IMinecraft;
import ua.nevernight.utils.client.Vec2i;
import ua.nevernight.utils.math.MathUtil;
import ua.nevernight.utils.math.StopWatch;
import ua.nevernight.utils.render.ColorUtils;
import ua.nevernight.utils.render.DisplayUtils;
import ua.nevernight.utils.render.KawaseBlur;
import ua.nevernight.utils.render.Stencil;
import ua.nevernight.utils.render.font.Fonts;

public class MainScreen
extends Screen
implements IMinecraft {
    private final ResourceLocation backmenu = new ResourceLocation("nevernight/images/backmenu.png");
    private final List<Button> buttons = new ArrayList<Button>();
    private static final CopyOnWriteArrayList<Particle> particles = new CopyOnWriteArrayList();
    private final StopWatch stopWatch = new StopWatch();
    static boolean start = false;
    public static final ResourceLocation button = new ResourceLocation("nevernight/images/button.png");

    public MainScreen() {
        super(ITextComponent.getTextComponentOrEmpty(""));
    }

    @Override
    public void init(Minecraft minecraft, int n, int n2) {
        super.init(minecraft, n, n2);
        float f = 175.0f;
        for (Particle particle : particles) {
            particle.y = ThreadLocalRandom.current().nextInt(-5, n2);
        }
        int n3 = "\u67d1\u4fe3".length();
        int n4 = "\u523f\u6d67\u502e".length();
        float f2 = (float)ClientUtil.calc(n) / 2.0f - f / 2.0f + 10.0f;
        float f3 = Math.round((float)ClientUtil.calc(n2) / 2.0f + 1.0f);
        this.buttons.clear();
        int n5 = "\u6cc3\u5b5e\u6e95\u7093".length();
        int n6 = "\u5559\u56b6\u5d4c\u671f\u5f4e".length();
        int n7 = "\u5932\u70a8\u5169\u50b6".length();
        int n8 = "\u6414".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 + 9.0f, f - 75.0f, 23.0f, "\u041e\u0434\u0438\u043d\u043e\u0447\u043d\u0430\u044f \u0438\u0433\u0440\u0430", () -> {
            int n = "\u57fd\u6d79\u58cf\u5c4a\u5a82".length();
            int n2 = "\u5a09\u67a5\u5c40\u540b\u6524".length();
            int n3 = "\u62ca\u6501\u5b4f\u636e\u58c0".length();
            mc.displayGuiScreen(new WorldSelectionScreen(this));
        }));
        int n9 = "\u63ba\u5b0d".length();
        int n10 = "\u59b5\u6224\u6532\u4ed6\u563c".length();
        f3 += 39.0f;
        int n11 = "\u6bf0\u68b5\u5461\u5223".length();
        int n12 = "\u6372\u6389".length();
        int n13 = "\u617b".length();
        int n14 = "\u6d2c\u5101".length();
        int n15 = "\u6497\u506c".length();
        int n16 = "\u6e94\u6423".length();
        int n17 = "\u574f\u59ef".length();
        int n18 = "\u629a\u6a80\u6dd7".length();
        int n19 = "\u5395\u70a8".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 - 6.5f, f - 75.0f, 23.0f, "\u0421\u0435\u0442\u0435\u0432\u0430\u044f \u0438\u0433\u0440\u0430", () -> {
            int n = "\u624a\u5ce2\u7084".length();
            int n2 = "\u4f15\u57f6\u69dd\u5980".length();
            int n3 = "\u58d9\u5a89".length();
            mc.displayGuiScreen(new MultiplayerScreen(this));
        }));
        int n20 = "\u4e7c\u510f\u5c2e\u57d8".length();
        int n21 = "\u544a\u5f1b\u55e4\u629e\u53be".length();
        int n22 = "\u6606\u5a19".length();
        f3 += 39.0f;
        int n23 = "\u6c00\u6d26\u5dc4\u5241\u67a6".length();
        int n24 = "\u5b26\u6c65\u67dc\u5d8a".length();
        int n25 = "\u4e5c\u520e\u50e4\u63f3\u6d24".length();
        int n26 = "\u6df6\u6bc6\u55b6".length();
        int n27 = "\u5fd6\u5cd9".length();
        int n28 = "\u4fba\u54c8".length();
        int n29 = "\u5a4e".length();
        int n30 = "\u5b42".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 - 22.0f, f - 75.0f, 23.0f, "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438", () -> {
            int n = "\u6394\u5f20".length();
            int n2 = "\u679d\u5a27\u65b1".length();
            mc.displayGuiScreen(new OptionsScreen(this, MainScreen.mc.gameSettings));
        }));
        int n31 = "\u5f49\u5132".length();
        int n32 = "\u6ccd".length();
        int n33 = "\u598c\u606a".length();
        int n34 = "\u651f".length();
        int n35 = "\u6d95\u5b46".length();
        int n36 = "\u64b7".length();
        int n37 = "\u56cd".length();
        int n38 = "\u6039\u5900".length();
        int n39 = "\u683a".length();
        int n40 = "\u4e43".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 - 22.0f + 23.5f, f - 75.0f, 23.0f, "\u0412\u044b\u0445\u043e\u0434", () -> Minecraft.getInstance().shutdown()));
        int n41 = "\u53c4\u6477\u4e29".length();
        int n42 = "\u5a76".length();
    }

    @Override
    public boolean mouseScrolled(double d, double d2, double d3) {
        nevernight.getInstance().getAltWidget().updateScroll((int)d, (int)d2, (float)d3);
        return super.mouseScrolled(d, d2, d3);
    }

    @Override
    public void render(MatrixStack matrixStack, int n, int n2, float f) {
        boolean bl;
        super.render(matrixStack, n, n2, f);
        if (this.stopWatch.isReached(100L)) {
            int n3 = "\u6ed0\u6297".length();
            int n4 = "\u58be".length();
            int n5 = "\u61a8\u5c79\u6143".length();
            particles.add(new Particle());
            int n6 = "\u6cb4\u6aa4\u5ed3\u519f\u5286".length();
            int n7 = "\u5e42\u6ba7\u61dc".length();
            int n8 = "\u6912\u6730\u4f6c".length();
            this.stopWatch.reset();
        }
        MainWindow mainWindow = mc.getMainWindow();
        int n9 = ClientUtil.calc(mainWindow.getScaledWidth());
        int n10 = ClientUtil.calc(mainWindow.getScaledHeight());
        int n11 = 960;
        int n12 = 540;
        int n13 = "\u5126\u5f3c\u6a7c".length();
        int n14 = "\u54e8\u6b48\u5a11\u64f0".length();
        int n15 = "\u4fd8".length();
        int n16 = (n9 - n11) / 2;
        int n17 = "\u644b".length();
        int n18 = "\u5843\u5fbc".length();
        int n19 = (n10 - n12) / 2 + 50;
        boolean bl2 = bl = mainWindow.getWidth() < 900 && mainWindow.getHeight() < 900;
        if (bl) {
            n19 += 50;
        }
        DisplayUtils.drawRoundedRect(-10.0f, -10.0f, (float)(this.width + 1000), (float)(this.height + 1000), 0.0f, ColorUtils.rgba(25, 25, 25, 200));
        MainScreen.mc.gameRenderer.setupOverlayRendering(2);
        KawaseBlur.blur.updateBlur(3.0f, 4);
        this.drawButtons(matrixStack, n, n2, f);
        nevernight.getInstance().getAltWidget().render(matrixStack, n, n2);
        MainScreen.mc.gameRenderer.setupOverlayRendering();
    }

    @Override
    public boolean charTyped(char c, int n) {
        nevernight.getInstance().getAltWidget().onChar(c);
        return super.charTyped(c, n);
    }

    @Override
    public boolean keyPressed(int n, int n2, int n3) {
        nevernight.getInstance().getAltWidget().onKey(n);
        return false;
    }

    @Override
    public boolean mouseClicked(double d, double d2, int n) {
        Vec2i vec2i = ClientUtil.getMouse((int)d, (int)d2);
        this.buttons.forEach(button -> button.click(vec2i.getX(), vec2i.getY(), n));
        nevernight.getInstance().getAltWidget().click(vec2i.getX(), vec2i.getY(), n);
        return super.mouseClicked(d, d2, n);
    }

    private void drawButtons(MatrixStack matrixStack, int n, int n2, float f) {
        this.buttons.forEach(button -> button.render(matrixStack, n, n2, f));
    }

    private class Particle {
        private final float x = ThreadLocalRandom.current().nextInt(0, IMinecraft.mc.getMainWindow().getScaledWidth());
        private float y = 0.0f;
        private float size = 0.0f;

        public void update() {
            int n = "\u5a40\u6260".length();
            int n2 = "\u5147\u5b0b".length();
            this.y += 1.0f;
        }

        public void render(MatrixStack matrixStack) {
            int n = "\u5e44".length();
            this.size += 0.1f;
            GlStateManager.pushMatrix();
            GlStateManager.translated((double)this.x + Math.sin((float)System.nanoTime() / 1.0E9f) * 5.0, this.y, 0.0);
            GlStateManager.rotatef(this.size * 20.0f, 0.0f, 0.0f, 1.0f);
            GlStateManager.translated(-((double)this.x + Math.sin((float)System.nanoTime() / 1.0E9f) * 5.0), -this.y, 0.0);
            int n2 = "\u62ec\u68df\u60e7\u6f0b".length();
            int n3 = "\u63b9\u6173\u5a50\u625f".length();
            float f = 1.0f - MathHelper.clamp(this.y / (float)IMinecraft.mc.getMainWindow().getScaledHeight(), 0.0f, 1.0f);
            int n4 = "\u6d0f\u5833\u5f0f\u6f80\u4f24".length();
            int n5 = "\u6d99\u582b\u6b3a\u57ee".length();
            this.y += 1.0f;
            Fonts.damage.drawText(matrixStack, "A", (float)((double)this.x + Math.sin((float)System.nanoTime() / 1.0E9f) * 5.0), this.y, -1, MathHelper.clamp(this.size * f, 0.0f, 9.0f));
            GlStateManager.popMatrix();
            if (this.y >= (float)IMinecraft.mc.getMainWindow().getScaledHeight()) {
                particles.remove(this);
                int n6 = "\u57c7\u4f0e\u5cc3".length();
                int n7 = "\u7069\u6514\u6cc0\u63b0\u59cf".length();
                int n8 = "\u64da\u674b\u6bec\u5fd9\u5a5f".length();
            }
        }
    }

    private class Button {
        private final float x;
        private final float y;
        private final float width;
        private final float height;
        private String text;
        private Runnable action;

        public void render(MatrixStack matrixStack, int n, int n2, float f) {
            Stencil.initStencilToWrite();
            int n3 = "\u6881".length();
            int n4 = "\u6a5d\u6239".length();
            int n5 = "\u515a\u5f08\u558f".length();
            int n6 = "\u5e05\u5666".length();
            DisplayUtils.drawRoundedRect(this.x, this.y + 2.0f - 25.0f, this.width, this.height, 5.0f, ColorUtils.rgba(25, 25, 25, 250));
            Stencil.readStencilBuffer(1);
            Stencil.uninitStencilBuffer();
            int n7 = "\u6326\u522a".length();
            int n8 = "\u69ec\u55d7".length();
            int n9 = "\u65b3".length();
            Animation animation = new Animation();
            int n10 = ColorUtils.rgb(255, 255, 255);
            int n11 = "\u4f45\u5a52\u639c".length();
            int n12 = "\u4efb\u61e8\u553a\u5633".length();
            int n13 = "\u5a8c\u5330\u5aed\u5c2b".length();
            int n14 = "\u535c".length();
            if (MathUtil.isHovered(n, n2, this.x, this.y - 30.0f, this.width + 50.0f, this.height)) {
                // empty if block
            }
            int n15 = ColorUtils.rgba(0, 0, 0, 100);
            int n16 = "\u500a\u5b2c\u67f7".length();
            int n17 = "\u6f02\u596f\u6e07\u62cc".length();
            if (MathUtil.isHovered(n, n2, this.x, this.y - 30.0f, this.width + 20.0f, this.height)) {
                n15 = ColorUtils.rgba(255, 255, 255, 50);
            }
            int n18 = "\u5da0".length();
            int n19 = "\u6a45\u4f68\u638e".length();
            int n20 = "\u67ce\u701c".length();
            int n21 = "\u664d\u60f9\u5328\u6d3e".length();
            int n22 = "\u675e\u5a2d".length();
            DisplayUtils.drawShadow(this.x - 25.0f, this.y - 30.0f, this.width + 50.0f, this.height, 5, ColorUtils.getColor(0));
            int n23 = "\u54eb\u5bdc".length();
            int n24 = "\u5524\u6e1a\u6654\u6717".length();
            int n25 = "\u68e9\u585e\u70b8".length();
            int n26 = "\u5f82\u50bf\u5d58\u56e1".length();
            int n27 = "\u5be7\u5e04\u50e8\u6159".length();
            int n28 = "\u69e1\u69ba\u58fa".length();
            DisplayUtils.drawShadow(this.x - 25.0f, this.y - 30.0f, this.width + 50.0f, this.height, 6, ColorUtils.rgba(25, 25, 25, 250));
            int n29 = "\u5682\u6a50\u5e2d\u61e9\u5148".length();
            int n30 = "\u5100".length();
            int n31 = "\u5a0e\u529d\u5344".length();
            int n32 = "\u6002\u68e1\u6a42".length();
            int n33 = "\u566a\u6c3a\u540a\u6760".length();
            DisplayUtils.drawRoundedRect(this.x - 25.0f, this.y - 30.0f, this.width + 50.0f, this.height, 3.0f, n15);
            int n34 = "\u6e66\u4fd5".length();
            int n35 = "\u68fe\u54a2\u51ba\u569d".length();
            int n36 = "\u4f44\u5fca".length();
            int n37 = "\u6d69".length();
            int n38 = "\u4fd6\u6f96\u5a46".length();
            int n39 = "\u58ad\u6294\u6b8d\u5077".length();
            int n40 = "\u5230\u6e5c".length();
            Fonts.sfMedium.drawCenteredText(matrixStack, this.text, this.x + this.width / 2.0f, this.y - 30.0f - 2.5f + this.height / 2.0f - 5.5f + 3.5f, ColorUtils.rgb(255, 255, 255), 8.0f);
        }

        public void click(int n, int n2, int n3) {
            int n4 = "\u69e2\u6bff\u6c21\u59d0\u57db".length();
            if (MathUtil.isHovered(n, n2, this.x, this.y - 30.0f, this.width, this.height)) {
                this.action.run();
            }
        }

        public Button(float f, float f2, float f3, float f4, String string, Runnable runnable) {
            this.x = f;
            this.y = f2;
            this.width = f3;
            this.height = f4;
            this.text = string;
            this.action = runnable;
        }

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

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

        public float getWidth() {
            return this.width;
        }

        public float getHeight() {
            return this.height;
        }
    }
}
CHAT GPT ANYWHERE
 
Read Only
Статус
Оффлайн
Регистрация
31 Авг 2023
Сообщения
700
Реакции[?]
6
Поинты[?]
5K
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
и зач
 
Forge Api ;-;
Начинающий
Статус
Оффлайн
Регистрация
3 Май 2023
Сообщения
684
Реакции[?]
15
Поинты[?]
12K
а чо низя?

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


Java:
package ua.nevernight.ui.mainmenu;

import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.ThreadLocalRandom;
import net.minecraft.client.MainWindow;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screen.MultiplayerScreen;
import net.minecraft.client.gui.screen.OptionsScreen;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.screen.WorldSelectionScreen;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.text.ITextComponent;
import ru.hogoshi.Animation;
import ua.nevernight.nevernight;
import ua.nevernight.utils.client.ClientUtil;
import ua.nevernight.utils.client.IMinecraft;
import ua.nevernight.utils.client.Vec2i;
import ua.nevernight.utils.math.MathUtil;
import ua.nevernight.utils.math.StopWatch;
import ua.nevernight.utils.render.ColorUtils;
import ua.nevernight.utils.render.DisplayUtils;
import ua.nevernight.utils.render.KawaseBlur;
import ua.nevernight.utils.render.Stencil;
import ua.nevernight.utils.render.font.Fonts;

public class MainScreen
extends Screen
implements IMinecraft {
    private final ResourceLocation backmenu = new ResourceLocation("nevernight/images/backmenu.png");
    private final List<Button> buttons = new ArrayList<Button>();
    private static final CopyOnWriteArrayList<Particle> particles = new CopyOnWriteArrayList();
    private final StopWatch stopWatch = new StopWatch();
    static boolean start = false;
    public static final ResourceLocation button = new ResourceLocation("nevernight/images/button.png");

    public MainScreen() {
        super(ITextComponent.getTextComponentOrEmpty(""));
    }

    @Override
    public void init(Minecraft minecraft, int n, int n2) {
        super.init(minecraft, n, n2);
        float f = 175.0f;
        for (Particle particle : particles) {
            particle.y = ThreadLocalRandom.current().nextInt(-5, n2);
        }
        int n3 = "\u67d1\u4fe3".length();
        int n4 = "\u523f\u6d67\u502e".length();
        float f2 = (float)ClientUtil.calc(n) / 2.0f - f / 2.0f + 10.0f;
        float f3 = Math.round((float)ClientUtil.calc(n2) / 2.0f + 1.0f);
        this.buttons.clear();
        int n5 = "\u6cc3\u5b5e\u6e95\u7093".length();
        int n6 = "\u5559\u56b6\u5d4c\u671f\u5f4e".length();
        int n7 = "\u5932\u70a8\u5169\u50b6".length();
        int n8 = "\u6414".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 + 9.0f, f - 75.0f, 23.0f, "\u041e\u0434\u0438\u043d\u043e\u0447\u043d\u0430\u044f \u0438\u0433\u0440\u0430", () -> {
            int n = "\u57fd\u6d79\u58cf\u5c4a\u5a82".length();
            int n2 = "\u5a09\u67a5\u5c40\u540b\u6524".length();
            int n3 = "\u62ca\u6501\u5b4f\u636e\u58c0".length();
            mc.displayGuiScreen(new WorldSelectionScreen(this));
        }));
        int n9 = "\u63ba\u5b0d".length();
        int n10 = "\u59b5\u6224\u6532\u4ed6\u563c".length();
        f3 += 39.0f;
        int n11 = "\u6bf0\u68b5\u5461\u5223".length();
        int n12 = "\u6372\u6389".length();
        int n13 = "\u617b".length();
        int n14 = "\u6d2c\u5101".length();
        int n15 = "\u6497\u506c".length();
        int n16 = "\u6e94\u6423".length();
        int n17 = "\u574f\u59ef".length();
        int n18 = "\u629a\u6a80\u6dd7".length();
        int n19 = "\u5395\u70a8".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 - 6.5f, f - 75.0f, 23.0f, "\u0421\u0435\u0442\u0435\u0432\u0430\u044f \u0438\u0433\u0440\u0430", () -> {
            int n = "\u624a\u5ce2\u7084".length();
            int n2 = "\u4f15\u57f6\u69dd\u5980".length();
            int n3 = "\u58d9\u5a89".length();
            mc.displayGuiScreen(new MultiplayerScreen(this));
        }));
        int n20 = "\u4e7c\u510f\u5c2e\u57d8".length();
        int n21 = "\u544a\u5f1b\u55e4\u629e\u53be".length();
        int n22 = "\u6606\u5a19".length();
        f3 += 39.0f;
        int n23 = "\u6c00\u6d26\u5dc4\u5241\u67a6".length();
        int n24 = "\u5b26\u6c65\u67dc\u5d8a".length();
        int n25 = "\u4e5c\u520e\u50e4\u63f3\u6d24".length();
        int n26 = "\u6df6\u6bc6\u55b6".length();
        int n27 = "\u5fd6\u5cd9".length();
        int n28 = "\u4fba\u54c8".length();
        int n29 = "\u5a4e".length();
        int n30 = "\u5b42".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 - 22.0f, f - 75.0f, 23.0f, "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438", () -> {
            int n = "\u6394\u5f20".length();
            int n2 = "\u679d\u5a27\u65b1".length();
            mc.displayGuiScreen(new OptionsScreen(this, MainScreen.mc.gameSettings));
        }));
        int n31 = "\u5f49\u5132".length();
        int n32 = "\u6ccd".length();
        int n33 = "\u598c\u606a".length();
        int n34 = "\u651f".length();
        int n35 = "\u6d95\u5b46".length();
        int n36 = "\u64b7".length();
        int n37 = "\u56cd".length();
        int n38 = "\u6039\u5900".length();
        int n39 = "\u683a".length();
        int n40 = "\u4e43".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 - 22.0f + 23.5f, f - 75.0f, 23.0f, "\u0412\u044b\u0445\u043e\u0434", () -> Minecraft.getInstance().shutdown()));
        int n41 = "\u53c4\u6477\u4e29".length();
        int n42 = "\u5a76".length();
    }

    @Override
    public boolean mouseScrolled(double d, double d2, double d3) {
        nevernight.getInstance().getAltWidget().updateScroll((int)d, (int)d2, (float)d3);
        return super.mouseScrolled(d, d2, d3);
    }

    @Override
    public void render(MatrixStack matrixStack, int n, int n2, float f) {
        boolean bl;
        super.render(matrixStack, n, n2, f);
        if (this.stopWatch.isReached(100L)) {
            int n3 = "\u6ed0\u6297".length();
            int n4 = "\u58be".length();
            int n5 = "\u61a8\u5c79\u6143".length();
            particles.add(new Particle());
            int n6 = "\u6cb4\u6aa4\u5ed3\u519f\u5286".length();
            int n7 = "\u5e42\u6ba7\u61dc".length();
            int n8 = "\u6912\u6730\u4f6c".length();
            this.stopWatch.reset();
        }
        MainWindow mainWindow = mc.getMainWindow();
        int n9 = ClientUtil.calc(mainWindow.getScaledWidth());
        int n10 = ClientUtil.calc(mainWindow.getScaledHeight());
        int n11 = 960;
        int n12 = 540;
        int n13 = "\u5126\u5f3c\u6a7c".length();
        int n14 = "\u54e8\u6b48\u5a11\u64f0".length();
        int n15 = "\u4fd8".length();
        int n16 = (n9 - n11) / 2;
        int n17 = "\u644b".length();
        int n18 = "\u5843\u5fbc".length();
        int n19 = (n10 - n12) / 2 + 50;
        boolean bl2 = bl = mainWindow.getWidth() < 900 && mainWindow.getHeight() < 900;
        if (bl) {
            n19 += 50;
        }
        DisplayUtils.drawRoundedRect(-10.0f, -10.0f, (float)(this.width + 1000), (float)(this.height + 1000), 0.0f, ColorUtils.rgba(25, 25, 25, 200));
        MainScreen.mc.gameRenderer.setupOverlayRendering(2);
        KawaseBlur.blur.updateBlur(3.0f, 4);
        this.drawButtons(matrixStack, n, n2, f);
        nevernight.getInstance().getAltWidget().render(matrixStack, n, n2);
        MainScreen.mc.gameRenderer.setupOverlayRendering();
    }

    @Override
    public boolean charTyped(char c, int n) {
        nevernight.getInstance().getAltWidget().onChar(c);
        return super.charTyped(c, n);
    }

    @Override
    public boolean keyPressed(int n, int n2, int n3) {
        nevernight.getInstance().getAltWidget().onKey(n);
        return false;
    }

    @Override
    public boolean mouseClicked(double d, double d2, int n) {
        Vec2i vec2i = ClientUtil.getMouse((int)d, (int)d2);
        this.buttons.forEach(button -> button.click(vec2i.getX(), vec2i.getY(), n));
        nevernight.getInstance().getAltWidget().click(vec2i.getX(), vec2i.getY(), n);
        return super.mouseClicked(d, d2, n);
    }

    private void drawButtons(MatrixStack matrixStack, int n, int n2, float f) {
        this.buttons.forEach(button -> button.render(matrixStack, n, n2, f));
    }

    private class Particle {
        private final float x = ThreadLocalRandom.current().nextInt(0, IMinecraft.mc.getMainWindow().getScaledWidth());
        private float y = 0.0f;
        private float size = 0.0f;

        public void update() {
            int n = "\u5a40\u6260".length();
            int n2 = "\u5147\u5b0b".length();
            this.y += 1.0f;
        }

        public void render(MatrixStack matrixStack) {
            int n = "\u5e44".length();
            this.size += 0.1f;
            GlStateManager.pushMatrix();
            GlStateManager.translated((double)this.x + Math.sin((float)System.nanoTime() / 1.0E9f) * 5.0, this.y, 0.0);
            GlStateManager.rotatef(this.size * 20.0f, 0.0f, 0.0f, 1.0f);
            GlStateManager.translated(-((double)this.x + Math.sin((float)System.nanoTime() / 1.0E9f) * 5.0), -this.y, 0.0);
            int n2 = "\u62ec\u68df\u60e7\u6f0b".length();
            int n3 = "\u63b9\u6173\u5a50\u625f".length();
            float f = 1.0f - MathHelper.clamp(this.y / (float)IMinecraft.mc.getMainWindow().getScaledHeight(), 0.0f, 1.0f);
            int n4 = "\u6d0f\u5833\u5f0f\u6f80\u4f24".length();
            int n5 = "\u6d99\u582b\u6b3a\u57ee".length();
            this.y += 1.0f;
            Fonts.damage.drawText(matrixStack, "A", (float)((double)this.x + Math.sin((float)System.nanoTime() / 1.0E9f) * 5.0), this.y, -1, MathHelper.clamp(this.size * f, 0.0f, 9.0f));
            GlStateManager.popMatrix();
            if (this.y >= (float)IMinecraft.mc.getMainWindow().getScaledHeight()) {
                particles.remove(this);
                int n6 = "\u57c7\u4f0e\u5cc3".length();
                int n7 = "\u7069\u6514\u6cc0\u63b0\u59cf".length();
                int n8 = "\u64da\u674b\u6bec\u5fd9\u5a5f".length();
            }
        }
    }

    private class Button {
        private final float x;
        private final float y;
        private final float width;
        private final float height;
        private String text;
        private Runnable action;

        public void render(MatrixStack matrixStack, int n, int n2, float f) {
            Stencil.initStencilToWrite();
            int n3 = "\u6881".length();
            int n4 = "\u6a5d\u6239".length();
            int n5 = "\u515a\u5f08\u558f".length();
            int n6 = "\u5e05\u5666".length();
            DisplayUtils.drawRoundedRect(this.x, this.y + 2.0f - 25.0f, this.width, this.height, 5.0f, ColorUtils.rgba(25, 25, 25, 250));
            Stencil.readStencilBuffer(1);
            Stencil.uninitStencilBuffer();
            int n7 = "\u6326\u522a".length();
            int n8 = "\u69ec\u55d7".length();
            int n9 = "\u65b3".length();
            Animation animation = new Animation();
            int n10 = ColorUtils.rgb(255, 255, 255);
            int n11 = "\u4f45\u5a52\u639c".length();
            int n12 = "\u4efb\u61e8\u553a\u5633".length();
            int n13 = "\u5a8c\u5330\u5aed\u5c2b".length();
            int n14 = "\u535c".length();
            if (MathUtil.isHovered(n, n2, this.x, this.y - 30.0f, this.width + 50.0f, this.height)) {
                // empty if block
            }
            int n15 = ColorUtils.rgba(0, 0, 0, 100);
            int n16 = "\u500a\u5b2c\u67f7".length();
            int n17 = "\u6f02\u596f\u6e07\u62cc".length();
            if (MathUtil.isHovered(n, n2, this.x, this.y - 30.0f, this.width + 20.0f, this.height)) {
                n15 = ColorUtils.rgba(255, 255, 255, 50);
            }
            int n18 = "\u5da0".length();
            int n19 = "\u6a45\u4f68\u638e".length();
            int n20 = "\u67ce\u701c".length();
            int n21 = "\u664d\u60f9\u5328\u6d3e".length();
            int n22 = "\u675e\u5a2d".length();
            DisplayUtils.drawShadow(this.x - 25.0f, this.y - 30.0f, this.width + 50.0f, this.height, 5, ColorUtils.getColor(0));
            int n23 = "\u54eb\u5bdc".length();
            int n24 = "\u5524\u6e1a\u6654\u6717".length();
            int n25 = "\u68e9\u585e\u70b8".length();
            int n26 = "\u5f82\u50bf\u5d58\u56e1".length();
            int n27 = "\u5be7\u5e04\u50e8\u6159".length();
            int n28 = "\u69e1\u69ba\u58fa".length();
            DisplayUtils.drawShadow(this.x - 25.0f, this.y - 30.0f, this.width + 50.0f, this.height, 6, ColorUtils.rgba(25, 25, 25, 250));
            int n29 = "\u5682\u6a50\u5e2d\u61e9\u5148".length();
            int n30 = "\u5100".length();
            int n31 = "\u5a0e\u529d\u5344".length();
            int n32 = "\u6002\u68e1\u6a42".length();
            int n33 = "\u566a\u6c3a\u540a\u6760".length();
            DisplayUtils.drawRoundedRect(this.x - 25.0f, this.y - 30.0f, this.width + 50.0f, this.height, 3.0f, n15);
            int n34 = "\u6e66\u4fd5".length();
            int n35 = "\u68fe\u54a2\u51ba\u569d".length();
            int n36 = "\u4f44\u5fca".length();
            int n37 = "\u6d69".length();
            int n38 = "\u4fd6\u6f96\u5a46".length();
            int n39 = "\u58ad\u6294\u6b8d\u5077".length();
            int n40 = "\u5230\u6e5c".length();
            Fonts.sfMedium.drawCenteredText(matrixStack, this.text, this.x + this.width / 2.0f, this.y - 30.0f - 2.5f + this.height / 2.0f - 5.5f + 3.5f, ColorUtils.rgb(255, 255, 255), 8.0f);
        }

        public void click(int n, int n2, int n3) {
            int n4 = "\u69e2\u6bff\u6c21\u59d0\u57db".length();
            if (MathUtil.isHovered(n, n2, this.x, this.y - 30.0f, this.width, this.height)) {
                this.action.run();
            }
        }

        public Button(float f, float f2, float f3, float f4, String string, Runnable runnable) {
            this.x = f;
            this.y = f2;
            this.width = f3;
            this.height = f4;
            this.text = string;
            this.action = runnable;
        }

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

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

        public float getWidth() {
            return this.width;
        }

        public float getHeight() {
            return this.height;
        }
    }
}
Залупачес Виталя лучше сделает
 
Начинающий
Статус
Оффлайн
Регистрация
16 Мар 2024
Сообщения
157
Реакции[?]
0
Поинты[?]
1K
а чо низя?

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


Java:
package ua.nevernight.ui.mainmenu;

import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.ThreadLocalRandom;
import net.minecraft.client.MainWindow;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screen.MultiplayerScreen;
import net.minecraft.client.gui.screen.OptionsScreen;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.screen.WorldSelectionScreen;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.text.ITextComponent;
import ru.hogoshi.Animation;
import ua.nevernight.nevernight;
import ua.nevernight.utils.client.ClientUtil;
import ua.nevernight.utils.client.IMinecraft;
import ua.nevernight.utils.client.Vec2i;
import ua.nevernight.utils.math.MathUtil;
import ua.nevernight.utils.math.StopWatch;
import ua.nevernight.utils.render.ColorUtils;
import ua.nevernight.utils.render.DisplayUtils;
import ua.nevernight.utils.render.KawaseBlur;
import ua.nevernight.utils.render.Stencil;
import ua.nevernight.utils.render.font.Fonts;

public class MainScreen
extends Screen
implements IMinecraft {
    private final ResourceLocation backmenu = new ResourceLocation("nevernight/images/backmenu.png");
    private final List<Button> buttons = new ArrayList<Button>();
    private static final CopyOnWriteArrayList<Particle> particles = new CopyOnWriteArrayList();
    private final StopWatch stopWatch = new StopWatch();
    static boolean start = false;
    public static final ResourceLocation button = new ResourceLocation("nevernight/images/button.png");

    public MainScreen() {
        super(ITextComponent.getTextComponentOrEmpty(""));
    }

    @Override
    public void init(Minecraft minecraft, int n, int n2) {
        super.init(minecraft, n, n2);
        float f = 175.0f;
        for (Particle particle : particles) {
            particle.y = ThreadLocalRandom.current().nextInt(-5, n2);
        }
        int n3 = "\u67d1\u4fe3".length();
        int n4 = "\u523f\u6d67\u502e".length();
        float f2 = (float)ClientUtil.calc(n) / 2.0f - f / 2.0f + 10.0f;
        float f3 = Math.round((float)ClientUtil.calc(n2) / 2.0f + 1.0f);
        this.buttons.clear();
        int n5 = "\u6cc3\u5b5e\u6e95\u7093".length();
        int n6 = "\u5559\u56b6\u5d4c\u671f\u5f4e".length();
        int n7 = "\u5932\u70a8\u5169\u50b6".length();
        int n8 = "\u6414".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 + 9.0f, f - 75.0f, 23.0f, "\u041e\u0434\u0438\u043d\u043e\u0447\u043d\u0430\u044f \u0438\u0433\u0440\u0430", () -> {
            int n = "\u57fd\u6d79\u58cf\u5c4a\u5a82".length();
            int n2 = "\u5a09\u67a5\u5c40\u540b\u6524".length();
            int n3 = "\u62ca\u6501\u5b4f\u636e\u58c0".length();
            mc.displayGuiScreen(new WorldSelectionScreen(this));
        }));
        int n9 = "\u63ba\u5b0d".length();
        int n10 = "\u59b5\u6224\u6532\u4ed6\u563c".length();
        f3 += 39.0f;
        int n11 = "\u6bf0\u68b5\u5461\u5223".length();
        int n12 = "\u6372\u6389".length();
        int n13 = "\u617b".length();
        int n14 = "\u6d2c\u5101".length();
        int n15 = "\u6497\u506c".length();
        int n16 = "\u6e94\u6423".length();
        int n17 = "\u574f\u59ef".length();
        int n18 = "\u629a\u6a80\u6dd7".length();
        int n19 = "\u5395\u70a8".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 - 6.5f, f - 75.0f, 23.0f, "\u0421\u0435\u0442\u0435\u0432\u0430\u044f \u0438\u0433\u0440\u0430", () -> {
            int n = "\u624a\u5ce2\u7084".length();
            int n2 = "\u4f15\u57f6\u69dd\u5980".length();
            int n3 = "\u58d9\u5a89".length();
            mc.displayGuiScreen(new MultiplayerScreen(this));
        }));
        int n20 = "\u4e7c\u510f\u5c2e\u57d8".length();
        int n21 = "\u544a\u5f1b\u55e4\u629e\u53be".length();
        int n22 = "\u6606\u5a19".length();
        f3 += 39.0f;
        int n23 = "\u6c00\u6d26\u5dc4\u5241\u67a6".length();
        int n24 = "\u5b26\u6c65\u67dc\u5d8a".length();
        int n25 = "\u4e5c\u520e\u50e4\u63f3\u6d24".length();
        int n26 = "\u6df6\u6bc6\u55b6".length();
        int n27 = "\u5fd6\u5cd9".length();
        int n28 = "\u4fba\u54c8".length();
        int n29 = "\u5a4e".length();
        int n30 = "\u5b42".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 - 22.0f, f - 75.0f, 23.0f, "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438", () -> {
            int n = "\u6394\u5f20".length();
            int n2 = "\u679d\u5a27\u65b1".length();
            mc.displayGuiScreen(new OptionsScreen(this, MainScreen.mc.gameSettings));
        }));
        int n31 = "\u5f49\u5132".length();
        int n32 = "\u6ccd".length();
        int n33 = "\u598c\u606a".length();
        int n34 = "\u651f".length();
        int n35 = "\u6d95\u5b46".length();
        int n36 = "\u64b7".length();
        int n37 = "\u56cd".length();
        int n38 = "\u6039\u5900".length();
        int n39 = "\u683a".length();
        int n40 = "\u4e43".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 - 22.0f + 23.5f, f - 75.0f, 23.0f, "\u0412\u044b\u0445\u043e\u0434", () -> Minecraft.getInstance().shutdown()));
        int n41 = "\u53c4\u6477\u4e29".length();
        int n42 = "\u5a76".length();
    }

    @Override
    public boolean mouseScrolled(double d, double d2, double d3) {
        nevernight.getInstance().getAltWidget().updateScroll((int)d, (int)d2, (float)d3);
        return super.mouseScrolled(d, d2, d3);
    }

    @Override
    public void render(MatrixStack matrixStack, int n, int n2, float f) {
        boolean bl;
        super.render(matrixStack, n, n2, f);
        if (this.stopWatch.isReached(100L)) {
            int n3 = "\u6ed0\u6297".length();
            int n4 = "\u58be".length();
            int n5 = "\u61a8\u5c79\u6143".length();
            particles.add(new Particle());
            int n6 = "\u6cb4\u6aa4\u5ed3\u519f\u5286".length();
            int n7 = "\u5e42\u6ba7\u61dc".length();
            int n8 = "\u6912\u6730\u4f6c".length();
            this.stopWatch.reset();
        }
        MainWindow mainWindow = mc.getMainWindow();
        int n9 = ClientUtil.calc(mainWindow.getScaledWidth());
        int n10 = ClientUtil.calc(mainWindow.getScaledHeight());
        int n11 = 960;
        int n12 = 540;
        int n13 = "\u5126\u5f3c\u6a7c".length();
        int n14 = "\u54e8\u6b48\u5a11\u64f0".length();
        int n15 = "\u4fd8".length();
        int n16 = (n9 - n11) / 2;
        int n17 = "\u644b".length();
        int n18 = "\u5843\u5fbc".length();
        int n19 = (n10 - n12) / 2 + 50;
        boolean bl2 = bl = mainWindow.getWidth() < 900 && mainWindow.getHeight() < 900;
        if (bl) {
            n19 += 50;
        }
        DisplayUtils.drawRoundedRect(-10.0f, -10.0f, (float)(this.width + 1000), (float)(this.height + 1000), 0.0f, ColorUtils.rgba(25, 25, 25, 200));
        MainScreen.mc.gameRenderer.setupOverlayRendering(2);
        KawaseBlur.blur.updateBlur(3.0f, 4);
        this.drawButtons(matrixStack, n, n2, f);
        nevernight.getInstance().getAltWidget().render(matrixStack, n, n2);
        MainScreen.mc.gameRenderer.setupOverlayRendering();
    }

    @Override
    public boolean charTyped(char c, int n) {
        nevernight.getInstance().getAltWidget().onChar(c);
        return super.charTyped(c, n);
    }

    @Override
    public boolean keyPressed(int n, int n2, int n3) {
        nevernight.getInstance().getAltWidget().onKey(n);
        return false;
    }

    @Override
    public boolean mouseClicked(double d, double d2, int n) {
        Vec2i vec2i = ClientUtil.getMouse((int)d, (int)d2);
        this.buttons.forEach(button -> button.click(vec2i.getX(), vec2i.getY(), n));
        nevernight.getInstance().getAltWidget().click(vec2i.getX(), vec2i.getY(), n);
        return super.mouseClicked(d, d2, n);
    }

    private void drawButtons(MatrixStack matrixStack, int n, int n2, float f) {
        this.buttons.forEach(button -> button.render(matrixStack, n, n2, f));
    }

    private class Particle {
        private final float x = ThreadLocalRandom.current().nextInt(0, IMinecraft.mc.getMainWindow().getScaledWidth());
        private float y = 0.0f;
        private float size = 0.0f;

        public void update() {
            int n = "\u5a40\u6260".length();
            int n2 = "\u5147\u5b0b".length();
            this.y += 1.0f;
        }

        public void render(MatrixStack matrixStack) {
            int n = "\u5e44".length();
            this.size += 0.1f;
            GlStateManager.pushMatrix();
            GlStateManager.translated((double)this.x + Math.sin((float)System.nanoTime() / 1.0E9f) * 5.0, this.y, 0.0);
            GlStateManager.rotatef(this.size * 20.0f, 0.0f, 0.0f, 1.0f);
            GlStateManager.translated(-((double)this.x + Math.sin((float)System.nanoTime() / 1.0E9f) * 5.0), -this.y, 0.0);
            int n2 = "\u62ec\u68df\u60e7\u6f0b".length();
            int n3 = "\u63b9\u6173\u5a50\u625f".length();
            float f = 1.0f - MathHelper.clamp(this.y / (float)IMinecraft.mc.getMainWindow().getScaledHeight(), 0.0f, 1.0f);
            int n4 = "\u6d0f\u5833\u5f0f\u6f80\u4f24".length();
            int n5 = "\u6d99\u582b\u6b3a\u57ee".length();
            this.y += 1.0f;
            Fonts.damage.drawText(matrixStack, "A", (float)((double)this.x + Math.sin((float)System.nanoTime() / 1.0E9f) * 5.0), this.y, -1, MathHelper.clamp(this.size * f, 0.0f, 9.0f));
            GlStateManager.popMatrix();
            if (this.y >= (float)IMinecraft.mc.getMainWindow().getScaledHeight()) {
                particles.remove(this);
                int n6 = "\u57c7\u4f0e\u5cc3".length();
                int n7 = "\u7069\u6514\u6cc0\u63b0\u59cf".length();
                int n8 = "\u64da\u674b\u6bec\u5fd9\u5a5f".length();
            }
        }
    }

    private class Button {
        private final float x;
        private final float y;
        private final float width;
        private final float height;
        private String text;
        private Runnable action;

        public void render(MatrixStack matrixStack, int n, int n2, float f) {
            Stencil.initStencilToWrite();
            int n3 = "\u6881".length();
            int n4 = "\u6a5d\u6239".length();
            int n5 = "\u515a\u5f08\u558f".length();
            int n6 = "\u5e05\u5666".length();
            DisplayUtils.drawRoundedRect(this.x, this.y + 2.0f - 25.0f, this.width, this.height, 5.0f, ColorUtils.rgba(25, 25, 25, 250));
            Stencil.readStencilBuffer(1);
            Stencil.uninitStencilBuffer();
            int n7 = "\u6326\u522a".length();
            int n8 = "\u69ec\u55d7".length();
            int n9 = "\u65b3".length();
            Animation animation = new Animation();
            int n10 = ColorUtils.rgb(255, 255, 255);
            int n11 = "\u4f45\u5a52\u639c".length();
            int n12 = "\u4efb\u61e8\u553a\u5633".length();
            int n13 = "\u5a8c\u5330\u5aed\u5c2b".length();
            int n14 = "\u535c".length();
            if (MathUtil.isHovered(n, n2, this.x, this.y - 30.0f, this.width + 50.0f, this.height)) {
                // empty if block
            }
            int n15 = ColorUtils.rgba(0, 0, 0, 100);
            int n16 = "\u500a\u5b2c\u67f7".length();
            int n17 = "\u6f02\u596f\u6e07\u62cc".length();
            if (MathUtil.isHovered(n, n2, this.x, this.y - 30.0f, this.width + 20.0f, this.height)) {
                n15 = ColorUtils.rgba(255, 255, 255, 50);
            }
            int n18 = "\u5da0".length();
            int n19 = "\u6a45\u4f68\u638e".length();
            int n20 = "\u67ce\u701c".length();
            int n21 = "\u664d\u60f9\u5328\u6d3e".length();
            int n22 = "\u675e\u5a2d".length();
            DisplayUtils.drawShadow(this.x - 25.0f, this.y - 30.0f, this.width + 50.0f, this.height, 5, ColorUtils.getColor(0));
            int n23 = "\u54eb\u5bdc".length();
            int n24 = "\u5524\u6e1a\u6654\u6717".length();
            int n25 = "\u68e9\u585e\u70b8".length();
            int n26 = "\u5f82\u50bf\u5d58\u56e1".length();
            int n27 = "\u5be7\u5e04\u50e8\u6159".length();
            int n28 = "\u69e1\u69ba\u58fa".length();
            DisplayUtils.drawShadow(this.x - 25.0f, this.y - 30.0f, this.width + 50.0f, this.height, 6, ColorUtils.rgba(25, 25, 25, 250));
            int n29 = "\u5682\u6a50\u5e2d\u61e9\u5148".length();
            int n30 = "\u5100".length();
            int n31 = "\u5a0e\u529d\u5344".length();
            int n32 = "\u6002\u68e1\u6a42".length();
            int n33 = "\u566a\u6c3a\u540a\u6760".length();
            DisplayUtils.drawRoundedRect(this.x - 25.0f, this.y - 30.0f, this.width + 50.0f, this.height, 3.0f, n15);
            int n34 = "\u6e66\u4fd5".length();
            int n35 = "\u68fe\u54a2\u51ba\u569d".length();
            int n36 = "\u4f44\u5fca".length();
            int n37 = "\u6d69".length();
            int n38 = "\u4fd6\u6f96\u5a46".length();
            int n39 = "\u58ad\u6294\u6b8d\u5077".length();
            int n40 = "\u5230\u6e5c".length();
            Fonts.sfMedium.drawCenteredText(matrixStack, this.text, this.x + this.width / 2.0f, this.y - 30.0f - 2.5f + this.height / 2.0f - 5.5f + 3.5f, ColorUtils.rgb(255, 255, 255), 8.0f);
        }

        public void click(int n, int n2, int n3) {
            int n4 = "\u69e2\u6bff\u6c21\u59d0\u57db".length();
            if (MathUtil.isHovered(n, n2, this.x, this.y - 30.0f, this.width, this.height)) {
                this.action.run();
            }
        }

        public Button(float f, float f2, float f3, float f4, String string, Runnable runnable) {
            this.x = f;
            this.y = f2;
            this.width = f3;
            this.height = f4;
            this.text = string;
            this.action = runnable;
        }

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

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

        public float getWidth() {
            return this.width;
        }

        public float getHeight() {
            return this.height;
        }
    }
}
что за пиздец :NotLikeThis:
 
Начинающий
Статус
Оффлайн
Регистрация
13 Июл 2024
Сообщения
58
Реакции[?]
1
Поинты[?]
2K
Java:
package ua.nevernight.ui.mainmenu;

public class MainScreen
extends Screen
implements IMinecraft {
    private final ResourceLocation backmenu = new ResourceLocation("nevernight/images/backmenu.png");
    private final List<Button> buttons = new ArrayList<Button>();
    private static final CopyOnWriteArrayList<Particle> particles = new CopyOnWriteArrayList();
    private final StopWatch stopWatch = new StopWatch();
    static boolean start = false;
    public static final ResourceLocation button = new ResourceLocation("nevernight/images/button.png");

    public MainScreen() {
        super(ITextComponent.getTextComponentOrEmpty(""));
    }

    @Override
    public void init(Minecraft minecraft, int n, int n2) {
        super.init(minecraft, n, n2);
        float f = 175.0f;
        for (Particle particle : particles) {
            particle.y = ThreadLocalRandom.current().nextInt(-5, n2);
        }
        int n3 = "\u67d1\u4fe3".length();
        int n4 = "\u523f\u6d67\u502e".length();
        float f2 = (float)ClientUtil.calc(n) / 2.0f - f / 2.0f + 10.0f;
        float f3 = Math.round((float)ClientUtil.calc(n2) / 2.0f + 1.0f);
        this.buttons.clear();
        int n5 = "\u6cc3\u5b5e\u6e95\u7093".length();
        int n6 = "\u5559\u56b6\u5d4c\u671f\u5f4e".length();
        int n7 = "\u5932\u70a8\u5169\u50b6".length();
        int n8 = "\u6414".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 + 9.0f, f - 75.0f, 23.0f, "\u041e\u0434\u0438\u043d\u043e\u0447\u043d\u0430\u044f \u0438\u0433\u0440\u0430", () -> {
            int n = "\u57fd\u6d79\u58cf\u5c4a\u5a82".length();
            int n2 = "\u5a09\u67a5\u5c40\u540b\u6524".length();
            int n3 = "\u62ca\u6501\u5b4f\u636e\u58c0".length();
            mc.displayGuiScreen(new WorldSelectionScreen(this));
        }));
        int n9 = "\u63ba\u5b0d".length();
        int n10 = "\u59b5\u6224\u6532\u4ed6\u563c".length();
        f3 += 39.0f;
        int n11 = "\u6bf0\u68b5\u5461\u5223".length();
        int n12 = "\u6372\u6389".length();
        int n13 = "\u617b".length();
        int n14 = "\u6d2c\u5101".length();
        int n15 = "\u6497\u506c".length();
        int n16 = "\u6e94\u6423".length();
        int n17 = "\u574f\u59ef".length();
        int n18 = "\u629a\u6a80\u6dd7".length();
        int n19 = "\u5395\u70a8".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 - 6.5f, f - 75.0f, 23.0f, "\u0421\u0435\u0442\u0435\u0432\u0430\u044f \u0438\u0433\u0440\u0430", () -> {
            int n = "\u624a\u5ce2\u7084".length();
            int n2 = "\u4f15\u57f6\u69dd\u5980".length();
            int n3 = "\u58d9\u5a89".length();
            mc.displayGuiScreen(new MultiplayerScreen(this));
        }));
        int n20 = "\u4e7c\u510f\u5c2e\u57d8".length();
        int n21 = "\u544a\u5f1b\u55e4\u629e\u53be".length();
        int n22 = "\u6606\u5a19".length();
        f3 += 39.0f;
        int n23 = "\u6c00\u6d26\u5dc4\u5241\u67a6".length();
        int n24 = "\u5b26\u6c65\u67dc\u5d8a".length();
        int n25 = "\u4e5c\u520e\u50e4\u63f3\u6d24".length();
        int n26 = "\u6df6\u6bc6\u55b6".length();
        int n27 = "\u5fd6\u5cd9".length();
        int n28 = "\u4fba\u54c8".length();
        int n29 = "\u5a4e".length();
        int n30 = "\u5b42".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 - 22.0f, f - 75.0f, 23.0f, "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438", () -> {
            int n = "\u6394\u5f20".length();
            int n2 = "\u679d\u5a27\u65b1".length();
            mc.displayGuiScreen(new OptionsScreen(this, MainScreen.mc.gameSettings));
        }));
        int n31 = "\u5f49\u5132".length();
        int n32 = "\u6ccd".length();
        int n33 = "\u598c\u606a".length();
        int n34 = "\u651f".length();
        int n35 = "\u6d95\u5b46".length();
        int n36 = "\u64b7".length();
        int n37 = "\u56cd".length();
        int n38 = "\u6039\u5900".length();
        int n39 = "\u683a".length();
        int n40 = "\u4e43".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 - 22.0f + 23.5f, f - 75.0f, 23.0f, "\u0412\u044b\u0445\u043e\u0434", () -> Minecraft.getInstance().shutdown()));
        int n41 = "\u53c4\u6477\u4e29".length();
        int n42 = "\u5a76".length();
    }

    @Override
    public boolean mouseScrolled(double d, double d2, double d3) {
        nevernight.getInstance().getAltWidget().updateScroll((int)d, (int)d2, (float)d3);
        return super.mouseScrolled(d, d2, d3);
    }

    @Override
    public void render(MatrixStack matrixStack, int n, int n2, float f) {
        boolean bl;
        super.render(matrixStack, n, n2, f);
        if (this.stopWatch.isReached(100L)) {
            int n3 = "\u6ed0\u6297".length();
            int n4 = "\u58be".length();
            int n5 = "\u61a8\u5c79\u6143".length();
            particles.add(new Particle());
            int n6 = "\u6cb4\u6aa4\u5ed3\u519f\u5286".length();
            int n7 = "\u5e42\u6ba7\u61dc".length();
            int n8 = "\u6912\u6730\u4f6c".length();
            this.stopWatch.reset();
        }
        MainWindow mainWindow = mc.getMainWindow();
        int n9 = ClientUtil.calc(mainWindow.getScaledWidth());
        int n10 = ClientUtil.calc(mainWindow.getScaledHeight());
        int n11 = 960;
        int n12 = 540;
        int n13 = "\u5126\u5f3c\u6a7c".length();
        int n14 = "\u54e8\u6b48\u5a11\u64f0".length();
        int n15 = "\u4fd8".length();
        int n16 = (n9 - n11) / 2;
        int n17 = "\u644b".length();
        int n18 = "\u5843\u5fbc".length();
        int n19 = (n10 - n12) / 2 + 50;
        boolean bl2 = bl = mainWindow.getWidth() < 900 && mainWindow.getHeight() < 900;
        if (bl) {
            n19 += 50;
        }
        DisplayUtils.drawRoundedRect(-10.0f, -10.0f, (float)(this.width + 1000), (float)(this.height + 1000), 0.0f, ColorUtils.rgba(25, 25, 25, 200));
        MainScreen.mc.gameRenderer.setupOverlayRendering(2);
        KawaseBlur.blur.updateBlur(3.0f, 4);
        this.drawButtons(matrixStack, n, n2, f);
        nevernight.getInstance().getAltWidget().render(matrixStack, n, n2);
        MainScreen.mc.gameRenderer.setupOverlayRendering();
    }

    @Override
    public boolean charTyped(char c, int n) {
        nevernight.getInstance().getAltWidget().onChar(c);
        return super.charTyped(c, n);
    }

    @Override
    public boolean keyPressed(int n, int n2, int n3) {
        nevernight.getInstance().getAltWidget().onKey(n);
        return false;
    }

    @Override
    public boolean mouseClicked(double d, double d2, int n) {
        Vec2i vec2i = ClientUtil.getMouse((int)d, (int)d2);
        this.buttons.forEach(button -> button.click(vec2i.getX(), vec2i.getY(), n));
        nevernight.getInstance().getAltWidget().click(vec2i.getX(), vec2i.getY(), n);
        return super.mouseClicked(d, d2, n);
    }

    private void drawButtons(MatrixStack matrixStack, int n, int n2, float f) {
        this.buttons.forEach(button -> button.render(matrixStack, n, n2, f));
    }

    private class Particle {
        private final float x = ThreadLocalRandom.current().nextInt(0, IMinecraft.mc.getMainWindow().getScaledWidth());
        private float y = 0.0f;
        private float size = 0.0f;

        public void update() {
            int n = "\u5a40\u6260".length();
            int n2 = "\u5147\u5b0b".length();
            this.y += 1.0f;
        }

        public void render(MatrixStack matrixStack) {
            int n = "\u5e44".length();
            this.size += 0.1f;
            GlStateManager.pushMatrix();
            GlStateManager.translated((double)this.x + Math.sin((float)System.nanoTime() / 1.0E9f) * 5.0, this.y, 0.0);
            GlStateManager.rotatef(this.size * 20.0f, 0.0f, 0.0f, 1.0f);
            GlStateManager.translated(-((double)this.x + Math.sin((float)System.nanoTime() / 1.0E9f) * 5.0), -this.y, 0.0);
            int n2 = "\u62ec\u68df\u60e7\u6f0b".length();
            int n3 = "\u63b9\u6173\u5a50\u625f".length();
            float f = 1.0f - MathHelper.clamp(this.y / (float)IMinecraft.mc.getMainWindow().getScaledHeight(), 0.0f, 1.0f);
            int n4 = "\u6d0f\u5833\u5f0f\u6f80\u4f24".length();
            int n5 = "\u6d99\u582b\u6b3a\u57ee".length();
            this.y += 1.0f;
            Fonts.damage.drawText(matrixStack, "A", (float)((double)this.x + Math.sin((float)System.nanoTime() / 1.0E9f) * 5.0), this.y, -1, MathHelper.clamp(this.size * f, 0.0f, 9.0f));
            GlStateManager.popMatrix();
            if (this.y >= (float)IMinecraft.mc.getMainWindow().getScaledHeight()) {
                particles.remove(this);
                int n6 = "\u57c7\u4f0e\u5cc3".length();
                int n7 = "\u7069\u6514\u6cc0\u63b0\u59cf".length();
                int n8 = "\u64da\u674b\u6bec\u5fd9\u5a5f".length();
            }
        }
    }

    private class Button {
        private final float x;
        private final float y;
        private final float width;
        private final float height;
        private String text;
        private Runnable action;

        public void render(MatrixStack matrixStack, int n, int n2, float f) {
            Stencil.initStencilToWrite();
            int n3 = "\u6881".length();
            int n4 = "\u6a5d\u6239".length();
            int n5 = "\u515a\u5f08\u558f".length();
            int n6 = "\u5e05\u5666".length();
            DisplayUtils.drawRoundedRect(this.x, this.y + 2.0f - 25.0f, this.width, this.height, 5.0f, ColorUtils.rgba(25, 25, 25, 250));
            Stencil.readStencilBuffer(1);
            Stencil.uninitStencilBuffer();
            int n7 = "\u6326\u522a".length();
            int n8 = "\u69ec\u55d7".length();
            int n9 = "\u65b3".length();
            Animation animation = new Animation();
            int n10 = ColorUtils.rgb(255, 255, 255);
            int n11 = "\u4f45\u5a52\u639c".length();
            int n12 = "\u4efb\u61e8\u553a\u5633".length();
            int n13 = "\u5a8c\u5330\u5aed\u5c2b".length();
            int n14 = "\u535c".length();
            if (MathUtil.isHovered(n, n2, this.x, this.y - 30.0f, this.width + 50.0f, this.height)) {
                // empty if block
            }
            int n15 = ColorUtils.rgba(0, 0, 0, 100);
            int n16 = "\u500a\u5b2c\u67f7".length();
            int n17 = "\u6f02\u596f\u6e07\u62cc".length();
            if (MathUtil.isHovered(n, n2, this.x, this.y - 30.0f, this.width + 20.0f, this.height)) {
                n15 = ColorUtils.rgba(255, 255, 255, 50);
            }
            int n18 = "\u5da0".length();
            int n19 = "\u6a45\u4f68\u638e".length();
            int n20 = "\u67ce\u701c".length();
            int n21 = "\u664d\u60f9\u5328\u6d3e".length();
            int n22 = "\u675e\u5a2d".length();
            DisplayUtils.drawShadow(this.x - 25.0f, this.y - 30.0f, this.width + 50.0f, this.height, 5, ColorUtils.getColor(0));
            int n23 = "\u54eb\u5bdc".length();
            int n24 = "\u5524\u6e1a\u6654\u6717".length();
            int n25 = "\u68e9\u585e\u70b8".length();
            int n26 = "\u5f82\u50bf\u5d58\u56e1".length();
            int n27 = "\u5be7\u5e04\u50e8\u6159".length();
            int n28 = "\u69e1\u69ba\u58fa".length();
            DisplayUtils.drawShadow(this.x - 25.0f, this.y - 30.0f, this.width + 50.0f, this.height, 6, ColorUtils.rgba(25, 25, 25, 250));
            int n29 = "\u5682\u6a50\u5e2d\u61e9\u5148".length();
            int n30 = "\u5100".length();
            int n31 = "\u5a0e\u529d\u5344".length();
            int n32 = "\u6002\u68e1\u6a42".length();
            int n33 = "\u566a\u6c3a\u540a\u6760".length();
            DisplayUtils.drawRoundedRect(this.x - 25.0f, this.y - 30.0f, this.width + 50.0f, this.height, 3.0f, n15);
            int n34 = "\u6e66\u4fd5".length();
            int n35 = "\u68fe\u54a2\u51ba\u569d".length();
            int n36 = "\u4f44\u5fca".length();
            int n37 = "\u6d69".length();
            int n38 = "\u4fd6\u6f96\u5a46".length();
            int n39 = "\u58ad\u6294\u6b8d\u5077".length();
            int n40 = "\u5230\u6e5c".length();
            Fonts.sfMedium.drawCenteredText(matrixStack, this.text, this.x + this.width / 2.0f, this.y - 30.0f - 2.5f + this.height / 2.0f - 5.5f + 3.5f, ColorUtils.rgb(255, 255, 255), 8.0f);
        }

        public void click(int n, int n2, int n3) {
            int n4 = "\u69e2\u6bff\u6c21\u59d0\u57db".length();
            if (MathUtil.isHovered(n, n2, this.x, this.y - 30.0f, this.width, this.height)) {
                this.action.run();
            }
        }


    }
}
Что за нахуй? Ты что онлайн декомпилятором это пиздил? Как можно обосрать код и память переменными которые нахуй не нужны?
Солидарен
типо доработать код и норм но просто как ты снял обусфукация я в шоке (int n5 = "\u6cc3\u5b5e\u6e95\u7093".length();)
Какую обфускацию он снял, это пиздец мужик...
 
Последнее редактирование:
Начинающий
Статус
Оффлайн
Регистрация
20 Апр 2021
Сообщения
1,042
Реакции[?]
19
Поинты[?]
24K
Начинающий
Статус
Оффлайн
Регистрация
6 Июл 2024
Сообщения
60
Реакции[?]
2
Поинты[?]
1K
а чо низя?

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


Java:
package ua.nevernight.ui.mainmenu;

import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.ThreadLocalRandom;
import net.minecraft.client.MainWindow;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screen.MultiplayerScreen;
import net.minecraft.client.gui.screen.OptionsScreen;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.screen.WorldSelectionScreen;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.text.ITextComponent;
import ru.hogoshi.Animation;
import ua.nevernight.nevernight;
import ua.nevernight.utils.client.ClientUtil;
import ua.nevernight.utils.client.IMinecraft;
import ua.nevernight.utils.client.Vec2i;
import ua.nevernight.utils.math.MathUtil;
import ua.nevernight.utils.math.StopWatch;
import ua.nevernight.utils.render.ColorUtils;
import ua.nevernight.utils.render.DisplayUtils;
import ua.nevernight.utils.render.KawaseBlur;
import ua.nevernight.utils.render.Stencil;
import ua.nevernight.utils.render.font.Fonts;

public class MainScreen
extends Screen
implements IMinecraft {
    private final ResourceLocation backmenu = new ResourceLocation("nevernight/images/backmenu.png");
    private final List<Button> buttons = new ArrayList<Button>();
    private static final CopyOnWriteArrayList<Particle> particles = new CopyOnWriteArrayList();
    private final StopWatch stopWatch = new StopWatch();
    static boolean start = false;
    public static final ResourceLocation button = new ResourceLocation("nevernight/images/button.png");

    public MainScreen() {
        super(ITextComponent.getTextComponentOrEmpty(""));
    }

    @Override
    public void init(Minecraft minecraft, int n, int n2) {
        super.init(minecraft, n, n2);
        float f = 175.0f;
        for (Particle particle : particles) {
            particle.y = ThreadLocalRandom.current().nextInt(-5, n2);
        }
        int n3 = "\u67d1\u4fe3".length();
        int n4 = "\u523f\u6d67\u502e".length();
        float f2 = (float)ClientUtil.calc(n) / 2.0f - f / 2.0f + 10.0f;
        float f3 = Math.round((float)ClientUtil.calc(n2) / 2.0f + 1.0f);
        this.buttons.clear();
        int n5 = "\u6cc3\u5b5e\u6e95\u7093".length();
        int n6 = "\u5559\u56b6\u5d4c\u671f\u5f4e".length();
        int n7 = "\u5932\u70a8\u5169\u50b6".length();
        int n8 = "\u6414".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 + 9.0f, f - 75.0f, 23.0f, "\u041e\u0434\u0438\u043d\u043e\u0447\u043d\u0430\u044f \u0438\u0433\u0440\u0430", () -> {
            int n = "\u57fd\u6d79\u58cf\u5c4a\u5a82".length();
            int n2 = "\u5a09\u67a5\u5c40\u540b\u6524".length();
            int n3 = "\u62ca\u6501\u5b4f\u636e\u58c0".length();
            mc.displayGuiScreen(new WorldSelectionScreen(this));
        }));
        int n9 = "\u63ba\u5b0d".length();
        int n10 = "\u59b5\u6224\u6532\u4ed6\u563c".length();
        f3 += 39.0f;
        int n11 = "\u6bf0\u68b5\u5461\u5223".length();
        int n12 = "\u6372\u6389".length();
        int n13 = "\u617b".length();
        int n14 = "\u6d2c\u5101".length();
        int n15 = "\u6497\u506c".length();
        int n16 = "\u6e94\u6423".length();
        int n17 = "\u574f\u59ef".length();
        int n18 = "\u629a\u6a80\u6dd7".length();
        int n19 = "\u5395\u70a8".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 - 6.5f, f - 75.0f, 23.0f, "\u0421\u0435\u0442\u0435\u0432\u0430\u044f \u0438\u0433\u0440\u0430", () -> {
            int n = "\u624a\u5ce2\u7084".length();
            int n2 = "\u4f15\u57f6\u69dd\u5980".length();
            int n3 = "\u58d9\u5a89".length();
            mc.displayGuiScreen(new MultiplayerScreen(this));
        }));
        int n20 = "\u4e7c\u510f\u5c2e\u57d8".length();
        int n21 = "\u544a\u5f1b\u55e4\u629e\u53be".length();
        int n22 = "\u6606\u5a19".length();
        f3 += 39.0f;
        int n23 = "\u6c00\u6d26\u5dc4\u5241\u67a6".length();
        int n24 = "\u5b26\u6c65\u67dc\u5d8a".length();
        int n25 = "\u4e5c\u520e\u50e4\u63f3\u6d24".length();
        int n26 = "\u6df6\u6bc6\u55b6".length();
        int n27 = "\u5fd6\u5cd9".length();
        int n28 = "\u4fba\u54c8".length();
        int n29 = "\u5a4e".length();
        int n30 = "\u5b42".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 - 22.0f, f - 75.0f, 23.0f, "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438", () -> {
            int n = "\u6394\u5f20".length();
            int n2 = "\u679d\u5a27\u65b1".length();
            mc.displayGuiScreen(new OptionsScreen(this, MainScreen.mc.gameSettings));
        }));
        int n31 = "\u5f49\u5132".length();
        int n32 = "\u6ccd".length();
        int n33 = "\u598c\u606a".length();
        int n34 = "\u651f".length();
        int n35 = "\u6d95\u5b46".length();
        int n36 = "\u64b7".length();
        int n37 = "\u56cd".length();
        int n38 = "\u6039\u5900".length();
        int n39 = "\u683a".length();
        int n40 = "\u4e43".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 - 22.0f + 23.5f, f - 75.0f, 23.0f, "\u0412\u044b\u0445\u043e\u0434", () -> Minecraft.getInstance().shutdown()));
        int n41 = "\u53c4\u6477\u4e29".length();
        int n42 = "\u5a76".length();
    }

    @Override
    public boolean mouseScrolled(double d, double d2, double d3) {
        nevernight.getInstance().getAltWidget().updateScroll((int)d, (int)d2, (float)d3);
        return super.mouseScrolled(d, d2, d3);
    }

    @Override
    public void render(MatrixStack matrixStack, int n, int n2, float f) {
        boolean bl;
        super.render(matrixStack, n, n2, f);
        if (this.stopWatch.isReached(100L)) {
            int n3 = "\u6ed0\u6297".length();
            int n4 = "\u58be".length();
            int n5 = "\u61a8\u5c79\u6143".length();
            particles.add(new Particle());
            int n6 = "\u6cb4\u6aa4\u5ed3\u519f\u5286".length();
            int n7 = "\u5e42\u6ba7\u61dc".length();
            int n8 = "\u6912\u6730\u4f6c".length();
            this.stopWatch.reset();
        }
        MainWindow mainWindow = mc.getMainWindow();
        int n9 = ClientUtil.calc(mainWindow.getScaledWidth());
        int n10 = ClientUtil.calc(mainWindow.getScaledHeight());
        int n11 = 960;
        int n12 = 540;
        int n13 = "\u5126\u5f3c\u6a7c".length();
        int n14 = "\u54e8\u6b48\u5a11\u64f0".length();
        int n15 = "\u4fd8".length();
        int n16 = (n9 - n11) / 2;
        int n17 = "\u644b".length();
        int n18 = "\u5843\u5fbc".length();
        int n19 = (n10 - n12) / 2 + 50;
        boolean bl2 = bl = mainWindow.getWidth() < 900 && mainWindow.getHeight() < 900;
        if (bl) {
            n19 += 50;
        }
        DisplayUtils.drawRoundedRect(-10.0f, -10.0f, (float)(this.width + 1000), (float)(this.height + 1000), 0.0f, ColorUtils.rgba(25, 25, 25, 200));
        MainScreen.mc.gameRenderer.setupOverlayRendering(2);
        KawaseBlur.blur.updateBlur(3.0f, 4);
        this.drawButtons(matrixStack, n, n2, f);
        nevernight.getInstance().getAltWidget().render(matrixStack, n, n2);
        MainScreen.mc.gameRenderer.setupOverlayRendering();
    }

    @Override
    public boolean charTyped(char c, int n) {
        nevernight.getInstance().getAltWidget().onChar(c);
        return super.charTyped(c, n);
    }

    @Override
    public boolean keyPressed(int n, int n2, int n3) {
        nevernight.getInstance().getAltWidget().onKey(n);
        return false;
    }

    @Override
    public boolean mouseClicked(double d, double d2, int n) {
        Vec2i vec2i = ClientUtil.getMouse((int)d, (int)d2);
        this.buttons.forEach(button -> button.click(vec2i.getX(), vec2i.getY(), n));
        nevernight.getInstance().getAltWidget().click(vec2i.getX(), vec2i.getY(), n);
        return super.mouseClicked(d, d2, n);
    }

    private void drawButtons(MatrixStack matrixStack, int n, int n2, float f) {
        this.buttons.forEach(button -> button.render(matrixStack, n, n2, f));
    }

    private class Particle {
        private final float x = ThreadLocalRandom.current().nextInt(0, IMinecraft.mc.getMainWindow().getScaledWidth());
        private float y = 0.0f;
        private float size = 0.0f;

        public void update() {
            int n = "\u5a40\u6260".length();
            int n2 = "\u5147\u5b0b".length();
            this.y += 1.0f;
        }

        public void render(MatrixStack matrixStack) {
            int n = "\u5e44".length();
            this.size += 0.1f;
            GlStateManager.pushMatrix();
            GlStateManager.translated((double)this.x + Math.sin((float)System.nanoTime() / 1.0E9f) * 5.0, this.y, 0.0);
            GlStateManager.rotatef(this.size * 20.0f, 0.0f, 0.0f, 1.0f);
            GlStateManager.translated(-((double)this.x + Math.sin((float)System.nanoTime() / 1.0E9f) * 5.0), -this.y, 0.0);
            int n2 = "\u62ec\u68df\u60e7\u6f0b".length();
            int n3 = "\u63b9\u6173\u5a50\u625f".length();
            float f = 1.0f - MathHelper.clamp(this.y / (float)IMinecraft.mc.getMainWindow().getScaledHeight(), 0.0f, 1.0f);
            int n4 = "\u6d0f\u5833\u5f0f\u6f80\u4f24".length();
            int n5 = "\u6d99\u582b\u6b3a\u57ee".length();
            this.y += 1.0f;
            Fonts.damage.drawText(matrixStack, "A", (float)((double)this.x + Math.sin((float)System.nanoTime() / 1.0E9f) * 5.0), this.y, -1, MathHelper.clamp(this.size * f, 0.0f, 9.0f));
            GlStateManager.popMatrix();
            if (this.y >= (float)IMinecraft.mc.getMainWindow().getScaledHeight()) {
                particles.remove(this);
                int n6 = "\u57c7\u4f0e\u5cc3".length();
                int n7 = "\u7069\u6514\u6cc0\u63b0\u59cf".length();
                int n8 = "\u64da\u674b\u6bec\u5fd9\u5a5f".length();
            }
        }
    }

    private class Button {
        private final float x;
        private final float y;
        private final float width;
        private final float height;
        private String text;
        private Runnable action;

        public void render(MatrixStack matrixStack, int n, int n2, float f) {
            Stencil.initStencilToWrite();
            int n3 = "\u6881".length();
            int n4 = "\u6a5d\u6239".length();
            int n5 = "\u515a\u5f08\u558f".length();
            int n6 = "\u5e05\u5666".length();
            DisplayUtils.drawRoundedRect(this.x, this.y + 2.0f - 25.0f, this.width, this.height, 5.0f, ColorUtils.rgba(25, 25, 25, 250));
            Stencil.readStencilBuffer(1);
            Stencil.uninitStencilBuffer();
            int n7 = "\u6326\u522a".length();
            int n8 = "\u69ec\u55d7".length();
            int n9 = "\u65b3".length();
            Animation animation = new Animation();
            int n10 = ColorUtils.rgb(255, 255, 255);
            int n11 = "\u4f45\u5a52\u639c".length();
            int n12 = "\u4efb\u61e8\u553a\u5633".length();
            int n13 = "\u5a8c\u5330\u5aed\u5c2b".length();
            int n14 = "\u535c".length();
            if (MathUtil.isHovered(n, n2, this.x, this.y - 30.0f, this.width + 50.0f, this.height)) {
                // empty if block
            }
            int n15 = ColorUtils.rgba(0, 0, 0, 100);
            int n16 = "\u500a\u5b2c\u67f7".length();
            int n17 = "\u6f02\u596f\u6e07\u62cc".length();
            if (MathUtil.isHovered(n, n2, this.x, this.y - 30.0f, this.width + 20.0f, this.height)) {
                n15 = ColorUtils.rgba(255, 255, 255, 50);
            }
            int n18 = "\u5da0".length();
            int n19 = "\u6a45\u4f68\u638e".length();
            int n20 = "\u67ce\u701c".length();
            int n21 = "\u664d\u60f9\u5328\u6d3e".length();
            int n22 = "\u675e\u5a2d".length();
            DisplayUtils.drawShadow(this.x - 25.0f, this.y - 30.0f, this.width + 50.0f, this.height, 5, ColorUtils.getColor(0));
            int n23 = "\u54eb\u5bdc".length();
            int n24 = "\u5524\u6e1a\u6654\u6717".length();
            int n25 = "\u68e9\u585e\u70b8".length();
            int n26 = "\u5f82\u50bf\u5d58\u56e1".length();
            int n27 = "\u5be7\u5e04\u50e8\u6159".length();
            int n28 = "\u69e1\u69ba\u58fa".length();
            DisplayUtils.drawShadow(this.x - 25.0f, this.y - 30.0f, this.width + 50.0f, this.height, 6, ColorUtils.rgba(25, 25, 25, 250));
            int n29 = "\u5682\u6a50\u5e2d\u61e9\u5148".length();
            int n30 = "\u5100".length();
            int n31 = "\u5a0e\u529d\u5344".length();
            int n32 = "\u6002\u68e1\u6a42".length();
            int n33 = "\u566a\u6c3a\u540a\u6760".length();
            DisplayUtils.drawRoundedRect(this.x - 25.0f, this.y - 30.0f, this.width + 50.0f, this.height, 3.0f, n15);
            int n34 = "\u6e66\u4fd5".length();
            int n35 = "\u68fe\u54a2\u51ba\u569d".length();
            int n36 = "\u4f44\u5fca".length();
            int n37 = "\u6d69".length();
            int n38 = "\u4fd6\u6f96\u5a46".length();
            int n39 = "\u58ad\u6294\u6b8d\u5077".length();
            int n40 = "\u5230\u6e5c".length();
            Fonts.sfMedium.drawCenteredText(matrixStack, this.text, this.x + this.width / 2.0f, this.y - 30.0f - 2.5f + this.height / 2.0f - 5.5f + 3.5f, ColorUtils.rgb(255, 255, 255), 8.0f);
        }

        public void click(int n, int n2, int n3) {
            int n4 = "\u69e2\u6bff\u6c21\u59d0\u57db".length();
            if (MathUtil.isHovered(n, n2, this.x, this.y - 30.0f, this.width, this.height)) {
                this.action.run();
            }
        }

        public Button(float f, float f2, float f3, float f4, String string, Runnable runnable) {
            this.x = f;
            this.y = f2;
            this.width = f3;
            this.height = f4;
            this.text = string;
            this.action = runnable;
        }

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

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

        public float getWidth() {
            return this.width;
        }

        public float getHeight() {
            return this.height;
        }
    }
}
ss
 
Начинающий
Статус
Оффлайн
Регистрация
4 Июл 2024
Сообщения
317
Реакции[?]
0
Поинты[?]
0
а чо низя?

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


Java:
package ua.nevernight.ui.mainmenu;

import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.ThreadLocalRandom;
import net.minecraft.client.MainWindow;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screen.MultiplayerScreen;
import net.minecraft.client.gui.screen.OptionsScreen;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.screen.WorldSelectionScreen;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.text.ITextComponent;
import ru.hogoshi.Animation;
import ua.nevernight.nevernight;
import ua.nevernight.utils.client.ClientUtil;
import ua.nevernight.utils.client.IMinecraft;
import ua.nevernight.utils.client.Vec2i;
import ua.nevernight.utils.math.MathUtil;
import ua.nevernight.utils.math.StopWatch;
import ua.nevernight.utils.render.ColorUtils;
import ua.nevernight.utils.render.DisplayUtils;
import ua.nevernight.utils.render.KawaseBlur;
import ua.nevernight.utils.render.Stencil;
import ua.nevernight.utils.render.font.Fonts;

public class MainScreen
extends Screen
implements IMinecraft {
    private final ResourceLocation backmenu = new ResourceLocation("nevernight/images/backmenu.png");
    private final List<Button> buttons = new ArrayList<Button>();
    private static final CopyOnWriteArrayList<Particle> particles = new CopyOnWriteArrayList();
    private final StopWatch stopWatch = new StopWatch();
    static boolean start = false;
    public static final ResourceLocation button = new ResourceLocation("nevernight/images/button.png");

    public MainScreen() {
        super(ITextComponent.getTextComponentOrEmpty(""));
    }

    @Override
    public void init(Minecraft minecraft, int n, int n2) {
        super.init(minecraft, n, n2);
        float f = 175.0f;
        for (Particle particle : particles) {
            particle.y = ThreadLocalRandom.current().nextInt(-5, n2);
        }
        int n3 = "\u67d1\u4fe3".length();
        int n4 = "\u523f\u6d67\u502e".length();
        float f2 = (float)ClientUtil.calc(n) / 2.0f - f / 2.0f + 10.0f;
        float f3 = Math.round((float)ClientUtil.calc(n2) / 2.0f + 1.0f);
        this.buttons.clear();
        int n5 = "\u6cc3\u5b5e\u6e95\u7093".length();
        int n6 = "\u5559\u56b6\u5d4c\u671f\u5f4e".length();
        int n7 = "\u5932\u70a8\u5169\u50b6".length();
        int n8 = "\u6414".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 + 9.0f, f - 75.0f, 23.0f, "\u041e\u0434\u0438\u043d\u043e\u0447\u043d\u0430\u044f \u0438\u0433\u0440\u0430", () -> {
            int n = "\u57fd\u6d79\u58cf\u5c4a\u5a82".length();
            int n2 = "\u5a09\u67a5\u5c40\u540b\u6524".length();
            int n3 = "\u62ca\u6501\u5b4f\u636e\u58c0".length();
            mc.displayGuiScreen(new WorldSelectionScreen(this));
        }));
        int n9 = "\u63ba\u5b0d".length();
        int n10 = "\u59b5\u6224\u6532\u4ed6\u563c".length();
        f3 += 39.0f;
        int n11 = "\u6bf0\u68b5\u5461\u5223".length();
        int n12 = "\u6372\u6389".length();
        int n13 = "\u617b".length();
        int n14 = "\u6d2c\u5101".length();
        int n15 = "\u6497\u506c".length();
        int n16 = "\u6e94\u6423".length();
        int n17 = "\u574f\u59ef".length();
        int n18 = "\u629a\u6a80\u6dd7".length();
        int n19 = "\u5395\u70a8".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 - 6.5f, f - 75.0f, 23.0f, "\u0421\u0435\u0442\u0435\u0432\u0430\u044f \u0438\u0433\u0440\u0430", () -> {
            int n = "\u624a\u5ce2\u7084".length();
            int n2 = "\u4f15\u57f6\u69dd\u5980".length();
            int n3 = "\u58d9\u5a89".length();
            mc.displayGuiScreen(new MultiplayerScreen(this));
        }));
        int n20 = "\u4e7c\u510f\u5c2e\u57d8".length();
        int n21 = "\u544a\u5f1b\u55e4\u629e\u53be".length();
        int n22 = "\u6606\u5a19".length();
        f3 += 39.0f;
        int n23 = "\u6c00\u6d26\u5dc4\u5241\u67a6".length();
        int n24 = "\u5b26\u6c65\u67dc\u5d8a".length();
        int n25 = "\u4e5c\u520e\u50e4\u63f3\u6d24".length();
        int n26 = "\u6df6\u6bc6\u55b6".length();
        int n27 = "\u5fd6\u5cd9".length();
        int n28 = "\u4fba\u54c8".length();
        int n29 = "\u5a4e".length();
        int n30 = "\u5b42".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 - 22.0f, f - 75.0f, 23.0f, "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438", () -> {
            int n = "\u6394\u5f20".length();
            int n2 = "\u679d\u5a27\u65b1".length();
            mc.displayGuiScreen(new OptionsScreen(this, MainScreen.mc.gameSettings));
        }));
        int n31 = "\u5f49\u5132".length();
        int n32 = "\u6ccd".length();
        int n33 = "\u598c\u606a".length();
        int n34 = "\u651f".length();
        int n35 = "\u6d95\u5b46".length();
        int n36 = "\u64b7".length();
        int n37 = "\u56cd".length();
        int n38 = "\u6039\u5900".length();
        int n39 = "\u683a".length();
        int n40 = "\u4e43".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 - 22.0f + 23.5f, f - 75.0f, 23.0f, "\u0412\u044b\u0445\u043e\u0434", () -> Minecraft.getInstance().shutdown()));
        int n41 = "\u53c4\u6477\u4e29".length();
        int n42 = "\u5a76".length();
    }

    @Override
    public boolean mouseScrolled(double d, double d2, double d3) {
        nevernight.getInstance().getAltWidget().updateScroll((int)d, (int)d2, (float)d3);
        return super.mouseScrolled(d, d2, d3);
    }

    @Override
    public void render(MatrixStack matrixStack, int n, int n2, float f) {
        boolean bl;
        super.render(matrixStack, n, n2, f);
        if (this.stopWatch.isReached(100L)) {
            int n3 = "\u6ed0\u6297".length();
            int n4 = "\u58be".length();
            int n5 = "\u61a8\u5c79\u6143".length();
            particles.add(new Particle());
            int n6 = "\u6cb4\u6aa4\u5ed3\u519f\u5286".length();
            int n7 = "\u5e42\u6ba7\u61dc".length();
            int n8 = "\u6912\u6730\u4f6c".length();
            this.stopWatch.reset();
        }
        MainWindow mainWindow = mc.getMainWindow();
        int n9 = ClientUtil.calc(mainWindow.getScaledWidth());
        int n10 = ClientUtil.calc(mainWindow.getScaledHeight());
        int n11 = 960;
        int n12 = 540;
        int n13 = "\u5126\u5f3c\u6a7c".length();
        int n14 = "\u54e8\u6b48\u5a11\u64f0".length();
        int n15 = "\u4fd8".length();
        int n16 = (n9 - n11) / 2;
        int n17 = "\u644b".length();
        int n18 = "\u5843\u5fbc".length();
        int n19 = (n10 - n12) / 2 + 50;
        boolean bl2 = bl = mainWindow.getWidth() < 900 && mainWindow.getHeight() < 900;
        if (bl) {
            n19 += 50;
        }
        DisplayUtils.drawRoundedRect(-10.0f, -10.0f, (float)(this.width + 1000), (float)(this.height + 1000), 0.0f, ColorUtils.rgba(25, 25, 25, 200));
        MainScreen.mc.gameRenderer.setupOverlayRendering(2);
        KawaseBlur.blur.updateBlur(3.0f, 4);
        this.drawButtons(matrixStack, n, n2, f);
        nevernight.getInstance().getAltWidget().render(matrixStack, n, n2);
        MainScreen.mc.gameRenderer.setupOverlayRendering();
    }

    @Override
    public boolean charTyped(char c, int n) {
        nevernight.getInstance().getAltWidget().onChar(c);
        return super.charTyped(c, n);
    }

    @Override
    public boolean keyPressed(int n, int n2, int n3) {
        nevernight.getInstance().getAltWidget().onKey(n);
        return false;
    }

    @Override
    public boolean mouseClicked(double d, double d2, int n) {
        Vec2i vec2i = ClientUtil.getMouse((int)d, (int)d2);
        this.buttons.forEach(button -> button.click(vec2i.getX(), vec2i.getY(), n));
        nevernight.getInstance().getAltWidget().click(vec2i.getX(), vec2i.getY(), n);
        return super.mouseClicked(d, d2, n);
    }

    private void drawButtons(MatrixStack matrixStack, int n, int n2, float f) {
        this.buttons.forEach(button -> button.render(matrixStack, n, n2, f));
    }

    private class Particle {
        private final float x = ThreadLocalRandom.current().nextInt(0, IMinecraft.mc.getMainWindow().getScaledWidth());
        private float y = 0.0f;
        private float size = 0.0f;

        public void update() {
            int n = "\u5a40\u6260".length();
            int n2 = "\u5147\u5b0b".length();
            this.y += 1.0f;
        }

        public void render(MatrixStack matrixStack) {
            int n = "\u5e44".length();
            this.size += 0.1f;
            GlStateManager.pushMatrix();
            GlStateManager.translated((double)this.x + Math.sin((float)System.nanoTime() / 1.0E9f) * 5.0, this.y, 0.0);
            GlStateManager.rotatef(this.size * 20.0f, 0.0f, 0.0f, 1.0f);
            GlStateManager.translated(-((double)this.x + Math.sin((float)System.nanoTime() / 1.0E9f) * 5.0), -this.y, 0.0);
            int n2 = "\u62ec\u68df\u60e7\u6f0b".length();
            int n3 = "\u63b9\u6173\u5a50\u625f".length();
            float f = 1.0f - MathHelper.clamp(this.y / (float)IMinecraft.mc.getMainWindow().getScaledHeight(), 0.0f, 1.0f);
            int n4 = "\u6d0f\u5833\u5f0f\u6f80\u4f24".length();
            int n5 = "\u6d99\u582b\u6b3a\u57ee".length();
            this.y += 1.0f;
            Fonts.damage.drawText(matrixStack, "A", (float)((double)this.x + Math.sin((float)System.nanoTime() / 1.0E9f) * 5.0), this.y, -1, MathHelper.clamp(this.size * f, 0.0f, 9.0f));
            GlStateManager.popMatrix();
            if (this.y >= (float)IMinecraft.mc.getMainWindow().getScaledHeight()) {
                particles.remove(this);
                int n6 = "\u57c7\u4f0e\u5cc3".length();
                int n7 = "\u7069\u6514\u6cc0\u63b0\u59cf".length();
                int n8 = "\u64da\u674b\u6bec\u5fd9\u5a5f".length();
            }
        }
    }

    private class Button {
        private final float x;
        private final float y;
        private final float width;
        private final float height;
        private String text;
        private Runnable action;

        public void render(MatrixStack matrixStack, int n, int n2, float f) {
            Stencil.initStencilToWrite();
            int n3 = "\u6881".length();
            int n4 = "\u6a5d\u6239".length();
            int n5 = "\u515a\u5f08\u558f".length();
            int n6 = "\u5e05\u5666".length();
            DisplayUtils.drawRoundedRect(this.x, this.y + 2.0f - 25.0f, this.width, this.height, 5.0f, ColorUtils.rgba(25, 25, 25, 250));
            Stencil.readStencilBuffer(1);
            Stencil.uninitStencilBuffer();
            int n7 = "\u6326\u522a".length();
            int n8 = "\u69ec\u55d7".length();
            int n9 = "\u65b3".length();
            Animation animation = new Animation();
            int n10 = ColorUtils.rgb(255, 255, 255);
            int n11 = "\u4f45\u5a52\u639c".length();
            int n12 = "\u4efb\u61e8\u553a\u5633".length();
            int n13 = "\u5a8c\u5330\u5aed\u5c2b".length();
            int n14 = "\u535c".length();
            if (MathUtil.isHovered(n, n2, this.x, this.y - 30.0f, this.width + 50.0f, this.height)) {
                // empty if block
            }
            int n15 = ColorUtils.rgba(0, 0, 0, 100);
            int n16 = "\u500a\u5b2c\u67f7".length();
            int n17 = "\u6f02\u596f\u6e07\u62cc".length();
            if (MathUtil.isHovered(n, n2, this.x, this.y - 30.0f, this.width + 20.0f, this.height)) {
                n15 = ColorUtils.rgba(255, 255, 255, 50);
            }
            int n18 = "\u5da0".length();
            int n19 = "\u6a45\u4f68\u638e".length();
            int n20 = "\u67ce\u701c".length();
            int n21 = "\u664d\u60f9\u5328\u6d3e".length();
            int n22 = "\u675e\u5a2d".length();
            DisplayUtils.drawShadow(this.x - 25.0f, this.y - 30.0f, this.width + 50.0f, this.height, 5, ColorUtils.getColor(0));
            int n23 = "\u54eb\u5bdc".length();
            int n24 = "\u5524\u6e1a\u6654\u6717".length();
            int n25 = "\u68e9\u585e\u70b8".length();
            int n26 = "\u5f82\u50bf\u5d58\u56e1".length();
            int n27 = "\u5be7\u5e04\u50e8\u6159".length();
            int n28 = "\u69e1\u69ba\u58fa".length();
            DisplayUtils.drawShadow(this.x - 25.0f, this.y - 30.0f, this.width + 50.0f, this.height, 6, ColorUtils.rgba(25, 25, 25, 250));
            int n29 = "\u5682\u6a50\u5e2d\u61e9\u5148".length();
            int n30 = "\u5100".length();
            int n31 = "\u5a0e\u529d\u5344".length();
            int n32 = "\u6002\u68e1\u6a42".length();
            int n33 = "\u566a\u6c3a\u540a\u6760".length();
            DisplayUtils.drawRoundedRect(this.x - 25.0f, this.y - 30.0f, this.width + 50.0f, this.height, 3.0f, n15);
            int n34 = "\u6e66\u4fd5".length();
            int n35 = "\u68fe\u54a2\u51ba\u569d".length();
            int n36 = "\u4f44\u5fca".length();
            int n37 = "\u6d69".length();
            int n38 = "\u4fd6\u6f96\u5a46".length();
            int n39 = "\u58ad\u6294\u6b8d\u5077".length();
            int n40 = "\u5230\u6e5c".length();
            Fonts.sfMedium.drawCenteredText(matrixStack, this.text, this.x + this.width / 2.0f, this.y - 30.0f - 2.5f + this.height / 2.0f - 5.5f + 3.5f, ColorUtils.rgb(255, 255, 255), 8.0f);
        }

        public void click(int n, int n2, int n3) {
            int n4 = "\u69e2\u6bff\u6c21\u59d0\u57db".length();
            if (MathUtil.isHovered(n, n2, this.x, this.y - 30.0f, this.width, this.height)) {
                this.action.run();
            }
        }

        public Button(float f, float f2, float f3, float f4, String string, Runnable runnable) {
            this.x = f;
            this.y = f2;
            this.width = f3;
            this.height = f4;
            this.text = string;
            this.action = runnable;
        }

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

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

        public float getWidth() {
            return this.width;
        }

        public float getHeight() {
            return this.height;
        }
    }
}
чтооо, спасибо, пойду пастить
 
Забаненный
Статус
Оффлайн
Регистрация
2 Фев 2024
Сообщения
852
Реакции[?]
7
Поинты[?]
4K
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
а чо низя?

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


Java:
package ua.nevernight.ui.mainmenu;

import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.ThreadLocalRandom;
import net.minecraft.client.MainWindow;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screen.MultiplayerScreen;
import net.minecraft.client.gui.screen.OptionsScreen;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.screen.WorldSelectionScreen;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.text.ITextComponent;
import ru.hogoshi.Animation;
import ua.nevernight.nevernight;
import ua.nevernight.utils.client.ClientUtil;
import ua.nevernight.utils.client.IMinecraft;
import ua.nevernight.utils.client.Vec2i;
import ua.nevernight.utils.math.MathUtil;
import ua.nevernight.utils.math.StopWatch;
import ua.nevernight.utils.render.ColorUtils;
import ua.nevernight.utils.render.DisplayUtils;
import ua.nevernight.utils.render.KawaseBlur;
import ua.nevernight.utils.render.Stencil;
import ua.nevernight.utils.render.font.Fonts;

public class MainScreen
extends Screen
implements IMinecraft {
    private final ResourceLocation backmenu = new ResourceLocation("nevernight/images/backmenu.png");
    private final List<Button> buttons = new ArrayList<Button>();
    private static final CopyOnWriteArrayList<Particle> particles = new CopyOnWriteArrayList();
    private final StopWatch stopWatch = new StopWatch();
    static boolean start = false;
    public static final ResourceLocation button = new ResourceLocation("nevernight/images/button.png");

    public MainScreen() {
        super(ITextComponent.getTextComponentOrEmpty(""));
    }

    @Override
    public void init(Minecraft minecraft, int n, int n2) {
        super.init(minecraft, n, n2);
        float f = 175.0f;
        for (Particle particle : particles) {
            particle.y = ThreadLocalRandom.current().nextInt(-5, n2);
        }
        int n3 = "\u67d1\u4fe3".length();
        int n4 = "\u523f\u6d67\u502e".length();
        float f2 = (float)ClientUtil.calc(n) / 2.0f - f / 2.0f + 10.0f;
        float f3 = Math.round((float)ClientUtil.calc(n2) / 2.0f + 1.0f);
        this.buttons.clear();
        int n5 = "\u6cc3\u5b5e\u6e95\u7093".length();
        int n6 = "\u5559\u56b6\u5d4c\u671f\u5f4e".length();
        int n7 = "\u5932\u70a8\u5169\u50b6".length();
        int n8 = "\u6414".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 + 9.0f, f - 75.0f, 23.0f, "\u041e\u0434\u0438\u043d\u043e\u0447\u043d\u0430\u044f \u0438\u0433\u0440\u0430", () -> {
            int n = "\u57fd\u6d79\u58cf\u5c4a\u5a82".length();
            int n2 = "\u5a09\u67a5\u5c40\u540b\u6524".length();
            int n3 = "\u62ca\u6501\u5b4f\u636e\u58c0".length();
            mc.displayGuiScreen(new WorldSelectionScreen(this));
        }));
        int n9 = "\u63ba\u5b0d".length();
        int n10 = "\u59b5\u6224\u6532\u4ed6\u563c".length();
        f3 += 39.0f;
        int n11 = "\u6bf0\u68b5\u5461\u5223".length();
        int n12 = "\u6372\u6389".length();
        int n13 = "\u617b".length();
        int n14 = "\u6d2c\u5101".length();
        int n15 = "\u6497\u506c".length();
        int n16 = "\u6e94\u6423".length();
        int n17 = "\u574f\u59ef".length();
        int n18 = "\u629a\u6a80\u6dd7".length();
        int n19 = "\u5395\u70a8".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 - 6.5f, f - 75.0f, 23.0f, "\u0421\u0435\u0442\u0435\u0432\u0430\u044f \u0438\u0433\u0440\u0430", () -> {
            int n = "\u624a\u5ce2\u7084".length();
            int n2 = "\u4f15\u57f6\u69dd\u5980".length();
            int n3 = "\u58d9\u5a89".length();
            mc.displayGuiScreen(new MultiplayerScreen(this));
        }));
        int n20 = "\u4e7c\u510f\u5c2e\u57d8".length();
        int n21 = "\u544a\u5f1b\u55e4\u629e\u53be".length();
        int n22 = "\u6606\u5a19".length();
        f3 += 39.0f;
        int n23 = "\u6c00\u6d26\u5dc4\u5241\u67a6".length();
        int n24 = "\u5b26\u6c65\u67dc\u5d8a".length();
        int n25 = "\u4e5c\u520e\u50e4\u63f3\u6d24".length();
        int n26 = "\u6df6\u6bc6\u55b6".length();
        int n27 = "\u5fd6\u5cd9".length();
        int n28 = "\u4fba\u54c8".length();
        int n29 = "\u5a4e".length();
        int n30 = "\u5b42".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 - 22.0f, f - 75.0f, 23.0f, "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438", () -> {
            int n = "\u6394\u5f20".length();
            int n2 = "\u679d\u5a27\u65b1".length();
            mc.displayGuiScreen(new OptionsScreen(this, MainScreen.mc.gameSettings));
        }));
        int n31 = "\u5f49\u5132".length();
        int n32 = "\u6ccd".length();
        int n33 = "\u598c\u606a".length();
        int n34 = "\u651f".length();
        int n35 = "\u6d95\u5b46".length();
        int n36 = "\u64b7".length();
        int n37 = "\u56cd".length();
        int n38 = "\u6039\u5900".length();
        int n39 = "\u683a".length();
        int n40 = "\u4e43".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 - 22.0f + 23.5f, f - 75.0f, 23.0f, "\u0412\u044b\u0445\u043e\u0434", () -> Minecraft.getInstance().shutdown()));
        int n41 = "\u53c4\u6477\u4e29".length();
        int n42 = "\u5a76".length();
    }

    @Override
    public boolean mouseScrolled(double d, double d2, double d3) {
        nevernight.getInstance().getAltWidget().updateScroll((int)d, (int)d2, (float)d3);
        return super.mouseScrolled(d, d2, d3);
    }

    @Override
    public void render(MatrixStack matrixStack, int n, int n2, float f) {
        boolean bl;
        super.render(matrixStack, n, n2, f);
        if (this.stopWatch.isReached(100L)) {
            int n3 = "\u6ed0\u6297".length();
            int n4 = "\u58be".length();
            int n5 = "\u61a8\u5c79\u6143".length();
            particles.add(new Particle());
            int n6 = "\u6cb4\u6aa4\u5ed3\u519f\u5286".length();
            int n7 = "\u5e42\u6ba7\u61dc".length();
            int n8 = "\u6912\u6730\u4f6c".length();
            this.stopWatch.reset();
        }
        MainWindow mainWindow = mc.getMainWindow();
        int n9 = ClientUtil.calc(mainWindow.getScaledWidth());
        int n10 = ClientUtil.calc(mainWindow.getScaledHeight());
        int n11 = 960;
        int n12 = 540;
        int n13 = "\u5126\u5f3c\u6a7c".length();
        int n14 = "\u54e8\u6b48\u5a11\u64f0".length();
        int n15 = "\u4fd8".length();
        int n16 = (n9 - n11) / 2;
        int n17 = "\u644b".length();
        int n18 = "\u5843\u5fbc".length();
        int n19 = (n10 - n12) / 2 + 50;
        boolean bl2 = bl = mainWindow.getWidth() < 900 && mainWindow.getHeight() < 900;
        if (bl) {
            n19 += 50;
        }
        DisplayUtils.drawRoundedRect(-10.0f, -10.0f, (float)(this.width + 1000), (float)(this.height + 1000), 0.0f, ColorUtils.rgba(25, 25, 25, 200));
        MainScreen.mc.gameRenderer.setupOverlayRendering(2);
        KawaseBlur.blur.updateBlur(3.0f, 4);
        this.drawButtons(matrixStack, n, n2, f);
        nevernight.getInstance().getAltWidget().render(matrixStack, n, n2);
        MainScreen.mc.gameRenderer.setupOverlayRendering();
    }

    @Override
    public boolean charTyped(char c, int n) {
        nevernight.getInstance().getAltWidget().onChar(c);
        return super.charTyped(c, n);
    }

    @Override
    public boolean keyPressed(int n, int n2, int n3) {
        nevernight.getInstance().getAltWidget().onKey(n);
        return false;
    }

    @Override
    public boolean mouseClicked(double d, double d2, int n) {
        Vec2i vec2i = ClientUtil.getMouse((int)d, (int)d2);
        this.buttons.forEach(button -> button.click(vec2i.getX(), vec2i.getY(), n));
        nevernight.getInstance().getAltWidget().click(vec2i.getX(), vec2i.getY(), n);
        return super.mouseClicked(d, d2, n);
    }

    private void drawButtons(MatrixStack matrixStack, int n, int n2, float f) {
        this.buttons.forEach(button -> button.render(matrixStack, n, n2, f));
    }

    private class Particle {
        private final float x = ThreadLocalRandom.current().nextInt(0, IMinecraft.mc.getMainWindow().getScaledWidth());
        private float y = 0.0f;
        private float size = 0.0f;

        public void update() {
            int n = "\u5a40\u6260".length();
            int n2 = "\u5147\u5b0b".length();
            this.y += 1.0f;
        }

        public void render(MatrixStack matrixStack) {
            int n = "\u5e44".length();
            this.size += 0.1f;
            GlStateManager.pushMatrix();
            GlStateManager.translated((double)this.x + Math.sin((float)System.nanoTime() / 1.0E9f) * 5.0, this.y, 0.0);
            GlStateManager.rotatef(this.size * 20.0f, 0.0f, 0.0f, 1.0f);
            GlStateManager.translated(-((double)this.x + Math.sin((float)System.nanoTime() / 1.0E9f) * 5.0), -this.y, 0.0);
            int n2 = "\u62ec\u68df\u60e7\u6f0b".length();
            int n3 = "\u63b9\u6173\u5a50\u625f".length();
            float f = 1.0f - MathHelper.clamp(this.y / (float)IMinecraft.mc.getMainWindow().getScaledHeight(), 0.0f, 1.0f);
            int n4 = "\u6d0f\u5833\u5f0f\u6f80\u4f24".length();
            int n5 = "\u6d99\u582b\u6b3a\u57ee".length();
            this.y += 1.0f;
            Fonts.damage.drawText(matrixStack, "A", (float)((double)this.x + Math.sin((float)System.nanoTime() / 1.0E9f) * 5.0), this.y, -1, MathHelper.clamp(this.size * f, 0.0f, 9.0f));
            GlStateManager.popMatrix();
            if (this.y >= (float)IMinecraft.mc.getMainWindow().getScaledHeight()) {
                particles.remove(this);
                int n6 = "\u57c7\u4f0e\u5cc3".length();
                int n7 = "\u7069\u6514\u6cc0\u63b0\u59cf".length();
                int n8 = "\u64da\u674b\u6bec\u5fd9\u5a5f".length();
            }
        }
    }

    private class Button {
        private final float x;
        private final float y;
        private final float width;
        private final float height;
        private String text;
        private Runnable action;

        public void render(MatrixStack matrixStack, int n, int n2, float f) {
            Stencil.initStencilToWrite();
            int n3 = "\u6881".length();
            int n4 = "\u6a5d\u6239".length();
            int n5 = "\u515a\u5f08\u558f".length();
            int n6 = "\u5e05\u5666".length();
            DisplayUtils.drawRoundedRect(this.x, this.y + 2.0f - 25.0f, this.width, this.height, 5.0f, ColorUtils.rgba(25, 25, 25, 250));
            Stencil.readStencilBuffer(1);
            Stencil.uninitStencilBuffer();
            int n7 = "\u6326\u522a".length();
            int n8 = "\u69ec\u55d7".length();
            int n9 = "\u65b3".length();
            Animation animation = new Animation();
            int n10 = ColorUtils.rgb(255, 255, 255);
            int n11 = "\u4f45\u5a52\u639c".length();
            int n12 = "\u4efb\u61e8\u553a\u5633".length();
            int n13 = "\u5a8c\u5330\u5aed\u5c2b".length();
            int n14 = "\u535c".length();
            if (MathUtil.isHovered(n, n2, this.x, this.y - 30.0f, this.width + 50.0f, this.height)) {
                // empty if block
            }
            int n15 = ColorUtils.rgba(0, 0, 0, 100);
            int n16 = "\u500a\u5b2c\u67f7".length();
            int n17 = "\u6f02\u596f\u6e07\u62cc".length();
            if (MathUtil.isHovered(n, n2, this.x, this.y - 30.0f, this.width + 20.0f, this.height)) {
                n15 = ColorUtils.rgba(255, 255, 255, 50);
            }
            int n18 = "\u5da0".length();
            int n19 = "\u6a45\u4f68\u638e".length();
            int n20 = "\u67ce\u701c".length();
            int n21 = "\u664d\u60f9\u5328\u6d3e".length();
            int n22 = "\u675e\u5a2d".length();
            DisplayUtils.drawShadow(this.x - 25.0f, this.y - 30.0f, this.width + 50.0f, this.height, 5, ColorUtils.getColor(0));
            int n23 = "\u54eb\u5bdc".length();
            int n24 = "\u5524\u6e1a\u6654\u6717".length();
            int n25 = "\u68e9\u585e\u70b8".length();
            int n26 = "\u5f82\u50bf\u5d58\u56e1".length();
            int n27 = "\u5be7\u5e04\u50e8\u6159".length();
            int n28 = "\u69e1\u69ba\u58fa".length();
            DisplayUtils.drawShadow(this.x - 25.0f, this.y - 30.0f, this.width + 50.0f, this.height, 6, ColorUtils.rgba(25, 25, 25, 250));
            int n29 = "\u5682\u6a50\u5e2d\u61e9\u5148".length();
            int n30 = "\u5100".length();
            int n31 = "\u5a0e\u529d\u5344".length();
            int n32 = "\u6002\u68e1\u6a42".length();
            int n33 = "\u566a\u6c3a\u540a\u6760".length();
            DisplayUtils.drawRoundedRect(this.x - 25.0f, this.y - 30.0f, this.width + 50.0f, this.height, 3.0f, n15);
            int n34 = "\u6e66\u4fd5".length();
            int n35 = "\u68fe\u54a2\u51ba\u569d".length();
            int n36 = "\u4f44\u5fca".length();
            int n37 = "\u6d69".length();
            int n38 = "\u4fd6\u6f96\u5a46".length();
            int n39 = "\u58ad\u6294\u6b8d\u5077".length();
            int n40 = "\u5230\u6e5c".length();
            Fonts.sfMedium.drawCenteredText(matrixStack, this.text, this.x + this.width / 2.0f, this.y - 30.0f - 2.5f + this.height / 2.0f - 5.5f + 3.5f, ColorUtils.rgb(255, 255, 255), 8.0f);
        }

        public void click(int n, int n2, int n3) {
            int n4 = "\u69e2\u6bff\u6c21\u59d0\u57db".length();
            if (MathUtil.isHovered(n, n2, this.x, this.y - 30.0f, this.width, this.height)) {
                this.action.run();
            }
        }

        public Button(float f, float f2, float f3, float f4, String string, Runnable runnable) {
            this.x = f;
            this.y = f2;
            this.width = f3;
            this.height = f4;
            this.text = string;
            this.action = runnable;
        }

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

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

        public float getWidth() {
            return this.width;
        }

        public float getHeight() {
            return this.height;
        }
    }
}
Дело Икари Синдзи
 
Начинающий
Статус
Оффлайн
Регистрация
2 Фев 2024
Сообщения
138
Реакции[?]
0
Поинты[?]
1K
а чо низя?

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


Java:
package ua.nevernight.ui.mainmenu;

import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.ThreadLocalRandom;
import net.minecraft.client.MainWindow;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screen.MultiplayerScreen;
import net.minecraft.client.gui.screen.OptionsScreen;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.screen.WorldSelectionScreen;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.text.ITextComponent;
import ru.hogoshi.Animation;
import ua.nevernight.nevernight;
import ua.nevernight.utils.client.ClientUtil;
import ua.nevernight.utils.client.IMinecraft;
import ua.nevernight.utils.client.Vec2i;
import ua.nevernight.utils.math.MathUtil;
import ua.nevernight.utils.math.StopWatch;
import ua.nevernight.utils.render.ColorUtils;
import ua.nevernight.utils.render.DisplayUtils;
import ua.nevernight.utils.render.KawaseBlur;
import ua.nevernight.utils.render.Stencil;
import ua.nevernight.utils.render.font.Fonts;

public class MainScreen
extends Screen
implements IMinecraft {
    private final ResourceLocation backmenu = new ResourceLocation("nevernight/images/backmenu.png");
    private final List<Button> buttons = new ArrayList<Button>();
    private static final CopyOnWriteArrayList<Particle> particles = new CopyOnWriteArrayList();
    private final StopWatch stopWatch = new StopWatch();
    static boolean start = false;
    public static final ResourceLocation button = new ResourceLocation("nevernight/images/button.png");

    public MainScreen() {
        super(ITextComponent.getTextComponentOrEmpty(""));
    }

    @Override
    public void init(Minecraft minecraft, int n, int n2) {
        super.init(minecraft, n, n2);
        float f = 175.0f;
        for (Particle particle : particles) {
            particle.y = ThreadLocalRandom.current().nextInt(-5, n2);
        }
        int n3 = "\u67d1\u4fe3".length();
        int n4 = "\u523f\u6d67\u502e".length();
        float f2 = (float)ClientUtil.calc(n) / 2.0f - f / 2.0f + 10.0f;
        float f3 = Math.round((float)ClientUtil.calc(n2) / 2.0f + 1.0f);
        this.buttons.clear();
        int n5 = "\u6cc3\u5b5e\u6e95\u7093".length();
        int n6 = "\u5559\u56b6\u5d4c\u671f\u5f4e".length();
        int n7 = "\u5932\u70a8\u5169\u50b6".length();
        int n8 = "\u6414".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 + 9.0f, f - 75.0f, 23.0f, "\u041e\u0434\u0438\u043d\u043e\u0447\u043d\u0430\u044f \u0438\u0433\u0440\u0430", () -> {
            int n = "\u57fd\u6d79\u58cf\u5c4a\u5a82".length();
            int n2 = "\u5a09\u67a5\u5c40\u540b\u6524".length();
            int n3 = "\u62ca\u6501\u5b4f\u636e\u58c0".length();
            mc.displayGuiScreen(new WorldSelectionScreen(this));
        }));
        int n9 = "\u63ba\u5b0d".length();
        int n10 = "\u59b5\u6224\u6532\u4ed6\u563c".length();
        f3 += 39.0f;
        int n11 = "\u6bf0\u68b5\u5461\u5223".length();
        int n12 = "\u6372\u6389".length();
        int n13 = "\u617b".length();
        int n14 = "\u6d2c\u5101".length();
        int n15 = "\u6497\u506c".length();
        int n16 = "\u6e94\u6423".length();
        int n17 = "\u574f\u59ef".length();
        int n18 = "\u629a\u6a80\u6dd7".length();
        int n19 = "\u5395\u70a8".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 - 6.5f, f - 75.0f, 23.0f, "\u0421\u0435\u0442\u0435\u0432\u0430\u044f \u0438\u0433\u0440\u0430", () -> {
            int n = "\u624a\u5ce2\u7084".length();
            int n2 = "\u4f15\u57f6\u69dd\u5980".length();
            int n3 = "\u58d9\u5a89".length();
            mc.displayGuiScreen(new MultiplayerScreen(this));
        }));
        int n20 = "\u4e7c\u510f\u5c2e\u57d8".length();
        int n21 = "\u544a\u5f1b\u55e4\u629e\u53be".length();
        int n22 = "\u6606\u5a19".length();
        f3 += 39.0f;
        int n23 = "\u6c00\u6d26\u5dc4\u5241\u67a6".length();
        int n24 = "\u5b26\u6c65\u67dc\u5d8a".length();
        int n25 = "\u4e5c\u520e\u50e4\u63f3\u6d24".length();
        int n26 = "\u6df6\u6bc6\u55b6".length();
        int n27 = "\u5fd6\u5cd9".length();
        int n28 = "\u4fba\u54c8".length();
        int n29 = "\u5a4e".length();
        int n30 = "\u5b42".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 - 22.0f, f - 75.0f, 23.0f, "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438", () -> {
            int n = "\u6394\u5f20".length();
            int n2 = "\u679d\u5a27\u65b1".length();
            mc.displayGuiScreen(new OptionsScreen(this, MainScreen.mc.gameSettings));
        }));
        int n31 = "\u5f49\u5132".length();
        int n32 = "\u6ccd".length();
        int n33 = "\u598c\u606a".length();
        int n34 = "\u651f".length();
        int n35 = "\u6d95\u5b46".length();
        int n36 = "\u64b7".length();
        int n37 = "\u56cd".length();
        int n38 = "\u6039\u5900".length();
        int n39 = "\u683a".length();
        int n40 = "\u4e43".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 - 22.0f + 23.5f, f - 75.0f, 23.0f, "\u0412\u044b\u0445\u043e\u0434", () -> Minecraft.getInstance().shutdown()));
        int n41 = "\u53c4\u6477\u4e29".length();
        int n42 = "\u5a76".length();
    }

    @Override
    public boolean mouseScrolled(double d, double d2, double d3) {
        nevernight.getInstance().getAltWidget().updateScroll((int)d, (int)d2, (float)d3);
        return super.mouseScrolled(d, d2, d3);
    }

    @Override
    public void render(MatrixStack matrixStack, int n, int n2, float f) {
        boolean bl;
        super.render(matrixStack, n, n2, f);
        if (this.stopWatch.isReached(100L)) {
            int n3 = "\u6ed0\u6297".length();
            int n4 = "\u58be".length();
            int n5 = "\u61a8\u5c79\u6143".length();
            particles.add(new Particle());
            int n6 = "\u6cb4\u6aa4\u5ed3\u519f\u5286".length();
            int n7 = "\u5e42\u6ba7\u61dc".length();
            int n8 = "\u6912\u6730\u4f6c".length();
            this.stopWatch.reset();
        }
        MainWindow mainWindow = mc.getMainWindow();
        int n9 = ClientUtil.calc(mainWindow.getScaledWidth());
        int n10 = ClientUtil.calc(mainWindow.getScaledHeight());
        int n11 = 960;
        int n12 = 540;
        int n13 = "\u5126\u5f3c\u6a7c".length();
        int n14 = "\u54e8\u6b48\u5a11\u64f0".length();
        int n15 = "\u4fd8".length();
        int n16 = (n9 - n11) / 2;
        int n17 = "\u644b".length();
        int n18 = "\u5843\u5fbc".length();
        int n19 = (n10 - n12) / 2 + 50;
        boolean bl2 = bl = mainWindow.getWidth() < 900 && mainWindow.getHeight() < 900;
        if (bl) {
            n19 += 50;
        }
        DisplayUtils.drawRoundedRect(-10.0f, -10.0f, (float)(this.width + 1000), (float)(this.height + 1000), 0.0f, ColorUtils.rgba(25, 25, 25, 200));
        MainScreen.mc.gameRenderer.setupOverlayRendering(2);
        KawaseBlur.blur.updateBlur(3.0f, 4);
        this.drawButtons(matrixStack, n, n2, f);
        nevernight.getInstance().getAltWidget().render(matrixStack, n, n2);
        MainScreen.mc.gameRenderer.setupOverlayRendering();
    }

    @Override
    public boolean charTyped(char c, int n) {
        nevernight.getInstance().getAltWidget().onChar(c);
        return super.charTyped(c, n);
    }

    @Override
    public boolean keyPressed(int n, int n2, int n3) {
        nevernight.getInstance().getAltWidget().onKey(n);
        return false;
    }

    @Override
    public boolean mouseClicked(double d, double d2, int n) {
        Vec2i vec2i = ClientUtil.getMouse((int)d, (int)d2);
        this.buttons.forEach(button -> button.click(vec2i.getX(), vec2i.getY(), n));
        nevernight.getInstance().getAltWidget().click(vec2i.getX(), vec2i.getY(), n);
        return super.mouseClicked(d, d2, n);
    }

    private void drawButtons(MatrixStack matrixStack, int n, int n2, float f) {
        this.buttons.forEach(button -> button.render(matrixStack, n, n2, f));
    }

    private class Particle {
        private final float x = ThreadLocalRandom.current().nextInt(0, IMinecraft.mc.getMainWindow().getScaledWidth());
        private float y = 0.0f;
        private float size = 0.0f;

        public void update() {
            int n = "\u5a40\u6260".length();
            int n2 = "\u5147\u5b0b".length();
            this.y += 1.0f;
        }

        public void render(MatrixStack matrixStack) {
            int n = "\u5e44".length();
            this.size += 0.1f;
            GlStateManager.pushMatrix();
            GlStateManager.translated((double)this.x + Math.sin((float)System.nanoTime() / 1.0E9f) * 5.0, this.y, 0.0);
            GlStateManager.rotatef(this.size * 20.0f, 0.0f, 0.0f, 1.0f);
            GlStateManager.translated(-((double)this.x + Math.sin((float)System.nanoTime() / 1.0E9f) * 5.0), -this.y, 0.0);
            int n2 = "\u62ec\u68df\u60e7\u6f0b".length();
            int n3 = "\u63b9\u6173\u5a50\u625f".length();
            float f = 1.0f - MathHelper.clamp(this.y / (float)IMinecraft.mc.getMainWindow().getScaledHeight(), 0.0f, 1.0f);
            int n4 = "\u6d0f\u5833\u5f0f\u6f80\u4f24".length();
            int n5 = "\u6d99\u582b\u6b3a\u57ee".length();
            this.y += 1.0f;
            Fonts.damage.drawText(matrixStack, "A", (float)((double)this.x + Math.sin((float)System.nanoTime() / 1.0E9f) * 5.0), this.y, -1, MathHelper.clamp(this.size * f, 0.0f, 9.0f));
            GlStateManager.popMatrix();
            if (this.y >= (float)IMinecraft.mc.getMainWindow().getScaledHeight()) {
                particles.remove(this);
                int n6 = "\u57c7\u4f0e\u5cc3".length();
                int n7 = "\u7069\u6514\u6cc0\u63b0\u59cf".length();
                int n8 = "\u64da\u674b\u6bec\u5fd9\u5a5f".length();
            }
        }
    }

    private class Button {
        private final float x;
        private final float y;
        private final float width;
        private final float height;
        private String text;
        private Runnable action;

        public void render(MatrixStack matrixStack, int n, int n2, float f) {
            Stencil.initStencilToWrite();
            int n3 = "\u6881".length();
            int n4 = "\u6a5d\u6239".length();
            int n5 = "\u515a\u5f08\u558f".length();
            int n6 = "\u5e05\u5666".length();
            DisplayUtils.drawRoundedRect(this.x, this.y + 2.0f - 25.0f, this.width, this.height, 5.0f, ColorUtils.rgba(25, 25, 25, 250));
            Stencil.readStencilBuffer(1);
            Stencil.uninitStencilBuffer();
            int n7 = "\u6326\u522a".length();
            int n8 = "\u69ec\u55d7".length();
            int n9 = "\u65b3".length();
            Animation animation = new Animation();
            int n10 = ColorUtils.rgb(255, 255, 255);
            int n11 = "\u4f45\u5a52\u639c".length();
            int n12 = "\u4efb\u61e8\u553a\u5633".length();
            int n13 = "\u5a8c\u5330\u5aed\u5c2b".length();
            int n14 = "\u535c".length();
            if (MathUtil.isHovered(n, n2, this.x, this.y - 30.0f, this.width + 50.0f, this.height)) {
                // empty if block
            }
            int n15 = ColorUtils.rgba(0, 0, 0, 100);
            int n16 = "\u500a\u5b2c\u67f7".length();
            int n17 = "\u6f02\u596f\u6e07\u62cc".length();
            if (MathUtil.isHovered(n, n2, this.x, this.y - 30.0f, this.width + 20.0f, this.height)) {
                n15 = ColorUtils.rgba(255, 255, 255, 50);
            }
            int n18 = "\u5da0".length();
            int n19 = "\u6a45\u4f68\u638e".length();
            int n20 = "\u67ce\u701c".length();
            int n21 = "\u664d\u60f9\u5328\u6d3e".length();
            int n22 = "\u675e\u5a2d".length();
            DisplayUtils.drawShadow(this.x - 25.0f, this.y - 30.0f, this.width + 50.0f, this.height, 5, ColorUtils.getColor(0));
            int n23 = "\u54eb\u5bdc".length();
            int n24 = "\u5524\u6e1a\u6654\u6717".length();
            int n25 = "\u68e9\u585e\u70b8".length();
            int n26 = "\u5f82\u50bf\u5d58\u56e1".length();
            int n27 = "\u5be7\u5e04\u50e8\u6159".length();
            int n28 = "\u69e1\u69ba\u58fa".length();
            DisplayUtils.drawShadow(this.x - 25.0f, this.y - 30.0f, this.width + 50.0f, this.height, 6, ColorUtils.rgba(25, 25, 25, 250));
            int n29 = "\u5682\u6a50\u5e2d\u61e9\u5148".length();
            int n30 = "\u5100".length();
            int n31 = "\u5a0e\u529d\u5344".length();
            int n32 = "\u6002\u68e1\u6a42".length();
            int n33 = "\u566a\u6c3a\u540a\u6760".length();
            DisplayUtils.drawRoundedRect(this.x - 25.0f, this.y - 30.0f, this.width + 50.0f, this.height, 3.0f, n15);
            int n34 = "\u6e66\u4fd5".length();
            int n35 = "\u68fe\u54a2\u51ba\u569d".length();
            int n36 = "\u4f44\u5fca".length();
            int n37 = "\u6d69".length();
            int n38 = "\u4fd6\u6f96\u5a46".length();
            int n39 = "\u58ad\u6294\u6b8d\u5077".length();
            int n40 = "\u5230\u6e5c".length();
            Fonts.sfMedium.drawCenteredText(matrixStack, this.text, this.x + this.width / 2.0f, this.y - 30.0f - 2.5f + this.height / 2.0f - 5.5f + 3.5f, ColorUtils.rgb(255, 255, 255), 8.0f);
        }

        public void click(int n, int n2, int n3) {
            int n4 = "\u69e2\u6bff\u6c21\u59d0\u57db".length();
            if (MathUtil.isHovered(n, n2, this.x, this.y - 30.0f, this.width, this.height)) {
                this.action.run();
            }
        }

        public Button(float f, float f2, float f3, float f4, String string, Runnable runnable) {
            this.x = f;
            this.y = f2;
            this.width = f3;
            this.height = f4;
            this.text = string;
            this.action = runnable;
        }

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

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

        public float getWidth() {
            return this.width;
        }

        public float getHeight() {
            return this.height;
        }
    }
}
Какой неверхуернихт? Это yougame.gpt
 
Начинающий
Статус
Оффлайн
Регистрация
31 Дек 2022
Сообщения
209
Реакции[?]
2
Поинты[?]
1K
а чо низя?

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


Java:
package ua.nevernight.ui.mainmenu;

import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.ThreadLocalRandom;
import net.minecraft.client.MainWindow;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screen.MultiplayerScreen;
import net.minecraft.client.gui.screen.OptionsScreen;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.screen.WorldSelectionScreen;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.text.ITextComponent;
import ru.hogoshi.Animation;
import ua.nevernight.nevernight;
import ua.nevernight.utils.client.ClientUtil;
import ua.nevernight.utils.client.IMinecraft;
import ua.nevernight.utils.client.Vec2i;
import ua.nevernight.utils.math.MathUtil;
import ua.nevernight.utils.math.StopWatch;
import ua.nevernight.utils.render.ColorUtils;
import ua.nevernight.utils.render.DisplayUtils;
import ua.nevernight.utils.render.KawaseBlur;
import ua.nevernight.utils.render.Stencil;
import ua.nevernight.utils.render.font.Fonts;

public class MainScreen
extends Screen
implements IMinecraft {
    private final ResourceLocation backmenu = new ResourceLocation("nevernight/images/backmenu.png");
    private final List<Button> buttons = new ArrayList<Button>();
    private static final CopyOnWriteArrayList<Particle> particles = new CopyOnWriteArrayList();
    private final StopWatch stopWatch = new StopWatch();
    static boolean start = false;
    public static final ResourceLocation button = new ResourceLocation("nevernight/images/button.png");

    public MainScreen() {
        super(ITextComponent.getTextComponentOrEmpty(""));
    }

    @Override
    public void init(Minecraft minecraft, int n, int n2) {
        super.init(minecraft, n, n2);
        float f = 175.0f;
        for (Particle particle : particles) {
            particle.y = ThreadLocalRandom.current().nextInt(-5, n2);
        }
        int n3 = "\u67d1\u4fe3".length();
        int n4 = "\u523f\u6d67\u502e".length();
        float f2 = (float)ClientUtil.calc(n) / 2.0f - f / 2.0f + 10.0f;
        float f3 = Math.round((float)ClientUtil.calc(n2) / 2.0f + 1.0f);
        this.buttons.clear();
        int n5 = "\u6cc3\u5b5e\u6e95\u7093".length();
        int n6 = "\u5559\u56b6\u5d4c\u671f\u5f4e".length();
        int n7 = "\u5932\u70a8\u5169\u50b6".length();
        int n8 = "\u6414".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 + 9.0f, f - 75.0f, 23.0f, "\u041e\u0434\u0438\u043d\u043e\u0447\u043d\u0430\u044f \u0438\u0433\u0440\u0430", () -> {
            int n = "\u57fd\u6d79\u58cf\u5c4a\u5a82".length();
            int n2 = "\u5a09\u67a5\u5c40\u540b\u6524".length();
            int n3 = "\u62ca\u6501\u5b4f\u636e\u58c0".length();
            mc.displayGuiScreen(new WorldSelectionScreen(this));
        }));
        int n9 = "\u63ba\u5b0d".length();
        int n10 = "\u59b5\u6224\u6532\u4ed6\u563c".length();
        f3 += 39.0f;
        int n11 = "\u6bf0\u68b5\u5461\u5223".length();
        int n12 = "\u6372\u6389".length();
        int n13 = "\u617b".length();
        int n14 = "\u6d2c\u5101".length();
        int n15 = "\u6497\u506c".length();
        int n16 = "\u6e94\u6423".length();
        int n17 = "\u574f\u59ef".length();
        int n18 = "\u629a\u6a80\u6dd7".length();
        int n19 = "\u5395\u70a8".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 - 6.5f, f - 75.0f, 23.0f, "\u0421\u0435\u0442\u0435\u0432\u0430\u044f \u0438\u0433\u0440\u0430", () -> {
            int n = "\u624a\u5ce2\u7084".length();
            int n2 = "\u4f15\u57f6\u69dd\u5980".length();
            int n3 = "\u58d9\u5a89".length();
            mc.displayGuiScreen(new MultiplayerScreen(this));
        }));
        int n20 = "\u4e7c\u510f\u5c2e\u57d8".length();
        int n21 = "\u544a\u5f1b\u55e4\u629e\u53be".length();
        int n22 = "\u6606\u5a19".length();
        f3 += 39.0f;
        int n23 = "\u6c00\u6d26\u5dc4\u5241\u67a6".length();
        int n24 = "\u5b26\u6c65\u67dc\u5d8a".length();
        int n25 = "\u4e5c\u520e\u50e4\u63f3\u6d24".length();
        int n26 = "\u6df6\u6bc6\u55b6".length();
        int n27 = "\u5fd6\u5cd9".length();
        int n28 = "\u4fba\u54c8".length();
        int n29 = "\u5a4e".length();
        int n30 = "\u5b42".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 - 22.0f, f - 75.0f, 23.0f, "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438", () -> {
            int n = "\u6394\u5f20".length();
            int n2 = "\u679d\u5a27\u65b1".length();
            mc.displayGuiScreen(new OptionsScreen(this, MainScreen.mc.gameSettings));
        }));
        int n31 = "\u5f49\u5132".length();
        int n32 = "\u6ccd".length();
        int n33 = "\u598c\u606a".length();
        int n34 = "\u651f".length();
        int n35 = "\u6d95\u5b46".length();
        int n36 = "\u64b7".length();
        int n37 = "\u56cd".length();
        int n38 = "\u6039\u5900".length();
        int n39 = "\u683a".length();
        int n40 = "\u4e43".length();
        this.buttons.add(new Button(f2 + 30.0f, f3 - 22.0f + 23.5f, f - 75.0f, 23.0f, "\u0412\u044b\u0445\u043e\u0434", () -> Minecraft.getInstance().shutdown()));
        int n41 = "\u53c4\u6477\u4e29".length();
        int n42 = "\u5a76".length();
    }

    @Override
    public boolean mouseScrolled(double d, double d2, double d3) {
        nevernight.getInstance().getAltWidget().updateScroll((int)d, (int)d2, (float)d3);
        return super.mouseScrolled(d, d2, d3);
    }

    @Override
    public void render(MatrixStack matrixStack, int n, int n2, float f) {
        boolean bl;
        super.render(matrixStack, n, n2, f);
        if (this.stopWatch.isReached(100L)) {
            int n3 = "\u6ed0\u6297".length();
            int n4 = "\u58be".length();
            int n5 = "\u61a8\u5c79\u6143".length();
            particles.add(new Particle());
            int n6 = "\u6cb4\u6aa4\u5ed3\u519f\u5286".length();
            int n7 = "\u5e42\u6ba7\u61dc".length();
            int n8 = "\u6912\u6730\u4f6c".length();
            this.stopWatch.reset();
        }
        MainWindow mainWindow = mc.getMainWindow();
        int n9 = ClientUtil.calc(mainWindow.getScaledWidth());
        int n10 = ClientUtil.calc(mainWindow.getScaledHeight());
        int n11 = 960;
        int n12 = 540;
        int n13 = "\u5126\u5f3c\u6a7c".length();
        int n14 = "\u54e8\u6b48\u5a11\u64f0".length();
        int n15 = "\u4fd8".length();
        int n16 = (n9 - n11) / 2;
        int n17 = "\u644b".length();
        int n18 = "\u5843\u5fbc".length();
        int n19 = (n10 - n12) / 2 + 50;
        boolean bl2 = bl = mainWindow.getWidth() < 900 && mainWindow.getHeight() < 900;
        if (bl) {
            n19 += 50;
        }
        DisplayUtils.drawRoundedRect(-10.0f, -10.0f, (float)(this.width + 1000), (float)(this.height + 1000), 0.0f, ColorUtils.rgba(25, 25, 25, 200));
        MainScreen.mc.gameRenderer.setupOverlayRendering(2);
        KawaseBlur.blur.updateBlur(3.0f, 4);
        this.drawButtons(matrixStack, n, n2, f);
        nevernight.getInstance().getAltWidget().render(matrixStack, n, n2);
        MainScreen.mc.gameRenderer.setupOverlayRendering();
    }

    @Override
    public boolean charTyped(char c, int n) {
        nevernight.getInstance().getAltWidget().onChar(c);
        return super.charTyped(c, n);
    }

    @Override
    public boolean keyPressed(int n, int n2, int n3) {
        nevernight.getInstance().getAltWidget().onKey(n);
        return false;
    }

    @Override
    public boolean mouseClicked(double d, double d2, int n) {
        Vec2i vec2i = ClientUtil.getMouse((int)d, (int)d2);
        this.buttons.forEach(button -> button.click(vec2i.getX(), vec2i.getY(), n));
        nevernight.getInstance().getAltWidget().click(vec2i.getX(), vec2i.getY(), n);
        return super.mouseClicked(d, d2, n);
    }

    private void drawButtons(MatrixStack matrixStack, int n, int n2, float f) {
        this.buttons.forEach(button -> button.render(matrixStack, n, n2, f));
    }

    private class Particle {
        private final float x = ThreadLocalRandom.current().nextInt(0, IMinecraft.mc.getMainWindow().getScaledWidth());
        private float y = 0.0f;
        private float size = 0.0f;

        public void update() {
            int n = "\u5a40\u6260".length();
            int n2 = "\u5147\u5b0b".length();
            this.y += 1.0f;
        }

        public void render(MatrixStack matrixStack) {
            int n = "\u5e44".length();
            this.size += 0.1f;
            GlStateManager.pushMatrix();
            GlStateManager.translated((double)this.x + Math.sin((float)System.nanoTime() / 1.0E9f) * 5.0, this.y, 0.0);
            GlStateManager.rotatef(this.size * 20.0f, 0.0f, 0.0f, 1.0f);
            GlStateManager.translated(-((double)this.x + Math.sin((float)System.nanoTime() / 1.0E9f) * 5.0), -this.y, 0.0);
            int n2 = "\u62ec\u68df\u60e7\u6f0b".length();
            int n3 = "\u63b9\u6173\u5a50\u625f".length();
            float f = 1.0f - MathHelper.clamp(this.y / (float)IMinecraft.mc.getMainWindow().getScaledHeight(), 0.0f, 1.0f);
            int n4 = "\u6d0f\u5833\u5f0f\u6f80\u4f24".length();
            int n5 = "\u6d99\u582b\u6b3a\u57ee".length();
            this.y += 1.0f;
            Fonts.damage.drawText(matrixStack, "A", (float)((double)this.x + Math.sin((float)System.nanoTime() / 1.0E9f) * 5.0), this.y, -1, MathHelper.clamp(this.size * f, 0.0f, 9.0f));
            GlStateManager.popMatrix();
            if (this.y >= (float)IMinecraft.mc.getMainWindow().getScaledHeight()) {
                particles.remove(this);
                int n6 = "\u57c7\u4f0e\u5cc3".length();
                int n7 = "\u7069\u6514\u6cc0\u63b0\u59cf".length();
                int n8 = "\u64da\u674b\u6bec\u5fd9\u5a5f".length();
            }
        }
    }

    private class Button {
        private final float x;
        private final float y;
        private final float width;
        private final float height;
        private String text;
        private Runnable action;

        public void render(MatrixStack matrixStack, int n, int n2, float f) {
            Stencil.initStencilToWrite();
            int n3 = "\u6881".length();
            int n4 = "\u6a5d\u6239".length();
            int n5 = "\u515a\u5f08\u558f".length();
            int n6 = "\u5e05\u5666".length();
            DisplayUtils.drawRoundedRect(this.x, this.y + 2.0f - 25.0f, this.width, this.height, 5.0f, ColorUtils.rgba(25, 25, 25, 250));
            Stencil.readStencilBuffer(1);
            Stencil.uninitStencilBuffer();
            int n7 = "\u6326\u522a".length();
            int n8 = "\u69ec\u55d7".length();
            int n9 = "\u65b3".length();
            Animation animation = new Animation();
            int n10 = ColorUtils.rgb(255, 255, 255);
            int n11 = "\u4f45\u5a52\u639c".length();
            int n12 = "\u4efb\u61e8\u553a\u5633".length();
            int n13 = "\u5a8c\u5330\u5aed\u5c2b".length();
            int n14 = "\u535c".length();
            if (MathUtil.isHovered(n, n2, this.x, this.y - 30.0f, this.width + 50.0f, this.height)) {
                // empty if block
            }
            int n15 = ColorUtils.rgba(0, 0, 0, 100);
            int n16 = "\u500a\u5b2c\u67f7".length();
            int n17 = "\u6f02\u596f\u6e07\u62cc".length();
            if (MathUtil.isHovered(n, n2, this.x, this.y - 30.0f, this.width + 20.0f, this.height)) {
                n15 = ColorUtils.rgba(255, 255, 255, 50);
            }
            int n18 = "\u5da0".length();
            int n19 = "\u6a45\u4f68\u638e".length();
            int n20 = "\u67ce\u701c".length();
            int n21 = "\u664d\u60f9\u5328\u6d3e".length();
            int n22 = "\u675e\u5a2d".length();
            DisplayUtils.drawShadow(this.x - 25.0f, this.y - 30.0f, this.width + 50.0f, this.height, 5, ColorUtils.getColor(0));
            int n23 = "\u54eb\u5bdc".length();
            int n24 = "\u5524\u6e1a\u6654\u6717".length();
            int n25 = "\u68e9\u585e\u70b8".length();
            int n26 = "\u5f82\u50bf\u5d58\u56e1".length();
            int n27 = "\u5be7\u5e04\u50e8\u6159".length();
            int n28 = "\u69e1\u69ba\u58fa".length();
            DisplayUtils.drawShadow(this.x - 25.0f, this.y - 30.0f, this.width + 50.0f, this.height, 6, ColorUtils.rgba(25, 25, 25, 250));
            int n29 = "\u5682\u6a50\u5e2d\u61e9\u5148".length();
            int n30 = "\u5100".length();
            int n31 = "\u5a0e\u529d\u5344".length();
            int n32 = "\u6002\u68e1\u6a42".length();
            int n33 = "\u566a\u6c3a\u540a\u6760".length();
            DisplayUtils.drawRoundedRect(this.x - 25.0f, this.y - 30.0f, this.width + 50.0f, this.height, 3.0f, n15);
            int n34 = "\u6e66\u4fd5".length();
            int n35 = "\u68fe\u54a2\u51ba\u569d".length();
            int n36 = "\u4f44\u5fca".length();
            int n37 = "\u6d69".length();
            int n38 = "\u4fd6\u6f96\u5a46".length();
            int n39 = "\u58ad\u6294\u6b8d\u5077".length();
            int n40 = "\u5230\u6e5c".length();
            Fonts.sfMedium.drawCenteredText(matrixStack, this.text, this.x + this.width / 2.0f, this.y - 30.0f - 2.5f + this.height / 2.0f - 5.5f + 3.5f, ColorUtils.rgb(255, 255, 255), 8.0f);
        }

        public void click(int n, int n2, int n3) {
            int n4 = "\u69e2\u6bff\u6c21\u59d0\u57db".length();
            if (MathUtil.isHovered(n, n2, this.x, this.y - 30.0f, this.width, this.height)) {
                this.action.run();
            }
        }

        public Button(float f, float f2, float f3, float f4, String string, Runnable runnable) {
            this.x = f;
            this.y = f2;
            this.width = f3;
            this.height = f4;
            this.text = string;
            this.action = runnable;
        }

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

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

        public float getWidth() {
            return this.width;
        }

        public float getHeight() {
            return this.height;
        }
    }
}
/del
 
Сверху Снизу