Bukkit/CraftBukkit — pull request #1169 by riking (2013-06-06 06:33:37+00:00)
Title: [C] Fix wrong health being sent when consuming food

Original PR: https://github.com/Bukkit/CraftBukkit/pull/1144

### Issue
When a player consumes food, a health update packet is sent with the new health, hunger, and saturation. In all other locations, `player.getScaledHealth()`, which converts an arbitrary-scale health to a 0-20 scale health is used. getScaledHealth() is not used here. If the player is at 50/100 health, the client will show 5 hearts when using getScaledHealth(), but upon eating a food item, a health=50 update will be sent causing the hearts to jump to full and back again upon the next, correct update.

### Justification
This packet sending was missed when the maxHealth features were added. Better late than never. (to complete the saying, although never is often better than right now. pep-22.)

### Breakdown
- `entityhuman.getHealth()` is changed to `entityhuman.getScaledHealth()`.
- No additional import statements are required.
- No whitespace errors are introduced nor fixed.
- No mc-dev files require new inclusion.

### Testing and Results
Reproductions steps were [provided here.](https://github.com/Bukkit/CraftBukkit/pull/1144#issuecomment-18459371)
>To reproduce you need to set the max health of the player to above 20 (player.setMaxHealth(100)) and the current health so that not all hearts are shown: player.setHealth(50).
>
>When you then have a low hungerbar or eat something it will send the 50 health to the client, but the client only handles up to 20 and jumps to max. When you take damage again the healthbar jumps down.

### Related Links
https://bukkit.atlassian.net/browse/BUKKIT-4127