From a8cbef2321a8e1bdfac56476bdfb5b306f71d38b Mon Sep 17 00:00:00 2001 From: Christian Date: Sun, 11 May 2014 22:15:29 -0400 Subject: [PATCH] Finally hopefully fully kills the race condition causing a classcast on slow machines. This is me bugfixing. NOT MODDING! No! Stop it! I'm not! --- .../network/NetHandlerLoginClient.java.patch | 19 ++++++++++++++++--- .../network/NetHandlerPlayClient.java.patch | 18 ------------------ 2 files changed, 16 insertions(+), 21 deletions(-) delete mode 100644 patches/minecraft/net/minecraft/client/network/NetHandlerPlayClient.java.patch diff --git a/patches/minecraft/net/minecraft/client/network/NetHandlerLoginClient.java.patch b/patches/minecraft/net/minecraft/client/network/NetHandlerLoginClient.java.patch index d51cde63c7..f8e438c9aa 100644 --- a/patches/minecraft/net/minecraft/client/network/NetHandlerLoginClient.java.patch +++ b/patches/minecraft/net/minecraft/client/network/NetHandlerLoginClient.java.patch @@ -1,15 +1,16 @@ --- ../src-base/minecraft/net/minecraft/client/network/NetHandlerLoginClient.java +++ ../src-work/minecraft/net/minecraft/client/network/NetHandlerLoginClient.java -@@ -5,6 +5,8 @@ +@@ -5,6 +5,9 @@ import com.mojang.authlib.exceptions.InvalidCredentialsException; import com.mojang.authlib.minecraft.MinecraftSessionService; import com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService; + ++import cpw.mods.fml.client.FMLClientHandler; +import cpw.mods.fml.common.network.internal.FMLNetworkHandler; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import io.netty.util.concurrent.Future; -@@ -23,6 +25,7 @@ +@@ -23,6 +26,7 @@ import net.minecraft.network.login.server.S00PacketDisconnect; import net.minecraft.network.login.server.S01PacketEncryptionRequest; import net.minecraft.network.login.server.S02PacketLoginSuccess; @@ -17,7 +18,7 @@ import net.minecraft.util.ChatComponentTranslation; import net.minecraft.util.CryptManager; import net.minecraft.util.IChatComponent; -@@ -90,7 +93,7 @@ +@@ -90,7 +94,7 @@ public void func_147390_a(S02PacketLoginSuccess p_147390_1_) { @@ -26,3 +27,15 @@ } public void func_147231_a(IChatComponent p_147231_1_) +@@ -104,7 +108,10 @@ + + if (p_147232_2_ == EnumConnectionState.PLAY) + { +- this.field_147393_d.func_150719_a(new NetHandlerPlayClient(this.field_147394_b, this.field_147395_c, this.field_147393_d)); ++ NetHandlerPlayClient nhpc = new NetHandlerPlayClient(this.field_147394_b, this.field_147395_c, this.field_147393_d); ++ this.field_147393_d.func_150719_a(nhpc); ++ FMLClientHandler.instance().setPlayClient(nhpc); ++ + } + } + diff --git a/patches/minecraft/net/minecraft/client/network/NetHandlerPlayClient.java.patch b/patches/minecraft/net/minecraft/client/network/NetHandlerPlayClient.java.patch deleted file mode 100644 index 473cdec35e..0000000000 --- a/patches/minecraft/net/minecraft/client/network/NetHandlerPlayClient.java.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- ../src-base/minecraft/net/minecraft/client/network/NetHandlerPlayClient.java -+++ ../src-work/minecraft/net/minecraft/client/network/NetHandlerPlayClient.java -@@ -1,6 +1,7 @@ - package net.minecraft.client.network; - - import com.google.common.base.Charsets; -+import cpw.mods.fml.client.FMLClientHandler; - import cpw.mods.fml.relauncher.Side; - import cpw.mods.fml.relauncher.SideOnly; - import io.netty.buffer.ByteBuf; -@@ -215,6 +216,7 @@ - this.field_147299_f = p_i45061_1_; - this.field_147307_j = p_i45061_2_; - this.field_147302_e = p_i45061_3_; -+ FMLClientHandler.instance().setPlayClient(this); - } - - public void func_147296_c()