mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Fixed Metadata throwing an exception
This commit is contained in:
parent
0b98628572
commit
1901f4b62d
1 changed files with 5 additions and 3 deletions
|
|
@ -645,12 +645,11 @@ namespace MinecraftClient.Protocol.Handlers
|
||||||
|
|
||||||
while (key != terminteValue)
|
while (key != terminteValue)
|
||||||
{
|
{
|
||||||
if (protocolversion <= Protocol18Handler.MC_1_8_Version)
|
|
||||||
key = (byte)(key & 0x1f);
|
|
||||||
|
|
||||||
int typeId = protocolversion <= Protocol18Handler.MC_1_8_Version
|
int typeId = protocolversion <= Protocol18Handler.MC_1_8_Version
|
||||||
? key >> 5 // 1.8
|
? key >> 5 // 1.8
|
||||||
: ReadNextVarInt(cache); // 1.9+
|
: ReadNextVarInt(cache); // 1.9+
|
||||||
|
|
||||||
|
|
||||||
EntityMetaDataType type;
|
EntityMetaDataType type;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
@ -661,6 +660,9 @@ namespace MinecraftClient.Protocol.Handlers
|
||||||
throw new System.IO.InvalidDataException("Unknown Metadata Type ID " + typeId + ". Is this up to date for new MC Version?");
|
throw new System.IO.InvalidDataException("Unknown Metadata Type ID " + typeId + ". Is this up to date for new MC Version?");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (protocolversion <= Protocol18Handler.MC_1_8_Version)
|
||||||
|
key = (byte)(key & 0x1f);
|
||||||
|
|
||||||
// Value's data type is depended on Type
|
// Value's data type is depended on Type
|
||||||
object? value = null;
|
object? value = null;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue