mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 04:05:50 -07:00
Update the client after a FoodLevelChange event is fired. Fixes BUKKIT-2510
This commit is contained in:
@@ -35,6 +35,8 @@ public class ItemFood extends Item {
|
||||
if (!event.isCancelled()) {
|
||||
entityhuman.getFoodData().eat(event.getFoodLevel() - oldFoodLevel, this.getSaturationModifier());
|
||||
}
|
||||
|
||||
((EntityPlayer) entityhuman).netServerHandler.sendPacket(new Packet8UpdateHealth(entityhuman.getHealth(), entityhuman.getFoodData().foodLevel, entityhuman.getFoodData().saturationLevel));
|
||||
// CraftBukkit end
|
||||
|
||||
world.makeSound(entityhuman, "random.burp", 0.5F, world.random.nextFloat() * 0.1F + 0.9F);
|
||||
|
Reference in New Issue
Block a user