Исходник Expensive 4.0 Alt Manager | снова подарок от SXDpandora

Начинающий
Статус
Оффлайн
Регистрация
1 Дек 2020
Сообщения
64
Реакции[?]
1
Поинты[?]
1K

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

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

Спасибо!

Java:
package ru.expensive.implement.screens.title;

import com.mojang.authlib.exceptions.AuthenticationException;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.screen.multiplayer.MultiplayerScreen;
import net.minecraft.client.gui.screen.option.OptionsScreen;
import net.minecraft.client.gui.screen.world.SelectWorldScreen;
import net.minecraft.client.util.Session;
import net.minecraft.text.Text;
import org.joml.Matrix4f;
import ru.expensive.api.system.font.Fonts;
import ru.expensive.common.QuickImports;
import ru.expensive.api.system.shape.ShapeProperties;
import ru.expensive.api.system.shape.implement.Image;
import ru.expensive.common.util.other.StringUtil;
import ru.expensive.implement.screens.title.button.AbstractButton;
import ru.expensive.implement.screens.title.button.implement.CustomTextTitleButton;
import ru.expensive.implement.screens.title.button.implement.CustomTitleButton;

import java.util.*;

public class CustomTitleScreen extends Screen implements QuickImports {
    private final List<AbstractButton> buttons = new ArrayList<>();

    private final AbstractButton singleplayer = new CustomTitleButton("Singleplayer", () -> mc.setScreen(new SelectWorldScreen(this)));
    private final AbstractButton multiplayer = new CustomTitleButton("Multiplayer", () -> mc.setScreen(new MultiplayerScreen(this)));
    private final AbstractButton accounts = new CustomTitleButton("Accounts", () -> mc.setScreen(new AccountManagerScreen()));
    private final AbstractButton options = new CustomTextTitleButton("Options", () -> mc.setScreen(new OptionsScreen(this, mc.options)));
    private final AbstractButton exit = new CustomTextTitleButton("Exit", MinecraftClient.getInstance()::scheduleStop);

    public CustomTitleScreen() {
        super(Text.of("Expensive custom title screen."));

        buttons.addAll(Arrays.asList(
                singleplayer,
                multiplayer,
                accounts,
                options,
                exit)
        );
        try {
            String currentUsername = AccountManagerScreen.getCurrentUsername();
            StringUtil.setSession(new Session(currentUsername, UUID.randomUUID().toString(), "", Optional.empty(), Optional.empty(), Session.AccountType.MOJANG));
        } catch (AuthenticationException ignored) {

        }
    }

    @Override
    public void render(DrawContext context, int mouseX, int mouseY, float delta) {
        Matrix4f positionMatrix = context.getMatrices().peek().getPositionMatrix();

        int wHeight = window.getHeight() / 4;
        int wWidth = window.getScaledWidth() / 2;

        singleplayer.position(wWidth - 80, wHeight - 28)
                .size(160, 27);

        multiplayer.position(wWidth - 80, wHeight + 4)
                .size(160, 27);

        accounts.position(wWidth - 80, wHeight + 36)
                .size(160, 27);

        options.position(wWidth - 40, wHeight + 82);
        exit.position(wWidth + 25, wHeight + 82);

        Image image = QuickImports.image.setMatrixStack(context.getMatrices());

        image.setTexture("textures/mainmenu.png").render(ShapeProperties.create(positionMatrix,0, 0, width, height)
                .build()
        );

        image.setTexture("textures/big_logo.png").render(ShapeProperties.create(positionMatrix,window.getScaledWidth() - 400, window.getScaledHeight() - 480, 618, 618)
                .build()
        );

        image.setTexture("textures/logo.png").render(ShapeProperties.create(positionMatrix,wWidth - 42, wHeight - 88, 84, 16)
                .build()
        );

        Fonts.getSize(20, Fonts.Type.DEFAULT).drawCenteredString(context.getMatrices(), "Снова вам от меня подарок, удачи братья!", wWidth, wHeight - 54, -1);

        buttons.forEach(buttons -> buttons.render(context, mouseX, mouseY, delta));
        super.render(context, mouseX, mouseY, delta);
    }

    @Override
    public boolean mouseClicked(double mouseX, double mouseY, int button) {
        buttons.forEach(buttons -> buttons.mouseClicked(mouseX, mouseY, button));
        return super.mouseClicked(mouseX, mouseY, button);
    }
}
Java:
package ru.expensive.implement.screens.title;

import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.widget.ButtonWidget;
import net.minecraft.client.gui.widget.TextFieldWidget;
import net.minecraft.client.util.Session;
import net.minecraft.text.Text;
import org.joml.Matrix4f;
import ru.expensive.api.system.shape.ShapeProperties;
import ru.expensive.api.system.shape.implement.Image;
import ru.expensive.common.QuickImports;
import ru.expensive.common.util.other.StringUtil;

import java.util.Optional;
import java.util.UUID;

public class AccountManagerScreen extends Screen implements QuickImports {

    private TextFieldWidget usernameField;
    private ButtonWidget saveButton;
    private static String currentUsername = "WirentDeveloper";

    public AccountManagerScreen() {
        super(Text.empty());
    }

    @Override
    protected void init() {
        super.init();
        this.usernameField = new TextFieldWidget(this.client.textRenderer, this.width / 2 - 100, this.height / 2 - 20, 200, 20, Text.of("Enter username"));
        this.usernameField.setMaxLength(32);
        this.usernameField.setText(currentUsername);
        this.usernameField.setFocused(true);
        this.addSelectableChild(this.usernameField);

        this.saveButton = ButtonWidget.builder(Text.of("Save"), button -> saveUsername()).dimensions(this.width / 2 - 100, this.height / 2 + 10, 200, 20).build();
        this.addDrawableChild(this.saveButton);
    }

    @Override
    public void render(DrawContext context, int mouseX, int mouseY, float delta) {
        this.renderBackground(context);
        Matrix4f positionMatrix = context.getMatrices().peek().getPositionMatrix();

        Image image = QuickImports.image.setMatrixStack(context.getMatrices());

        image.setTexture("textures/mainmenu.png").render(ShapeProperties.create(positionMatrix, 0, 0, width, height).build());
        image.setTexture("textures/big_logo.png").render(ShapeProperties.create(positionMatrix, window.getScaledWidth() - 400, window.getScaledHeight() - 480, 618, 618).build());

        this.usernameField.render(context, mouseX, mouseY, delta);
        this.saveButton.render(context, mouseX, mouseY, delta);

        super.render(context, mouseX, mouseY, delta);
    }

    @Override
    public boolean mouseClicked(double mouseX, double mouseY, int button) {
        if (this.usernameField.mouseClicked(mouseX, mouseY, button)) {
            return true;
        }
        return super.mouseClicked(mouseX, mouseY, button);
    }

    @Override
    public boolean keyPressed(int keyCode, int scanCode, int modifiers) {
        if (this.usernameField.keyPressed(keyCode, scanCode, modifiers) || this.usernameField.isActive()) {
            return true;
        }
        return super.keyPressed(keyCode, scanCode, modifiers);
    }

    @Override
    public boolean charTyped(char chr, int modifiers) {
        if (this.usernameField.charTyped(chr, modifiers)) {
            return true;
        }
        return super.charTyped(chr, modifiers);
    }

    private void saveUsername() {
        currentUsername = this.usernameField.getText();
        System.out.println("Your nick my bro: " + currentUsername);
        MinecraftClient.getInstance().setScreen(null);
    }

    public static String getCurrentUsername() {
        return currentUsername;
    }
}
 
Начинающий
Статус
Оффлайн
Регистрация
11 Апр 2023
Сообщения
10
Реакции[?]
0
Поинты[?]
0
блин ты бы хоть ss прикрепил а то пастерки будут в ярости когда перепастят дефолт альт менеджер 4.0 экспы
 
Read Only
Статус
Оффлайн
Регистрация
26 Авг 2024
Сообщения
645
Реакции[?]
1
Поинты[?]
2K
блин ты бы хоть ss прикрепил а то пастерки будут в ярости когда перепастят дефолт альт менеджер 4.0 экспы
так прикол в том что на 4.0 нету альт менеджера, а он слил единственный такой понял или нед
 
Начинающий
Статус
Оффлайн
Регистрация
8 Сен 2023
Сообщения
297
Реакции[?]
5
Поинты[?]
0
Начинающий
Статус
Оффлайн
Регистрация
1 Дек 2020
Сообщения
64
Реакции[?]
1
Поинты[?]
1K
Там это была роздача альт менеджера мой друг ее сделал а код я
?
У меня хуйня получше чем у него оказалась
не буду наверное тебе говорить что это сделано было за 10 минут и дизаин не делался вообще, так как я не расчитывал на ренеймеров которые даже это сделать не смогут
1728992537751.pngдальше этого мог не писать
 
Забаненный
Статус
Оффлайн
Регистрация
2 Ноя 2024
Сообщения
136
Реакции[?]
0
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Read Only
Статус
Оффлайн
Регистрация
29 Апр 2023
Сообщения
844
Реакции[?]
4
Поинты[?]
5K
Java:
package ru.expensive.implement.screens.title;

import com.mojang.authlib.exceptions.AuthenticationException;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.screen.multiplayer.MultiplayerScreen;
import net.minecraft.client.gui.screen.option.OptionsScreen;
import net.minecraft.client.gui.screen.world.SelectWorldScreen;
import net.minecraft.client.util.Session;
import net.minecraft.text.Text;
import org.joml.Matrix4f;
import ru.expensive.api.system.font.Fonts;
import ru.expensive.common.QuickImports;
import ru.expensive.api.system.shape.ShapeProperties;
import ru.expensive.api.system.shape.implement.Image;
import ru.expensive.common.util.other.StringUtil;
import ru.expensive.implement.screens.title.button.AbstractButton;
import ru.expensive.implement.screens.title.button.implement.CustomTextTitleButton;
import ru.expensive.implement.screens.title.button.implement.CustomTitleButton;

import java.util.*;

public class CustomTitleScreen extends Screen implements QuickImports {
    private final List<AbstractButton> buttons = new ArrayList<>();

    private final AbstractButton singleplayer = new CustomTitleButton("Singleplayer", () -> mc.setScreen(new SelectWorldScreen(this)));
    private final AbstractButton multiplayer = new CustomTitleButton("Multiplayer", () -> mc.setScreen(new MultiplayerScreen(this)));
    private final AbstractButton accounts = new CustomTitleButton("Accounts", () -> mc.setScreen(new AccountManagerScreen()));
    private final AbstractButton options = new CustomTextTitleButton("Options", () -> mc.setScreen(new OptionsScreen(this, mc.options)));
    private final AbstractButton exit = new CustomTextTitleButton("Exit", MinecraftClient.getInstance()::scheduleStop);

    public CustomTitleScreen() {
        super(Text.of("Expensive custom title screen."));

        buttons.addAll(Arrays.asList(
                singleplayer,
                multiplayer,
                accounts,
                options,
                exit)
        );
        try {
            String currentUsername = AccountManagerScreen.getCurrentUsername();
            StringUtil.setSession(new Session(currentUsername, UUID.randomUUID().toString(), "", Optional.empty(), Optional.empty(), Session.AccountType.MOJANG));
        } catch (AuthenticationException ignored) {

        }
    }

