mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
Add command to check player health and saturation
This commit is contained in:
parent
fe020c74c7
commit
975e6d4daa
5 changed files with 31 additions and 8 deletions
|
|
@ -725,10 +725,10 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
break;
|
||||
case PacketIncomingType.UpdateHealth:
|
||||
float health = dataTypes.ReadNextFloat(packetData);
|
||||
// don't need them
|
||||
dataTypes.ReadNextVarInt(packetData);
|
||||
int Food = dataTypes.ReadNextVarInt(packetData);
|
||||
// Food Saturation, not useful
|
||||
dataTypes.ReadNextFloat(packetData);
|
||||
handler.OnUpdateHealth(health);
|
||||
handler.OnUpdateHealth(health, Food);
|
||||
break;
|
||||
default:
|
||||
return false; //Ignored packet
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ namespace MinecraftClient.Protocol
|
|||
/// <param name="item">Item (may be null for empty slot)</param>
|
||||
void OnSetSlot(byte inventoryID, short slotID, Item item);
|
||||
|
||||
void OnUpdateHealth(float health);
|
||||
void OnUpdateHealth(float health, int Food);
|
||||
|
||||
/// <summary>
|
||||
/// Called when the Player entity ID has been received from the server
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue