pocketmine\block\Wheat::getDrops PHP Метод

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

public getDrops ( Item $item ) : array
$item pocketmine\item\Item
Результат array
    public function getDrops(Item $item) : array
    {
        $drops = [];
        if ($this->meta >= 0x7) {
            $fortunel = $item->getEnchantmentLevel(Enchantment::TYPE_MINING_FORTUNE);
            $fortunel = $fortunel > 3 ? 3 : $fortunel;
            $drops[] = [Item::WHEAT, 0, 1];
            $drops[] = [Item::WHEAT_SEEDS, 0, mt_rand(0, 3 + $fortunel)];
        } else {
            $drops[] = [Item::WHEAT_SEEDS, 0, 1];
        }
        return $drops;
    }