Начинающий
- Статус
- Оффлайн
- Регистрация
- 19 Ноя 2023
- Сообщения
- 218
- Реакции
- 2
вдохновился идеей Нурсултана (no ad) и решил зделать
идем по пути net.minecraft.client.gui.screen и ищем класс IngameMenuScreen
потом добавляем метод
теперь к иницилизации кнопки
на 28 строчке меняем метод на этот
и у вас есть реконнект!
идем по пути net.minecraft.client.gui.screen и ищем класс IngameMenuScreen
потом добавляем метод
Код:
private void reconnectToServer() {
ServerData serverData = mc.getCurrentServerData();
if (serverData != null) {
mc.world.sendQuittingDisconnectingPacket();
mc.displayGuiScreen(new ConnectingScreen(this, mc, serverData));
}
}
на 28 строчке меняем метод на этот
Код:
protected void init() {
if (this.isFullMenu) {
this.addButtons();
this.addButton(new Button(this.width / 2 - 100, this.height / 4 + 120 + 24, 200, 20, new StringTextComponent("Reconnect"), (button) -> {
reconnectToServer();
}));
}
}