__construct() публичный Метод

public __construct ( Entity $entity, pocketmine\item\FoodSource $foodSource )
$entity pocketmine\entity\Entity
$foodSource pocketmine\item\FoodSource
Пример #1
0
 public function __construct(Entity $entity, FoodSource $foodSource)
 {
     if (!$foodSource instanceof Block) {
         throw new \InvalidArgumentException("Food source must be a block");
     }
     parent::__construct($entity, $foodSource);
 }
Пример #2
0
 public function __construct(Entity $entity, Food $foodSource)
 {
     parent::__construct($entity, $foodSource);
 }