Provide a default for health (#3806)

This commit is contained in:
Stephen B 2020-08-30 16:50:11 -04:00 committed by GitHub
parent dd4f26a9cf
commit 9cf8f608d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -106,7 +106,7 @@ abstract class Living extends Entity implements Damageable{
$health = $this->namedtag->getShort("Health");
$this->namedtag->removeTag("Health");
}else{
$health = $this->namedtag->getFloat("Health");
$health = $this->namedtag->getFloat("Health", $this->getMaxHealth());
}
$this->setHealth($health);