Update Inventory support version to 1.15.2 and Remove GetInventoryEnabled condition bypass

This commit is contained in:
ReinforceZwei 2020-03-24 15:12:14 +08:00 committed by ORelio
parent 27db483c7c
commit 364afdfc72
2 changed files with 2 additions and 3 deletions

View file

@ -88,7 +88,6 @@
<Compile Include="ChatBots\TestBot.cs" />
<Compile Include="ChatBot.cs" />
<Compile Include="Command.cs" />
<Compile Include="Commands\AutoAttack.cs" />
<Compile Include="Commands\Connect.cs" />
<Compile Include="Commands\Debug.cs" />
<Compile Include="Commands\Look.cs" />

View file

@ -68,7 +68,7 @@ namespace MinecraftClient.Protocol.Handlers
handler.SetTerrainEnabled(false);
}
if (handler.GetInventoryEnabled() && protocolversion > MC114Version)
if (handler.GetInventoryEnabled() && protocolversion > MC1152Version)
{
ConsoleIO.WriteLineFormatted("§8Inventories are currently not handled for that MC version.");
handler.SetInventoryEnabled(false);
@ -509,7 +509,7 @@ namespace MinecraftClient.Protocol.Handlers
}
break;
case PacketIncomingType.WindowItems:
if (handler.GetInventoryEnabled()||true) // set true in .ini but GetInventoryEnabled seems like return false
if (handler.GetInventoryEnabled())
{
/*
* Following commented code will crash