mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-18 20:14:31 +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,10 +23,10 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
use pocketmine\entity\EntityFactory;
|
||||
use pocketmine\entity\Location;
|
||||
use pocketmine\entity\projectile\Egg as EggEntity;
|
||||
use pocketmine\entity\projectile\Throwable;
|
||||
use pocketmine\nbt\tag\CompoundTag;
|
||||
use pocketmine\player\Player;
|
||||
|
||||
class Egg extends ProjectileItem{
|
||||
@@ -36,11 +36,7 @@ class Egg extends ProjectileItem{
|
||||
}
|
||||
|
||||
protected function createEntity(Location $location, Player $thrower) : Throwable{
|
||||
return new EggEntity(
|
||||
$location->getWorldNonNull(),
|
||||
EntityFactory::createBaseNBT($location, null, $location->yaw, $location->pitch),
|
||||
$thrower
|
||||
);
|
||||
return new EggEntity($location, $thrower, new CompoundTag());
|
||||
}
|
||||
|
||||
public function getThrowForce() : float{
|
||||
|
Reference in New Issue
Block a user