Исходник MainMenu skid (avalon) Exp 2.0 - Orbita Ready

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

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

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

Спасибо!

дело было к вечеру делать было нечего кароче чо то скачал я ваш Orbita у него мейн меню говно вот и сделал еще хуже если я там еще где то на говно кодил пишите /del
фотки шрифты -
Пожалуйста, авторизуйтесь для просмотра ссылки.

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

И вообще это не скид точнее а идея так как полностью мне лень было скидить а то 15 минут я дрочить мог а не нажимать по клавиатуре
а да еще это ес чо в MainMenuScreen пихать кто не пон да


Cod:
package net.minecraft.client.gui.screen;

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

import java.awt.*;
import java.util.List;
import java.util.Random;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Executor;
import java.util.function.BiConsumer;

import com.mojang.blaze3d.systems.RenderSystem;
import hilz.orbita.util.BetterText;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.AccessibilityScreen;
import net.minecraft.client.gui.widget.Widget;
import net.minecraft.client.gui.widget.button.AbstractButton;
import net.minecraft.client.gui.widget.button.ImageButton;
import net.minecraft.client.renderer.RenderSkybox;
import net.minecraft.client.renderer.RenderSkyboxCube;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.client.resources.I18n;
import net.minecraft.realms.RealmsBridgeScreen;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.SharedConstants;
import net.minecraft.util.Util;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.StringTextComponent;
import net.minecraft.util.text.TranslationTextComponent;
import net.optifine.reflect.Reflector;
import net.optifine.reflect.ReflectorForge;
import org.apache.http.util.TextUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.joml.Vector4i;
import hilz.orbita.managment.Managment;
import hilz.orbita.util.ClientUtil;
import hilz.orbita.util.font.Fonts;
import hilz.orbita.util.render.*;
import hilz.orbita.util.render.animation.AnimationMath;

import javax.annotation.Nullable;

import static hilz.orbita.util.IMinecraft.mc;

public class MainMenuScreen extends Screen {
    private static final Logger field_238656_b_ = LogManager.getLogger();
    public static final RenderSkyboxCube PANORAMA_RESOURCES = new RenderSkyboxCube(new ResourceLocation("textures/gui/title/background/panorama"));
    private static final ResourceLocation PANORAMA_OVERLAY_TEXTURES = new ResourceLocation("textures/gui/title/background/panorama_overlay.png");
    private static final ResourceLocation ACCESSIBILITY_TEXTURES = new ResourceLocation("textures/gui/accessibility.png");
    private final boolean showTitleWronglySpelled;
    private Button buttonResetDemo;
    private static final ResourceLocation MINECRAFT_TITLE_TEXTURES = new ResourceLocation("textures/gui/title/minecraft.png");
    private static final ResourceLocation MINECRAFT_TITLE_EDITION = new ResourceLocation("textures/gui/title/edition.png");
    private int widthCopyright;
    String user = ClientUtil.me == null ? "null" : ClientUtil.me.getName();
    private BetterText betterText;
    private int widthCopyrightRest;
    private Screen realmsNotification;
    private boolean hasCheckedForRealmsNotification;

    [USER=1265501]@nullable[/USER]
    private String splashText;
    private final RenderSkybox panorama = new RenderSkybox(PANORAMA_RESOURCES);
    private final boolean showFadeInAnimation;
    private long firstRenderTime;

    public MainMenuScreen() {
        this(false);
    }

    [USER=1367676]@override[/USER]
    public void init(Minecraft minecraft, int width, int height) {
        super.init(minecraft, width, height);
        if (ClientUtil.legitMode) {
            if (this.splashText == null) {
                this.splashText = this.minecraft.getSplashes().getSplashText();
            }

            this.widthCopyright = this.font.getStringWidth("Copyright Mojang AB. Do not distribute!");
            this.widthCopyrightRest = this.width - this.widthCopyright - 2;
            int i = 24;
            int j = this.height / 4 + 48;
            net.minecraft.client.gui.widget.button.Button button = null;


            this.addSingleplayerMultiplayerButtons(j, 24);

            if (Reflector.ModListScreen_Constructor.exists()) {
                button = ReflectorForge.makeButtonMods(this, j, 24);
                this.addButton(button);
            }

            this.addButton(new ImageButton(this.width / 2 - 124, j + 72 + 12, 20, 20, 0, 106, 20, net.minecraft.client.gui.widget.button.Button.WIDGETS_LOCATION, 256, 256, (p_lambda$init$0_1_) ->
            {
                this.minecraft.displayGuiScreen(new LanguageScreen(this, this.minecraft.gameSettings, this.minecraft.getLanguageManager()));
            }, new TranslationTextComponent("narrator.button.language")));
            this.addButton(new net.minecraft.client.gui.widget.button.Button(this.width / 2 - 100, j + 72 + 12, 98, 20, new TranslationTextComponent("menu.options"), (p_lambda$init$1_1_) ->
            {
                this.minecraft.displayGuiScreen(new OptionsScreen(this, this.minecraft.gameSettings));
            }));
            this.addButton(new net.minecraft.client.gui.widget.button.Button(this.width / 2 + 2, j + 72 + 12, 98, 20, new TranslationTextComponent("menu.quit"), (p_lambda$init$2_1_) ->
            {
                this.minecraft.shutdown();
            }));
            this.addButton(new ImageButton(this.width / 2 + 104, j + 72 + 12, 20, 20, 0, 0, 20, ACCESSIBILITY_TEXTURES, 32, 64, (p_lambda$init$3_1_) ->
            {
                this.minecraft.displayGuiScreen(new AccessibilityScreen(this, this.minecraft.gameSettings));
            }, new TranslationTextComponent("narrator.button.accessibility")));
            this.minecraft.setConnectedToRealms(false);

            if (this.minecraft.gameSettings.realmsNotifications && !this.hasCheckedForRealmsNotification) {
                RealmsBridgeScreen realmsbridgescreen = new RealmsBridgeScreen();
                this.realmsNotification = realmsbridgescreen.func_239555_b_(this);
                this.hasCheckedForRealmsNotification = true;
            }

            if (this.areRealmsNotificationsEnabled()) {
                this.realmsNotification.init(this.minecraft, this.width, this.height);
            }

            return;
        }

        int buttonWidth = (int) ((int) (353 / 2f));
        int buttonHeight = (int) ((int) (68 / 2f));
        int off = (int) (buttonHeight + 5);
        this.addButton(new Button(
                (int) (mc.getMainWindow().scaledWidth() / 2 - buttonWidth / 2f) + 37,
                mc.getMainWindow().scaledHeight() / 2,
                buttonWidth - 70,
                buttonHeight - 7,
                new StringTextComponent("Одиночная Игра"),
                p_onPress_1_ -> {
                    mc.displayGuiScreen(new WorldSelectionScreen(this));
                },
                "Z"
        ));

        this.addButton(new Button(
                (int) (mc.getMainWindow().scaledWidth() / 2 - buttonWidth / 2f) + 37,
                mc.getMainWindow().scaledHeight() / 2 + off - 15,
                buttonWidth - 70,
                buttonHeight - 7,
                new StringTextComponent("Сетевая Игра"),
                p_onPress_1_ -> {
                    mc.displayGuiScreen(new MultiplayerScreen(this));
                },
                "F"
        ));

        this.addButton(new Button(
                (int) (mc.getMainWindow().scaledWidth() / 2 - buttonWidth / 2f) + 52,
                mc.getMainWindow().scaledHeight() / 2 - 10 + off + 20,
                buttonWidth - 108,
                buttonHeight - 15,
                new StringTextComponent("Аккаунты"),
                p_onPress_1_ -> {
                    mc.displayGuiScreen(Managment.ALT);
                },
                ""
        ));
    }

    private boolean areRealmsNotificationsEnabled() {
        return this.minecraft.gameSettings.realmsNotifications && this.realmsNotification != null;
    }

    private void addSingleplayerMultiplayerButtons(int yIn, int rowHeightIn) {
        this.addButton(new net.minecraft.client.gui.widget.button.Button(this.width / 2 - 100, yIn, 200, 20, new TranslationTextComponent("menu.singleplayer"), (p_lambda$addSingleplayerMultiplayerButtons$4_1_) ->
        {
            this.minecraft.displayGuiScreen(new WorldSelectionScreen(this));
        }));
        boolean flag = this.minecraft.isMultiplayerEnabled();
        net.minecraft.client.gui.widget.button.Button.ITooltip button$itooltip = flag ? net.minecraft.client.gui.widget.button.Button.field_238486_s_ : (p_lambda$addSingleplayerMultiplayerButtons$5_1_, p_lambda$addSingleplayerMultiplayerButtons$5_2_, p_lambda$addSingleplayerMultiplayerButtons$5_3_, p_lambda$addSingleplayerMultiplayerButtons$5_4_) ->
        {
            if (!p_lambda$addSingleplayerMultiplayerButtons$5_1_.active) {
                this.renderTooltip(p_lambda$addSingleplayerMultiplayerButtons$5_2_, this.minecraft.fontRenderer.trimStringToWidth(new TranslationTextComponent("title.multiplayer.disabled"), Math.max(this.width / 2 - 43, 170)), p_lambda$addSingleplayerMultiplayerButtons$5_3_, p_lambda$addSingleplayerMultiplayerButtons$5_4_);
            }
        };
        (this.addButton(new net.minecraft.client.gui.widget.button.Button(this.width / 2 - 100, yIn + rowHeightIn * 1, 200, 20, new TranslationTextComponent("menu.multiplayer"), (p_lambda$addSingleplayerMultiplayerButtons$6_1_) ->
        {
            Screen screen = (Screen) (this.minecraft.gameSettings.skipMultiplayerWarning ? new MultiplayerScreen(this) : new MultiplayerWarningScreen(this));
            this.minecraft.displayGuiScreen(screen);
        }, button$itooltip))).active = flag;
        (this.addButton(new net.minecraft.client.gui.widget.button.Button(this.width / 2 - 100, yIn + rowHeightIn * 2, 200, 20, new TranslationTextComponent("menu.online"), (p_lambda$addSingleplayerMultiplayerButtons$7_1_) ->
        {
            this.switchToRealms();
        }, button$itooltip))).active = flag;

        if (Reflector.ModListScreen_Constructor.exists() && this.buttons.size() > 0) {
            Widget widget = this.buttons.get(this.buttons.size() - 1);
            widget.x = this.width / 2 + 2;
            widget.setWidth(98);
        }
    }

    private void switchToRealms() {
        RealmsBridgeScreen realmsbridgescreen = new RealmsBridgeScreen();
        realmsbridgescreen.func_231394_a_(this);
    }

    public MainMenuScreen(boolean fadeIn) {
        super(new TranslationTextComponent("narrator.screen.title"));
        this.showFadeInAnimation = fadeIn;
        this.showTitleWronglySpelled = (double) (new Random()).nextFloat() < 1.0E-4D;
    }

    public void tick() {
        if (this.areRealmsNotificationsEnabled()) {
            this.realmsNotification.tick();
        }
    }

    public static CompletableFuture<Void> loadAsync(TextureManager texMngr, Executor backgroundExecutor) {
        return CompletableFuture.allOf(texMngr.loadAsync(MINECRAFT_TITLE_TEXTURES, backgroundExecutor), texMngr.loadAsync(MINECRAFT_TITLE_EDITION, backgroundExecutor), texMngr.loadAsync(PANORAMA_OVERLAY_TEXTURES, backgroundExecutor), PANORAMA_RESOURCES.loadAsync(texMngr, backgroundExecutor));
    }

    public boolean isPauseScreen() {
        return false;
    }

    public boolean shouldCloseOnEsc() {
        return false;
    }

    protected void init() {

    }

    public void render(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) {
        if (betterText == null) {
            initBetterText();
        }
        if (ClientUtil.legitMode) {
            if (this.firstRenderTime == 0L && this.showFadeInAnimation) {
                this.firstRenderTime = Util.milliTime();
            }

            float f = this.showFadeInAnimation ? (float) (Util.milliTime() - this.firstRenderTime) / 1000.0F : 1.0F;
            GlStateManager.disableDepthTest();
            fill(matrixStack, 0, 0, this.width, this.height, -1);
            this.panorama.render(partialTicks, MathHelper.clamp(f, 0.0F, 1.0F));
            int i = 274;
            int j = this.width / 2 - 137;
            int k = 30;
            this.minecraft.getTextureManager().bindTexture(PANORAMA_OVERLAY_TEXTURES);
            RenderSystem.enableBlend();
            RenderSystem.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
            RenderSystem.color4f(1.0F, 1.0F, 1.0F, this.showFadeInAnimation ? (float) MathHelper.ceil(MathHelper.clamp(f, 0.0F, 1.0F)) : 1.0F);
            blit(matrixStack, 0, 0, this.width, this.height, 0.0F, 0.0F, 16, 128, 16, 128);
            float f1 = this.showFadeInAnimation ? MathHelper.clamp(f - 1.0F, 0.0F, 1.0F) : 1.0F;
            int l = MathHelper.ceil(f1 * 255.0F) << 24;

            if ((l & -67108864) != 0) {
                this.minecraft.getTextureManager().bindTexture(MINECRAFT_TITLE_TEXTURES);
                RenderSystem.color4f(1.0F, 1.0F, 1.0F, f1);

                if (this.showTitleWronglySpelled) {
                    this.blitBlackOutline(j, 30, (p_lambda$render$10_2_, p_lambda$render$10_3_) ->
                    {
                        this.blit(matrixStack, p_lambda$render$10_2_ + 0, p_lambda$render$10_3_, 0, 0, 99, 44);
                        this.blit(matrixStack, p_lambda$render$10_2_ + 99, p_lambda$render$10_3_, 129, 0, 27, 44);
                        this.blit(matrixStack, p_lambda$render$10_2_ + 99 + 26, p_lambda$render$10_3_, 126, 0, 3, 44);
                        this.blit(matrixStack, p_lambda$render$10_2_ + 99 + 26 + 3, p_lambda$render$10_3_, 99, 0, 26, 44);
                        this.blit(matrixStack, p_lambda$render$10_2_ + 155, p_lambda$render$10_3_, 0, 45, 155, 44);
                    });
                } else {
                    this.blitBlackOutline(j, 30, (p_lambda$render$11_2_, p_lambda$render$11_3_) ->
                    {
                        this.blit(matrixStack, p_lambda$render$11_2_ + 0, p_lambda$render$11_3_, 0, 0, 155, 44);
                        this.blit(matrixStack, p_lambda$render$11_2_ + 155, p_lambda$render$11_3_, 0, 45, 155, 44);
                    });
                }

                this.minecraft.getTextureManager().bindTexture(MINECRAFT_TITLE_EDITION);
                blit(matrixStack, j + 88, 67, 0.0F, 0.0F, 98, 14, 128, 16);

                if (Reflector.ForgeHooksClient_renderMainMenu.exists()) {
                    Reflector.callVoid(Reflector.ForgeHooksClient_renderMainMenu, this, matrixStack, this.font, this.width, this.height, l);
                }

                if (this.splashText != null) {
                    RenderSystem.pushMatrix();
                    RenderSystem.translatef((float) (this.width / 2 + 90), 70.0F, 0.0F);
                    RenderSystem.rotatef(-20.0F, 0.0F, 0.0F, 1.0F);
                    float f2 = 1.8F - MathHelper.abs(MathHelper.sin((float) (Util.milliTime() % 1000L) / 1000.0F * ((float) Math.PI * 2F)) * 0.1F);
                    f2 = f2 * 100.0F / (float) (this.font.getStringWidth(this.splashText) + 32);
                    RenderSystem.scalef(f2, f2, f2);
                    drawCenteredString(matrixStack, this.font, this.splashText, 0, -8, 16776960 | l);
                    RenderSystem.popMatrix();
                }

                String s = "Minecraft " + SharedConstants.getVersion().getName();

                if (this.minecraft.isDemo()) {
                    s = s + " Demo";
                } else {
                    s = s + ("release".equalsIgnoreCase(this.minecraft.getVersionType()) ? "" : "/" + this.minecraft.getVersionType());
                }

                if (this.minecraft.isModdedClient()) {
                    s = s + I18n.format("menu.modded");
                }

                if (Reflector.BrandingControl.exists()) {
                    if (Reflector.BrandingControl_forEachLine.exists()) {
                        BiConsumer<Integer, String> biconsumer = (p_lambda$render$12_3_, p_lambda$render$12_4_) ->
                        {
                            drawString(matrixStack, this.font, p_lambda$render$12_4_, 2, this.height - (10 + p_lambda$render$12_3_ * (9 + 1)), 16777215 | l);
                        };
                        Reflector.call(Reflector.BrandingControl_forEachLine, true, true, biconsumer);
                    }

                    if (Reflector.BrandingControl_forEachAboveCopyrightLine.exists()) {
                        BiConsumer<Integer, String> biconsumer1 = (p_lambda$render$13_3_, p_lambda$render$13_4_) ->
                        {
                            drawString(matrixStack, this.font, p_lambda$render$13_4_, this.width - this.font.getStringWidth(p_lambda$render$13_4_), this.height - (10 + (p_lambda$render$13_3_ + 1) * (9 + 1)), 16777215 | l);
                        };
                        Reflector.call(Reflector.BrandingControl_forEachAboveCopyrightLine, biconsumer1);
                    }
                } else {
                    drawString(matrixStack, this.font, s, 2, this.height - 10, 16777215 | l);
                }

                drawString(matrixStack, this.font, "Copyright Mojang AB. Do not distribute!", this.widthCopyrightRest, this.height - 10, 16777215 | l);

                if (mouseX > this.widthCopyrightRest && mouseX < this.widthCopyrightRest + this.widthCopyright && mouseY > this.height - 10 && mouseY < this.height) {
                    fill(matrixStack, this.widthCopyrightRest, this.height - 1, this.widthCopyrightRest + this.widthCopyright, this.height, 16777215 | l);
                }

                for (Widget widget : this.buttons) {
                    widget.setAlpha(f1);
                }
                if (this.areRealmsNotificationsEnabled() && f1 >= 1.0F) {
                    this.realmsNotification.render(matrixStack, mouseX, mouseY, partialTicks);
                }
                super.render(matrixStack, mouseX, mouseY, partialTicks);
            }
            return;

        }

        float widthPerc = (float) mc.getMainWindow().scaledWidth() / 960;
        Vec2i fixed = ScaleMath.getMouse((int) mouseX, (int) mouseY);
        mouseX = fixed.getX();
        mouseY = fixed.getY();
        String better = betterText.output;
        mc.gameRenderer.setupOverlayRendering(2);
        RenderUtil.Render2D.drawImage(new ResourceLocation("orbita/background.png"), 0, 0, mc.getMainWindow().scaledWidth(), mc.getMainWindow().scaledHeight(), -1);
        RenderUtil.Render2D.drawRoundedRect(0F, 0F, mc.getMainWindow().scaledWidth(), mc.getMainWindow().scaledHeight(), 11, new Color(0, 0, 0, 68).getRGB());
        //    RenderUtil.Render2D.drawShadow(mouseX - 70, mouseY, 150, 15, 150 , ColorUtil.getColorStyle(240), ColorUtil.getColorStyle(120), ColorUtil.getColorStyle(80), ColorUtil.getColorStyle(0));
        RenderUtil.Render2D.drawRoundedRect(350.0F, 200.0F, mc.getMainWindow().scaledWidth() - 690, mc.getMainWindow().scaledHeight() - 332, 11, new Color(0, 2, 15, 155).getRGB());
        RenderUtil.Render2D.drawImage(new ResourceLocation("orbita/logo_128.png"), 469.0F, 224.0F, 20, 20, -1);
        Fonts.font[20].drawString(matrixStack, betterText.output, 450.0F, 250.0F, -1);
        super.render(matrixStack, mouseX, mouseY, partialTicks);


        BloomHelper.draw(15, 2, false);
        mc.gameRenderer.setupOverlayRendering();

    }

    public boolean mouseClicked(double mouseX, double mouseY, int button) {
        Vec2i fixed = ScaleMath.getMouse((int) mouseX, (int) mouseY);
        mouseX = fixed.getX();
        mouseY = fixed.getY();
        return super.mouseClicked(mouseX, mouseY, button);
    }
    private void initBetterText() {
        betterText = new BetterText(List.of("Sosal DLC",
                " uid: " + Managment.USER_PROFILE.getUid(),
                "user: " +  user,
                "Sosal",
                "Лютая паста"
        ), 1000);
    }
    public void onClose() {
        if (this.realmsNotification != null) {
            this.realmsNotification.onClose();
        }
    }

    public static class Button extends AbstractButton {

        public static final net.minecraft.client.gui.widget.button.Button.ITooltip field_238486_s_ = (button, matrixStack, mouseX, mouseY) -> {
        };
        protected final net.minecraft.client.gui.widget.button.Button.IPressable onPress;
        protected final net.minecraft.client.gui.widget.button.Button.ITooltip onTooltip;

        private final String symbol;


        public Button(int x, int y, int width, int height, ITextComponent title, net.minecraft.client.gui.widget.button.Button.IPressable pressedAction, String symbol) {
            this(x, y, width, height, title, pressedAction, field_238486_s_, symbol);
        }


        public Button(int x, int y, int width, int height, ITextComponent title, net.minecraft.client.gui.widget.button.Button.IPressable pressedAction, net.minecraft.client.gui.widget.button.Button.ITooltip onTooltip, String symbol) {
            super(x, y, width, height, title);
            this.onPress = pressedAction;
            this.onTooltip = onTooltip;
            this.symbol = symbol;
        }

        public float animation;

