mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
Living: don't reset attack time on regaining health
fixes #2004 and related bugs
This commit is contained in:
parent
63fa6a36a9
commit
3b36d46a8f
@ -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[]
|
||||
|
Loading…
x
Reference in New Issue
Block a user