Living: don't reset attack time on regaining health

fixes #2004 and related bugs
This commit is contained in:
Dylan K. Taylor 2018-02-10 20:53:39 +00:00
parent 63fa6a36a9
commit 3b36d46a8f

View File

@ -173,15 +173,6 @@ abstract class Living extends Entity implements Damageable{
//return $this->getLevel()->rayTraceBlocks(Vector3::createVector($this->x, $this->y + $this->height, $this->z), Vector3::createVector($entity->x, $entity->y + $entity->height, $entity->z)) === null;
}
public function heal(EntityRegainHealthEvent $source){
parent::heal($source);
if($source->isCancelled()){
return;
}
$this->attackTime = 0;
}
/**
* Returns an array of Effects currently active on the mob.
* @return Effect[]