    @Override
    public void render(DrawContext context, int mouseX, int mouseY, float delta) {
        Matrix4f positionMatrix = context.getMatrices().peek().getPositionMatrix();

        int wHeight = window.getHeight() / 4;
        int wWidth = window.getScaledWidth() / 2;

        singleplayer.position(wWidth - 80, wHeight - 28)
                .size(160, 27);

        multiplayer.position(wWidth - 80, wHeight + 4)
                .size(160, 27);

        accounts.position(wWidth - 80, wHeight + 36)
                .size(160, 27);

        options.position(wWidth - 40, wHeight + 82);
        exit.position(wWidth + 25, wHeight + 82);

        Image image = QuickImports.image.setMatrixStack(context.getMatrices());

        image.setTexture("textures/mainmenu.png").render(ShapeProperties.create(positionMatrix,0, 0, width, height)
                .build()
        );

        image.setTexture("textures/big_logo.png").render(ShapeProperties.create(positionMatrix,window.getScaledWidth() - 400, window.getScaledHeight() - 480, 618, 618)
                .build()
        );

        image.setTexture("textures/logo.png").render(ShapeProperties.create(positionMatrix,wWidth - 42, wHeight - 88, 84, 16)
                .build()
        );

        Fonts.getSize(20, Fonts.Type.DEFAULT).drawCenteredString(context.getMatrices(), "Снова вам от меня подарок, удачи братья!", wWidth, wHeight - 54, -1);

        buttons.forEach(buttons -> buttons.render(context, mouseX, mouseY, delta));
        super.render(context, mouseX, mouseY, delta);
    }

    @Override
    public boolean mouseClicked(double mouseX, double mouseY, int button) {
        buttons.forEach(buttons -> buttons.mouseClicked(mouseX, mouseY, button));
        return super.mouseClicked(mouseX, mouseY, button);
    }
}
Java:
package ru.expensive.implement.screens.title;

import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.widget.ButtonWidget;
import net.minecraft.client.gui.widget.TextFieldWidget;
import net.minecraft.client.util.Session;
import net.minecraft.text.Text;
import org.joml.Matrix4f;
import ru.expensive.api.system.shape.ShapeProperties;
import ru.expensive.api.system.shape.implement.Image;
import ru.expensive.common.QuickImports;
import ru.expensive.common.util.other.StringUtil;

import java.util.Optional;
import java.util.UUID;

public class AccountManagerScreen extends Screen implements QuickImports {

    private TextFieldWidget usernameField;
    private ButtonWidget saveButton;
    private static String currentUsername = "WirentDeveloper";

    public AccountManagerScreen() {
        super(Text.empty());
    }

    @Override
    protected void init() {
        super.init();
        this.usernameField = new TextFieldWidget(this.client.textRenderer, this.width / 2 - 100, this.height / 2 - 20, 200, 20, Text.of("Enter username"));
        this.usernameField.setMaxLength(32);
        this.usernameField.setText(currentUsername);
        this.usernameField.setFocused(true);
        this.addSelectableChild(this.usernameField);

        this.saveButton = ButtonWidget.builder(Text.of("Save"), button -> saveUsername()).dimensions(this.width / 2 - 100, this.height / 2 + 10, 200, 20).build();
        this.addDrawableChild(this.saveButton);
    }

    @Override
    public void render(DrawContext context, int mouseX, int mouseY, float delta) {
        this.renderBackground(context);
        Matrix4f positionMatrix = context.getMatrices().peek().getPositionMatrix();

        Image image = QuickImports.image.setMatrixStack(context.getMatrices());

        image.setTexture("textures/mainmenu.png").render(ShapeProperties.create(positionMatrix, 0, 0, width, height).build());
        image.setTexture("textures/big_logo.png").render(ShapeProperties.create(positionMatrix, window.getScaledWidth() - 400, window.getScaledHeight() - 480, 618, 618).build());

        this.usernameField.render(context, mouseX, mouseY, delta);
        this.saveButton.render(context, mouseX, mouseY, delta);

        super.render(context, mouseX, mouseY, delta);
    }

    @Override
    public boolean mouseClicked(double mouseX, double mouseY, int button) {
        if (this.usernameField.mouseClicked(mouseX, mouseY, button)) {
            return true;
        }
        return super.mouseClicked(mouseX, mouseY, button);
    }

