Fixed burning mobs not getting onfire data flag set when read from disk

they'd just flash red and take damage for no apparent reason
This commit is contained in:
Dylan K. Taylor 2017-10-21 12:36:30 +01:00
parent 554096953b
commit 1dd2203ee5

View File

@ -516,6 +516,9 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
$this->namedtag->Fire = new ShortTag("Fire", 0);
}
$this->fireTicks = (int) $this->namedtag["Fire"];
if($this->isOnFire()){
$this->setGenericFlag(self::DATA_FLAG_ONFIRE);
}
if(!isset($this->namedtag->Air)){
$this->namedtag->Air = new ShortTag("Air", 300);