0x06 S06PacketUpdateHealth
Updates the player's health, food level, and saturation. Sent ~20 times per second during combat.
Fields
| Field | Type | Description |
|---|---|---|
| health | float | Current health (0.0-20.0). ≤ 0.0 = death screen. |
| foodLevel | VarInt | Current food level (0-20) |
| saturationLevel | float | Food saturation (0.0-5.0) |
Wire Encoding
| Field | Type | Notes |
|---|---|---|
| Health | float | 0.0-20.0 |
| Food | VarInt | 0-20 |
| Saturation | float | 0.0-5.0 |
MCP References
MCP
NetHandlerPlayClient.handleUpdateHealth()Handler Interface
HND
INetHandlerPlayClientNotes
When health ≤ 0, the client shows the death screen overlay and sends C16PacketClientStatus(PERFORM_RESPAWN) on respawn button click.
implementation Implementation Cases
AutoRespawn
(Tenacity 5.1, Sigma 3.9, Gugustus)
Detect health changes. AutoRespawn triggers on health<=0. AutoPot uses health thresholds. GodMode cancels health update.
if (event.getPacket() instanceof S06PacketUpdateHealth) {
S06PacketUpdateHealth s06 = (S06PacketUpdateHealth) event.getPacket();
if (s06.getHealth() <= 0) autoRespawn();
if (s06.getHealth() < threshold) autoPot();
}AutoPot
(Tenacity 5.1, Sigma 3.9, Gugustus)
Detect health changes. AutoRespawn triggers on health<=0. AutoPot uses health thresholds. GodMode cancels health update.
if (event.getPacket() instanceof S06PacketUpdateHealth) {
S06PacketUpdateHealth s06 = (S06PacketUpdateHealth) event.getPacket();
if (s06.getHealth() <= 0) autoRespawn();
if (s06.getHealth() < threshold) autoPot();
}Regen
(Tenacity 5.1, Sigma 3.9, Gugustus)
Detect health changes. AutoRespawn triggers on health<=0. AutoPot uses health thresholds. GodMode cancels health update.
if (event.getPacket() instanceof S06PacketUpdateHealth) {
S06PacketUpdateHealth s06 = (S06PacketUpdateHealth) event.getPacket();
if (s06.getHealth() <= 0) autoRespawn();
if (s06.getHealth() < threshold) autoPot();
}GodMode
(Tenacity 5.1, Sigma 3.9, Gugustus)
Detect health changes. AutoRespawn triggers on health<=0. AutoPot uses health thresholds. GodMode cancels health update.
if (event.getPacket() instanceof S06PacketUpdateHealth) {
S06PacketUpdateHealth s06 = (S06PacketUpdateHealth) event.getPacket();
if (s06.getHealth() <= 0) autoRespawn();
if (s06.getHealth() < threshold) autoPot();
}