mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 10:53:05 +00:00
Simplify motion handling in ProjectileItem
This commit is contained in:
@ -27,15 +27,14 @@ use pocketmine\entity\EntityFactory;
|
||||
use pocketmine\entity\Location;
|
||||
use pocketmine\entity\projectile\ExperienceBottle as ExperienceBottleEntity;
|
||||
use pocketmine\entity\projectile\Throwable;
|
||||
use pocketmine\math\Vector3;
|
||||
use pocketmine\player\Player;
|
||||
|
||||
class ExperienceBottle extends ProjectileItem{
|
||||
|
||||
protected function createEntity(Location $location, Vector3 $velocity, Player $thrower) : Throwable{
|
||||
protected function createEntity(Location $location, Player $thrower) : Throwable{
|
||||
return new ExperienceBottleEntity(
|
||||
$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