mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 04:20:02 +03:00
77 lines
3.8 KiB
Diff
77 lines
3.8 KiB
Diff
--- ../src-base/minecraft/net/minecraft/client/gui/GuiMainMenu.java
|
|
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiMainMenu.java
|
|
@@ -70,6 +70,8 @@
|
|
private GuiScreen realmsNotification;
|
|
private int widthCopyright;
|
|
private int widthCopyrightRest;
|
|
+ private GuiButton modButton;
|
|
+ private net.minecraftforge.client.gui.NotificationModUpdateScreen modUpdateNotification;
|
|
|
|
public GuiMainMenu()
|
|
{
|
|
@@ -212,13 +214,15 @@
|
|
this.realmsNotification.setGuiSize(this.width, this.height);
|
|
this.realmsNotification.initGui();
|
|
}
|
|
+ modUpdateNotification = net.minecraftforge.client.gui.NotificationModUpdateScreen.init(this, modButton);
|
|
}
|
|
|
|
private void addSingleplayerMultiplayerButtons(int p_73969_1_, int p_73969_2_)
|
|
{
|
|
this.buttonList.add(new GuiButton(1, this.width / 2 - 100, p_73969_1_, I18n.format("menu.singleplayer")));
|
|
this.buttonList.add(new GuiButton(2, this.width / 2 - 100, p_73969_1_ + p_73969_2_ * 1, I18n.format("menu.multiplayer")));
|
|
- this.realmsButton = this.addButton(new GuiButton(14, this.width / 2 - 100, p_73969_1_ + p_73969_2_ * 2, I18n.format("menu.online")));
|
|
+ this.realmsButton = this.addButton(new GuiButton(14, this.width / 2 + 2, p_73969_1_ + p_73969_2_ * 2, 98, 20, I18n.format("menu.online").replace("Minecraft", "").trim()));
|
|
+ this.buttonList.add(modButton = new GuiButton(6, this.width / 2 - 100, p_73969_1_ + p_73969_2_ * 2, 98, 20, I18n.format("fml.menu.mods")));
|
|
}
|
|
|
|
private void addDemoButtons(int p_73972_1_, int p_73972_2_)
|
|
@@ -266,6 +270,11 @@
|
|
this.mc.shutdown();
|
|
}
|
|
|
|
+ if (button.id == 6)
|
|
+ {
|
|
+ this.mc.displayGuiScreen(new net.minecraftforge.fml.client.GuiModList(this));
|
|
+ }
|
|
+
|
|
if (button.id == 11)
|
|
{
|
|
this.mc.launchIntegratedServer("Demo_World", "Demo_World", WorldServerDemo.DEMO_WORLD_SETTINGS);
|
|
@@ -500,6 +509,9 @@
|
|
|
|
this.mc.getTextureManager().bindTexture(field_194400_H);
|
|
drawModalRectWithCustomSizedTexture(j + 88, 67, 0.0F, 0.0F, 98, 14, 128.0F, 16.0F);
|
|
+
|
|
+ this.splashText = net.minecraftforge.client.ForgeHooksClient.renderMainMenu(this, this.fontRenderer, this.width, this.height, this.splashText);
|
|
+
|
|
GlStateManager.pushMatrix();
|
|
GlStateManager.translate((float)(this.width / 2 + 90), 70.0F, 0.0F);
|
|
GlStateManager.rotate(-20.0F, 0.0F, 0.0F, 1.0F);
|
|
@@ -519,7 +531,16 @@
|
|
s = s + ("release".equalsIgnoreCase(this.mc.getVersionType()) ? "" : "/" + this.mc.getVersionType());
|
|
}
|
|
|
|
- this.drawString(this.fontRenderer, s, 2, this.height - 10, -1);
|
|
+ List<String> brandings = com.google.common.collect.Lists.reverse(net.minecraftforge.fml.common.FMLCommonHandler.instance().getBrandings(true));
|
|
+ for (int brdline = 0; brdline < brandings.size(); brdline++)
|
|
+ {
|
|
+ String brd = brandings.get(brdline);
|
|
+ if (!com.google.common.base.Strings.isNullOrEmpty(brd))
|
|
+ {
|
|
+ this.drawString(this.fontRenderer, brd, 2, this.height - ( 10 + brdline * (this.fontRenderer.FONT_HEIGHT + 1)), 16777215);
|
|
+ }
|
|
+ }
|
|
+
|
|
this.drawString(this.fontRenderer, "Copyright Mojang AB. Do not distribute!", this.widthCopyrightRest, this.height - 10, -1);
|
|
|
|
if (mouseX > this.widthCopyrightRest && mouseX < this.widthCopyrightRest + this.widthCopyright && mouseY > this.height - 10 && mouseY < this.height && Mouse.isInsideWindow())
|
|
@@ -540,6 +561,7 @@
|
|
{
|
|
this.realmsNotification.drawScreen(mouseX, mouseY, partialTicks);
|
|
}
|
|
+ modUpdateNotification.drawScreen(mouseX, mouseY, partialTicks);
|
|
}
|
|
|
|
protected void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException
|