        public void renderButton(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) {
            animation = AnimationMath.lerp(animation, isHovered() ? 1f : 0, 10);

            RenderUtil.Render2D.drawRoundedRect(x + 1.6f, y + 1.6f, width - 3, height - 6, 4f, new Color(0, 0, 0, 108).getRGB());

            BloomHelper.registerRenderCall(() -> {
                Fonts.font[15].drawCenteredString(matrixStack, this.getMessage().getString(), x + width / 2f, y + height / 2f + 4 - Fonts.font[23].getFontHeight() / 2f, RenderUtil.reAlphaInt(ColorUtil.interpolateColor(ColorUtil.rgba(255, 255, 255, 255), -1, animation), (int) (255 * animation)));
            });

            Fonts.font[15].drawCenteredString(matrixStack, this.getMessage().getString(), x + width / 2f, y + height / 2f + 4 - Fonts.font[23].getFontHeight() / 2f, RenderUtil.reAlphaInt(ColorUtil.interpolateColor(ColorUtil.rgba(255, 255, 255, 255), -1, animation), (int) (255)));


            Fonts.icon[24].drawCenteredString(matrixStack, symbol, x + width / 3f - 24, y + height / 2f + 2 - Fonts.icon[23].getFontHeight() / 2f, RenderUtil.reAlphaInt(ColorUtil.interpolateColor(ColorUtil.rgba(255, 255, 255, 255), -1, animation), (int) (255)));
        }

        public void onPress() {
            this.onPress.onPress(this);
        }
    }
}
 
Последнее редактирование:
Начинающий
Статус
Онлайн
Регистрация
26 Янв 2023
Сообщения
302
Реакции[?]
1
Поинты[?]
1K
дело было к вечеру делать было нечего кароче чо то скачал я ваш Orbita у него мейн меню говно вот и сделал еще хуже если я там еще где то на говно кодил пишите /del
фотки шрифты -
Пожалуйста, авторизуйтесь для просмотра ссылки.

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

И вообще это не скид точнее а идея так как полностью мне лень было скидить а то 15 минут я дрочить мог а не нажимать по клавиатуре
а да еще это ес чо в MainMenuScreen пихать кто не пон да


Cod:
package net.minecraft.client.gui.screen;

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

import java.awt.*;
import java.util.List;
import java.util.Random;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Executor;
import java.util.function.BiConsumer;

import com.mojang.blaze3d.systems.RenderSystem;
import hilz.orbita.util.BetterText;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.AccessibilityScreen;
import net.minecraft.client.gui.widget.Widget;
import net.minecraft.client.gui.widget.button.AbstractButton;
import net.minecraft.client.gui.widget.button.ImageButton;
import net.minecraft.client.renderer.RenderSkybox;
import net.minecraft.client.renderer.RenderSkyboxCube;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.client.resources.I18n;
import net.minecraft.realms.RealmsBridgeScreen;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.SharedConstants;
import net.minecraft.util.Util;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.StringTextComponent;
import net.minecraft.util.text.TranslationTextComponent;
import net.optifine.reflect.Reflector;
import net.optifine.reflect.ReflectorForge;
import org.apache.http.util.TextUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.joml.Vector4i;
import hilz.orbita.managment.Managment;
import hilz.orbita.util.ClientUtil;
import hilz.orbita.util.font.Fonts;
import hilz.orbita.util.render.*;
import hilz.orbita.util.render.animation.AnimationMath;

import javax.annotation.Nullable;

import static hilz.orbita.util.IMinecraft.mc;

public class MainMenuScreen extends Screen {
    private static final Logger field_238656_b_ = LogManager.getLogger();
    public static final RenderSkyboxCube PANORAMA_RESOURCES = new RenderSkyboxCube(new ResourceLocation("textures/gui/title/background/panorama"));
    private static final ResourceLocation PANORAMA_OVERLAY_TEXTURES = new ResourceLocation("textures/gui/title/background/panorama_overlay.png");
    private static final ResourceLocation ACCESSIBILITY_TEXTURES = new ResourceLocation("textures/gui/accessibility.png");
    private final boolean showTitleWronglySpelled;
    private Button buttonResetDemo;
    private static final ResourceLocation MINECRAFT_TITLE_TEXTURES = new ResourceLocation("textures/gui/title/minecraft.png");
    private static final ResourceLocation MINECRAFT_TITLE_EDITION = new ResourceLocation("textures/gui/title/edition.png");
    private int widthCopyright;
    String user = ClientUtil.me == null ? "null" : ClientUtil.me.getName();
    private BetterText betterText;
    private int widthCopyrightRest;
    private Screen realmsNotification;
    private boolean hasCheckedForRealmsNotification;

    [USER=1265501]@nullable[/USER]
    private String splashText;
    private final RenderSkybox panorama = new RenderSkybox(PANORAMA_RESOURCES);
    private final boolean showFadeInAnimation;
    private long firstRenderTime;

    public MainMenuScreen() {
        this(false);
    }

    [USER=1367676]@override[/USER]
    public void init(Minecraft minecraft, int width, int height) {
        super.init(minecraft, width, height);
        if (ClientUtil.legitMode) {
            if (this.splashText == null) {
                this.splashText = this.minecraft.getSplashes().getSplashText();
            }

            this.widthCopyright = this.font.getStringWidth("Copyright Mojang AB. Do not distribute!");
            this.widthCopyrightRest = this.width - this.widthCopyright - 2;
            int i = 24;
            int j = this.height / 4 + 48;
            net.minecraft.client.gui.widget.button.Button button = null;


            this.addSingleplayerMultiplayerButtons(j, 24);

            if (Reflector.ModListScreen_Constructor.exists()) {
                button = ReflectorForge.makeButtonMods(this, j, 24);
                this.addButton(button);
            }

            this.addButton(new ImageButton(this.width / 2 - 124, j + 72 + 12, 20, 20, 0, 106, 20, net.minecraft.client.gui.widget.button.Button.WIDGETS_LOCATION, 256, 256, (p_lambda$init$0_1_) ->
            {
                this.minecraft.displayGuiScreen(new LanguageScreen(this, this.minecraft.gameSettings, this.minecraft.getLanguageManager()));
            }, new TranslationTextComponent("narrator.button.language")));
            this.addButton(new net.minecraft.client.gui.widget.button.Button(this.width / 2 - 100, j + 72 + 12, 98, 20, new TranslationTextComponent("menu.options"), (p_lambda$init$1_1_) ->
            {
                this.minecraft.displayGuiScreen(new OptionsScreen(this, this.minecraft.gameSettings));
            }));
            this.addButton(new net.minecraft.client.gui.widget.button.Button(this.width / 2 + 2, j + 72 + 12, 98, 20, new TranslationTextComponent("menu.quit"), (p_lambda$init$2_1_) ->
            {
                this.minecraft.shutdown();
            }));
            this.addButton(new ImageButton(this.width / 2 + 104, j + 72 + 12, 20, 20, 0, 0, 20, ACCESSIBILITY_TEXTURES, 32, 64, (p_lambda$init$3_1_) ->
            {
                this.minecraft.displayGuiScreen(new AccessibilityScreen(this, this.minecraft.gameSettings));
            }, new TranslationTextComponent("narrator.button.accessibility")));
            this.minecraft.setConnectedToRealms(false);

            if (this.minecraft.gameSettings.realmsNotifications && !this.hasCheckedForRealmsNotification) {
                RealmsBridgeScreen realmsbridgescreen = new RealmsBridgeScreen();
                this.realmsNotification = realmsbridgescreen.func_239555_b_(this);
                this.hasCheckedForRealmsNotification = true;
            }

            if (this.areRealmsNotificationsEnabled()) {
                this.realmsNotification.init(this.minecraft, this.width, this.height);
            }

            return;
        }

        int buttonWidth = (int) ((int) (353 / 2f));
        int buttonHeight = (int) ((int) (68 / 2f));
        int off = (int) (buttonHeight + 5);
        this.addButton(new Button(
                (int) (mc.getMainWindow().scaledWidth() / 2 - buttonWidth / 2f) + 37,
                mc.getMainWindow().scaledHeight() / 2,
                buttonWidth - 70,
                buttonHeight - 7,
                new StringTextComponent("Одиночная Игра"),
                p_onPress_1_ -> {
                    mc.displayGuiScreen(new WorldSelectionScreen(this));
                },
                "Z"
        ));

        this.addButton(new Button(
                (int) (mc.getMainWindow().scaledWidth() / 2 - buttonWidth / 2f) + 37,
                mc.getMainWindow().scaledHeight() / 2 + off - 15,
                buttonWidth - 70,
                buttonHeight - 7,
                new StringTextComponent("Сетевая Игра"),
                p_onPress_1_ -> {
                    mc.displayGuiScreen(new MultiplayerScreen(this));
                },
                "F"
        ));

        this.addButton(new Button(
                (int) (mc.getMainWindow().scaledWidth() / 2 - buttonWidth / 2f) + 52,
                mc.getMainWindow().scaledHeight() / 2 - 10 + off + 20,
                buttonWidth - 108,
                buttonHeight - 15,
                new StringTextComponent("Аккаунты"),
                p_onPress_1_ -> {
                    mc.displayGuiScreen(Managment.ALT);
                },
                ""
        ));
    }

    private boolean areRealmsNotificationsEnabled() {
        return this.minecraft.gameSettings.realmsNotifications && this.realmsNotification != null;
    }

    private void addSingleplayerMultiplayerButtons(int yIn, int rowHeightIn) {
        this.addButton(new net.minecraft.client.gui.widget.button.Button(this.width / 2 - 100, yIn, 200, 20, new TranslationTextComponent("menu.singleplayer"), (p_lambda$addSingleplayerMultiplayerButtons$4_1_) ->
        {
            this.minecraft.displayGuiScreen(new WorldSelectionScreen(this));
        }));
        boolean flag = this.minecraft.isMultiplayerEnabled();
        net.minecraft.client.gui.widget.button.Button.ITooltip button$itooltip = flag ? net.minecraft.client.gui.widget.button.Button.field_238486_s_ : (p_lambda$addSingleplayerMultiplayerButtons$5_1_, p_lambda$addSingleplayerMultiplayerButtons$5_2_, p_lambda$addSingleplayerMultiplayerButtons$5_3_, p_lambda$addSingleplayerMultiplayerButtons$5_4_) ->
        {
            if (!p_lambda$addSingleplayerMultiplayerButtons$5_1_.active) {
                this.renderTooltip(p_lambda$addSingleplayerMultiplayerButtons$5_2_, this.minecraft.fontRenderer.trimStringToWidth(new TranslationTextComponent("title.multiplayer.disabled"), Math.max(this.width / 2 - 43, 170)), p_lambda$addSingleplayerMultiplayerButtons$5_3_, p_lambda$addSingleplayerMultiplayerButtons$5_4_);
            }
        };
        (this.addButton(new net.minecraft.client.gui.widget.button.Button(this.width / 2 - 100, yIn + rowHeightIn * 1, 200, 20, new TranslationTextComponent("menu.multiplayer"), (p_lambda$addSingleplayerMultiplayerButtons$6_1_) ->
        {
            Screen screen = (Screen) (this.minecraft.gameSettings.skipMultiplayerWarning ? new MultiplayerScreen(this) : new MultiplayerWarningScreen(this));
            this.minecraft.displayGuiScreen(screen);
        }, button$itooltip))).active = flag;
        (this.addButton(new net.minecraft.client.gui.widget.button.Button(this.width / 2 - 100, yIn + rowHeightIn * 2, 200, 20, new TranslationTextComponent("menu.online"), (p_lambda$addSingleplayerMultiplayerButtons$7_1_) ->
        {
            this.switchToRealms();
        }, button$itooltip))).active = flag;

        if (Reflector.ModListScreen_Constructor.exists() && this.buttons.size() > 0) {
            Widget widget = this.buttons.get(this.buttons.size() - 1);
            widget.x = this.width / 2 + 2;
            widget.setWidth(98);
        }
    }

