mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-11-07 17:36:07 +00:00
Fix packet IDs for Minecraft 1.11.X
Issue #710, bug introduced when implementing #599
This commit is contained in:
parent
5f83ff0958
commit
41b3f98924
1 changed files with 4 additions and 4 deletions
|
|
@ -28,7 +28,7 @@ namespace MinecraftClient.Protocol.Handlers
|
||||||
private const int MC19Version = 107;
|
private const int MC19Version = 107;
|
||||||
private const int MC191Version = 108;
|
private const int MC191Version = 108;
|
||||||
private const int MC110Version = 210;
|
private const int MC110Version = 210;
|
||||||
private const int MC111Version = 315;
|
private const int MC1112Version = 316;
|
||||||
private const int MC112Version = 335;
|
private const int MC112Version = 335;
|
||||||
private const int MC1121Version = 338;
|
private const int MC1121Version = 338;
|
||||||
private const int MC1122Version = 340;
|
private const int MC1122Version = 340;
|
||||||
|
|
@ -197,7 +197,7 @@ namespace MinecraftClient.Protocol.Handlers
|
||||||
default: return PacketIncomingType.UnknownPacket;
|
default: return PacketIncomingType.UnknownPacket;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (protocol <= MC111Version) // MC 1.9, 1.10 and 1.11
|
else if (protocol <= MC1112Version) // MC 1.9, 1.10 and 1.11
|
||||||
{
|
{
|
||||||
switch (packetID)
|
switch (packetID)
|
||||||
{
|
{
|
||||||
|
|
@ -332,7 +332,7 @@ namespace MinecraftClient.Protocol.Handlers
|
||||||
case PacketOutgoingType.TeleportConfirm: throw new InvalidOperationException("Teleport confirm is not supported in protocol " + protocol);
|
case PacketOutgoingType.TeleportConfirm: throw new InvalidOperationException("Teleport confirm is not supported in protocol " + protocol);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (protocol <= MC111Version) // MC 1.9, 1,10 and 1.11
|
else if (protocol <= MC1112Version) // MC 1.9, 1,10 and 1.11
|
||||||
{
|
{
|
||||||
switch (packet)
|
switch (packet)
|
||||||
{
|
{
|
||||||
|
|
@ -1713,7 +1713,7 @@ namespace MinecraftClient.Protocol.Handlers
|
||||||
/// <returns>Max length, in characters</returns>
|
/// <returns>Max length, in characters</returns>
|
||||||
public int GetMaxChatMessageLength()
|
public int GetMaxChatMessageLength()
|
||||||
{
|
{
|
||||||
return protocolversion >= MC111Version
|
return protocolversion > MC110Version
|
||||||
? 256
|
? 256
|
||||||
: 100;
|
: 100;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue