added throwable eggs and refactor some projectile logic

close #1473
This commit is contained in:
Dylan K. Taylor
2017-10-19 14:12:44 +01:00
parent 11cc20972f
commit 2db13bd114
5 changed files with 108 additions and 31 deletions

View File

@ -23,12 +23,21 @@ declare(strict_types=1);
namespace pocketmine\item;
class Egg extends Item{
class Egg extends ProjectileItem{
public function __construct(int $meta = 0){
parent::__construct(self::EGG, $meta, "Egg");
}
//TODO
public function getMaxStackSize() : int{
return 16;
}
public function getProjectileEntityType() : string{
return "Egg";
}
public function getThrowForce() : float{
return 1.5;
}
}