pocketmine\entity\Mooshroom::getDrops PHP Метод

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

public getDrops ( )
    public function getDrops()
    {
        $lootingL = 0;
        $cause = $this->lastDamageCause;
        if ($cause instanceof EntityDamageByEntityEvent and $cause->getDamager() instanceof Player) {
            $lootingL = $cause->getDamager()->getItemInHand()->getEnchantmentLevel(Enchantment::TYPE_WEAPON_LOOTING);
        }
        $drops = array(ItemItem::get(ItemItem::RAW_BEEF, 0, mt_rand(1, 3 + $lootingL)));
        $drops[] = ItemItem::get(ItemItem::LEATHER, 0, mt_rand(0, 2 + $lootingL));
        return $drops;
    }