// priority: 0

// Visit the wiki for more info - https://kubejs.com/

// onEvent('recipes', event => {

ServerEvents.recipes(event => {
    let cutting_woodset = (log_type, mod) => {
        event.recipes.create.cutting(`8x ${mod ? mod : 'minecraft'}:${log_type}_button`, `${mod ? mod : 'minecraft'}:stripped_${log_type}_log`).id(`bttk:cutting/${log_type}_button_from_stripped_${log_type}_log`)
        event.recipes.create.cutting(`8x ${mod ? mod : 'minecraft'}:${log_type}_button`, `${mod ? mod : 'minecraft'}:stripped_${log_type}_wood`).id(`bttk:cutting/${log_type}_button_from_stripped_${log_type}_wood`)
        
        event.recipes.create.cutting(`8x ${mod ? mod : 'minecraft'}:${log_type}_pressure_plate`, `${mod ? mod : 'minecraft'}:stripped_${log_type}_log`).id(`bttk:cutting/${log_type}_pressure_plate_from_stripped_${log_type}_log`)
        event.recipes.create.cutting(`8x ${mod ? mod : 'minecraft'}:${log_type}_pressure_plate`, `${mod ? mod : 'minecraft'}:stripped_${log_type}_wood`).id(`bttk:cutting/${log_type}_pressure_plate_from_stripped_${log_type}_wood`)

        event.recipes.create.cutting(`8x ${mod ? mod : 'minecraft'}:${log_type}_slab`, `${mod ? mod : 'minecraft'}:stripped_${log_type}_log`).id(`bttk:cutting/${log_type}_slab_from_stripped_${log_type}_log`)
        event.recipes.create.cutting(`8x ${mod ? mod : 'minecraft'}:${log_type}_slab`, `${mod ? mod : 'minecraft'}:stripped_${log_type}_wood`).id(`bttk:cutting/${log_type}_slab_from_stripped_${log_type}_wood`)

        event.recipes.create.cutting(`6x ${mod ? mod : 'minecraft'}:${log_type}_stairs`, `${mod ? mod : 'minecraft'}:stripped_${log_type}_log`).id(`bttk:cutting/${log_type}_stairs_from_stripped_${log_type}_log`)
        event.recipes.create.cutting(`6x ${mod ? mod : 'minecraft'}:${log_type}_stairs`, `${mod ? mod : 'minecraft'}:stripped_${log_type}_wood`).id(`bttk:cutting/${log_type}_stairs_from_stripped_${log_type}_wood`)

        event.recipes.create.cutting(`6x ${mod ? mod : 'minecraft'}:${log_type}_door`, `${mod ? mod : 'minecraft'}:stripped_${log_type}_log`).id(`bttk:cutting/${log_type}_door_from_stripped_${log_type}_log`)
        event.recipes.create.cutting(`6x ${mod ? mod : 'minecraft'}:${log_type}_door`, `${mod ? mod : 'minecraft'}:stripped_${log_type}_wood`).id(`bttk:cutting/${log_type}_door_from_stripped_${log_type}_wood`)

        event.recipes.create.cutting(`6x ${mod ? mod : 'minecraft'}:${log_type}_trapdoor`, `${mod ? mod : 'minecraft'}:stripped_${log_type}_log`).id(`bttk:cutting/${log_type}_trapdoor_from_stripped_${log_type}_log`)
        event.recipes.create.cutting(`6x ${mod ? mod : 'minecraft'}:${log_type}_trapdoor`, `${mod ? mod : 'minecraft'}:stripped_${log_type}_wood`).id(`bttk:cutting/${log_type}_trapdoor_from_stripped_${log_type}_wood`)
        
        event.recipes.create.cutting(`8x ${mod ? mod : 'minecraft'}:${log_type}_fence`, `${mod ? mod : 'minecraft'}:stripped_${log_type}_log`).id(`bttk:cutting/${log_type}_fence_from_stripped_${log_type}_log`)
        event.recipes.create.cutting(`8x ${mod ? mod : 'minecraft'}:${log_type}_fence`, `${mod ? mod : 'minecraft'}:stripped_${log_type}_wood`).id(`bttk:cutting/${log_type}_fence_from_stripped_${log_type}_wood`)
        
        event.recipes.create.cutting(`8x ${mod ? mod : 'minecraft'}:${log_type}_fence_gate`, `${mod ? mod : 'minecraft'}:stripped_${log_type}_log`).id(`bttk:cutting/${log_type}_fence_gate_from_stripped_${log_type}_log`)
        event.recipes.create.cutting(`8x ${mod ? mod : 'minecraft'}:${log_type}_fence_gate`, `${mod ? mod : 'minecraft'}:stripped_${log_type}_wood`).id(`bttk:cutting/${log_type}_fence_gate_from_stripped_${log_type}_wood`)
        
        event.recipes.create.cutting(`4x ${mod ? mod : 'minecraft'}:${log_type}_sign`, `${mod ? mod : 'minecraft'}:stripped_${log_type}_log`).id(`bttk:cutting/${log_type}_sign_from_stripped_${log_type}_log`)
        event.recipes.create.cutting(`4x ${mod ? mod : 'minecraft'}:${log_type}_sign`, `${mod ? mod : 'minecraft'}:stripped_${log_type}_wood`).id(`bttk:cutting/${log_type}_sign_from_stripped_${log_type}_wood`)
        
        event.recipes.create.cutting(`4x ${mod ? mod : 'minecraft'}:${log_type}_hanging_sign`, `${mod ? mod : 'minecraft'}:stripped_${log_type}_log`).id(`bttk:cutting/${log_type}_hanging_sign_from_stripped_${log_type}_log`)
        event.recipes.create.cutting(`4x ${mod ? mod : 'minecraft'}:${log_type}_hanging_sign`, `${mod ? mod : 'minecraft'}:stripped_${log_type}_wood`).id(`bttk:cutting/${log_type}_hanging_sign_from_stripped_${log_type}_wood`)
    }

    cutting_woodset('oak')
    cutting_woodset('dark_oak')
    cutting_woodset('spruce')
    cutting_woodset('birch')
    cutting_woodset('acacia')
    cutting_woodset('jungle')
    cutting_woodset('mangrove')
    cutting_woodset('cherry')
    
    cutting_woodset('fir', 'biomesoplenty')
    cutting_woodset('redwood', 'biomesoplenty')
    cutting_woodset('mahogany', 'biomesoplenty')
    cutting_woodset('jacaranda', 'biomesoplenty')
    cutting_woodset('palm', 'biomesoplenty')
    cutting_woodset('willow', 'biomesoplenty')
    cutting_woodset('dead', 'biomesoplenty')
    cutting_woodset('magic', 'biomesoplenty')
    cutting_woodset('umbran', 'biomesoplenty')
    cutting_woodset('hellbark', 'biomesoplenty')
    
    cutting_woodset('rubberwood', 'thermal')
    
    cutting_woodset('pewen', 'alexscaves')
    cutting_woodset('thornwood', 'alexscaves')
    
    cutting_woodset('myqueste', 'hibernalherbs')
    
    cutting_woodset('nut', 'garnished')

    let cutting_stemset = (stem_type, mod) => {
        event.recipes.create.cutting(`8x ${mod ? mod : 'minecraft'}:${stem_type}_button`, `${mod ? mod : 'minecraft'}:stripped_${stem_type}_stem`).id(`bttk:cutting/${stem_type}_button_from_stripped_${stem_type}_stem`)
        event.recipes.create.cutting(`8x ${mod ? mod : 'minecraft'}:${stem_type}_button`, `${mod ? mod : 'minecraft'}:stripped_${stem_type}_hyphae`).id(`bttk:cutting/${stem_type}_button_from_stripped_${stem_type}_hyphae`)
        
        event.recipes.create.cutting(`8x ${mod ? mod : 'minecraft'}:${stem_type}_pressure_plate`, `${mod ? mod : 'minecraft'}:stripped_${stem_type}_stem`).id(`bttk:cutting/${stem_type}_pressure_plate_from_stripped_${stem_type}_stem`)
        event.recipes.create.cutting(`8x ${mod ? mod : 'minecraft'}:${stem_type}_pressure_plate`, `${mod ? mod : 'minecraft'}:stripped_${stem_type}_hyphae`).id(`bttk:cutting/${stem_type}_pressure_plate_from_stripped_${stem_type}_hyphae`)

        event.recipes.create.cutting(`8x ${mod ? mod : 'minecraft'}:${stem_type}_slab`, `${mod ? mod : 'minecraft'}:stripped_${stem_type}_stem`).id(`bttk:cutting/${stem_type}_slab_from_stripped_${stem_type}_stem`)
        event.recipes.create.cutting(`8x ${mod ? mod : 'minecraft'}:${stem_type}_slab`, `${mod ? mod : 'minecraft'}:stripped_${stem_type}_hyphae`).id(`bttk:cutting/${stem_type}_slab_from_stripped_${stem_type}_hyphae`)

        event.recipes.create.cutting(`6x ${mod ? mod : 'minecraft'}:${stem_type}_stairs`, `${mod ? mod : 'minecraft'}:stripped_${stem_type}_stem`).id(`bttk:cutting/${stem_type}_stairs_from_stripped_${stem_type}_stem`)
        event.recipes.create.cutting(`6x ${mod ? mod : 'minecraft'}:${stem_type}_stairs`, `${mod ? mod : 'minecraft'}:stripped_${stem_type}_hyphae`).id(`bttk:cutting/${stem_type}_stairs_from_stripped_${stem_type}_hyphae`)

        event.recipes.create.cutting(`6x ${mod ? mod : 'minecraft'}:${stem_type}_door`, `${mod ? mod : 'minecraft'}:stripped_${stem_type}_stem`).id(`bttk:cutting/${stem_type}_door_from_stripped_${stem_type}_stem`)
        event.recipes.create.cutting(`6x ${mod ? mod : 'minecraft'}:${stem_type}_door`, `${mod ? mod : 'minecraft'}:stripped_${stem_type}_hyphae`).id(`bttk:cutting/${stem_type}_door_from_stripped_${stem_type}_hyphae`)

        event.recipes.create.cutting(`6x ${mod ? mod : 'minecraft'}:${stem_type}_trapdoor`, `${mod ? mod : 'minecraft'}:stripped_${stem_type}_stem`).id(`bttk:cutting/${stem_type}_trapdoor_from_stripped_${stem_type}_stem`)
        event.recipes.create.cutting(`6x ${mod ? mod : 'minecraft'}:${stem_type}_trapdoor`, `${mod ? mod : 'minecraft'}:stripped_${stem_type}_hyphae`).id(`bttk:cutting/${stem_type}_trapdoor_from_stripped_${stem_type}_hyphae`)
        
        event.recipes.create.cutting(`8x ${mod ? mod : 'minecraft'}:${stem_type}_fence`, `${mod ? mod : 'minecraft'}:stripped_${stem_type}_stem`).id(`bttk:cutting/${stem_type}_fence_from_stripped_${stem_type}_stem`)
        event.recipes.create.cutting(`8x ${mod ? mod : 'minecraft'}:${stem_type}_fence`, `${mod ? mod : 'minecraft'}:stripped_${stem_type}_hyphae`).id(`bttk:cutting/${stem_type}_fence_from_stripped_${stem_type}_hyphae`)
        
        event.recipes.create.cutting(`8x ${mod ? mod : 'minecraft'}:${stem_type}_fence_gate`, `${mod ? mod : 'minecraft'}:stripped_${stem_type}_stem`).id(`bttk:cutting/${stem_type}_fence_gate_from_stripped_${stem_type}_stem`)
        event.recipes.create.cutting(`8x ${mod ? mod : 'minecraft'}:${stem_type}_fence_gate`, `${mod ? mod : 'minecraft'}:stripped_${stem_type}_hyphae`).id(`bttk:cutting/${stem_type}_fence_gate_from_stripped_${stem_type}_hyphae`)
        
        event.recipes.create.cutting(`4x ${mod ? mod : 'minecraft'}:${stem_type}_sign`, `${mod ? mod : 'minecraft'}:stripped_${stem_type}_stem`).id(`bttk:cutting/${stem_type}_sign_from_stripped_${stem_type}_stem`)
        event.recipes.create.cutting(`4x ${mod ? mod : 'minecraft'}:${stem_type}_sign`, `${mod ? mod : 'minecraft'}:stripped_${stem_type}_hyphae`).id(`bttk:cutting/${stem_type}_sign_from_stripped_${stem_type}_hyphae`)
        
        event.recipes.create.cutting(`4x ${mod ? mod : 'minecraft'}:${stem_type}_hanging_sign`, `${mod ? mod : 'minecraft'}:stripped_${stem_type}_stem`).id(`bttk:cutting/${stem_type}_hanging_sign_from_stripped_${stem_type}_stem`)
        event.recipes.create.cutting(`4x ${mod ? mod : 'minecraft'}:${stem_type}_hanging_sign`, `${mod ? mod : 'minecraft'}:stripped_${stem_type}_hyphae`).id(`bttk:cutting/${stem_type}_hanging_sign_from_stripped_${stem_type}_hyphae`)
    }
    
    cutting_stemset('crimson')
    cutting_stemset('warped')
    
    cutting_stemset('sepia', 'garnished')

    event.recipes.create.cutting('thermal:stripped_rubberwood_log', 'thermal:rubberwood_log').id('bttk:cutting/stripped_rubberwood_log')
    event.recipes.create.cutting('thermal:stripped_rubberwood_wood', 'thermal:rubberwood_wood').id('bttk:cutting/stripped_rubberwood_wood')
    event.recipes.create.cutting('6x thermal:rubberwood_planks', 'thermal:stripped_rubberwood_log').id('bttk:cutting/rubberwood_planks_from_stripped_rubberwood_log')
    event.recipes.create.cutting('6x thermal:rubberwood_planks', 'thermal:stripped_rubberwood_wood').id('bttk:cutting/rubberwood_planks_from_stripped_rubberwood_wood')
})