mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
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
This commit is contained in:
parent
de4322458a
commit
86711adba8
1 changed files with 6 additions and 0 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue