ConsoleIcon support Windows 10 on new Console & OnLatencyUpdate Event (#1044)

* new ConsoleIcon support

* Update ChatBot.cs

+ OnLatencyUpdate

* Update McTcpClient.cs

+ OnLatencyUpdate

* Update Protocol18.cs

+ OnLatencyUpdate

* Update IMinecraftComHandler.cs

+ OnLatencyUpdate

* Update Protocol18.cs

+ BugFix

* Update ConsoleIcon.cs
This commit is contained in:
Рома Данилов 2020-06-07 16:16:49 +05:00 committed by GitHub
parent 85f5117833
commit b800bbcb37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 65 additions and 4 deletions

View file

@ -448,7 +448,8 @@ namespace MinecraftClient.Protocol.Handlers
handler.OnGamemodeUpdate(uuid, gamemode);
break;
case 0x02: //Update latency
dataTypes.ReadNextVarInt(packetData);
int latency = dataTypes.ReadNextVarInt(packetData);
handler.OnLatencyUpdate(uuid, latency); //Update latency;
break;
case 0x03: //Update display name
if (dataTypes.ReadNextBool(packetData))
@ -1390,6 +1391,8 @@ namespace MinecraftClient.Protocol.Handlers
Container inventory = handler.GetInventory(windowId);
if (inventory.Items.ContainsKey(slotId))
inventory.Items[slotId].Count--; // server won't update us after dropped
if (inventory.Items[slotId].Count == 0)
inventory.Items.Remove(slotId);
break;
case WindowActionType.DropItemStack:
button = 1;