Fixed health not scaling (most visible in the case of iron golems)

This commit is contained in:
Sollace 2020-09-30 20:36:28 +02:00
parent d8419115fc
commit 96e5af9743

View file

@ -159,7 +159,8 @@ public class EntityBehaviour<T extends Entity> {
l.deathTime = from.deathTime;
l.stuckStingerTimer = from.stuckStingerTimer;
l.stuckArrowTimer = from.stuckArrowTimer;
l.setHealth(from.getHealth());
l.setHealth((from.getHealth() / from.getMaxHealth()) * l.getMaxHealth());
copyInventory(from, l);
}