Further cleanup on ListTag and CompoundTag usage

This commit is contained in:
Dylan K. Taylor
2017-11-17 11:43:32 +00:00
parent 665130561e
commit 460d540dbc
5 changed files with 19 additions and 15 deletions

View File

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