mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
✨ Added 1.16(.1) support
This commit is contained in:
parent
a579b453b0
commit
d06f14d055
3 changed files with 12 additions and 5 deletions
|
|
@ -32,7 +32,7 @@ namespace MinecraftClient
|
||||||
|
|
||||||
public const string Version = MCHighestVersion;
|
public const string Version = MCHighestVersion;
|
||||||
public const string MCLowestVersion = "1.4.6";
|
public const string MCLowestVersion = "1.4.6";
|
||||||
public const string MCHighestVersion = "1.15.2";
|
public const string MCHighestVersion = "1.16.1";
|
||||||
public static readonly string BuildInfo = null;
|
public static readonly string BuildInfo = null;
|
||||||
|
|
||||||
private static Thread offlinePrompt = null;
|
private static Thread offlinePrompt = null;
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,8 @@ namespace MinecraftClient.Protocol.Handlers
|
||||||
internal const int MC114Version = 477;
|
internal const int MC114Version = 477;
|
||||||
internal const int MC115Version = 573;
|
internal const int MC115Version = 573;
|
||||||
internal const int MC1152Version = 578;
|
internal const int MC1152Version = 578;
|
||||||
|
internal const int MC116Version = 735;
|
||||||
|
internal const int MC1161Version = 736;
|
||||||
|
|
||||||
private int compression_treshold = 0;
|
private int compression_treshold = 0;
|
||||||
private bool autocomplete_received = false;
|
private bool autocomplete_received = false;
|
||||||
|
|
@ -67,7 +69,7 @@ namespace MinecraftClient.Protocol.Handlers
|
||||||
this.pForge = new Protocol18Forge(forgeInfo, protocolVersion, dataTypes, this, handler);
|
this.pForge = new Protocol18Forge(forgeInfo, protocolVersion, dataTypes, this, handler);
|
||||||
this.pTerrain = new Protocol18Terrain(protocolVersion, dataTypes, handler);
|
this.pTerrain = new Protocol18Terrain(protocolVersion, dataTypes, handler);
|
||||||
|
|
||||||
if (handler.GetTerrainEnabled() && protocolversion > MC1152Version)
|
if (handler.GetTerrainEnabled() && protocolversion > MC1161Version)
|
||||||
{
|
{
|
||||||
ConsoleIO.WriteLineFormatted("§8Terrain & Movements currently not handled for that MC version.");
|
ConsoleIO.WriteLineFormatted("§8Terrain & Movements currently not handled for that MC version.");
|
||||||
handler.SetTerrainEnabled(false);
|
handler.SetTerrainEnabled(false);
|
||||||
|
|
@ -87,7 +89,7 @@ namespace MinecraftClient.Protocol.Handlers
|
||||||
|
|
||||||
if (protocolversion >= MC113Version)
|
if (protocolversion >= MC113Version)
|
||||||
{
|
{
|
||||||
if (protocolVersion > MC1152Version && handler.GetTerrainEnabled())
|
if (protocolVersion > MC1161Version && handler.GetTerrainEnabled())
|
||||||
throw new NotImplementedException("Please update block types handling for this Minecraft version. See Material.cs");
|
throw new NotImplementedException("Please update block types handling for this Minecraft version. See Material.cs");
|
||||||
if (protocolVersion >= MC115Version)
|
if (protocolVersion >= MC115Version)
|
||||||
Block.Palette = new Palette115();
|
Block.Palette = new Palette115();
|
||||||
|
|
|
||||||
|
|
@ -116,7 +116,7 @@ namespace MinecraftClient.Protocol
|
||||||
int[] supportedVersions_Protocol16 = { 51, 60, 61, 72, 73, 74, 78 };
|
int[] supportedVersions_Protocol16 = { 51, 60, 61, 72, 73, 74, 78 };
|
||||||
if (Array.IndexOf(supportedVersions_Protocol16, ProtocolVersion) > -1)
|
if (Array.IndexOf(supportedVersions_Protocol16, ProtocolVersion) > -1)
|
||||||
return new Protocol16Handler(Client, ProtocolVersion, Handler);
|
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};
|
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};
|
||||||
if (Array.IndexOf(supportedVersions_Protocol18, ProtocolVersion) > -1)
|
if (Array.IndexOf(supportedVersions_Protocol18, ProtocolVersion) > -1)
|
||||||
return new Protocol18Handler(Client, ProtocolVersion, Handler, forgeInfo);
|
return new Protocol18Handler(Client, ProtocolVersion, Handler, forgeInfo);
|
||||||
throw new NotSupportedException("The protocol version no." + ProtocolVersion + " is not supported.");
|
throw new NotSupportedException("The protocol version no." + ProtocolVersion + " is not supported.");
|
||||||
|
|
@ -223,6 +223,11 @@ namespace MinecraftClient.Protocol
|
||||||
return 575;
|
return 575;
|
||||||
case "1.15.2":
|
case "1.15.2":
|
||||||
return 578;
|
return 578;
|
||||||
|
case "1.16":
|
||||||
|
case "1.16.1":
|
||||||
|
return 735;
|
||||||
|
case "1.16.1":
|
||||||
|
return 736;
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue