From 96e5af9743543b2695db1a3a36d909b21f367d53 Mon Sep 17 00:00:00 2001 From: Sollace Date: Wed, 30 Sep 2020 20:36:28 +0200 Subject: [PATCH] Fixed health not scaling (most visible in the case of iron golems) --- .../unicopia/entity/behaviour/EntityBehaviour.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/minelittlepony/unicopia/entity/behaviour/EntityBehaviour.java b/src/main/java/com/minelittlepony/unicopia/entity/behaviour/EntityBehaviour.java index 7798c624..5c1d5279 100644 --- a/src/main/java/com/minelittlepony/unicopia/entity/behaviour/EntityBehaviour.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/behaviour/EntityBehaviour.java @@ -159,7 +159,8 @@ public class EntityBehaviour { 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); }