item: remove some unnecessary CompoundTag usages

This commit is contained in:
Dylan K. Taylor 2020-06-19 22:59:19 +01:00
parent 4e8e10ca45
commit d62d0762ff
5 changed files with 5 additions and 10 deletions

View File

@ -26,7 +26,6 @@ namespace pocketmine\item;
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,7 +35,7 @@ class Egg extends ProjectileItem{
}
protected function createEntity(Location $location, Player $thrower) : Throwable{
return new EggEntity($location, $thrower, new CompoundTag());
return new EggEntity($location, $thrower);
}
public function getThrowForce() : float{

View File

@ -26,7 +26,6 @@ namespace pocketmine\item;
use pocketmine\entity\Location;
use pocketmine\entity\projectile\EnderPearl as EnderPearlEntity;
use pocketmine\entity\projectile\Throwable;
use pocketmine\nbt\tag\CompoundTag;
use pocketmine\player\Player;
class EnderPearl extends ProjectileItem{
@ -36,7 +35,7 @@ class EnderPearl extends ProjectileItem{
}
protected function createEntity(Location $location, Player $thrower) : Throwable{
return new EnderPearlEntity($location, $thrower, new CompoundTag());
return new EnderPearlEntity($location, $thrower);
}
public function getThrowForce() : float{

View File

@ -26,13 +26,12 @@ namespace pocketmine\item;
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, $thrower, new CompoundTag());
return new ExperienceBottleEntity($location, $thrower);
}
public function getThrowForce() : float{

View File

@ -26,7 +26,6 @@ namespace pocketmine\item;
use pocketmine\entity\Location;
use pocketmine\entity\projectile\Snowball as SnowballEntity;
use pocketmine\entity\projectile\Throwable;
use pocketmine\nbt\tag\CompoundTag;
use pocketmine\player\Player;
class Snowball extends ProjectileItem{
@ -36,7 +35,7 @@ class Snowball extends ProjectileItem{
}
protected function createEntity(Location $location, Player $thrower) : Throwable{
return new SnowballEntity($location, $thrower, new CompoundTag());
return new SnowballEntity($location, $thrower);
}
public function getThrowForce() : float{

View File

@ -26,7 +26,6 @@ namespace pocketmine\item;
use pocketmine\entity\Location;
use pocketmine\entity\projectile\SplashPotion as SplashPotionEntity;
use pocketmine\entity\projectile\Throwable;
use pocketmine\nbt\tag\CompoundTag;
use pocketmine\player\Player;
class SplashPotion extends ProjectileItem{
@ -36,7 +35,7 @@ class SplashPotion extends ProjectileItem{
}
protected function createEntity(Location $location, Player $thrower) : Throwable{
$projectile = new SplashPotionEntity($location, $thrower, new CompoundTag());
$projectile = new SplashPotionEntity($location, $thrower);
$projectile->setPotionId($this->meta);
return $projectile;
}