Simplify motion handling in ProjectileItem

This commit is contained in:
Dylan K. Taylor
2020-06-19 02:38:01 +01:00
parent 6a26c0bebf
commit 3f135da704
6 changed files with 13 additions and 18 deletions

View File

@@ -27,7 +27,6 @@ use pocketmine\entity\EntityFactory;
use pocketmine\entity\Location;
use pocketmine\entity\projectile\SplashPotion as SplashPotionEntity;
use pocketmine\entity\projectile\Throwable;
use pocketmine\math\Vector3;
use pocketmine\player\Player;
class SplashPotion extends ProjectileItem{
@@ -36,10 +35,10 @@ class SplashPotion extends ProjectileItem{
return 1;
}
protected function createEntity(Location $location, Vector3 $velocity, Player $thrower) : Throwable{
protected function createEntity(Location $location, Player $thrower) : Throwable{
$projectile = new SplashPotionEntity(
$location->getWorldNonNull(),
EntityFactory::createBaseNBT($location, $velocity, $location->yaw, $location->pitch),
EntityFactory::createBaseNBT($location, null, $location->yaw, $location->pitch),
$thrower
);