Add 'accepted' response pour resource packs

An 'accepted' response is sent by vanilla minecraft before sending
'successfully loaded', so let's do the same thing here. See #91
This commit is contained in:
ORelio 2015-08-21 17:22:06 +02:00
parent a0683e1c46
commit 344749ead2

View file

@ -200,7 +200,8 @@ namespace MinecraftClient.Protocol.Handlers
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
//Send back "accepted" and "successfully loaded" responses for plugins making use of resource pack mandatory
SendPacket(0x19, concatBytes(getVarInt(hash.Length), Encoding.UTF8.GetBytes(hash), getVarInt(3)));
SendPacket(0x19, concatBytes(getVarInt(hash.Length), Encoding.UTF8.GetBytes(hash), getVarInt(0)));
break;
default: