ForgePatch/patches/minecraft/net/minecraft/client/gui/GuiMainMenu.java.patch

78 lines
4.1 KiB
Diff

--- a/net/minecraft/client/gui/GuiMainMenu.java
+++ b/net/minecraft/client/gui/GuiMainMenu.java
@@ -59,6 +59,7 @@
private int field_193978_M;
private int field_193979_N;
private final RenderSkybox field_209101_K = new RenderSkybox(new RenderSkyboxCube(new ResourceLocation("textures/gui/title/background/panorama")));
+ private net.minecraftforge.client.gui.NotificationModUpdateScreen modUpdateNotification;
public GuiMainMenu() {
this.field_73975_c = "missingno";
@@ -176,7 +177,7 @@
if (this.func_183501_a()) {
this.field_183503_M.func_146280_a(this.field_146297_k, this.field_146294_l, this.field_146295_m);
}
-
+ modUpdateNotification = net.minecraftforge.client.gui.NotificationModUpdateScreen.init(this, field_146292_n.stream().filter(b -> b.field_146127_k == 6).findFirst().orElse(null)); // The Mobs button is id 6
}
private void func_73969_a(int p_73969_1_, int p_73969_2_) {
@@ -190,11 +191,17 @@
GuiMainMenu.this.field_146297_k.func_147108_a(new GuiMultiplayer(GuiMainMenu.this));
}
});
- this.func_189646_b(new GuiButton(14, this.field_146294_l / 2 - 100, p_73969_1_ + p_73969_2_ * 2, I18n.func_135052_a("menu.online")) {
+ this.func_189646_b(new GuiButton(14, this.field_146294_l / 2 + 2, p_73969_1_ + p_73969_2_ * 2, 98, 20, I18n.func_135052_a("menu.online")) {
public void func_194829_a(double p_194829_1_, double p_194829_3_) {
GuiMainMenu.this.func_140005_i();
}
});
+ this.func_189646_b(new GuiButton(6, this.field_146294_l / 2 - 100, p_73969_1_ + p_73969_2_ * 2, 98, 20, I18n.func_135052_a("fml.menu.mods")) {
+ @Override
+ public void func_194829_a(double p_194829_1_, double p_194829_3_) {
+ GuiMainMenu.this.field_146297_k.func_147108_a(new net.minecraftforge.fml.client.gui.GuiModList(GuiMainMenu.this));
+ }
+ });
}
private void func_73972_b(int p_73972_1_, int p_73972_2_) {
@@ -204,7 +211,7 @@
}
});
this.field_73973_d = this.func_189646_b(new GuiButton(12, this.field_146294_l / 2 - 100, p_73972_1_ + p_73972_2_ * 1, I18n.func_135052_a("menu.resetdemo")) {
- public void func_194829_a(double p_194829_1_, double p_194829_3_) {
+ public void func_194829_a(double mouseX, double mouseY) {
ISaveFormat isaveformat1 = GuiMainMenu.this.field_146297_k.func_71359_d();
WorldInfo worldinfo1 = isaveformat1.func_75803_c("Demo_World");
if (worldinfo1 != null) {
@@ -266,6 +273,9 @@
this.field_146297_k.func_110434_K().func_110577_a(field_194400_H);
func_146110_a(j + 88, 67, 0.0F, 0.0F, 98, 14, 128.0F, 16.0F);
+
+ net.minecraftforge.client.ForgeHooksClient.renderMainMenu(this, this.field_146289_q, this.field_146294_l, this.field_146295_m);
+
GlStateManager.func_179094_E();
GlStateManager.func_179109_b((float)(this.field_146294_l / 2 + 90), 70.0F, 0.0F);
GlStateManager.func_179114_b(-20.0F, 0.0F, 0.0F, 1.0F);
@@ -281,7 +291,10 @@
s = s + ("release".equalsIgnoreCase(this.field_146297_k.func_184123_d()) ? "" : "/" + this.field_146297_k.func_184123_d());
}
- this.func_73731_b(this.field_146289_q, s, 2, this.field_146295_m - 10, -1);
+ net.minecraftforge.fml.BrandingControl.forEachLine(true, true, (brdline, brd) ->
+ this.func_73731_b(this.field_146289_q, brd, 2, this.field_146295_m - ( 10 + brdline * (this.field_146289_q.field_78288_b + 1)), 16777215)
+ );
+
this.func_73731_b(this.field_146289_q, "Copyright Mojang AB. Do not distribute!", this.field_193979_N, this.field_146295_m - 10, -1);
if (p_73863_1_ > this.field_193979_N && p_73863_1_ < this.field_193979_N + this.field_193978_M && p_73863_2_ > this.field_146295_m - 10 && p_73863_2_ < this.field_146295_m) {
func_73734_a(this.field_193979_N, this.field_146295_m - 1, this.field_193979_N + this.field_193978_M, this.field_146295_m, -1);
@@ -297,6 +310,7 @@
if (this.func_183501_a()) {
this.field_183503_M.func_73863_a(p_73863_1_, p_73863_2_, p_73863_3_);
}
+ modUpdateNotification.func_73863_a(p_73863_1_, p_73863_2_, p_73863_3_);
}