Removed obsolete parameters from Entity->attack() and Entity->heal()

This commit is contained in:
Dylan K. Taylor
2017-08-21 13:18:39 +01:00
parent b62597fe63
commit 456ddd3fb3
15 changed files with 40 additions and 44 deletions

View File

@ -49,9 +49,9 @@ abstract class Projectile extends Entity{
parent::__construct($level, $nbt);
}
public function attack($damage, EntityDamageEvent $source){
public function attack(EntityDamageEvent $source){
if($source->getCause() === EntityDamageEvent::CAUSE_VOID){
parent::attack($damage, $source);
parent::attack($source);
}
}
@ -88,7 +88,7 @@ abstract class Projectile extends Entity{
$ev = new EntityDamageByChildEntityEvent($this->getOwningEntity(), $this, $entity, EntityDamageEvent::CAUSE_PROJECTILE, $damage);
}
$entity->attack($ev->getFinalDamage(), $ev);
$entity->attack($ev);
$this->hadCollision = true;