ForgePatch/patches_old_unknown/Minecraft.java.patch

151 lines
5.9 KiB
Diff
Raw Normal View History

--- ../src-base/minecraft/net/minecraft/client/Minecraft.java
+++ ../src-work/minecraft/net/minecraft/client/Minecraft.java
@@ -536,23 +544,27 @@
- this.field_71446_o.func_147645_c(this.field_152354_ay);
+ net.minecraftforge.fml.client.SplashProgress.clearVanillaResources(field_71446_o, field_152354_ay);
this.field_152354_ay = null;
this.field_71461_s = new LoadingScreenRenderer(this);
this.field_184132_p = new DebugRenderer(this);
@@ -1094,11 +1113,13 @@
if (!this.field_71454_w)
{
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onRenderTickStart(this.field_71428_T.field_194147_b);
this.field_71424_I.func_76318_c("gameRenderer");
this.field_71460_t.func_181560_a(this.field_71445_n ? this.field_193996_ah : this.field_71428_T.field_194147_b, i);
this.field_71424_I.func_76318_c("toasts");
this.field_193034_aS.func_191783_a(new ScaledResolution(this));
this.field_71424_I.func_76319_b();
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onRenderTickEnd(this.field_71428_T.field_194147_b);
}
this.field_71424_I.func_76319_b();
@@ -1630,6 +1653,11 @@
}
Display.setFullscreen(this.field_71431_Q);
+ if (!this.field_71431_Q) //Forge: Fix MC-68754, Screen is not resizeable after exiting fullscreen due to LWJGL bug https://github.com/LWJGL/lwjgl/issues/142 which is fixed, but not in the version MC ships
+ {
+ Display.setResizable(false);
+ Display.setResizable(true);
+ }
Display.setVSyncEnabled(this.field_71474_y.field_74352_v);
this.func_175601_h();
}
@@ -1676,6 +1704,8 @@
--this.field_71467_ac;
}
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onPreClientTick();
+
this.field_71424_I.func_76320_a("gui");
if (!this.field_71445_n)
@@ -1877,6 +1907,7 @@
}
this.field_71424_I.func_76319_b();
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onPostClientTick();
this.field_71423_H = func_71386_F();
}
@@ -1982,6 +2013,7 @@
}
}
}
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().fireKeyInput();
}
this.func_184117_aA();
@@ -2239,6 +2271,8 @@
{
while (Mouse.next())
{
+ if (net.minecraftforge.client.ForgeHooksClient.postMouseEvent()) continue;
+
int i = Mouse.getEventButton();
KeyBinding.func_74510_a(i - 100, Mouse.getEventButtonState());
@@ -2294,6 +2328,7 @@
this.field_71462_r.func_146274_d();
}
}
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().fireMouseInput();
}
}
@@ -2304,6 +2339,7 @@
public void func_71371_a(String p_71371_1_, String p_71371_2_, @Nullable WorldSettings p_71371_3_)
{
+ net.minecraftforge.fml.client.FMLClientHandler.instance().startIntegratedServer(p_71371_1_, p_71371_2_, p_71371_3_);
this.func_71403_a((WorldClient)null);
System.gc();
ISaveHandler isavehandler = this.field_71469_aa.func_75804_a(p_71371_1_, false);
@@ -2344,8 +2380,14 @@
this.field_71461_s.func_73720_a(I18n.func_135052_a("menu.loadingLevel"));
- while (!this.field_71437_Z.func_71200_ad())
+ while (!this.field_71437_Z.func_71200_ad() && !this.field_71437_Z.func_71241_aa())
{
+ if (!net.minecraftforge.fml.common.StartupQuery.check())
+ {
+ func_71403_a(null);
+ func_147108_a(null);
+ return;
+ }
String s = this.field_71437_Z.func_71195_b_();
if (s != null)
@@ -2395,6 +2445,18 @@
if (this.field_71437_Z != null && this.field_71437_Z.func_175578_N())
{
this.field_71437_Z.func_71263_m();
+ if (field_71461_s != null && this.field_71425_J)
+ {
+ this.field_71461_s.func_73719_c(I18n.func_135052_a("forge.client.shutdown.internal"));
+ }
+ while (!field_71437_Z.func_71241_aa())
+ {
+ try
+ {
+ Thread.sleep(10);
+ }
+ catch (InterruptedException ie) {}
+ }
}
this.field_71437_Z = null;
@@ -2418,6 +2480,7 @@
this.field_71456_v.func_181029_i();
this.func_71351_a((ServerData)null);
this.field_71455_al = false;
+ net.minecraftforge.fml.client.FMLClientHandler.instance().handleClientWorldClosing(this.field_71441_e);
}
this.field_147127_av.func_147690_c();
@@ -3181,11 +3089,11 @@
{
if (Keyboard.getEventKeyState())
{
- if (i == this.field_71474_y.field_152395_am.func_151463_i())
+ if (this.field_71474_y.field_152395_am.isActiveAndMatches(i))
{
this.func_71352_k();
}
- else if (i == this.field_71474_y.field_151447_Z.func_151463_i())
+ else if (this.field_71474_y.field_151447_Z.isActiveAndMatches(i))
{
this.field_71456_v.func_146158_b().func_146227_a(ScreenShotHelper.func_148260_a(this.field_71412_D, this.field_71443_c, this.field_71440_d, this.field_147124_at));
}
@@ -3199,6 +3107,7 @@
}
}
}
+ else if (this.field_71462_r instanceof GuiControls) ((GuiControls)this.field_71462_r).field_146491_f = null;
}
}
}