    @Override
    public boolean keyPressed(int keyCode, int scanCode, int modifiers) {
        if (this.usernameField.keyPressed(keyCode, scanCode, modifiers) || this.usernameField.isActive()) {
            return true;
        }
        return super.keyPressed(keyCode, scanCode, modifiers);
    }

    @Override
    public boolean charTyped(char chr, int modifiers) {
        if (this.usernameField.charTyped(chr, modifiers)) {
            return true;
        }
        return super.charTyped(chr, modifiers);
    }

    private void saveUsername() {
        currentUsername = this.usernameField.getText();
        System.out.println("Your nick my bro: " + currentUsername);
        MinecraftClient.getInstance().setScreen(null);
    }

    public static String getCurrentUsername() {
        return currentUsername;
    }
}
/del
 
Начинающий
Статус
Оффлайн
Регистрация
27 Окт 2024
Сообщения
61
Реакции[?]
0
Поинты[?]
0
Java:
package ru.expensive.implement.screens.title;

import com.mojang.authlib.exceptions.AuthenticationException;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.screen.multiplayer.MultiplayerScreen;
import net.minecraft.client.gui.screen.option.OptionsScreen;
import net.minecraft.client.gui.screen.world.SelectWorldScreen;
import net.minecraft.client.util.Session;
import net.minecraft.text.Text;
import org.joml.Matrix4f;
import ru.expensive.api.system.font.Fonts;
import ru.expensive.common.QuickImports;
import ru.expensive.api.system.shape.ShapeProperties;
import ru.expensive.api.system.shape.implement.Image;
import ru.expensive.common.util.other.StringUtil;
import ru.expensive.implement.screens.title.button.AbstractButton;
import ru.expensive.implement.screens.title.button.implement.CustomTextTitleButton;
import ru.expensive.implement.screens.title.button.implement.CustomTitleButton;

import java.util.*;

public class CustomTitleScreen extends Screen implements QuickImports {
    private final List<AbstractButton> buttons = new ArrayList<>();

    private final AbstractButton singleplayer = new CustomTitleButton("Singleplayer", () -> mc.setScreen(new SelectWorldScreen(this)));
    private final AbstractButton multiplayer = new CustomTitleButton("Multiplayer", () -> mc.setScreen(new MultiplayerScreen(this)));
    private final AbstractButton accounts = new CustomTitleButton("Accounts", () -> mc.setScreen(new AccountManagerScreen()));
    private final AbstractButton options = new CustomTextTitleButton("Options", () -> mc.setScreen(new OptionsScreen(this, mc.options)));
    private final AbstractButton exit = new CustomTextTitleButton("Exit", MinecraftClient.getInstance()::scheduleStop);

    public CustomTitleScreen() {
        super(Text.of("Expensive custom title screen."));

        buttons.addAll(Arrays.asList(
                singleplayer,
                multiplayer,
                accounts,
                options,
                exit)
        );
        try {
            String currentUsername = AccountManagerScreen.getCurrentUsername();
            StringUtil.setSession(new Session(currentUsername, UUID.randomUUID().toString(), "", Optional.empty(), Optional.empty(), Session.AccountType.MOJANG));
        } catch (AuthenticationException ignored) {

        }
    }

    @Override
    public void render(DrawContext context, int mouseX, int mouseY, float delta) {
        Matrix4f positionMatrix = context.getMatrices().peek().getPositionMatrix();

        int wHeight = window.getHeight() / 4;
        int wWidth = window.getScaledWidth() / 2;

        singleplayer.position(wWidth - 80, wHeight - 28)
                .size(160, 27);

        multiplayer.position(wWidth - 80, wHeight + 4)
                .size(160, 27);

        accounts.position(wWidth - 80, wHeight + 36)
                .size(160, 27);

        options.position(wWidth - 40, wHeight + 82);
        exit.position(wWidth + 25, wHeight + 82);

        Image image = QuickImports.image.setMatrixStack(context.getMatrices());

        image.setTexture("textures/mainmenu.png").render(ShapeProperties.create(positionMatrix,0, 0, width, height)
                .build()
        );

        image.setTexture("textures/big_logo.png").render(ShapeProperties.create(positionMatrix,window.getScaledWidth() - 400, window.getScaledHeight() - 480, 618, 618)
                .build()
        );

        image.setTexture("textures/logo.png").render(ShapeProperties.create(positionMatrix,wWidth - 42, wHeight - 88, 84, 16)
                .build()
        );

        Fonts.getSize(20, Fonts.Type.DEFAULT).drawCenteredString(context.getMatrices(), "Снова вам от меня подарок, удачи братья!", wWidth, wHeight - 54, -1);

        buttons.forEach(buttons -> buttons.render(context, mouseX, mouseY, delta));
        super.render(context, mouseX, mouseY, delta);
    }

    @Override
    public boolean mouseClicked(double mouseX, double mouseY, int button) {
        buttons.forEach(buttons -> buttons.mouseClicked(mouseX, mouseY, button));
        return super.mouseClicked(mouseX, mouseY, button);
    }
}
Java:
package ru.expensive.implement.screens.title;

import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.widget.ButtonWidget;
import net.minecraft.client.gui.widget.TextFieldWidget;
import net.minecraft.client.util.Session;
import net.minecraft.text.Text;
import org.joml.Matrix4f;
import ru.expensive.api.system.shape.ShapeProperties;
import ru.expensive.api.system.shape.implement.Image;
import ru.expensive.common.QuickImports;
import ru.expensive.common.util.other.StringUtil;

import java.util.Optional;
import java.util.UUID;

public class AccountManagerScreen extends Screen implements QuickImports {

    private TextFieldWidget usernameField;
    private ButtonWidget saveButton;
    private static String currentUsername = "WirentDeveloper";

    public AccountManagerScreen() {
        super(Text.empty());
    }

    @Override
    protected void init() {
        super.init();
        this.usernameField = new TextFieldWidget(this.client.textRenderer, this.width / 2 - 100, this.height / 2 - 20, 200, 20, Text.of("Enter username"));
        this.usernameField.setMaxLength(32);
        this.usernameField.setText(currentUsername);
        this.usernameField.setFocused(true);
        this.addSelectableChild(this.usernameField);

        this.saveButton = ButtonWidget.builder(Text.of("Save"), button -> saveUsername()).dimensions(this.width / 2 - 100, this.height / 2 + 10, 200, 20).build();
        this.addDrawableChild(this.saveButton);
    }

    @Override
    public void render(DrawContext context, int mouseX, int mouseY, float delta) {
        this.renderBackground(context);
        Matrix4f positionMatrix = context.getMatrices().peek().getPositionMatrix();

        Image image = QuickImports.image.setMatrixStack(context.getMatrices());

        image.setTexture("textures/mainmenu.png").render(ShapeProperties.create(positionMatrix, 0, 0, width, height).build());
        image.setTexture("textures/big_logo.png").render(ShapeProperties.create(positionMatrix, window.getScaledWidth() - 400, window.getScaledHeight() - 480, 618, 618).build());

        this.usernameField.render(context, mouseX, mouseY, delta);
        this.saveButton.render(context, mouseX, mouseY, delta);

        super.render(context, mouseX, mouseY, delta);
    }

    @Override
    public boolean mouseClicked(double mouseX, double mouseY, int button) {
        if (this.usernameField.mouseClicked(mouseX, mouseY, button)) {
            return true;
        }
        return super.mouseClicked(mouseX, mouseY, button);
    }

    @Override
    public boolean keyPressed(int keyCode, int scanCode, int modifiers) {
        if (this.usernameField.keyPressed(keyCode, scanCode, modifiers) || this.usernameField.isActive()) {
            return true;
        }
        return super.keyPressed(keyCode, scanCode, modifiers);
    }

    @Override
    public boolean charTyped(char chr, int modifiers) {
        if (this.usernameField.charTyped(chr, modifiers)) {
            return true;
        }
        return super.charTyped(chr, modifiers);
    }