    private void switchToRealms() {
        RealmsBridgeScreen realmsbridgescreen = new RealmsBridgeScreen();
        realmsbridgescreen.func_231394_a_(this);
    }

    public MainMenuScreen(boolean fadeIn) {
        super(new TranslationTextComponent("narrator.screen.title"));
        this.showFadeInAnimation = fadeIn;
        this.showTitleWronglySpelled = (double) (new Random()).nextFloat() < 1.0E-4D;
    }

    public void tick() {
        if (this.areRealmsNotificationsEnabled()) {
            this.realmsNotification.tick();
        }
    }

    public static CompletableFuture<Void> loadAsync(TextureManager texMngr, Executor backgroundExecutor) {
        return CompletableFuture.allOf(texMngr.loadAsync(MINECRAFT_TITLE_TEXTURES, backgroundExecutor), texMngr.loadAsync(MINECRAFT_TITLE_EDITION, backgroundExecutor), texMngr.loadAsync(PANORAMA_OVERLAY_TEXTURES, backgroundExecutor), PANORAMA_RESOURCES.loadAsync(texMngr, backgroundExecutor));
    }

    public boolean isPauseScreen() {
        return false;
    }

    public boolean shouldCloseOnEsc() {
        return false;
    }

    protected void init() {

    }

    public void render(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) {
        if (betterText == null) {
            initBetterText();
        }
        if (ClientUtil.legitMode) {
            if (this.firstRenderTime == 0L && this.showFadeInAnimation) {
                this.firstRenderTime = Util.milliTime();
            }

            float f = this.showFadeInAnimation ? (float) (Util.milliTime() - this.firstRenderTime) / 1000.0F : 1.0F;
            GlStateManager.disableDepthTest();
            fill(matrixStack, 0, 0, this.width, this.height, -1);
            this.panorama.render(partialTicks, MathHelper.clamp(f, 0.0F, 1.0F));
            int i = 274;
            int j = this.width / 2 - 137;
            int k = 30;
            this.minecraft.getTextureManager().bindTexture(PANORAMA_OVERLAY_TEXTURES);
            RenderSystem.enableBlend();
            RenderSystem.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
            RenderSystem.color4f(1.0F, 1.0F, 1.0F, this.showFadeInAnimation ? (float) MathHelper.ceil(MathHelper.clamp(f, 0.0F, 1.0F)) : 1.0F);
            blit(matrixStack, 0, 0, this.width, this.height, 0.0F, 0.0F, 16, 128, 16, 128);
            float f1 = this.showFadeInAnimation ? MathHelper.clamp(f - 1.0F, 0.0F, 1.0F) : 1.0F;
            int l = MathHelper.ceil(f1 * 255.0F) << 24;

            if ((l & -67108864) != 0) {
                this.minecraft.getTextureManager().bindTexture(MINECRAFT_TITLE_TEXTURES);
                RenderSystem.color4f(1.0F, 1.0F, 1.0F, f1);

                if (this.showTitleWronglySpelled) {
                    this.blitBlackOutline(j, 30, (p_lambda$render$10_2_, p_lambda$render$10_3_) ->
                    {
                        this.blit(matrixStack, p_lambda$render$10_2_ + 0, p_lambda$render$10_3_, 0, 0, 99, 44);
                        this.blit(matrixStack, p_lambda$render$10_2_ + 99, p_lambda$render$10_3_, 129, 0, 27, 44);
                        this.blit(matrixStack, p_lambda$render$10_2_ + 99 + 26, p_lambda$render$10_3_, 126, 0, 3, 44);
                        this.blit(matrixStack, p_lambda$render$10_2_ + 99 + 26 + 3, p_lambda$render$10_3_, 99, 0, 26, 44);
                        this.blit(matrixStack, p_lambda$render$10_2_ + 155, p_lambda$render$10_3_, 0, 45, 155, 44);
                    });
                } else {
                    this.blitBlackOutline(j, 30, (p_lambda$render$11_2_, p_lambda$render$11_3_) ->
                    {
                        this.blit(matrixStack, p_lambda$render$11_2_ + 0, p_lambda$render$11_3_, 0, 0, 155, 44);
                        this.blit(matrixStack, p_lambda$render$11_2_ + 155, p_lambda$render$11_3_, 0, 45, 155, 44);
                    });
                }

                this.minecraft.getTextureManager().bindTexture(MINECRAFT_TITLE_EDITION);
                blit(matrixStack, j + 88, 67, 0.0F, 0.0F, 98, 14, 128, 16);

                if (Reflector.ForgeHooksClient_renderMainMenu.exists()) {
                    Reflector.callVoid(Reflector.ForgeHooksClient_renderMainMenu, this, matrixStack, this.font, this.width, this.height, l);
                }

                if (this.splashText != null) {
                    RenderSystem.pushMatrix();
                    RenderSystem.translatef((float) (this.width / 2 + 90), 70.0F, 0.0F);
                    RenderSystem.rotatef(-20.0F, 0.0F, 0.0F, 1.0F);
                    float f2 = 1.8F - MathHelper.abs(MathHelper.sin((float) (Util.milliTime() % 1000L) / 1000.0F * ((float) Math.PI * 2F)) * 0.1F);
                    f2 = f2 * 100.0F / (float) (this.font.getStringWidth(this.splashText) + 32);
                    RenderSystem.scalef(f2, f2, f2);
                    drawCenteredString(matrixStack, this.font, this.splashText, 0, -8, 16776960 | l);
                    RenderSystem.popMatrix();
                }

                String s = "Minecraft " + SharedConstants.getVersion().getName();

                if (this.minecraft.isDemo()) {
                    s = s + " Demo";
                } else {
                    s = s + ("release".equalsIgnoreCase(this.minecraft.getVersionType()) ? "" : "/" + this.minecraft.getVersionType());
                }

                if (this.minecraft.isModdedClient()) {
                    s = s + I18n.format("menu.modded");
                }

                if (Reflector.BrandingControl.exists()) {
                    if (Reflector.BrandingControl_forEachLine.exists()) {
                        BiConsumer<Integer, String> biconsumer = (p_lambda$render$12_3_, p_lambda$render$12_4_) ->
                        {
                            drawString(matrixStack, this.font, p_lambda$render$12_4_, 2, this.height - (10 + p_lambda$render$12_3_ * (9 + 1)), 16777215 | l);
                        };
                        Reflector.call(Reflector.BrandingControl_forEachLine, true, true, biconsumer);
                    }

                    if (Reflector.BrandingControl_forEachAboveCopyrightLine.exists()) {
                        BiConsumer<Integer, String> biconsumer1 = (p_lambda$render$13_3_, p_lambda$render$13_4_) ->
                        {
                            drawString(matrixStack, this.font, p_lambda$render$13_4_, this.width - this.font.getStringWidth(p_lambda$render$13_4_), this.height - (10 + (p_lambda$render$13_3_ + 1) * (9 + 1)), 16777215 | l);
                        };
                        Reflector.call(Reflector.BrandingControl_forEachAboveCopyrightLine, biconsumer1);
                    }
                } else {
                    drawString(matrixStack, this.font, s, 2, this.height - 10, 16777215 | l);
                }

                drawString(matrixStack, this.font, "Copyright Mojang AB. Do not distribute!", this.widthCopyrightRest, this.height - 10, 16777215 | l);

                if (mouseX > this.widthCopyrightRest && mouseX < this.widthCopyrightRest + this.widthCopyright && mouseY > this.height - 10 && mouseY < this.height) {
                    fill(matrixStack, this.widthCopyrightRest, this.height - 1, this.widthCopyrightRest + this.widthCopyright, this.height, 16777215 | l);
                }

                for (Widget widget : this.buttons) {
                    widget.setAlpha(f1);
                }
                if (this.areRealmsNotificationsEnabled() && f1 >= 1.0F) {
                    this.realmsNotification.render(matrixStack, mouseX, mouseY, partialTicks);
                }
                super.render(matrixStack, mouseX, mouseY, partialTicks);
            }
            return;

        }

        float widthPerc = (float) mc.getMainWindow().scaledWidth() / 960;
        Vec2i fixed = ScaleMath.getMouse((int) mouseX, (int) mouseY);
        mouseX = fixed.getX();
        mouseY = fixed.getY();
        String better = betterText.output;
        mc.gameRenderer.setupOverlayRendering(2);
        RenderUtil.Render2D.drawImage(new ResourceLocation("orbita/background.png"), 0, 0, mc.getMainWindow().scaledWidth(), mc.getMainWindow().scaledHeight(), -1);
        RenderUtil.Render2D.drawRoundedRect(0F, 0F, mc.getMainWindow().scaledWidth(), mc.getMainWindow().scaledHeight(), 11, new Color(0, 0, 0, 68).getRGB());
        //    RenderUtil.Render2D.drawShadow(mouseX - 70, mouseY, 150, 15, 150 , ColorUtil.getColorStyle(240), ColorUtil.getColorStyle(120), ColorUtil.getColorStyle(80), ColorUtil.getColorStyle(0));
        RenderUtil.Render2D.drawRoundedRect(350.0F, 200.0F, mc.getMainWindow().scaledWidth() - 690, mc.getMainWindow().scaledHeight() - 332, 11, new Color(0, 2, 15, 155).getRGB());
        RenderUtil.Render2D.drawImage(new ResourceLocation("orbita/logo_128.png"), 469.0F, 224.0F, 20, 20, -1);
        Fonts.font[20].drawString(matrixStack, betterText.output, 450.0F, 250.0F, -1);
        super.render(matrixStack, mouseX, mouseY, partialTicks);


        BloomHelper.draw(15, 2, false);
        mc.gameRenderer.setupOverlayRendering();

    }

    public boolean mouseClicked(double mouseX, double mouseY, int button) {
        Vec2i fixed = ScaleMath.getMouse((int) mouseX, (int) mouseY);
        mouseX = fixed.getX();
        mouseY = fixed.getY();
        return super.mouseClicked(mouseX, mouseY, button);
    }
    private void initBetterText() {
        betterText = new BetterText(List.of("Sosal DLC",
                " uid: " + Managment.USER_PROFILE.getUid(),
                "user: " +  user,
                "Sosal",
                "Лютая паста"
        ), 1000);
    }
    public void onClose() {
        if (this.realmsNotification != null) {
            this.realmsNotification.onClose();
        }
    }

    public static class Button extends AbstractButton {

        public static final net.minecraft.client.gui.widget.button.Button.ITooltip field_238486_s_ = (button, matrixStack, mouseX, mouseY) -> {
        };
        protected final net.minecraft.client.gui.widget.button.Button.IPressable onPress;
        protected final net.minecraft.client.gui.widget.button.Button.ITooltip onTooltip;

        private final String symbol;


        public Button(int x, int y, int width, int height, ITextComponent title, net.minecraft.client.gui.widget.button.Button.IPressable pressedAction, String symbol) {
            this(x, y, width, height, title, pressedAction, field_238486_s_, symbol);
        }


        public Button(int x, int y, int width, int height, ITextComponent title, net.minecraft.client.gui.widget.button.Button.IPressable pressedAction, net.minecraft.client.gui.widget.button.Button.ITooltip onTooltip, String symbol) {
            super(x, y, width, height, title);
            this.onPress = pressedAction;
            this.onTooltip = onTooltip;
            this.symbol = symbol;
        }

        public float animation;

        public void renderButton(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) {
            animation = AnimationMath.lerp(animation, isHovered() ? 1f : 0, 10);

            RenderUtil.Render2D.drawRoundedRect(x + 1.6f, y + 1.6f, width - 3, height - 6, 4f, new Color(0, 0, 0, 108).getRGB());

            BloomHelper.registerRenderCall(() -> {
                Fonts.font[15].drawCenteredString(matrixStack, this.getMessage().getString(), x + width / 2f, y + height / 2f + 4 - Fonts.font[23].getFontHeight() / 2f, RenderUtil.reAlphaInt(ColorUtil.interpolateColor(ColorUtil.rgba(255, 255, 255, 255), -1, animation), (int) (255 * animation)));
            });

            Fonts.font[15].drawCenteredString(matrixStack, this.getMessage().getString(), x + width / 2f, y + height / 2f + 4 - Fonts.font[23].getFontHeight() / 2f, RenderUtil.reAlphaInt(ColorUtil.interpolateColor(ColorUtil.rgba(255, 255, 255, 255), -1, animation), (int) (255)));


            Fonts.icon[24].drawCenteredString(matrixStack, symbol, x + width / 3f - 24, y + height / 2f + 2 - Fonts.icon[23].getFontHeight() / 2f, RenderUtil.reAlphaInt(ColorUtil.interpolateColor(ColorUtil.rgba(255, 255, 255, 255), -1, animation), (int) (255)));
        }

        public void onPress() {
            this.onPress.onPress(this);
        }
    }
}
Ну такое
 
Начинающий
Статус
Оффлайн
Регистрация
20 Ноя 2023
Сообщения
86
Реакции[?]
1
Поинты[?]
1K
---- Minecraft Crash Report ----
// You should try our sister game, Minceraft!

Time: 21.11.2024, 17:12
Description: Rendering overlay

java.lang.ArrayIndexOutOfBoundsException: Index 24 out of bounds for length 24
at net.minecraft.client.gui.screen.MainMenuScreen$Button.renderButton(MainMenuScreen.java:421)
at net.minecraft.client.gui.widget.Widget.render(Widget.java:80)
at net.minecraft.client.gui.screen.Screen.render(Screen.java:79)
at net.minecraft.client.gui.screen.MainMenuScreen.render(MainMenuScreen.java:357)
at net.minecraft.client.gui.ResourceLoadProgressGui.render(ResourceLoadProgressGui.java:83)
at net.minecraft.client.renderer.GameRenderer.updateCameraAndRender(GameRenderer.java:677)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1041)
at net.minecraft.client.Minecraft.run(Minecraft.java:643)
at net.minecraft.client.main.Main.main(Main.java:207)
at Start.main(Start.java:12)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Render thread
Stacktrace:
at net.minecraft.client.gui.screen.MainMenuScreen$Button.renderButton(MainMenuScreen.java:421)
at net.minecraft.client.gui.widget.Widget.render(Widget.java:80)
at net.minecraft.client.gui.screen.Screen.render(Screen.java:79)
at net.minecraft.client.gui.screen.MainMenuScreen.render(MainMenuScreen.java:357)
at net.minecraft.client.gui.ResourceLoadProgressGui.render(ResourceLoadProgressGui.java:83)

-- Overlay render details --
Details:
Overlay name: net.minecraft.client.gui.ResourceLoadProgressGui
Stacktrace:
at net.minecraft.client.renderer.GameRenderer.updateCameraAndRender(GameRenderer.java:677)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1041)
at net.minecraft.client.Minecraft.run(Minecraft.java:643)
at net.minecraft.client.main.Main.main(Main.java:207)
at Start.main(Start.java:12)

-- System Details --
Details:
Minecraft Version: 1.16.5
Minecraft Version ID: 1.16.5
Operating System: Windows 10 (amd64) version 10.0
Java Version: 17.0.12, Amazon.com Inc.
Java VM Version: OpenJDK 64-Bit Server VM (mixed mode, sharing), Amazon.com Inc.
Memory: 149496144 bytes (142 MB) / 415236096 bytes (396 MB) up to 5347737600 bytes (5100 MB)
CPUs: 4
JVM Flags: 0 total;
Launched Version: mcp
Backend library: LWJGL version 3.2.2 build 10
Backend API: Intel(R) UHD Graphics 620 GL version 4.6.0 - Build 27.20.100.8729, Intel
GL Caps: Using framebuffer using OpenGL 3.0
Using VBOs: Yes
Is Modded: Definitely; Client brand changed to 'vanilla/modified'
Type: Client (map_client.txt)
Graphics mode: fancy
Resource Packs: vanilla
Current Language: English (US)
CPU: 4x Intel(R) Core(TM) i3-8130U CPU @ 2.20GHz
OptiFine Version: OptiFine_1.16.5_HD_U_G8
OptiFine Build: ~~NULL~~
Render Distance Chunks: 8
Mipmaps: 0
Anisotropic Filtering: 1
Antialiasing: 0
Multitexture: false
Shaders: null
OpenGlVersion: 4.6.0 - Build 27.20.100.8729
OpenGlRenderer: Intel(R) UHD Graphics 620
OpenGlVendor: Intel
CpuCount: 4

что делать?
 
Начинающий
Статус
Оффлайн
Регистрация
29 Май 2024
Сообщения
575
Реакции[?]
2
Поинты[?]
1K
а типа кнопки выйти нету чтоб школота 24/7 сидела в чите?
 
Начинающий
Статус
Оффлайн
Регистрация
27 Май 2024
Сообщения
54
Реакции[?]
0
Поинты[?]
0
а типа кнопки выйти нету чтоб школота 24/7 сидела в чите?
Ну хз можно по времени скример добавить чтобы школьники пугались или ты про то что тут фрики сидят не смогут кнопку выхода добавить ?
 
Начинающий
Статус
Оффлайн
Регистрация
23 Сен 2024
Сообщения
45
Реакции[?]
0
Поинты[?]
0
дело было к вечеру делать было нечего кароче чо то скачал я ваш Orbita у него мейн меню говно вот и сделал еще хуже если я там еще где то на говно кодил пишите /del
фотки шрифты -
Пожалуйста, авторизуйтесь для просмотра ссылки.

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

И вообще это не скид точнее а идея так как полностью мне лень было скидить а то 15 минут я дрочить мог а не нажимать по клавиатуре
а да еще это ес чо в MainMenuScreen пихать кто не пон да


Cod:
package net.minecraft.client.gui.screen;

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

import java.awt.*;
import java.util.List;
import java.util.Random;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Executor;
import java.util.function.BiConsumer;

import com.mojang.blaze3d.systems.RenderSystem;
import hilz.orbita.util.BetterText;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.AccessibilityScreen;
import net.minecraft.client.gui.widget.Widget;
import net.minecraft.client.gui.widget.button.AbstractButton;
import net.minecraft.client.gui.widget.button.ImageButton;
import net.minecraft.client.renderer.RenderSkybox;
import net.minecraft.client.renderer.RenderSkyboxCube;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.client.resources.I18n;
import net.minecraft.realms.RealmsBridgeScreen;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.SharedConstants;
import net.minecraft.util.Util;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.StringTextComponent;
import net.minecraft.util.text.TranslationTextComponent;
import net.optifine.reflect.Reflector;
import net.optifine.reflect.ReflectorForge;
import org.apache.http.util.TextUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.joml.Vector4i;
import hilz.orbita.managment.Managment;
import hilz.orbita.util.ClientUtil;
import hilz.orbita.util.font.Fonts;
import hilz.orbita.util.render.*;
import hilz.orbita.util.render.animation.AnimationMath;

import javax.annotation.Nullable;

import static hilz.orbita.util.IMinecraft.mc;

public class MainMenuScreen extends Screen {
    private static final Logger field_238656_b_ = LogManager.getLogger();
    public static final RenderSkyboxCube PANORAMA_RESOURCES = new RenderSkyboxCube(new ResourceLocation("textures/gui/title/background/panorama"));
    private static final ResourceLocation PANORAMA_OVERLAY_TEXTURES = new ResourceLocation("textures/gui/title/background/panorama_overlay.png");
    private static final ResourceLocation ACCESSIBILITY_TEXTURES = new ResourceLocation("textures/gui/accessibility.png");
    private final boolean showTitleWronglySpelled;
    private Button buttonResetDemo;
    private static final ResourceLocation MINECRAFT_TITLE_TEXTURES = new ResourceLocation("textures/gui/title/minecraft.png");
    private static final ResourceLocation MINECRAFT_TITLE_EDITION = new ResourceLocation("textures/gui/title/edition.png");
    private int widthCopyright;
    String user = ClientUtil.me == null ? "null" : ClientUtil.me.getName();
    private BetterText betterText;
    private int widthCopyrightRest;
    private Screen realmsNotification;
    private boolean hasCheckedForRealmsNotification;

    [USER=1265501]@nullable[/USER]
    private String splashText;
    private final RenderSkybox panorama = new RenderSkybox(PANORAMA_RESOURCES);
    private final boolean showFadeInAnimation;
    private long firstRenderTime;

    public MainMenuScreen() {
        this(false);
    }

