diff --git a/MinecraftClient/ChatBot.cs b/MinecraftClient/ChatBot.cs index 75b22f3a..bc769e55 100644 --- a/MinecraftClient/ChatBot.cs +++ b/MinecraftClient/ChatBot.cs @@ -915,7 +915,7 @@ namespace MinecraftClient } /// - /// Get the current location of the player (Feets location) + /// Get the current location of the player (Feet location) /// /// Minecraft world or null if associated setting is disabled protected Mapping.Location GetCurrentLocation() diff --git a/MinecraftClient/Inventory/ItemPalettes/ItemPalette.cs b/MinecraftClient/Inventory/ItemPalettes/ItemPalette.cs index 54afe69b..74de67b8 100644 --- a/MinecraftClient/Inventory/ItemPalettes/ItemPalette.cs +++ b/MinecraftClient/Inventory/ItemPalettes/ItemPalette.cs @@ -16,13 +16,14 @@ namespace MinecraftClient.Inventory.ItemPalettes foreach (KeyValuePair entry in GetDict()) DictReverse.Add(entry.Value, entry.Key); - DictReverse[ItemType.Unknown] = -2; - DictReverse[ItemType.Null] = -1; + // Hardcoded placeholder types for internal and network use + DictReverse[ItemType.Unknown] = (int)ItemType.Unknown; + DictReverse[ItemType.Null] = (int)ItemType.Null; } public ItemType FromId(int id) { - // Unknown item types may appear of Forge servers for custom items + // Unknown item types may appear on Forge servers for custom items if (!GetDict().ContainsKey(id)) return ItemType.Unknown; diff --git a/MinecraftClient/McClient.cs b/MinecraftClient/McClient.cs index fc675489..73d2ad59 100644 --- a/MinecraftClient/McClient.cs +++ b/MinecraftClient/McClient.cs @@ -1403,7 +1403,8 @@ namespace MinecraftClient /// Attempt to dig a block at the specified location /// /// Location of block to dig - public bool DigBlock(Location location) + /// Also perform the "arm swing" animation + public bool DigBlock(Location location, bool swingArms = true) { if (GetTerrainEnabled()) { @@ -1416,6 +1417,7 @@ namespace MinecraftClient // Send dig start and dig end, will need to wait for server response to know dig result // See https://wiki.vg/How_to_Write_a_Client#Digging for more details return handler.SendPlayerDigging(0, location, blockFace) + && (!swingArms || DoAnimation((int)Hand.MainHand)) && handler.SendPlayerDigging(2, location, blockFace); } else return false;