Use separate threads for decryption and decompression

This commit is contained in:
BruceChen 2022-08-30 17:37:46 +08:00
parent c941d086d9
commit 1a90b6d942
8 changed files with 47 additions and 37 deletions

View file

@ -56,11 +56,9 @@ namespace MinecraftClient.Protocol.Handlers
{
if (ForgeEnabled() && forgeInfo.Version == FMLVersion.FML)
{
int packetID = -1;
while (fmlHandshakeState != FMLHandshakeClientState.DONE)
{
Queue<byte> packetData = protocol18.ReadNextPacket(ref packetID);
(int packetID, Queue<byte> packetData) = protocol18.ReadNextPacket();
if (packetID == 0x40) // Disconnect
{