    [USER=1367676]@override[/USER]
    public void init(Minecraft minecraft, int width, int height) {
        super.init(minecraft, width, height);
        if (ClientUtil.legitMode) {
            if (this.splashText == null) {
                this.splashText = this.minecraft.getSplashes().getSplashText();
            }

            this.widthCopyright = this.font.getStringWidth("Copyright Mojang AB. Do not distribute!");
            this.widthCopyrightRest = this.width - this.widthCopyright - 2;
            int i = 24;
            int j = this.height / 4 + 48;
            net.minecraft.client.gui.widget.button.Button button = null;


            this.addSingleplayerMultiplayerButtons(j, 24);

            if (Reflector.ModListScreen_Constructor.exists()) {
                button = ReflectorForge.makeButtonMods(this, j, 24);
                this.addButton(button);
            }

            this.addButton(new ImageButton(this.width / 2 - 124, j + 72 + 12, 20, 20, 0, 106, 20, net.minecraft.client.gui.widget.button.Button.WIDGETS_LOCATION, 256, 256, (p_lambda$init$0_1_) ->
            {
                this.minecraft.displayGuiScreen(new LanguageScreen(this, this.minecraft.gameSettings, this.minecraft.getLanguageManager()));
            }, new TranslationTextComponent("narrator.button.language")));
            this.addButton(new net.minecraft.client.gui.widget.button.Button(this.width / 2 - 100, j + 72 + 12, 98, 20, new TranslationTextComponent("menu.options"), (p_lambda$init$1_1_) ->
            {
                this.minecraft.displayGuiScreen(new OptionsScreen(this, this.minecraft.gameSettings));
            }));
            this.addButton(new net.minecraft.client.gui.widget.button.Button(this.width / 2 + 2, j + 72 + 12, 98, 20, new TranslationTextComponent("menu.quit"), (p_lambda$init$2_1_) ->
            {
                this.minecraft.shutdown();
            }));
            this.addButton(new ImageButton(this.width / 2 + 104, j + 72 + 12, 20, 20, 0, 0, 20, ACCESSIBILITY_TEXTURES, 32, 64, (p_lambda$init$3_1_) ->
            {
                this.minecraft.displayGuiScreen(new AccessibilityScreen(this, this.minecraft.gameSettings));
            }, new TranslationTextComponent("narrator.button.accessibility")));
            this.minecraft.setConnectedToRealms(false);

            if (this.minecraft.gameSettings.realmsNotifications && !this.hasCheckedForRealmsNotification) {
                RealmsBridgeScreen realmsbridgescreen = new RealmsBridgeScreen();
                this.realmsNotification = realmsbridgescreen.func_239555_b_(this);
                this.hasCheckedForRealmsNotification = true;
            }

            if (this.areRealmsNotificationsEnabled()) {
                this.realmsNotification.init(this.minecraft, this.width, this.height);
            }

            return;
        }

        int buttonWidth = (int) ((int) (353 / 2f));
        int buttonHeight = (int) ((int) (68 / 2f));
        int off = (int) (buttonHeight + 5);
        this.addButton(new Button(
                (int) (mc.getMainWindow().scaledWidth() / 2 - buttonWidth / 2f) + 37,
                mc.getMainWindow().scaledHeight() / 2,
                buttonWidth - 70,
                buttonHeight - 7,
                new StringTextComponent("Одиночная Игра"),
                p_onPress_1_ -> {
                    mc.displayGuiScreen(new WorldSelectionScreen(this));
                },
                "Z"
        ));

        this.addButton(new Button(
                (int) (mc.getMainWindow().scaledWidth() / 2 - buttonWidth / 2f) + 37,
                mc.getMainWindow().scaledHeight() / 2 + off - 15,
                buttonWidth - 70,
                buttonHeight - 7,
                new StringTextComponent("Сетевая Игра"),
                p_onPress_1_ -> {
                    mc.displayGuiScreen(new MultiplayerScreen(this));
                },
                "F"
        ));

        this.addButton(new Button(
                (int) (mc.getMainWindow().scaledWidth() / 2 - buttonWidth / 2f) + 52,
                mc.getMainWindow().scaledHeight() / 2 - 10 + off + 20,
                buttonWidth - 108,
                buttonHeight - 15,
                new StringTextComponent("Аккаунты"),
                p_onPress_1_ -> {
                    mc.displayGuiScreen(Managment.ALT);
                },
                ""
        ));
    }

    private boolean areRealmsNotificationsEnabled() {
        return this.minecraft.gameSettings.realmsNotifications && this.realmsNotification != null;
    }

    private void addSingleplayerMultiplayerButtons(int yIn, int rowHeightIn) {
        this.addButton(new net.minecraft.client.gui.widget.button.Button(this.width / 2 - 100, yIn, 200, 20, new TranslationTextComponent("menu.singleplayer"), (p_lambda$addSingleplayerMultiplayerButtons$4_1_) ->
        {
            this.minecraft.displayGuiScreen(new WorldSelectionScreen(this));
        }));
        boolean flag = this.minecraft.isMultiplayerEnabled();
        net.minecraft.client.gui.widget.button.Button.ITooltip button$itooltip = flag ? net.minecraft.client.gui.widget.button.Button.field_238486_s_ : (p_lambda$addSingleplayerMultiplayerButtons$5_1_, p_lambda$addSingleplayerMultiplayerButtons$5_2_, p_lambda$addSingleplayerMultiplayerButtons$5_3_, p_lambda$addSingleplayerMultiplayerButtons$5_4_) ->
        {
            if (!p_lambda$addSingleplayerMultiplayerButtons$5_1_.active) {
                this.renderTooltip(p_lambda$addSingleplayerMultiplayerButtons$5_2_, this.minecraft.fontRenderer.trimStringToWidth(new TranslationTextComponent("title.multiplayer.disabled"), Math.max(this.width / 2 - 43, 170)), p_lambda$addSingleplayerMultiplayerButtons$5_3_, p_lambda$addSingleplayerMultiplayerButtons$5_4_);
            }
        };
        (this.addButton(new net.minecraft.client.gui.widget.button.Button(this.width / 2 - 100, yIn + rowHeightIn * 1, 200, 20, new TranslationTextComponent("menu.multiplayer"), (p_lambda$addSingleplayerMultiplayerButtons$6_1_) ->
        {
            Screen screen = (Screen) (this.minecraft.gameSettings.skipMultiplayerWarning ? new MultiplayerScreen(this) : new MultiplayerWarningScreen(this));
            this.minecraft.displayGuiScreen(screen);
        }, button$itooltip))).active = flag;
        (this.addButton(new net.minecraft.client.gui.widget.button.Button(this.width / 2 - 100, yIn + rowHeightIn * 2, 200, 20, new TranslationTextComponent("menu.online"), (p_lambda$addSingleplayerMultiplayerButtons$7_1_) ->
        {
            this.switchToRealms();
        }, button$itooltip))).active = flag;

        if (Reflector.ModListScreen_Constructor.exists() && this.buttons.size() > 0) {
            Widget widget = this.buttons.get(this.buttons.size() - 1);
            widget.x = this.width / 2 + 2;
            widget.setWidth(98);
        }
    }

    private void switchToRealms() {
        RealmsBridgeScreen realmsbridgescreen = new RealmsBridgeScreen();
        realmsbridgescreen.func_231394_a_(this);
    }

    public MainMenuScreen(boolean fadeIn) {
        super(new TranslationTextComponent("narrator.screen.title"));
        this.showFadeInAnimation = fadeIn;
        this.showTitleWronglySpelled = (double) (new Random()).nextFloat() < 1.0E-4D;
    }

    public void tick() {
        if (this.areRealmsNotificationsEnabled()) {
            this.realmsNotification.tick();
        }
    }

    public static CompletableFuture<Void> loadAsync(TextureManager texMngr, Executor backgroundExecutor) {
        return CompletableFuture.allOf(texMngr.loadAsync(MINECRAFT_TITLE_TEXTURES, backgroundExecutor), texMngr.loadAsync(MINECRAFT_TITLE_EDITION, backgroundExecutor), texMngr.loadAsync(PANORAMA_OVERLAY_TEXTURES, backgroundExecutor), PANORAMA_RESOURCES.loadAsync(texMngr, backgroundExecutor));
    }

    public boolean isPauseScreen() {
        return false;
    }

    public boolean shouldCloseOnEsc() {
        return false;
    }

    protected void init() {

    }

