From 86711adba8df44766890495f39ce67da0ed58a63 Mon Sep 17 00:00:00 2001 From: ORelio Date: Fri, 21 Aug 2015 16:54:18 +0200 Subject: [PATCH] Fake resource pack acceptance Some server requires that players install a resource pack, and will kick them if they doesn't. With this new feature MCC will automatically respond "successfully loaded" for every "resource pack send" packet it receives. Suggested by Yoann166 in issue #91 --- MinecraftClient/Protocol/Handlers/Protocol18.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/MinecraftClient/Protocol/Handlers/Protocol18.cs b/MinecraftClient/Protocol/Handlers/Protocol18.cs index 6cfbf89b..6188accf 100644 --- a/MinecraftClient/Protocol/Handlers/Protocol18.cs +++ b/MinecraftClient/Protocol/Handlers/Protocol18.cs @@ -197,6 +197,12 @@ namespace MinecraftClient.Protocol.Handlers if (protocolversion >= MC18Version) compression_treshold = readNextVarInt(ref packetData); break; + case 0x48: //Resource Pack Send + string url = readNextString(ref packetData); + string hash = readNextString(ref packetData); + //Send back a "successfully loaded" response for plugins making use of resource pack mandatory + SendPacket(0x19, concatBytes(getVarInt(hash.Length), Encoding.UTF8.GetBytes(hash), getVarInt(0))); + break; default: return false; //Ignored packet }