• MONEY за подписку! Ничего делать не надо совсем, всего-то подписаться на тг одмена и нажать кнопку "Принять участие" в розыгрыше: https://t.me/govthing/7650

Гайд Как добавить кнопку Accounts в деф мейн меню майна | exp 3.1

Начинающий
Начинающий
Статус
Оффлайн
Регистрация
11 Окт 2024
Сообщения
715
Реакции
7
Сначала действуем по этому треду

потом когда все сделали нам нужно вставить этот код
Код:
Expand Collapse Copy
(this.addButton(new Button(this.width / 2 - 100, yIn + rowHeightIn * 2, 200,20, new TranslationTextComponent("Accounts"),(p_lambda$addSingleplayerMultiplayerButtons$7_1_) ->
        {
            this.minecraft.displayGuiScreen(Divini4ev.getInstance().getAltManager());
        }, button$itooltip))).active = flag;

после кода
Код:
Expand Collapse Copy
   private void addSingleplayerMultiplayerButtons(int yIn, int rowHeightIn) {
        this.addButton(new 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();
        Button.ITooltip button$itooltip = flag ? 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 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;

ну и все, думаю кому то облегчу жизнь
 
Так оно только кнопку делает а альт менеджер сам? Если можно пожалуйста
 
Сначала действуем по этому треду

потом когда все сделали нам нужно вставить этот код
Код:
Expand Collapse Copy
(this.addButton(new Button(this.width / 2 - 100, yIn + rowHeightIn * 2, 200,20, new TranslationTextComponent("Accounts"),(p_lambda$addSingleplayerMultiplayerButtons$7_1_) ->
        {
            this.minecraft.displayGuiScreen(Divini4ev.getInstance().getAltManager());
        }, button$itooltip))).active = flag;

после кода
Код:
Expand Collapse Copy
   private void addSingleplayerMultiplayerButtons(int yIn, int rowHeightIn) {
        this.addButton(new 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();
        Button.ITooltip button$itooltip = flag ? 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 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;

ну и все, думаю кому то облегчу жизнь
оооудааа чат гпт корм корм люти
 
дайте базу 3.1
 
Назад
Сверху Снизу