    private void saveUsername() {
        currentUsername = this.usernameField.getText();
        System.out.println("Your nick my bro: " + currentUsername);
        MinecraftClient.getInstance().setScreen(null);
    }

    public static String getCurrentUsername() {
        return currentUsername;
    }
}
молодец
 
Начинающий
Статус
Онлайн
Регистрация
25 Янв 2024
Сообщения
359
Реакции[?]
0
Поинты[?]
1K
Java:
package ru.expensive.implement.screens.title;

import com.mojang.authlib.exceptions.AuthenticationException;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.screen.multiplayer.MultiplayerScreen;
import net.minecraft.client.gui.screen.option.OptionsScreen;
import net.minecraft.client.gui.screen.world.SelectWorldScreen;
import net.minecraft.client.util.Session;
import net.minecraft.text.Text;
import org.joml.Matrix4f;
import ru.expensive.api.system.font.Fonts;
import ru.expensive.common.QuickImports;
import ru.expensive.api.system.shape.ShapeProperties;
import ru.expensive.api.system.shape.implement.Image;
import ru.expensive.common.util.other.StringUtil;
import ru.expensive.implement.screens.title.button.AbstractButton;
import ru.expensive.implement.screens.title.button.implement.CustomTextTitleButton;
import ru.expensive.implement.screens.title.button.implement.CustomTitleButton;

import java.util.*;

public class CustomTitleScreen extends Screen implements QuickImports {
    private final List<AbstractButton> buttons = new ArrayList<>();

    private final AbstractButton singleplayer = new CustomTitleButton("Singleplayer", () -> mc.setScreen(new SelectWorldScreen(this)));
    private final AbstractButton multiplayer = new CustomTitleButton("Multiplayer", () -> mc.setScreen(new MultiplayerScreen(this)));
    private final AbstractButton accounts = new CustomTitleButton("Accounts", () -> mc.setScreen(new AccountManagerScreen()));
    private final AbstractButton options = new CustomTextTitleButton("Options", () -> mc.setScreen(new OptionsScreen(this, mc.options)));
    private final AbstractButton exit = new CustomTextTitleButton("Exit", MinecraftClient.getInstance()::scheduleStop);

    public CustomTitleScreen() {
        super(Text.of("Expensive custom title screen."));

        buttons.addAll(Arrays.asList(
                singleplayer,
                multiplayer,
                accounts,
                options,
                exit)
        );
        try {
            String currentUsername = AccountManagerScreen.getCurrentUsername();
            StringUtil.setSession(new Session(currentUsername, UUID.randomUUID().toString(), "", Optional.empty(), Optional.empty(), Session.AccountType.MOJANG));
        } catch (AuthenticationException ignored) {

        }
    }

    @Override
    public void render(DrawContext context, int mouseX, int mouseY, float delta) {
        Matrix4f positionMatrix = context.getMatrices().peek().getPositionMatrix();

        int wHeight = window.getHeight() / 4;
        int wWidth = window.getScaledWidth() / 2;

        singleplayer.position(wWidth - 80, wHeight - 28)
                .size(160, 27);

        multiplayer.position(wWidth - 80, wHeight + 4)
                .size(160, 27);

        accounts.position(wWidth - 80, wHeight + 36)
                .size(160, 27);

        options.position(wWidth - 40, wHeight + 82);
        exit.position(wWidth + 25, wHeight + 82);

        Image image = QuickImports.image.setMatrixStack(context.getMatrices());

        image.setTexture("textures/mainmenu.png").render(ShapeProperties.create(positionMatrix,0, 0, width, height)
                .build()
        );

        image.setTexture("textures/big_logo.png").render(ShapeProperties.create(positionMatrix,window.getScaledWidth() - 400, window.getScaledHeight() - 480, 618, 618)
                .build()
        );

        image.setTexture("textures/logo.png").render(ShapeProperties.create(positionMatrix,wWidth - 42, wHeight - 88, 84, 16)
                .build()
        );

        Fonts.getSize(20, Fonts.Type.DEFAULT).drawCenteredString(context.getMatrices(), "Снова вам от меня подарок, удачи братья!", wWidth, wHeight - 54, -1);

        buttons.forEach(buttons -> buttons.render(context, mouseX, mouseY, delta));
        super.render(context, mouseX, mouseY, delta);
    }

