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

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

public getDrops ( Item $item ) : array
$item pocketmine\item\Item
Результат array
    public function getDrops(Item $item) : array
    {
        if ($item->isPickaxe() >= 4) {
            if ($item->getEnchantmentLevel(Enchantment::TYPE_MINING_SILK_TOUCH) > 0) {
                return [[Item::EMERALD_ORE, 0, 1]];
            } else {
                $fortunel = $item->getEnchantmentLevel(Enchantment::TYPE_MINING_FORTUNE);
                $fortunel = $fortunel > 3 ? 3 : $fortunel;
                $times = [1, 1, 2, 3, 4];
                $time = $times[mt_rand(0, $fortunel + 1)];
                return [[Item::EMERALD, 0, $time]];
            }
        } else {
            return [];
        }
    }