// server script
ServerEvents.recipes((event) => {
    function apiaryRecipes (beeType, flower) {
        event.recipes.mbd2.apiary()
            // recipe id is optional, but we recommend to set a unique id
            .id("mbd2:apiary/" + beeType + '_bee') 
            // duration in tick
            .duration(600)
            .chance(0, builder => builder
                .inputItems({item: "productivebees:spawn_egg_configurable_bee",type: "forge:nbt",nbt: '{"EntityTag":{"type":"productivebees:' + beeType + '"}}'})
                .inputItems(flower)
            )
            .chance(1, builder => builder
                .outputItems({item: "productivebees:configurable_honeycomb",type: "forge:nbt",nbt: '{"EntityTag":{"type":"productivebees:' + beeType + '"}}'})
            )
    }

    apiaryRecipes('copper', "#productivebees:flowers/cupric_flowers")
    apiaryRecipes('skeletal', "minecraft:bone_block")
    apiaryRecipes('steel', "#forge:storage_blocks/steel")
    apiaryRecipes('redstone', "#productivebees:flowers/redstone")
    apiaryRecipes('end_steel', "enderio:end_steel_block")
    apiaryRecipes('constantan', "#forge:storage_blocks/constantan")
    apiaryRecipes('energetic_alloy', "enderio:energetic_alloy_block")
    apiaryRecipes('lapis', "#forge:storage_blocks/lapis")
    apiaryRecipes('withered', "minecraft:wither_rose")
    apiaryRecipes('vibrant_alloy', "enderio:vibrant_alloy_block")
    apiaryRecipes('sky_steel', "megacells:sky_steel_block")
    apiaryRecipes('copper_alloy', "enderio:copper_alloy_block")
    apiaryRecipes('blitz', "thermal:niter_block")
    apiaryRecipes('lumium', "#forge:storage_blocks/lumium")
    apiaryRecipes('soularium', "enderio:soularium_block")
    apiaryRecipes('brass', "#forge:storage_blocks/brass")
    apiaryRecipes('gold', "#productivebees:flowers/gilded_flowers")
    apiaryRecipes('crystalline', "#productivebees:flowers/crystalline")
    apiaryRecipes('obsidian', "#forge:obsidian")
    apiaryRecipes('invar', "#forge:storage_blocks/invar")
    apiaryRecipes('lead', "#forge:storage_blocks/lead")
    apiaryRecipes('osmium', "#forge:storage_blocks/osmium")
    apiaryRecipes('nickel', "#forge:storage_blocks/nickel")
    apiaryRecipes('pulsating_alloy', "enderio:pulsating_alloy_block")
    apiaryRecipes('ender', "#productivebees:flowers/ender")
    apiaryRecipes('netherite', "#forge:storage_blocks/netherite")
    apiaryRecipes('soul_shard', "eidolon:shadow_gem_block")
    apiaryRecipes('emerald', "#productivebees:flowers/emerald")
    apiaryRecipes('electrum', "#forge:storage_blocks/electrum")
    apiaryRecipes('silver', "#forge:storage_blocks/silver")
    apiaryRecipes('coal', "#forge:storage_blocks/coal")
    apiaryRecipes('bronze', "#forge:storage_blocks/bronze")
    apiaryRecipes('conductive_alloy', "enderio:conductive_alloy_block")
    apiaryRecipes('draconic', "#productivebees:flowers/draconic_flowers")
    apiaryRecipes('aluminum', "#forge:storage_blocks/aluminum")
    apiaryRecipes('dark_steel', "enderio:dark_steel_block")
    apiaryRecipes('refined_glowstone', "#forge:storage_blocks/refined_glowstone")
    apiaryRecipes('nitro_crystal', "powah:nitro_crystal_block")
    apiaryRecipes('fire_crystal', "elementalcraft:firecrystal_block")
    apiaryRecipes('earth_crystal', "elementalcraft:earthcrystal_block")
    apiaryRecipes('prosperity', "mysticalagriculture:prosperity_block")
    apiaryRecipes('swift_alloy', "#forge:storage_blocks/swift_alloy")
    apiaryRecipes('alfsteel', "mythicbotany:alfsteel_block")
    apiaryRecipes('manasteel', "#forge:storage_blocks/manasteel")
    apiaryRecipes('insanite', "#forge:storage_blocks/insanite")
    apiaryRecipes('rose_gold', "#forge:storage_blocks/rose_gold")
    apiaryRecipes('platinum', "#forge:storage_blocks/platinum")
    apiaryRecipes('iron', "#productivebees:flowers/ferric_flowers")
    apiaryRecipes('arcane_gold', "eidolon:arcane_gold_block")
    apiaryRecipes('hop_graphite', "immersiveengineering:graphite_electrode")
    apiaryRecipes('diamond', "#productivebees:flowers/diamond")
    apiaryRecipes('redstone_alloy', "enderio:redstone_alloy_block")
    apiaryRecipes('basalz', "#productivebees:flowers/burning")
    apiaryRecipes('tin', "#forge:storage_blocks/tin")
    apiaryRecipes('zinc', "#forge:storage_blocks/zinc")
    apiaryRecipes('stone', "#forge:stone")
    apiaryRecipes('arcane', "ars_nouveau:source_gem_block")
    apiaryRecipes('blazing', "#productivebees:flowers/fiery")
    apiaryRecipes('amethyst', "#productivebees:flowers/amethyst")
    apiaryRecipes('glowing', "#productivebees:flowers/glowing_flowers")
    apiaryRecipes('ghostly', "#productivebees:flowers/souled_flowers")
    apiaryRecipes('ridiculite', "#forge:storage_blocks/ridiculite")
    apiaryRecipes('arcane_essence', "irons_spellbooks:ruined_book")
    apiaryRecipes('prismalium', "#forge:storage_blocks/prismalium")
    apiaryRecipes('springaline', "elementalcraft:springaline_block")
    apiaryRecipes('water_crystal', "elementalcraft:watercrystal_block")
    apiaryRecipes('blazing_crystal', "powah:blazing_crystal_block")
    apiaryRecipes('ludicrite', "#forge:storage_blocks/ludicrite")
    apiaryRecipes('niotic_crystal', "powah:niotic_crystal_block")
    apiaryRecipes('hematophagous', "#productivebees:animals")
    apiaryRecipes('cyanite', "#forge:storage_blocks/cyanite")
    apiaryRecipes('enderium', "#forge:storage_blocks/enderium")
    apiaryRecipes('signalum', "#forge:storage_blocks/signalum")
    apiaryRecipes('deorum', "forbidden_arcanus:deorum_block")
    apiaryRecipes('iesnium', "#forge:storage_blocks/iesnium")
    apiaryRecipes('draconium', "#forge:storage_blocks/draconium")
    apiaryRecipes('cobalt', "#forge:storage_blocks/cobalt")
    apiaryRecipes('flux', "fluxnetworks:flux_block")
    apiaryRecipes('cheese', "ad_astra:cheese_block")
    apiaryRecipes('chaos', "draconicevolution:chaos_shard")
    apiaryRecipes('twinite', "thermal_extra:twinite_block")
    apiaryRecipes('regenerative', "#minecraft:flowers")
    apiaryRecipes('silicon', "#productivebees:flowers/crystalline")
    apiaryRecipes('dragonsteel', "thermal_extra:dragonsteel_block")
    apiaryRecipes('blutonium', "#forge:storage_blocks/blutonium")
    apiaryRecipes('vibranium', "#forge:storage_blocks/vibranium")
    apiaryRecipes('mana', "botania:gaia_pylon")
    apiaryRecipes('uraninite', "#forge:storage_blocks/uraninite")
    apiaryRecipes('utheric', "#forge:storage_blocks/utherium")
    apiaryRecipes('infused_iron', "naturesaura:infused_iron_block")
    apiaryRecipes('sky_ingot', "naturesaura:sky_ingot_block")
    apiaryRecipes('radioactive', "#productivebees:flowers/radioactive")
    apiaryRecipes('air_crystal', "elementalcraft:aircrystal_block")
    apiaryRecipes('infinity', "enderio:reinforced_obsidian_block")
    apiaryRecipes('quartz_enriched_iron', "refinedstorage:controller")
    apiaryRecipes('stellarium', "#forge:storage_blocks/stellarium")
    apiaryRecipes('tainted_gold', "naturesaura:tainted_gold_block")
    apiaryRecipes('drenched_iron', "#forge:storage_blocks/drenched_iron")
    apiaryRecipes('elementium', "#forge:storage_blocks/elementium")
    apiaryRecipes('energized_steel', "powah:energized_steel_block")
    apiaryRecipes('blizz', "#productivebees:flowers/frozen")
    apiaryRecipes('melodium', "#forge:storage_blocks/melodium")
    apiaryRecipes('stellarite', "forbidden_arcanus:stellarite_block")
    apiaryRecipes('spirited_crystal', "powah:spirited_crystal_block")
    apiaryRecipes('cloggrum', "#forge:storage_blocks/cloggrum")
    apiaryRecipes('pure_crystal', "elementalcraft:purerock")
    apiaryRecipes('unobtainium', "#forge:storage_blocks/unobtainium")
    apiaryRecipes('wanna', "productivebees:amber")
    apiaryRecipes('fireite', "#forge:storage_blocks/fireite")
    apiaryRecipes('lightning_dragonsteel', "iceandfire:dragonsteel_lightning_block")
    apiaryRecipes('refined_obsidian', "#forge:storage_blocks/refined_obsidian")
    apiaryRecipes('energized_glowstone', "#minecraft:flowers")
    apiaryRecipes('soul_infused', "thermal_extra:soul_infused_block")
    apiaryRecipes('resonant_ender', "#productivebees:flowers/ender")
    apiaryRecipes('awakened', "#forge:storage_blocks/draconium_awakened")
    apiaryRecipes('fire_dragonsteel', "iceandfire:dragonsteel_fire_block")
    apiaryRecipes('inert_crystal', "elementalcraft:inertcrystal_block")
    apiaryRecipes('ice_dragonsteel', "iceandfire:dragonsteel_ice_block")
    apiaryRecipes('astral', "enigmaticlegacy:astral_block")
    apiaryRecipes('compressed_iron', "pneumaticcraft:compressed_iron_block")
    apiaryRecipes('plastic', "#forge:plastic")
    apiaryRecipes('allthemodium', "#forge:storage_blocks/allthemodium")
    apiaryRecipes('terrasteel', "#forge:storage_blocks/terrasteel")
    apiaryRecipes('hellfire', "bloodmagic:dungeon_metal")
    apiaryRecipes('destabilized_redstone', "#productivebees:flowers/redstone")
    apiaryRecipes('bloody', "evilcraft:hardened_blood")
    apiaryRecipes('shellite', "thermal_extra:shellite_block")
    apiaryRecipes('dark_gem', "evilcraft:dark_block")
})