    public void render(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) {
        if (betterText == null) {
            initBetterText();
        }
        if (ClientUtil.legitMode) {
            if (this.firstRenderTime == 0L && this.showFadeInAnimation) {
                this.firstRenderTime = Util.milliTime();
            }

            float f = this.showFadeInAnimation ? (float) (Util.milliTime() - this.firstRenderTime) / 1000.0F : 1.0F;
            GlStateManager.disableDepthTest();
            fill(matrixStack, 0, 0, this.width, this.height, -1);
            this.panorama.render(partialTicks, MathHelper.clamp(f, 0.0F, 1.0F));
            int i = 274;
            int j = this.width / 2 - 137;
            int k = 30;
            this.minecraft.getTextureManager().bindTexture(PANORAMA_OVERLAY_TEXTURES);
            RenderSystem.enableBlend();
            RenderSystem.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
            RenderSystem.color4f(1.0F, 1.0F, 1.0F, this.showFadeInAnimation ? (float) MathHelper.ceil(MathHelper.clamp(f, 0.0F, 1.0F)) : 1.0F);
            blit(matrixStack, 0, 0, this.width, this.height, 0.0F, 0.0F, 16, 128, 16, 128);
            float f1 = this.showFadeInAnimation ? MathHelper.clamp(f - 1.0F, 0.0F, 1.0F) : 1.0F;
            int l = MathHelper.ceil(f1 * 255.0F) << 24;

            if ((l & -67108864) != 0) {
                this.minecraft.getTextureManager().bindTexture(MINECRAFT_TITLE_TEXTURES);
                RenderSystem.color4f(1.0F, 1.0F, 1.0F, f1);

                if (this.showTitleWronglySpelled) {
                    this.blitBlackOutline(j, 30, (p_lambda$render$10_2_, p_lambda$render$10_3_) ->
                    {
                        this.blit(matrixStack, p_lambda$render$10_2_ + 0, p_lambda$render$10_3_, 0, 0, 99, 44);
                        this.blit(matrixStack, p_lambda$render$10_2_ + 99, p_lambda$render$10_3_, 129, 0, 27, 44);
                        this.blit(matrixStack, p_lambda$render$10_2_ + 99 + 26, p_lambda$render$10_3_, 126, 0, 3, 44);
                        this.blit(matrixStack, p_lambda$render$10_2_ + 99 + 26 + 3, p_lambda$render$10_3_, 99, 0, 26, 44);
                        this.blit(matrixStack, p_lambda$render$10_2_ + 155, p_lambda$render$10_3_, 0, 45, 155, 44);
                    });
                } else {
                    this.blitBlackOutline(j, 30, (p_lambda$render$11_2_, p_lambda$render$11_3_) ->
                    {
                        this.blit(matrixStack, p_lambda$render$11_2_ + 0, p_lambda$render$11_3_, 0, 0, 155, 44);
                        this.blit(matrixStack, p_lambda$render$11_2_ + 155, p_lambda$render$11_3_, 0, 45, 155, 44);
                    });
                }

                this.minecraft.getTextureManager().bindTexture(MINECRAFT_TITLE_EDITION);
                blit(matrixStack, j + 88, 67, 0.0F, 0.0F, 98, 14, 128, 16);

                if (Reflector.ForgeHooksClient_renderMainMenu.exists()) {
                    Reflector.callVoid(Reflector.ForgeHooksClient_renderMainMenu, this, matrixStack, this.font, this.width, this.height, l);
                }

                if (this.splashText != null) {
                    RenderSystem.pushMatrix();
                    RenderSystem.translatef((float) (this.width / 2 + 90), 70.0F, 0.0F);
                    RenderSystem.rotatef(-20.0F, 0.0F, 0.0F, 1.0F);
                    float f2 = 1.8F - MathHelper.abs(MathHelper.sin((float) (Util.milliTime() % 1000L) / 1000.0F * ((float) Math.PI * 2F)) * 0.1F);
                    f2 = f2 * 100.0F / (float) (this.font.getStringWidth(this.splashText) + 32);
                    RenderSystem.scalef(f2, f2, f2);
                    drawCenteredString(matrixStack, this.font, this.splashText, 0, -8, 16776960 | l);
                    RenderSystem.popMatrix();
                }

                String s = "Minecraft " + SharedConstants.getVersion().getName();

                if (this.minecraft.isDemo()) {
                    s = s + " Demo";
                } else {
                    s = s + ("release".equalsIgnoreCase(this.minecraft.getVersionType()) ? "" : "/" + this.minecraft.getVersionType());
                }

                if (this.minecraft.isModdedClient()) {
                    s = s + I18n.format("menu.modded");
                }

                if (Reflector.BrandingControl.exists()) {
                    if (Reflector.BrandingControl_forEachLine.exists()) {
                        BiConsumer<Integer, String> biconsumer = (p_lambda$render$12_3_, p_lambda$render$12_4_) ->
                        {
                            drawString(matrixStack, this.font, p_lambda$render$12_4_, 2, this.height - (10 + p_lambda$render$12_3_ * (9 + 1)), 16777215 | l);
                        };
                        Reflector.call(Reflector.BrandingControl_forEachLine, true, true, biconsumer);
                    }

                    if (Reflector.BrandingControl_forEachAboveCopyrightLine.exists()) {
                        BiConsumer<Integer, String> biconsumer1 = (p_lambda$render$13_3_, p_lambda$render$13_4_) ->
                        {
                            drawString(matrixStack, this.font, p_lambda$render$13_4_, this.width - this.font.getStringWidth(p_lambda$render$13_4_), this.height - (10 + (p_lambda$render$13_3_ + 1) * (9 + 1)), 16777215 | l);
                        };
                        Reflector.call(Reflector.BrandingControl_forEachAboveCopyrightLine, biconsumer1);
                    }
                } else {
                    drawString(matrixStack, this.font, s, 2, this.height - 10, 16777215 | l);
                }

                drawString(matrixStack, this.font, "Copyright Mojang AB. Do not distribute!", this.widthCopyrightRest, this.height - 10, 16777215 | l);

                if (mouseX > this.widthCopyrightRest && mouseX < this.widthCopyrightRest + this.widthCopyright && mouseY > this.height - 10 && mouseY < this.height) {
                    fill(matrixStack, this.widthCopyrightRest, this.height - 1, this.widthCopyrightRest + this.widthCopyright, this.height, 16777215 | l);
                }

                for (Widget widget : this.buttons) {
                    widget.setAlpha(f1);
                }
                if (this.areRealmsNotificationsEnabled() && f1 >= 1.0F) {
                    this.realmsNotification.render(matrixStack, mouseX, mouseY, partialTicks);
                }
                super.render(matrixStack, mouseX, mouseY, partialTicks);
            }
            return;

        }

        float widthPerc = (float) mc.getMainWindow().scaledWidth() / 960;
        Vec2i fixed = ScaleMath.getMouse((int) mouseX, (int) mouseY);
        mouseX = fixed.getX();
        mouseY = fixed.getY();
        String better = betterText.output;
        mc.gameRenderer.setupOverlayRendering(2);
        RenderUtil.Render2D.drawImage(new ResourceLocation("orbita/background.png"), 0, 0, mc.getMainWindow().scaledWidth(), mc.getMainWindow().scaledHeight(), -1);
        RenderUtil.Render2D.drawRoundedRect(0F, 0F, mc.getMainWindow().scaledWidth(), mc.getMainWindow().scaledHeight(), 11, new Color(0, 0, 0, 68).getRGB());
        //    RenderUtil.Render2D.drawShadow(mouseX - 70, mouseY, 150, 15, 150 , ColorUtil.getColorStyle(240), ColorUtil.getColorStyle(120), ColorUtil.getColorStyle(80), ColorUtil.getColorStyle(0));
        RenderUtil.Render2D.drawRoundedRect(350.0F, 200.0F, mc.getMainWindow().scaledWidth() - 690, mc.getMainWindow().scaledHeight() - 332, 11, new Color(0, 2, 15, 155).getRGB());
        RenderUtil.Render2D.drawImage(new ResourceLocation("orbita/logo_128.png"), 469.0F, 224.0F, 20, 20, -1);
        Fonts.font[20].drawString(matrixStack, betterText.output, 450.0F, 250.0F, -1);
        super.render(matrixStack, mouseX, mouseY, partialTicks);


        BloomHelper.draw(15, 2, false);
        mc.gameRenderer.setupOverlayRendering();

    }

    public boolean mouseClicked(double mouseX, double mouseY, int button) {
        Vec2i fixed = ScaleMath.getMouse((int) mouseX, (int) mouseY);
        mouseX = fixed.getX();
        mouseY = fixed.getY();
        return super.mouseClicked(mouseX, mouseY, button);
    }
    private void initBetterText() {
        betterText = new BetterText(List.of("Sosal DLC",
                " uid: " + Managment.USER_PROFILE.getUid(),
                "user: " +  user,
                "Sosal",
                "Лютая паста"
        ), 1000);
    }
    public void onClose() {
        if (this.realmsNotification != null) {
            this.realmsNotification.onClose();
        }
    }

    public static class Button extends AbstractButton {

        public static final net.minecraft.client.gui.widget.button.Button.ITooltip field_238486_s_ = (button, matrixStack, mouseX, mouseY) -> {
        };
        protected final net.minecraft.client.gui.widget.button.Button.IPressable onPress;
        protected final net.minecraft.client.gui.widget.button.Button.ITooltip onTooltip;

        private final String symbol;


        public Button(int x, int y, int width, int height, ITextComponent title, net.minecraft.client.gui.widget.button.Button.IPressable pressedAction, String symbol) {
            this(x, y, width, height, title, pressedAction, field_238486_s_, symbol);
        }


        public Button(int x, int y, int width, int height, ITextComponent title, net.minecraft.client.gui.widget.button.Button.IPressable pressedAction, net.minecraft.client.gui.widget.button.Button.ITooltip onTooltip, String symbol) {
            super(x, y, width, height, title);
            this.onPress = pressedAction;
            this.onTooltip = onTooltip;
            this.symbol = symbol;
        }

        public float animation;

        public void renderButton(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) {
            animation = AnimationMath.lerp(animation, isHovered() ? 1f : 0, 10);

            RenderUtil.Render2D.drawRoundedRect(x + 1.6f, y + 1.6f, width - 3, height - 6, 4f, new Color(0, 0, 0, 108).getRGB());

            BloomHelper.registerRenderCall(() -> {
                Fonts.font[15].drawCenteredString(matrixStack, this.getMessage().getString(), x + width / 2f, y + height / 2f + 4 - Fonts.font[23].getFontHeight() / 2f, RenderUtil.reAlphaInt(ColorUtil.interpolateColor(ColorUtil.rgba(255, 255, 255, 255), -1, animation), (int) (255 * animation)));
            });

            Fonts.font[15].drawCenteredString(matrixStack, this.getMessage().getString(), x + width / 2f, y + height / 2f + 4 - Fonts.font[23].getFontHeight() / 2f, RenderUtil.reAlphaInt(ColorUtil.interpolateColor(ColorUtil.rgba(255, 255, 255, 255), -1, animation), (int) (255)));


            Fonts.icon[24].drawCenteredString(matrixStack, symbol, x + width / 3f - 24, y + height / 2f + 2 - Fonts.icon[23].getFontHeight() / 2f, RenderUtil.reAlphaInt(ColorUtil.interpolateColor(ColorUtil.rgba(255, 255, 255, 255), -1, animation), (int) (255)));
        }

        public void onPress() {
            this.onPress.onPress(this);
        }
    }
}
извени канешна а поч лого такое кривое и где кнопки остальные
 
Начинающий
Статус
Оффлайн
Регистрация
27 Май 2024
Сообщения
54
Реакции[?]
0
Поинты[?]
0
извени канешна а поч лого такое кривое и где кнопки остальные
Остальные кнопки добавить можно а делал я с Авалона ну визуально хотел там кнопки выхода и настроек нет а лого с асетов взято не знаю почему криво
 
Начинающий
Статус
Оффлайн
Регистрация
4 Дек 2024
Сообщения
38
Реакции[?]
0
Поинты[?]
0
package wtf.expensive.util.font;

import wtf.expensive.util.font.common.Lang;
import wtf.expensive.util.font.styled.StyledFont;

public class Fonts {
public static final String FONT_DIR = "/assets/minecraft/expensive/font/";
public static volatile StyledFont[] minecraft = new StyledFont[45];
public static volatile StyledFont[] verdana = new StyledFont[24];
public static volatile StyledFont[] gilroyBold = new StyledFont[45];
public static volatile StyledFont[] msBold = new StyledFont[24];
public static volatile StyledFont[] msMedium = new StyledFont[24];
public static volatile StyledFont[] msLight = new StyledFont[24];
public static volatile StyledFont[] msRegular = new StyledFont[24];
public static volatile StyledFont[] msSemiBold = new StyledFont[24];
public static volatile StyledFont[] unbounded12 = new StyledFont[45];
public static volatile StyledFont[] Nurik = new StyledFont[24];
public static volatile StyledFont[] babkatv = new StyledFont[24];
public static volatile StyledFont[] gilroy = new StyledFont[45];
public static volatile StyledFont[] sora = new StyledFont[24];
public static volatile StyledFont[] woveline = new StyledFont[24];
public static volatile StyledFont[] icons = new StyledFont[24];
public static volatile StyledFont[] configIcon = new StyledFont[24];
public static volatile StyledFont[] icons1 = new StyledFont[131];

public Fonts() {
}

public static void init() {
try {
long time = System.currentTimeMillis();
icons[16] = new StyledFont("penus.ttf", 16, 0.0F, 0.0F, 0.0F, true, Lang.ENG_RU);
icons[12] = new StyledFont("penus.ttf", 12, 0.0F, 0.0F, 0.0F, true, Lang.ENG_RU);
woveline[19] = new StyledFont("woveline.otf", 19, 0.0F, 0.0F, 0.0F, true, Lang.ENG_RU);
icons1[130] = new StyledFont("icons.ttf", 130, 0.0F, 0.0F, 0.0F, true, Lang.ENG_RU);

int i;
for(i = 8; i < 24; ++i) {
icons1 = new StyledFont("icons.ttf", i, 0.0F, 0.0F, 0.0F, true, Lang.ENG_RU);
}

for(i = 8; i < 24; ++i) {
minecraft = new StyledFont("mc.ttf", i, 0.0F, 0.0F, 0.0F, true, Lang.ENG_RU);
}

for(i = 8; i < 16; ++i) {
verdana = new StyledFont("verdana.ttf", i, 0.0F, 0.0F, 0.0F, false, Lang.ENG_RU);
}

for(i = 10; i < 23; ++i) {
sora = new StyledFont("sora.ttf", i, 0.0F, 0.0F, 0.0F, true, Lang.ENG_RU);
}

for(i = 10; i < 45; ++i) {
unbounded12 = new StyledFont("Unbounded-Bold.ttf", i, 0.0F, 0.0F, 0.0F, true, Lang.ENG_RU);
}

for(i = 10; i < 23; ++i) {
configIcon = new StyledFont("Glyphter.ttf", i, 0.0F, 0.0F, 0.0F, true, Lang.ENG_RU);
}

for(i = 10; i < 45; ++i) {
gilroyBold = new StyledFont("gilroy-bold.ttf", i, 0.0F, 0.0F, 0.0F, true, Lang.ENG_RU);
}

for(i = 10; i < 45; ++i) {
gilroy = new StyledFont("gilroy.ttf", i, 0.0F, 0.0F, 0.0F, true, Lang.ENG_RU);
}

for(i = 10; i < 23; ++i) {
Nurik = new StyledFont("Nurik.ttf", i, 0.0F, 0.0F, 0.0F, true, Lang.ENG_RU);
}

for(i = 10; i < 24; ++i) {
babkatv = new StyledFont("babkatv.ttf", i, 0.0F, 0.0F, 0.0F, true, Lang.ENG_RU);
}

for(i = 8; i < 24; ++i) {
msBold = new StyledFont("Montserrat-Bold.ttf", i, 0.0F, 0.0F, 0.0F, true, Lang.ENG_RU);
}

for(i = 8; i < 24; ++i) {
msLight = new StyledFont("Montserrat-Light.ttf", i, 0.0F, 0.0F, 0.0F, true, Lang.ENG_RU);
}

for(i = 8; i < 24; ++i) {
msMedium = new StyledFont("Montserrat-Medium.ttf", i, 0.0F, 0.0F, 0.0F, true, Lang.ENG_RU);
}

for(i = 8; i < 24; ++i) {
msRegular = new StyledFont("Montserrat-Regular.ttf", i, 0.0F, 0.0F, 0.0F, true, Lang.ENG_RU);
}

for(i = 8; i < 24; ++i) {
msSemiBold = new StyledFont("Montserrat-SemiBold.ttf", i, 0.0F, 0.0F, 0.0F, true, Lang.ENG_RU);
}

System.out.println("Шрифты загрузились за: " + (System.currentTimeMillis() - time) + " миллисекунды!");
} catch (Throwable var3) {
Throwable $ex = var3;
try {
throw $ex;
} catch (Throwable e) {
throw new RuntimeException(e);
}
}
}
}
 
