__construct() public method

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