mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-19 04:15:04 +00:00
Simplify motion handling in ProjectileItem
This commit is contained in:
@@ -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
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user