Начинающий
Статус
Онлайн
Регистрация
26 Янв 2023
Сообщения
302
Реакции[?]
1
Поинты[?]
1K
package wtf.expensive.util.font;

import wtf.expensive.util.font.common.Lang;
import wtf.expensive.util.font.styled.StyledFont;

public class Fonts {
public static final String FONT_DIR = "/assets/minecraft/expensive/font/";
public static volatile StyledFont[] minecraft = new StyledFont[45];
public static volatile StyledFont[] verdana = new StyledFont[24];
public static volatile StyledFont[] gilroyBold = new StyledFont[45];
public static volatile StyledFont[] msBold = new StyledFont[24];
public static volatile StyledFont[] msMedium = new StyledFont[24];
public static volatile StyledFont[] msLight = new StyledFont[24];
public static volatile StyledFont[] msRegular = new StyledFont[24];
public static volatile StyledFont[] msSemiBold = new StyledFont[24];
public static volatile StyledFont[] unbounded12 = new StyledFont[45];
public static volatile StyledFont[] Nurik = new StyledFont[24];
public static volatile StyledFont[] babkatv = new StyledFont[24];
public static volatile StyledFont[] gilroy = new StyledFont[45];
public static volatile StyledFont[] sora = new StyledFont[24];
public static volatile StyledFont[] woveline = new StyledFont[24];
public static volatile StyledFont[] icons = new StyledFont[24];
public static volatile StyledFont[] configIcon = new StyledFont[24];
public static volatile StyledFont[] icons1 = new StyledFont[131];

public Fonts() {
}

public static void init() {
try {
long time = System.currentTimeMillis();
icons[16] = new StyledFont("penus.ttf", 16, 0.0F, 0.0F, 0.0F, true, Lang.ENG_RU);
icons[12] = new StyledFont("penus.ttf", 12, 0.0F, 0.0F, 0.0F, true, Lang.ENG_RU);
woveline[19] = new StyledFont("woveline.otf", 19, 0.0F, 0.0F, 0.0F, true, Lang.ENG_RU);
icons1[130] = new StyledFont("icons.ttf", 130, 0.0F, 0.0F, 0.0F, true, Lang.ENG_RU);

int i;
for(i = 8; i < 24; ++i) {
icons1 = new StyledFont("icons.ttf", i, 0.0F, 0.0F, 0.0F, true, Lang.ENG_RU);
}

for(i = 8; i < 24; ++i) {
minecraft = new StyledFont("mc.ttf", i, 0.0F, 0.0F, 0.0F, true, Lang.ENG_RU);
}

for(i = 8; i < 16; ++i) {
verdana = new StyledFont("verdana.ttf", i, 0.0F, 0.0F, 0.0F, false, Lang.ENG_RU);
}

for(i = 10; i < 23; ++i) {
sora = new StyledFont("sora.ttf", i, 0.0F, 0.0F, 0.0F, true, Lang.ENG_RU);
}

for(i = 10; i < 45; ++i) {
unbounded12 = new StyledFont("Unbounded-Bold.ttf", i, 0.0F, 0.0F, 0.0F, true, Lang.ENG_RU);
}

for(i = 10; i < 23; ++i) {
configIcon = new StyledFont("Glyphter.ttf", i, 0.0F, 0.0F, 0.0F, true, Lang.ENG_RU);
}

for(i = 10; i < 45; ++i) {
gilroyBold = new StyledFont("gilroy-bold.ttf", i, 0.0F, 0.0F, 0.0F, true, Lang.ENG_RU);
}

for(i = 10; i < 45; ++i) {
gilroy = new StyledFont("gilroy.ttf", i, 0.0F, 0.0F, 0.0F, true, Lang.ENG_RU);
}

for(i = 10; i < 23; ++i) {
Nurik = new StyledFont("Nurik.ttf", i, 0.0F, 0.0F, 0.0F, true, Lang.ENG_RU);
}

for(i = 10; i < 24; ++i) {
babkatv = new StyledFont("babkatv.ttf", i, 0.0F, 0.0F, 0.0F, true, Lang.ENG_RU);
}

for(i = 8; i < 24; ++i) {
msBold = new StyledFont("Montserrat-Bold.ttf", i, 0.0F, 0.0F, 0.0F, true, Lang.ENG_RU);
}

for(i = 8; i < 24; ++i) {
msLight = new StyledFont("Montserrat-Light.ttf", i, 0.0F, 0.0F, 0.0F, true, Lang.ENG_RU);
}

for(i = 8; i < 24; ++i) {
msMedium = new StyledFont("Montserrat-Medium.ttf", i, 0.0F, 0.0F, 0.0F, true, Lang.ENG_RU);
}

for(i = 8; i < 24; ++i) {
msRegular = new StyledFont("Montserrat-Regular.ttf", i, 0.0F, 0.0F, 0.0F, true, Lang.ENG_RU);
}

for(i = 8; i < 24; ++i) {
msSemiBold = new StyledFont("Montserrat-SemiBold.ttf", i, 0.0F, 0.0F, 0.0F, true, Lang.ENG_RU);
}

System.out.println("Шрифты загрузились за: " + (System.currentTimeMillis() - time) + " миллисекунды!");
} catch (Throwable var3) {
Throwable $ex = var3;
try {
throw $ex;
} catch (Throwable e) {
throw new RuntimeException(e);
}
}
}
}
Та нее краш лог кинь
 
Начинающий
Статус
Оффлайн
Регистрация
4 Дек 2024
Сообщения
38
Реакции[?]
0
Поинты[?]
0
Та нее краш лог кинь
бляя щас самый первый найду
Та нее краш лог кинь
---- Minecraft Crash Report ----
// This doesn't make any sense!

Time: 14.12.2024, 14:54
Description: Rendering overlay

java.lang.NullPointerException: Cannot load from object array because "wtf.expensive.util.font.Fonts.font" is null
at net.minecraft.client.gui.screen.MainMenuScreen.render(MainMenuScreen.java:357)
at net.minecraft.client.gui.ResourceLoadProgressGui.render(ResourceLoadProgressGui.java:83)
at net.minecraft.client.renderer.GameRenderer.updateCameraAndRender(GameRenderer.java:677)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1041)
at net.minecraft.client.Minecraft.run(Minecraft.java:643)
at net.minecraft.client.main.Main.main(Main.java:207)
at Start.main(Start.java:12)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Render thread
Stacktrace:
at net.minecraft.client.gui.screen.MainMenuScreen.render(MainMenuScreen.java:357)
at net.minecraft.client.gui.ResourceLoadProgressGui.render(ResourceLoadProgressGui.java:83)

-- Overlay render details --
Details:
Overlay name: net.minecraft.client.gui.ResourceLoadProgressGui
Stacktrace:
at net.minecraft.client.renderer.GameRenderer.updateCameraAndRender(GameRenderer.java:677)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1041)
at net.minecraft.client.Minecraft.run(Minecraft.java:643)
at net.minecraft.client.main.Main.main(Main.java:207)
at Start.main(Start.java:12)

-- System Details --
Details:
Minecraft Version: 1.16.5
Minecraft Version ID: 1.16.5
Operating System: Windows 11 (amd64) version 10.0
Java Version: 17.0.12, Amazon.com Inc.
Java VM Version: OpenJDK 64-Bit Server VM (mixed mode, sharing), Amazon.com Inc.
Memory: 168181424 bytes (160 MB) / 566231040 bytes (540 MB) up to 4276092928 bytes (4078 MB)
CPUs: 12
JVM Flags: 0 total;
Launched Version: mcp
Backend library: LWJGL version 3.2.2 build 10
Backend API: NVIDIA GeForce GTX 1060 3GB/PCIe/SSE2 GL version 4.6.0 NVIDIA 560.94, NVIDIA Corporation
GL Caps: Using framebuffer using OpenGL 3.0
Using VBOs: Yes
Is Modded: Definitely; Client brand changed to 'vanilla/modified'
Type: Client (map_client.txt)
Graphics mode: fancy
Resource Packs: vanilla, file/jaguars1
Current Language: English (US)
CPU: 12x AMD Ryzen 5 2600X Six-Core Processor
OptiFine Version: OptiFine_1.16.5_HD_U_G8
OptiFine Build: ~~NULL~~
Render Distance Chunks: 8
Mipmaps: 4
Anisotropic Filtering: 1
Antialiasing: 0
Multitexture: false
Shaders: null
OpenGlVersion: 4.6.0 NVIDIA 560.94
OpenGlRenderer: NVIDIA GeForce GTX 1060 3GB/PCIe/SSE2
OpenGlVendor: NVIDIA Corporation
CpuCount: 12
вродь самое первое
 
Сверху Снизу