diff --git a/src/pocketmine/entity/Entity.php b/src/pocketmine/entity/Entity.php index dd9d49f16..7f69b9f94 100644 --- a/src/pocketmine/entity/Entity.php +++ b/src/pocketmine/entity/Entity.php @@ -571,9 +571,7 @@ abstract class Entity extends Location implements Metadatable{ if($this->dead !== true){ $this->kill(); } - }elseif($amount > $this->getMaxHealth()){ - $this->health = $this->getMaxHealth(); - }else{ + }elseif($amount <= $this->getMaxHealth() or $amount < $this->health){ $this->health = (int) $amount; } }