const materials = [
    'wood',
    'stone',
    'tin',
    'copper',
    'gold',
    'silver',
    'iron',
    'steel'
]
const packs = [
    'antiquelegacy',
    'magistuarmory',
    'magistuarmoryaddon',
    'slavicarmory'
]
const shield = [
    'target',
    'buckler',
    'rondache',
    'hoplon',
    'heatershield',
    'tartsche',
    'ellipticalshield',
    'roundshield',
    'pavese',
    'kiteshield'
]

//TAGS
ServerEvents.tags('item', event => {
    // Adds TFC wrought iron to the iron ingots tag
    event.add('c:ingots/irons', 'tfc:metal/ingot/wrought_iron')
    // shield tags
    packs.forEach(pack => {
        materials.forEach(metal => {
            shield.forEach(weapon => {
                const id = `${pack}:${metal}_${weapon}`;
                if (Item.exists(id)) {
                event.add('c:tools/shield', (id))
                }
            })
        })
    })
    
})
ServerEvents.tags('worldgen/biome', event => {
    // Adds every biome from the 'tfc' namespace to the Picky Wheels windmill whitelist
    event.add('createpickywheels:windmills_whitelist', /tfc:.*/);
    
    // If you also want to whitelist water wheels for all TFC biomes, uncomment the line below:
    // event.add('createpickywheels:waterwheels_whitelist', /tfc:.*/);
});


//BANNED ITEMS
ServerEvents.recipes(event => {
    event.remove({ output: 'create:schematicannon' })
    event.remove({ output: 'create:cart_assembler' })
    event.remove({ output: 'create:mechanical_drill' })
    event.remove({ output: 'createbigcannons:cast_iron_ingot'})
    event.remove({ output: 'createbigcannons:cast_iron_block'})
    event.remove({ output: 'antiquelegacy:iron_plate'})
    event.remove({ output: 'antiquelegacy:small_iron_plate'})
    event.remove({ output: 'minecraft:golden_apple'})
    event.remove({ output: 'minecraft:golden_carrot'})
    event.remove({ output: 'create_submarine:steel_cable'})
    event.remove({ output: 'createdieselgenerators:mold'})
    event.remove({ output: 'aeronautics:adjustable_burner'})
    event.remove({ output: 'create:water_wheel'})
    event.remove({ output: 'create:large_water_wheel'})
    event.remove({ output: 'minecraft:shield'})
    event.remove({ output: 'tfc:metal/shield/bismuth_bronze'})
    event.remove({ output: 'tfc:metal/shield/black_bronze'})
    event.remove({ output: 'tfc:metal/shield/bronze'})
    event.remove({ output: 'tfc:metal/shield/copper'})
    event.remove({ output: 'tfc:metal/shield/wrought_iron'})
    event.remove({ output: 'tfc:metal/shield/steel'})
    event.remove({ output: 'tfc:metal/shield/black_steel'})
    event.remove({ output: 'tfc:metal/shield/blue_steel'})
    event.remove({ output: 'tfc:metal/shield/red_steel'})
})