fix: visually update health and food levels
This commit is contained in:
parent
b7fff273cf
commit
98c0a446c6
1 changed files with 3 additions and 0 deletions
|
@ -138,6 +138,7 @@ public class AppearanceManager {
|
|||
final World world = player.getWorld();
|
||||
final boolean wasFlying = player.isFlying();
|
||||
final boolean wasAllowedToFly = player.getAllowFlight();
|
||||
final int foodLevel = player.getFoodLevel();
|
||||
final WrapperPlayServerRespawn respawn = new WrapperPlayServerRespawn();
|
||||
respawn.setDimension(world);
|
||||
respawn.setSeed(world.getSeed());
|
||||
|
@ -150,6 +151,8 @@ public class AppearanceManager {
|
|||
player.setAllowFlight(wasAllowedToFly);
|
||||
player.setFlying(wasFlying);
|
||||
player.updateInventory();
|
||||
player.sendHealthUpdate();
|
||||
player.setFoodLevel(foodLevel);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
|
|
Loading…
Reference in a new issue