mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 10:53:05 +00:00
Extract mandatory parameters into constructor parameters
the goal is obviously to ditch NBT entirely here, but there's more work to be done before that becomes possible.
This commit is contained in:
@ -23,20 +23,16 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
use pocketmine\entity\EntityFactory;
|
||||
use pocketmine\entity\Location;
|
||||
use pocketmine\entity\projectile\ExperienceBottle as ExperienceBottleEntity;
|
||||
use pocketmine\entity\projectile\Throwable;
|
||||
use pocketmine\nbt\tag\CompoundTag;
|
||||
use pocketmine\player\Player;
|
||||
|
||||
class ExperienceBottle extends ProjectileItem{
|
||||
|
||||
protected function createEntity(Location $location, Player $thrower) : Throwable{
|
||||
return new ExperienceBottleEntity(
|
||||
$location->getWorldNonNull(),
|
||||
EntityFactory::createBaseNBT($location, null, $location->yaw, $location->pitch),
|
||||
$thrower
|
||||
);
|
||||
return new ExperienceBottleEntity($location, $thrower, new CompoundTag());
|
||||
}
|
||||
|
||||
public function getThrowForce() : float{
|
||||
|
Reference in New Issue
Block a user