mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-17 21:33:49 -07:00
Rework max health values. Fixes BUKKIT-4398
This commit is contained in:
@@ -1149,10 +1149,6 @@ public abstract class Entity {
|
||||
// CraftBukkit start
|
||||
if (this instanceof EntityLiving) {
|
||||
EntityLiving entity = (EntityLiving) this;
|
||||
// If the entity does not have a max health set yet, update it (it may have changed after loading the entity)
|
||||
if (!nbttagcompound.hasKey("Bukkit.MaxHealth")) {
|
||||
entity.maxHealth = entity.getMaxHealth();
|
||||
}
|
||||
|
||||
// Reset the persistence for tamed animals
|
||||
if (entity instanceof EntityTameableAnimal && !isLevelAtLeast(nbttagcompound, 2) && !nbttagcompound.getBoolean("PersistenceRequired")) {
|
||||
|
Reference in New Issue
Block a user