// priority: 0

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

var tfc_ie_sandstone = [
    "cut_black",
    "cut_brown",
    "cut_green",
    "cut_pink",
    "cut_red",
    "cut_white",
    "cut_yellow",
    "raw_black",
    "raw_brown",
    "raw_green",
    "raw_pink",
    "raw_red",
    "raw_white",
    "raw_yellow",
    "smooth_black",
    "smooth_brown",
    "smooth_green",
    "smooth_pink",
    "smooth_red",
    "smooth_white",
    "smooth_yellow",
]

console.info('Hello, World! (Loaded server scripts)')
ServerEvents.recipes(event => {
    //移除配方
    event.remove({ type: 'immersiveengineering:mineral_mix' })
    event.remove({ type: 'minecraft:blasting' })
    event.remove({ type: 'lychee:anvil_crafting' })
    event.remove({ id: 'immersiveengineering:mineral/amethyst_crevasse' })
    event.remove({ id: 'immersiveengineering:mineral/ancient_debris' })
    event.remove({ id: 'immersiveengineering:mineral/ancient_seabed' })
    event.remove({ id: 'immersiveengineering:mineral/auricupride' })
    event.remove({ id: 'immersiveengineering:mineral/beryl' })
    event.remove({ id: 'immersiveengineering:mineral/bituminous_coal' })
    event.remove({ id: 'immersiveengineering:mineral/cassiterite' })
    event.remove({ id: 'immersiveengineering:mineral/chalcopyrite' })
    event.remove({ id: 'immersiveengineering:mineral/cinnabar' })
    event.remove({ id: 'immersiveengineering:mineral/cooled_lava_tube' })
    event.remove({ id: 'immersiveengineering:mineral/cooperite' })
    event.remove({ id: 'immersiveengineering:mineral/galena' })
    event.remove({ id: 'immersiveengineering:mineral/hardened_clay_pan' })
    event.remove({ id: 'immersiveengineering:mineral/igneous_rock' })
    event.remove({ id: 'immersiveengineering:mineral/laterite' })
    event.remove({ id: 'immersiveengineering:mineral/mephitic_quarzite' })
    event.remove({ id: 'immersiveengineering:mineral/nether_silt' })
    event.remove({ id: 'immersiveengineering:mineral/pentlandite' })
    event.remove({ id: 'immersiveengineering:mineral/silt' })
    event.remove({ id: 'immersiveengineering:mineral/uraninite' })
    event.remove({ id: 'immersiveengineering:mineral/wolframite' })
    event.remove({ id: 'minecraft:paper' })
    event.remove({ id: 'mekanism:paper' })
    event.remove({ id: 'immersiveengineering:crafting/paper_from_sawdust' })
    event.remove({ id: 'tfc:crafting/parchment' })
    event.remove({ id: 'scout:tanned_leather' })
    event.remove({ id: 'immersiveengineering:crafting/nugget_copper_to_copper_ingot' })
    event.remove({ id: 'immersiveengineering:crafting/nugget_aluminum_to_ingot_aluminum' })
    event.remove({ id: 'immersiveengineering:crafting/nugget_silver_to_ingot_silver' })
    event.remove({ id: "epicsamurai:silver_ingot_from_nugget" })
    event.remove({ id: "minecraft:gold_ingot_from_nuggets" })
    event.remove({ id: 'create:crafting/materials/zinc_ingot_from_compacting' })
    //数据包移除配方迁移
    event.remove({ id: 'ad_astra:etrionic_capacitor' })
    event.remove({ id: 'ad_astra:gravity_normalizer' })
    event.remove({ id: 'ad_astra:nasa_workbench' })
    event.remove({ id: 'ae2:blasting/silicon_from_certus_quartz_dust' })
    event.remove({ id: 'ae2:decorative/quartz_glass' })
    event.remove({ id: 'vinery:straw_hat' })
    event.remove({ id: 'vinery:winemaker_apron' })
    event.remove({ id: 'vinery:winemaker_boots' })
    event.remove({ id: 'vinery:winemaker_leggings' })
    event.remove({ id: "woodencog:crafting/sequenced_assembly/precision_mechanism" })
    event.remove({ id: "minecraft:minecart" })
    event.remove({ id: "create:crushing/leather_horse_armor" })
    event.remove({ id: "create:crushing/iron_horse_armor" })
    event.remove({ id: "create:crushing/diamond_horse_armor" })
    event.remove({ id: "create:crushing/golden_horse_armor" })
    event.remove({ id: "create:milling/saddle" })
    event.remove({ id: "minecraft:slime_block" })
    event.remove({ id: "ad_astra:iron_plateblock" })
    event.remove({ output: "minecraft:iron_ingot" })
    event.remove({ output: "minecraft:gold_ingot" })
    //event.remove({ input: "minecraft:iron_ingot" })
    event.remove({ output: "minecraft:copper_ingot" })
    event.remove({ mod: "travelersbackpack" })
    event.remove({ id: "minecraft:tripwire_hook" })
    event.remove({ id: "minecraft:piston" })
    event.remove({ id: "minecraft:detector_rail" })
    event.remove({ id: "minecraft:smithing_table" })
    event.remove({ id: "minecraft:activator_rail" })
    event.remove({ id: "minecraft:hopper" })
    event.remove({ id: "minecraft:crossbow" })
    event.remove({ id: "minecraft:shears" })
    event.remove({ id: "minecraft:cauldron" })
    event.remove({ id: "mekanism:rails" })
    event.remove({ id: "minecraft:powered_rail" })
    event.remove({ id: "minecraft:gold_block" })
    event.remove({ output: "farmersdelight:organic_compost" })
    event.remove({ id: "minecraft:gold_block" })
    event.remove({ id: "botania:diva_charm" })
    event.remove({ id: "farmersdelight:lead_from_straw" })
    event.remove({ id: "minecraft:lead" })
    event.remove({ id: "botania:water_ring" })
    event.remove({ id: "botania:mining_ring" })
    event.remove({ id: "botania:dodge_ring" })
    event.remove({ id: "botania:cloud_pendant" })
    event.remove({ id: "botania:tiny_planet" })
    event.remove({ id: "botania:lava_pendant" })
    event.remove({ id: "minecraft:nether_bricks" })
    event.remove({ id: "minecraft:red_nether_bricks" })
    event.remove({ id: "minecraft:nether_brick_fence" })
    event.remove({ output: "mekanism:dust_quartz" })
    event.remove({ type: "immersiveengineering:alloy" })
    event.remove({ id: "botania:mining_ring" })
    event.remove({ id: "botania:mining_ring" })
    event.remove({ id: 'mekanism:combining/gravel' })
    event.remove({ id: 'mekanism:crushing/cobblestone_to_gravel' })
    event.remove({ output: 'minecraft:netherrack' })
    event.remove({ id: 'immersiveengineering:crusher/cobblestone' })
    event.remove({ id: 'mekanism:metallurgic_infusing/sand_to_dirt' })
    event.remove({ id: 'minecraft:sandstone' })
    event.remove({ id: 'create:haunting/blackstone' })
    event.remove({ id: 'create:splashing/gravel' })
    event.remove({ id: 'botania:mana_infusion/gravel/dupe' })
    event.remove({ id: "botania:dirt_rod" })
    event.remove({ id: "botania:skydirt_rod" })
    event.remove({ id: "botania:cobble_rod" })
    event.remove({ id: "botania:water_rod" })
    event.remove({ id: "botania:terraform_rod" })
    event.remove({ id: "cuisinedelight:spatula_from_iron_ingot_stonecutting" })
    event.remove({ id: "firmalife:barrel/yeast_starter" })
    event.remove({ id: "tfmg:stonecutting/steel_truss" })
    event.remove({ id: "create:crafting/kinetics/flywheel" })
    event.remove({ id: "mekanism:processing/osmium/ore/from_raw" })
    event.remove({ id: "mekanism:processing/iron/ore/deepslate_from_raw" })
    event.remove({ id: "mekanism:processing/redstone/to_ore" })
    event.remove({ id: "mekanism:processing/gold/ore/from_raw" })
    event.remove({ id: "mekanism:processing/lapis_lazuli/to_deepslate_ore" })
    event.remove({ id: "mekanism:processing/uranium/ore/deepslate_from_raw" })
    event.remove({ id: "mekanism:combining/packed_miud" })
    event.remove({ id: "mekanism:processing/uranium/ore/from_raw" })
    event.remove({ id: "mekanism:processing/fluorite/to_ore" })
    event.remove({ id: "mekanism:processing/redstone/ore/to_deepslate_ore" })
    event.remove({ id: "mekanism:processing/gold/ore/nether_from_raw" })
    event.remove({ id: "mekanism:processing/tin/ore/from_raw" })
    event.remove({ id: "mekanism:processing/copper/ore/deepslate_from_raw" })
    event.remove({ id: "mekanism:processing/emerald/to_deepslate_ore" })
    event.remove({ id: "mekanism:processing/tin/ore/deepslate_from_raw" })
    event.remove({ id: "mekanism:processing/lapis_lazuli/to_ore" })
    event.remove({ id: "mekanism:processing/gold/ore/deepslate_from_raw" })
    event.remove({ id: "mekanism:processing/lead/ore/deepslate_from_raw" })
    event.remove({ id: "mekanism:processing/iron/ore/from_raw" })
    event.remove({ id: "mekanism:processing/emerald/to_ore" })
    event.remove({ id: "mekanism:processing/coal/to_ore" })
    event.remove({ id: "mekanism:processing/coal/to_deepslate_ore" })
    event.remove({ id: "mekanism:processing/lead/ore/from_raw" })
    event.remove({ id: "mekanism:processing/copper/ore/from_raw" })
    event.remove({ id: "mekanism:processing/fluorite/to_deepslate_ore" })
    event.remove({ id: "mekanism:processing/quartz/to_ore" })
    event.remove({ id: "mekanism:processing/osmium/ore/deepslate_from_raw" })
    event.remove({ id: "mekanism:processing/diamond/to_deepslate_ore" })
    event.remove({ id: "mekanism:processing/diamond/to_ore" })
    event.remove({ id: "create:splashing/immersiveengineering/crushed_raw_lead" })
    event.remove({ id: "botania:conversions/terrasteel_from_nuggets" })
    event.remove({ id: "immersiveengineering:crafting/nugget_steel_to_ingot_steel" })
    event.remove({ id: "mekanism:processing/osmium/ingot/from_nuggets" })
    event.remove({ id: "mekanism:processing/bronze/ingot/from_nuggets" })
    event.remove({ id: "botania:conversions/manasteel_from_nuggets" })
    event.remove({ id: "immersiveengineering:crafting/nugget_nickel_to_ingot_nickel" })
    event.remove({ id: "mekanism:processing/tin/ingot/from_nuggets" })
    event.remove({ id: "immersiveengineering:crafting/nugget_lead_to_ingot_lead" })
    event.remove({ id: "create:splashing/mekanism/crushed_raw_uranium" })
    event.remove({ id: "create:smelting/ingot_uranium_compat_mekanism" })
    event.remove({ id: "mekanism:processing/uranium/ingot/from_nuggets" })
    event.remove({ id: "immersiveengineering:crafting/nugget_uranium_to_ingot_uranium" })
    event.remove({ id: "create:smelting/ingot_lead_compat_immersiveengineering" })
    event.remove({ id: "create:smelting/ingot_lead_compat_mekanism" })
    event.remove({ id: "create:smelting/ingot_uranium_compat_immersiveengineering" })
    event.remove({ id: "create:smelting/ingot_tin_compat_mekanism" })
    event.remove({ id: "create:smelting/ingot_nickel_compat_immersiveengineering" })
    event.remove({ id: "create:mixing/lava_from_cobble" })
    event.remove({ id: "tfmg:sequenced_assembly/heavy_plate" })
    event.remove({ id: "minecraft:tnt" })
    event.remove({ id: "tfc:crafting/fire_clay_block" })
    event.remove({ id: "create:crafting/materials/zinc_block_from_compacting" })
    for (let i = 0; i < tfc_ie_sandstone.length; i++) {
        event.remove({ id: "tfc_ie_addon:crusher/sandstone/" + tfc_ie_sandstone[i]})
    }
    event.remove({ id: "immersiveengineering:crusher/venus_sandstone" })
    event.remove({ id: "immersiveengineering:crusher/red_sandstone" })
    event.remove({ id: 'create:milling/large_fern' })
    event.remove({ id: 'create:milling/fern' })
    event.remove({ id: 'create:milling/tall_grass' })
    event.remove({ id: 'create:milling/grass' })


    event.remove({ id: 'woodencog:compacting/axe_head_mold' })
    event.remove({ id: 'woodencog:compacting/bowl_2' })
    event.remove({ id: 'woodencog:compacting/bowl_4' })
    event.remove({ id: 'woodencog:compacting/saw_blade_mold' })
    event.remove({ id: 'woodencog:compacting/scythe_blade_mold' })
    event.remove({ id: 'woodencog:compacting/knife_blade_mold' })
    event.remove({ id: 'woodencog:compacting/pan' })
    event.remove({ id: 'woodencog:compacting/javelin_head_mold' })
    event.remove({ id: 'woodencog:compacting/flower_pot' })
    event.remove({ id: 'woodencog:compacting/jug' })
    event.remove({ id: 'woodencog:compacting/vessel' })
    event.remove({ id: 'woodencog:compacting/shovel_head_mold' })
    event.remove({ id: 'woodencog:compacting/chisel_head_mold' })
    event.remove({ id: 'woodencog:compacting/large_vessel' })
    event.remove({ id: 'woodencog:compacting/spindle_head' })
    event.remove({ id: 'woodencog:compacting/mace_blade_mold' })
    event.remove({ id: 'woodencog:compacting/ingot_mold' })
    event.remove({ id: 'woodencog:compacting/pot' })
    event.remove({ id: 'woodencog:compacting/pickaxe_head_mold' })
    event.remove({ id: 'woodencog:compacting/hammer_head_mold' })
    event.remove({ id: 'woodencog:compacting/hoe_head_mold' })
    event.remove({ id: 'woodencog:compacting/sword_blade_mold' })
    event.remove({ id: 'woodencog:compacting/propick_head_mold' })


    //沉浸原油高压精炼配方修复
    event.remove({ id: 'immersivepetroleum:hydrotreater/lubricant_cracking' })
    event.remove({ id: 'immersivepetroleum:hydrotreater/pneumaticcraft_plastic' })
    event.remove({ id: 'immersivepetroleum:hydrotreater/naphtha_cracking' })
    event.remove({ id: 'immersivepetroleum:hydrotreater/sulfur_recovery' })



})
//移除心晶力晶
LootJS.modifiers((event) => {
    event.removeGlobalModifier("scalinghealth:loot_modifiers/hostile")
    event.removeGlobalModifier("scalinghealth:loot_modifiers/peaceful")
    event.removeGlobalModifier("@scalinghealth")
})
//添加配方
ServerEvents.recipes(event => {
    event.shapeless(
        Item.of("minecraft:paper"),
        ['kubejs:paper_curtain_b']
    ).replaceIngredient({ item: 'kubejs:paper_curtain_b' }, "kubejs:paper_curtain").id("kubejs:paper_curtain_b_to_paper")
    //玻璃模具
    event.shapeless(
        "kubejs:raw_silica_glass_bottle_mold",
        ['tfc:silica_glass_bottle', 'minecraft:clay_ball']
    ).keepIngredient({ item: 'tfc:silica_glass_bottle' })
    event.shapeless(
        "kubejs:raw_empty_jar_mold",
        ['tfc:empty_jar', 'minecraft:clay_ball']
    ).keepIngredient({ item: 'tfc:empty_jar' })
    event.shapeless(
        "kubejs:raw_lens_mold",
        ['tfc:lens', 'minecraft:clay_ball']
    ).keepIngredient({ item: 'tfc:lens' })
    event.shapeless(
        "kubejs:raw_wine_glass_mold",
        ['firmalife:wine_glass', 'minecraft:clay_ball']
    ).keepIngredient({ item: 'firmalife:wine_glass' })

    event.shapeless(
        Item.of("tfc:silica_glass_bottle"),
        ['kubejs:full_silica_glass_bottle_mold']
    ).replaceIngredient({ item: 'kubejs:full_silica_glass_bottle_mold' }, 'kubejs:silica_glass_bottle_mold').id("kubejs:full_silica_glass_bottle_mold")
    event.shapeless(
        Item.of("tfc:empty_jar"),
        ['kubejs:full_empty_jar_mold']
    ).replaceIngredient({ item: 'kubejs:full_empty_jar_mold' }, 'kubejs:empty_jar_mold').id("kubejs:full_empty_jar_mold")
    event.shapeless(
        Item.of("tfc:lens"),
        ['kubejs:full_lens_mold']
    ).replaceIngredient({ item: 'kubejs:full_lens_mold' }, 'kubejs:lens_mold').id("kubejs:full_lens_mold")
    event.shapeless(
        Item.of("firmalife:wine_glass"),
        ['kubejs:full_wine_glass_mold']
    ).replaceIngredient({ item: 'kubejs:full_wine_glass_mold' }, 'kubejs:wine_glass_mold').id("kubejs:full_wine_glass_mold")
})



