Update supported version to 1.16.3

Nothing got changed in 1.16.3
This commit is contained in:
ReinforceZwei 2020-09-11 22:58:10 +08:00 committed by ORelio
parent 7e20e409a8
commit 9bfb2bf6c7
4 changed files with 12 additions and 9 deletions

View file

@ -39,7 +39,7 @@ namespace MinecraftClient.Protocol.Handlers
/// <returns></returns>
public PacketTypePalette GetTypeHandler(int protocol)
{
if (protocol > Protocol18Handler.MC1162Version)
if (protocol > Protocol18Handler.MC1163Version)
throw new NotImplementedException("Please update packet type palette for this Minecraft version. See PacketTypePalette.cs");
if (protocol <= Protocol18Handler.MC18Version)
return new PacketPalette17();

View file

@ -46,6 +46,7 @@ namespace MinecraftClient.Protocol.Handlers
internal const int MC116Version = 735;
internal const int MC1161Version = 736;
internal const int MC1162Version = 751;
internal const int MC1163Version = 753;
private int compression_treshold = 0;
private bool autocomplete_received = false;
@ -84,13 +85,13 @@ namespace MinecraftClient.Protocol.Handlers
handler.SetTerrainEnabled(false);
}
if (handler.GetInventoryEnabled() && (protocolversion < MC110Version || protocolversion > MC1162Version))
if (handler.GetInventoryEnabled() && (protocolversion < MC110Version || protocolversion > MC1163Version))
{
ConsoleIO.WriteLineFormatted("§8Inventories are currently not handled for that MC version.");
handler.SetInventoryEnabled(false);
}
if (handler.GetEntityHandlingEnabled() && (protocolversion < MC110Version || protocolversion > MC1162Version))
if (handler.GetEntityHandlingEnabled() && (protocolversion < MC110Version || protocolversion > MC1163Version))
{
ConsoleIO.WriteLineFormatted("§8Entities are currently not handled for that MC version.");
handler.SetEntityHandlingEnabled(false);
@ -112,9 +113,9 @@ namespace MinecraftClient.Protocol.Handlers
// Entity palette
if (protocolversion >= MC113Version)
{
if (protocolversion > MC1162Version && handler.GetEntityHandlingEnabled())
if (protocolversion > MC1163Version && handler.GetEntityHandlingEnabled())
throw new NotImplementedException("Please update entity types handling for this Minecraft version. See EntityType.cs");
if (protocolversion >= MC1162Version)
if (protocolversion >= MC1163Version)
entityPalette = new EntityPalette1162();
else if (protocolversion >= MC116Version)
entityPalette = new EntityPalette1161();
@ -129,9 +130,9 @@ namespace MinecraftClient.Protocol.Handlers
// Item palette
if (protocolversion >= MC116Version)
{
if (protocolversion > MC1162Version && handler.GetInventoryEnabled())
if (protocolversion > MC1163Version && handler.GetInventoryEnabled())
throw new NotImplementedException("Please update item types handling for this Minecraft version. See ItemType.cs");
if (protocolversion >= MC1162Version)
if (protocolversion >= MC1163Version)
itemPalette = new ItemPalette1162();
else itemPalette = new ItemPalette1161();
}

View file

@ -126,7 +126,7 @@ namespace MinecraftClient.Protocol
int[] supportedVersions_Protocol16 = { 51, 60, 61, 72, 73, 74, 78 };
if (Array.IndexOf(supportedVersions_Protocol16, ProtocolVersion) > -1)
return new Protocol16Handler(Client, ProtocolVersion, Handler);
int[] supportedVersions_Protocol18 = { 4, 5, 47, 107, 108, 109, 110, 210, 315, 316, 335, 338, 340, 393, 401, 404, 477, 480, 485, 490, 498, 573, 575, 578, 735, 736, 751 };
int[] supportedVersions_Protocol18 = { 4, 5, 47, 107, 108, 109, 110, 210, 315, 316, 335, 338, 340, 393, 401, 404, 477, 480, 485, 490, 498, 573, 575, 578, 735, 736, 751, 753 };
if (Array.IndexOf(supportedVersions_Protocol18, ProtocolVersion) > -1)
return new Protocol18Handler(Client, ProtocolVersion, Handler, forgeInfo);
throw new NotSupportedException("The protocol version no." + ProtocolVersion + " is not supported.");
@ -240,6 +240,8 @@ namespace MinecraftClient.Protocol
return 736;
case "1.16.2":
return 751;
case "1.16.3":
return 753;
default:
return 0;
}