SplashPotion: Require potionId in constructor

This commit is contained in:
Dylan K. Taylor
2021-06-19 19:47:44 +01:00
parent fc70b625b3
commit 6fea09ded4
3 changed files with 10 additions and 9 deletions

View File

@@ -43,9 +43,7 @@ class SplashPotion extends ProjectileItem{
}
protected function createEntity(Location $location, Player $thrower) : Throwable{
$projectile = new SplashPotionEntity($location, $thrower);
$projectile->setPotionId($this->potionId);
return $projectile;
return new SplashPotionEntity($location, $thrower, $this->potionId);
}
public function getThrowForce() : float{