diff --git a/MinecraftClient/Commands/Status.cs b/MinecraftClient/Commands/Health.cs similarity index 72% rename from MinecraftClient/Commands/Status.cs rename to MinecraftClient/Commands/Health.cs index b3701739..14b41b9d 100644 --- a/MinecraftClient/Commands/Status.cs +++ b/MinecraftClient/Commands/Health.cs @@ -5,14 +5,14 @@ using System.Text; namespace MinecraftClient.Commands { - class Status : Command + class Health : Command { public override string CMDName { get { return "status"; } } public override string CMDDesc { get { return "status: Display Health and Food saturation."; } } public override string Run(McTcpClient handler, string command, Dictionary localVars) { - return "Health: " + handler.GetHealth() + "\n[MCC] Saturation: " + handler.GetSaturation(); // any good ways to print multiple lines? + return "Health: " + handler.GetHealth() + ", Saturation: " + handler.GetSaturation(); } } } diff --git a/MinecraftClient/McTcpClient.cs b/MinecraftClient/McTcpClient.cs index 16b708d7..42377401 100644 --- a/MinecraftClient/McTcpClient.cs +++ b/MinecraftClient/McTcpClient.cs @@ -1542,10 +1542,10 @@ namespace MinecraftClient /// Called when client player's health changed, e.g. getting attack /// /// Player current health - public void OnUpdateHealth(float health, int Food) + public void OnUpdateHealth(float health, int food) { playerHealth = health; - playerFoodSaturation = Food; + playerFoodSaturation = food; if (health <= 0) { if (Settings.AutoRespawn) diff --git a/MinecraftClient/MinecraftClient.csproj b/MinecraftClient/MinecraftClient.csproj index 368e32ce..e5d7bcad 100644 --- a/MinecraftClient/MinecraftClient.csproj +++ b/MinecraftClient/MinecraftClient.csproj @@ -101,7 +101,7 @@ - + diff --git a/MinecraftClient/Protocol/Handlers/Protocol18.cs b/MinecraftClient/Protocol/Handlers/Protocol18.cs index 4559fd72..891900e5 100644 --- a/MinecraftClient/Protocol/Handlers/Protocol18.cs +++ b/MinecraftClient/Protocol/Handlers/Protocol18.cs @@ -725,10 +725,10 @@ namespace MinecraftClient.Protocol.Handlers break; case PacketIncomingType.UpdateHealth: float health = dataTypes.ReadNextFloat(packetData); - int Food = dataTypes.ReadNextVarInt(packetData); + int food = dataTypes.ReadNextVarInt(packetData); // Food Saturation, not useful dataTypes.ReadNextFloat(packetData); - handler.OnUpdateHealth(health, Food); + handler.OnUpdateHealth(health, food); break; default: return false; //Ignored packet diff --git a/MinecraftClient/Protocol/IMinecraftComHandler.cs b/MinecraftClient/Protocol/IMinecraftComHandler.cs index 20e57c4c..ca0a221f 100644 --- a/MinecraftClient/Protocol/IMinecraftComHandler.cs +++ b/MinecraftClient/Protocol/IMinecraftComHandler.cs @@ -212,7 +212,7 @@ namespace MinecraftClient.Protocol /// Item (may be null for empty slot) void OnSetSlot(byte inventoryID, short slotID, Item item); - void OnUpdateHealth(float health, int Food); + void OnUpdateHealth(float health, int food); /// /// Called when the Player entity ID has been received from the server