    @Override
    public boolean mouseClicked(double mouseX, double mouseY, int button) {
        buttons.forEach(buttons -> buttons.mouseClicked(mouseX, mouseY, button));
        return super.mouseClicked(mouseX, mouseY, button);
    }
}
Java:
package ru.expensive.implement.screens.title;

import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.widget.ButtonWidget;
import net.minecraft.client.gui.widget.TextFieldWidget;
import net.minecraft.client.util.Session;
import net.minecraft.text.Text;
import org.joml.Matrix4f;
import ru.expensive.api.system.shape.ShapeProperties;
import ru.expensive.api.system.shape.implement.Image;
import ru.expensive.common.QuickImports;
import ru.expensive.common.util.other.StringUtil;

import java.util.Optional;
import java.util.UUID;

public class AccountManagerScreen extends Screen implements QuickImports {

    private TextFieldWidget usernameField;
    private ButtonWidget saveButton;
    private static String currentUsername = "WirentDeveloper";

    public AccountManagerScreen() {
        super(Text.empty());
    }

    @Override
    protected void init() {
        super.init();
        this.usernameField = new TextFieldWidget(this.client.textRenderer, this.width / 2 - 100, this.height / 2 - 20, 200, 20, Text.of("Enter username"));
        this.usernameField.setMaxLength(32);
        this.usernameField.setText(currentUsername);
        this.usernameField.setFocused(true);
        this.addSelectableChild(this.usernameField);

        this.saveButton = ButtonWidget.builder(Text.of("Save"), button -> saveUsername()).dimensions(this.width / 2 - 100, this.height / 2 + 10, 200, 20).build();
        this.addDrawableChild(this.saveButton);
    }

    @Override
    public void render(DrawContext context, int mouseX, int mouseY, float delta) {
        this.renderBackground(context);
        Matrix4f positionMatrix = context.getMatrices().peek().getPositionMatrix();

        Image image = QuickImports.image.setMatrixStack(context.getMatrices());

        image.setTexture("textures/mainmenu.png").render(ShapeProperties.create(positionMatrix, 0, 0, width, height).build());
        image.setTexture("textures/big_logo.png").render(ShapeProperties.create(positionMatrix, window.getScaledWidth() - 400, window.getScaledHeight() - 480, 618, 618).build());

        this.usernameField.render(context, mouseX, mouseY, delta);
        this.saveButton.render(context, mouseX, mouseY, delta);

        super.render(context, mouseX, mouseY, delta);
    }

    @Override
    public boolean mouseClicked(double mouseX, double mouseY, int button) {
        if (this.usernameField.mouseClicked(mouseX, mouseY, button)) {
            return true;
        }
        return super.mouseClicked(mouseX, mouseY, button);
    }

    @Override
    public boolean keyPressed(int keyCode, int scanCode, int modifiers) {
        if (this.usernameField.keyPressed(keyCode, scanCode, modifiers) || this.usernameField.isActive()) {
            return true;
        }
        return super.keyPressed(keyCode, scanCode, modifiers);
    }

    @Override
    public boolean charTyped(char chr, int modifiers) {
        if (this.usernameField.charTyped(chr, modifiers)) {
            return true;
        }
        return super.charTyped(chr, modifiers);
    }

    private void saveUsername() {
        currentUsername = this.usernameField.getText();
        System.out.println("Your nick my bro: " + currentUsername);
        MinecraftClient.getInstance().setScreen(null);
    }

    public static String getCurrentUsername() {
        return currentUsername;
    }
}
Дефолт хуйня, я еще летом делал с кастом кнопками и выбором аакаунтов
 
Сверху Снизу