diff --git a/MinecraftClient/Protocol/Handlers/DataTypes.cs b/MinecraftClient/Protocol/Handlers/DataTypes.cs index 07aa4fe2..6cccbdd9 100644 --- a/MinecraftClient/Protocol/Handlers/DataTypes.cs +++ b/MinecraftClient/Protocol/Handlers/DataTypes.cs @@ -36,9 +36,9 @@ namespace MinecraftClient.Protocol.Handlers /// The data read from the cache as an array public byte[] ReadData(int offset, Queue cache) { - byte[] result = cache.Take(offset).ToArray(); + byte[] result = new byte[offset]; for (int i = 0; i < offset; i++) - cache.Dequeue(); + result[i] = cache.Dequeue(); return result; }