mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Remove VarIntArray because I cannot read wiki's correctly xD
This commit is contained in:
parent
424eab29dd
commit
627ad5aaf1
2 changed files with 2 additions and 23 deletions
|
|
@ -284,27 +284,6 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
return i;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Read an integer from a cache of bytes and remove it from the cache
|
||||
/// </summary>
|
||||
/// <param name="cache">Cache of bytes to read from</param>
|
||||
/// <returns>The integer</returns>
|
||||
public int[] ReadNextVarIntArray(Queue<byte> cache)
|
||||
{
|
||||
string rawData = BitConverter.ToString(cache);
|
||||
int i = 0;
|
||||
int j = 0;
|
||||
int k = 0;
|
||||
while (true)
|
||||
{
|
||||
k = ReadNextByte(cache);
|
||||
i |= (k & 0x7F) << j++ * 7;
|
||||
if (j > 5) throw new OverflowException("VarInt too big " + rawData);
|
||||
if ((k & 0x80) != 128) break;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Read an "extended short", which is actually an int of some kind, from the cache of bytes.
|
||||
/// This is only done with forge. It looks like it's a normal short, except that if the high
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
if (protocolversion >= MC116Version)
|
||||
dataTypes.ReadNextVarInt(packetData); // World Count - 1.16 and above
|
||||
if (protocolversion >= MC116Version)
|
||||
dataTypes.ReadNextVarIntArray(packetData); // World Names - 1.16 and above
|
||||
dataTypes.ReadNextString(packetData); // World Names - 1.16 and above
|
||||
if (protocolversion >= MC116Version)
|
||||
dataTypes.ReadNextNbt(packetData); // Dimension Codec - 1.16 and above
|
||||
if (protocolversion >= MC191Version)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue