From 3e02903d193c7561308354bb4d936b0ecc718cae Mon Sep 17 00:00:00 2001 From: Jack Taylor Date: Thu, 7 Feb 2019 12:14:18 +1300 Subject: [PATCH] Port Minecraft client patch for 'ClientTickEvent' (#5397) --- .../net/minecraft/client/Minecraft.java.patch | 34 ++++++++++++++----- patches_old_unknown/Minecraft.java.patch | 17 ---------- 2 files changed, 26 insertions(+), 25 deletions(-) diff --git a/patches/minecraft/net/minecraft/client/Minecraft.java.patch b/patches/minecraft/net/minecraft/client/Minecraft.java.patch index 29290e64e..59a7a4fe8 100644 --- a/patches/minecraft/net/minecraft/client/Minecraft.java.patch +++ b/patches/minecraft/net/minecraft/client/Minecraft.java.patch @@ -186,7 +186,25 @@ if (!itemstack.func_190926_b() && this.field_71442_b.func_187101_a(this.field_71439_g, this.field_71441_e, enumhand) == EnumActionResult.SUCCESS) { this.field_71460_t.field_78516_c.func_187460_a(enumhand); return; -@@ -1392,8 +1415,14 @@ +@@ -1096,6 +1119,8 @@ + --this.field_71467_ac; + } + ++ net.minecraftforge.fml.hooks.BasicEventHooks.onPreClientTick(); ++ + this.field_71424_I.func_76320_a("gui"); + if (!this.field_71445_n) { + this.field_71456_v.func_73831_a(); +@@ -1216,6 +1241,8 @@ + this.field_71424_I.func_76318_c("keyboard"); + this.field_195559_v.func_204870_b(); + this.field_71424_I.func_76319_b(); ++ ++ net.minecraftforge.fml.hooks.BasicEventHooks.onPostClientTick(); + } + + private void func_184117_aA() { +@@ -1392,8 +1419,14 @@ NetworkManager networkmanager = NetworkManager.func_150722_a(socketaddress); networkmanager.func_150719_a(new NetHandlerLoginClient(networkmanager, this, (GuiScreen)null, (p_209507_0_) -> { })); @@ -202,7 +220,7 @@ this.field_71453_ak = networkmanager; } -@@ -1407,6 +1436,7 @@ +@@ -1407,6 +1440,7 @@ } public void func_205055_a(@Nullable WorldClient p_205055_1_, GuiScreen p_205055_2_) { @@ -210,7 +228,7 @@ if (p_205055_1_ == null) { NetHandlerPlayClient nethandlerplayclient = this.func_147114_u(); if (nethandlerplayclient != null) { -@@ -1443,6 +1473,7 @@ +@@ -1443,6 +1477,7 @@ } TileEntityRendererDispatcher.field_147556_a.func_147543_a(p_205055_1_); @@ -218,7 +236,7 @@ if (p_205055_1_ != null) { if (!this.field_71455_al) { AuthenticationService authenticationservice = new YggdrasilAuthenticationService(this.field_110453_aa, UUID.randomUUID().toString()); -@@ -1489,6 +1520,7 @@ +@@ -1489,6 +1524,7 @@ EntityPlayerSP entityplayersp = this.field_71439_g; this.field_71439_g = this.field_71442_b.func_199681_a(this.field_71441_e, this.field_71439_g == null ? new StatisticsManager() : this.field_71439_g.func_146107_m(), this.field_71439_g == null ? new RecipeBookClient(new RecipeManager()) : this.field_71439_g.func_199507_B()); this.field_71439_g.func_184212_Q().func_187218_a(entityplayersp.func_184212_Q().func_187231_c()); @@ -226,7 +244,7 @@ this.field_71439_g.field_71093_bK = p_71354_1_; this.field_175622_Z = this.field_71439_g; this.field_71439_g.func_70065_x(); -@@ -1528,110 +1560,8 @@ +@@ -1528,110 +1564,8 @@ private void func_147112_ai() { if (this.field_71476_x != null && this.field_71476_x.field_72313_a != RayTraceResult.Type.MISS) { @@ -339,7 +357,7 @@ } } -@@ -1708,6 +1638,7 @@ +@@ -1708,6 +1642,7 @@ return field_71432_P; } @@ -347,7 +365,7 @@ public ListenableFuture func_175603_A() { return this.func_152344_a(this::func_110436_a); } -@@ -1867,6 +1798,8 @@ +@@ -1867,6 +1802,8 @@ } public MusicTicker.MusicType func_147109_W() { @@ -356,7 +374,7 @@ if (this.field_71462_r instanceof GuiWinGame) { return MusicTicker.MusicType.CREDITS; } else if (this.field_71439_g == null) { -@@ -2006,4 +1939,12 @@ +@@ -2006,4 +1943,12 @@ public FontResourceManager func_211500_ak() { return this.field_211501_aD; } diff --git a/patches_old_unknown/Minecraft.java.patch b/patches_old_unknown/Minecraft.java.patch index 1a6c7c25d..7a9fad153 100644 --- a/patches_old_unknown/Minecraft.java.patch +++ b/patches_old_unknown/Minecraft.java.patch @@ -18,23 +18,6 @@ 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 @@ } }