Living: Fixed passing FloatTag to setHealth() when HealF tag is present, close #1784

This commit is contained in:
Dylan K. Taylor 2017-12-09 20:31:14 +00:00
parent 49dbd8b2c8
commit bf4076766e

View File

@ -72,7 +72,7 @@ abstract class Living extends Entity implements Damageable{
$health = $this->getMaxHealth();
if($this->namedtag->hasTag("HealF", FloatTag::class)){
$health = new FloatTag("Health", $this->namedtag->getFloat("HealF"));
$health = $this->namedtag->getFloat("HealF");
$this->namedtag->removeTag("HealF");
}elseif($this->namedtag->hasTag("Health")){
$healthTag = $this->namedtag->getTag("Health");