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

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

public getDrops ( Item $item ) : array
$item pocketmine\item\Item
Результат array
    public function getDrops(Item $item) : array
    {
        $drops = [];
        if ($item->isShears() or $item->getEnchantmentLevel(Enchantment::TYPE_MINING_SILK_TOUCH) > 0) {
            $drops[] = [$this->id, $this->meta & 0x1, 1];
        } else {
            $fortunel = $item->getEnchantmentLevel(Enchantment::TYPE_MINING_FORTUNE);
            $fortunel = min(3, $fortunel);
            $rates = [20, 16, 12, 10];
            if (mt_rand(1, $rates[$fortunel]) === 1) {
                //Saplings
                $drops[] = [Item::SAPLING, $this->meta & 0x1 | 0x4, 1];
            }
        }
        return $drops;
    }