Added 1.16(.1) support

This commit is contained in:
Bas950 2020-06-27 16:48:46 +02:00
parent a579b453b0
commit d06f14d055
3 changed files with 12 additions and 5 deletions

View file

@ -38,6 +38,8 @@ namespace MinecraftClient.Protocol.Handlers
internal const int MC114Version = 477;
internal const int MC115Version = 573;
internal const int MC1152Version = 578;
internal const int MC116Version = 735;
internal const int MC1161Version = 736;
private int compression_treshold = 0;
private bool autocomplete_received = false;
@ -67,7 +69,7 @@ namespace MinecraftClient.Protocol.Handlers
this.pForge = new Protocol18Forge(forgeInfo, protocolVersion, dataTypes, this, 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.");
handler.SetTerrainEnabled(false);
@ -87,7 +89,7 @@ namespace MinecraftClient.Protocol.Handlers
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");
if (protocolVersion >= MC115Version)
Block.Palette = new Palette115();
@ -1389,7 +1391,7 @@ namespace MinecraftClient.Protocol.Handlers
catch (System.IO.IOException) { return false; }
catch (ObjectDisposedException) { return false; }
}
public bool SendPlayerDigging(int status, Location location, Direction face)
{
try