protected function initEntity()
{
parent::initEntity();
if (isset($this->namedtag->HealF)) {
$this->namedtag->Health = new ShortTag("Health", (int) $this->namedtag["HealF"]);
unset($this->namedtag->HealF);
}
if (!isset($this->namedtag->Health) or !$this->namedtag->Health instanceof ShortTag) {
$this->namedtag->Health = new ShortTag("Health", $this->getMaxHealth());
}
if ($this->namedtag["Health"] <= 0) {
$this->setHealth(20);
} else {
$this->setHealth($this->namedtag["Health"]);
}
}