Fix crash on terrain and movements not implemented (#736)

This commit is contained in:
ORelio 2019-05-25 18:09:20 +02:00
parent 4964860679
commit 76def0d56b

View file

@ -62,6 +62,12 @@ namespace MinecraftClient.Protocol.Handlers
this.pForge = new Protocol18Forge(forgeInfo, protocolVersion, dataTypes, this, handler);
this.pTerrain = new Protocol18Terrain(protocolVersion, dataTypes, handler);
if (handler.GetTerrainEnabled() && protocolversion > MC1141Version)
{
ConsoleIO.WriteLineFormatted("§8Terrain & Movements currently not handled for that MC version.");
handler.SetTerrainEnabled(false);
}
if (protocolversion >= MC113Version)
{
if (protocolVersion > MC1141Version && handler.GetTerrainEnabled())
@ -71,12 +77,6 @@ namespace MinecraftClient.Protocol.Handlers
else Block.Palette = new Palette113();
}
else Block.Palette = new Palette112();
if (handler.GetTerrainEnabled() && protocolversion > MC1141Version)
{
ConsoleIO.WriteLineFormatted("§8Terrain & Movements currently not handled for that MC version.");
handler.SetTerrainEnabled(false);
}
}
/// <summary>