ServerEvents.recipes(event => {
  event.remove({id: 'reliquary:alkahestry_tome'})
  event.remove({id: 'allthemodium:teleport_pad'})
  event.remove({id: 'laserio:logic_chip_raw'})
  event.remove({output: 'laserio:logic_chip'})
  event.remove({id: 'mob_grinding_utils:recipe_saw'})
  event.remove({id: 'travelanchors:travel_anchor'})
  event.remove({id: 'tiab:time_in_a_bottle'})
  event.remove({id: 'notenoughwands:wand_core'})
  event.remove({id: 'notenoughwands:advanced_wand_core'})
  event.remove({id: 'dimstorage:dim_wall'})
  event.remove({id: 'dimstorage:solid_dim_core'})
  event.remove({id: 'entangled:block'})
  event.remove({id: 'hyperbox:hyperbox'})
  event.remove({id: 'ironjetpacks:basic_coil'})
  event.remove({id: 'ironjetpacks:advanced_coil'})
  event.remove({id: 'ironjetpacks:elite_coil'})
  event.remove({id: 'ironjetpacks:ultimate_coil'})
  event.remove({id: 'angelring:diamond_ring'})
  event.remove({output: 'fluxnetworks:flux_dust'})
})

ServerEvents.recipes(event => {
  //Ring of Flight
  event.shaped('ringsofascension:ring_flight',
    ['121','232','121'], {
      1: 'advanced_ae:quantum_alloy',
      2: '#forge:ingots/terrasteel',
      3: 'angelring:resonant_angel_ring'
  }).id('ringsofascension:ring_flight')

  //Tome of Alkahestry
  event.shaped('reliquary:alkahestry_tome',
    ['121','365','141'], {
      1: 'reliquary:witherless_rose', 
      2: 'reliquary:glacial_staff',
      3: 'reliquary:mercy_cross',
      4: 'reliquary:harvest_rod',
      5: 'reliquary:hero_medallion',
      6: 'eidolon:codex'
  }).id('reliquary:alkahestry_tome')

  //eye of Ignis
  event.shapeless(
    Item.of('endrem:nether_eye'), // arg 1: output
    [ 
      'cataclysm_ut:lifefire'
    ]
  ).id('endrem:nether_eye')

  //Monstrosity's Eye
  event.shapeless(
    Item.of('endrem:lost_eye'), // arg 1: output
    [ 
      'cataclysm:monstrous_horn'
    ]
  ).id('endrem:lost_eye')

  //Harbinger's Eye
  event.shapeless(
    Item.of('endrem:cursed_eye'), // arg 1: output
    [ 
      'cataclysm:witherite_block'
    ]
  ).id('endrem:cursed_eye')

  //Travel Anchor
  event.shapeless(
    Item.of('travelanchors:travel_anchor'), // arg 1: output
    [ 
      'enderio:travel_anchor'
    ]
  ).id('travelanchors:travel_anchor')

  //Travel Anchor - Revert
  event.shapeless(
    Item.of('enderio:travel_anchor'), // arg 1: output
    [ 
      'travelanchors:travel_anchor'
    ]
  ).id('travelanchors:travel_anchor_revert')

  //Mob Masher
  event.shaped('mob_grinding_utils:saw',
    ['121','343','252'], {
      1: 'allthemodium:allthemodium_sword', 
      2: '#forge:ingots/vibranium',
      3: 'mob_grinding_utils:spikes',
      4: 'allthecompressed:redstone_block_2x',
      5: 'evilcraft:promise_tier_1'
  }).id('mob_grinding_utils:saw')

  //Basic Coil
  event.shaped('ironjetpacks:basic_coil',
    [' 12','131','21 '], {
      1: '#forge:ingots/steel', 
      2: '#forge:dusts/redstone',
      3: '#forge:rods/treated_wood'
  }).id('ironjetpacks:basic_coil')

  //Advanced Coil
  event.shaped('ironjetpacks:advanced_coil',
    [' 12','131','21 '], {
      1: '#forge:ingots/arcane_gold', 
      2: '#forge:dusts/redstone',
      3: 'ironjetpacks:basic_coil'
  }).id('ironjetpacks:advanced_coil')

  //Elite Coil
  event.shaped('ironjetpacks:elite_coil',
    [' 12','131','21 '], {
      1: '#forge:ingots/end_steel', 
      2: '#forge:dusts/redstone',
      3: 'ironjetpacks:advanced_coil'
  }).id('ironjetpacks:elite_coil')

  //Ultimate Coil
  event.shaped('ironjetpacks:ultimate_coil',
    [' 12','131','21 '], {
      1: '#forge:ingots/desh', 
      2: '#forge:dusts/redstone',
      3: 'ironjetpacks:elite_coil'
  }).id('ironjetpacks:ultimate_coil')

  //Diamond Ring
  event.shaped('angelring:diamond_ring',
    ['121','232','121'], {
      1: 'minecraft:ghast_tear', 
      2: '#forge:storage_blocks/diamond',
      3: Item.of('ironjetpacks:jetpack', {Id: 'ironjetpacks:emerald'}).weakNBT()
  }).id('angelring:diamond_ring')

  //Raw Logic Chip
  event.shaped('8x laserio:logic_chip_raw',
    ['121','343','121'], {
      1: '#forge:ingots/end_steel', 
      2: '#forge:ingots/energetic_alloy',
      3: '#forge:gems/amethyst',
      4: 'allthecompressed:quartz_block_1x'
  }).id('laserio:logic_chip_raw')

  //Time in a Bottle
  event.shaped('tiab:time_in_a_bottle',
    ['111','232','454'], {
      1: 'industrialforegoing:pink_slime_ingot', 
      2: '#forge:gems/shadow_gem',
      3: 'create:cuckoo_clock',
      4: 'allthecompressed:lapis_block_1x',
      5: 'minecraft:glass_bottle'
  }).id('tiab:time_in_a_bottle')

  //Logic Chip
  event.custom({
    "type": "pneumaticcraft:pressure_chamber", 
      "inputs": [
        {
          "type": "pneumaticcraft:stacked_item",
          "count": 1,
          "item": "laserio:logic_chip_raw"
        },
    ],
          "pressure": 1.5, 
          "results": [{"item": "laserio:logic_chip"}]
  }).id('laserio:pressure/logic_chip')

  //TelePad ATM
  event.custom({
    "type": "pneumaticcraft:pressure_chamber", 
      "inputs": [
        {
          "type": "pneumaticcraft:stacked_item",
          "count": 2,
          "tag": "forge:ingots/allthemodium"
        },
        {
          "type": "pneumaticcraft:stacked_item",
          "count": 2,
          "tag": "forge:ingots/vibranium"
        },
        {
          "type": "pneumaticcraft:stacked_item",
          "count": 2,
          "tag": "forge:ingots/unobtainium"
        },
        {
          "type": "pneumaticcraft:stacked_item",
          "count": 1,
          "item": "bloodmagic:etherealslate"
        },
    ],
          "pressure": 2.5, 
          "results": [{"item": "allthemodium:teleport_pad"}]
  }).id('allthemodium:pressure/teleport_pad')

  //Diamond Gear -> Allthemodium Gear
  event.replaceInput(
    { mod: 'industrialforegoing' }, // Arg 1: the filter
    '#forge:gears/diamond',            // Arg 2: the item to replace
    '#forge:gears/allthemodium'         // Arg 3: the item to replace it with
  )

  //Wand Core
  event.shaped('notenoughwands:wand_core',
  ['12 ','212',' 21'], {
    1: 'botania:blaze_block', 
    2: '#forge:ingots/swift_alloy'
  }).id('notenoughwands:wand_core')

  //Wand Core
  event.shaped('notenoughwands:advanced_wand_core',
  [' 1 ','232',' 4 '], {
    1: '#forge:storage_blocks/nether_star', 
    2: '#forge:ingots/allthemodium', 
    3: 'notenoughwands:wand_core', 
    4: '#forge:storage_blocks/fireite'
  }).id('notenoughwands:advanced_wand_core')

  //Acceleration Wand
  event.shaped('notenoughwands:acceleration_wand',
  ['12 ','23 ','  3'], {
    1: 'rats:rat_upgrade_time_manipulator',
    2: 'minecraft:redstone',
    3: 'notenoughwands:advanced_wand_core'
  }).id('notenoughwands:acceleration_wand')

  //Dimensional Wall
  event.shaped('4x dimstorage:dim_wall',
  ['121','232','121'], {
    1: '#forge:storage_blocks/compressed_iron', 
    2: 'minecraft:redstone_block', 
    3: 'minecraft:diamond_block'
  }).id('dimstorage:dim_wall')

  //Solid Dimensional Core
  event.shaped('dimstorage:solid_dim_core',
  ['111','121','111'], {
    1: '#forge:ingots/compressed_iron', 
    2: 'dimstorage:dim_core'
  }).id('dimstorage:solid_dim_core')

  //Entangled Block
  event.shaped('entangled:block',
  ['121','232','121'], {
    1: '#forge:storage_blocks/ender_pearls', 
    2: 'allthecompressed:obsidian_1x', 
    3: 'dimstorage:dimensional_chest'
  }).id('entangled:block')

  //Hyper Box
  event.shaped('hyperbox:hyperbox',
  ['121','232','121'], {
    1: 'naturesaura:end_city_finder', 
    2: 'allthecompressed:obsidian_1x', 
    3: 'entangled:block'
  }).id('hyperbox:hyperbox')

  //Flux Dust
  event.custom({
  "input": [
    {
      "tag": "forge:dusts/redstone"
    },
    {
      "tag": "forge:dusts/redstone"
    },
    {
      "tag": "forge:dusts/redstone"
    },
    {
      "tag": "forge:dusts/redstone"
    },
    {
      "tag": "forge:dusts/redstone"
    },
    {
      "tag": "forge:dusts/redstone"
    },
    {
      "tag": "forge:dusts/redstone"
    },
    {
      "tag": "forge:dusts/redstone"
    }
  ],
  "processingTime": 300,
  "output": {
    "item": "fluxnetworks:flux_dust",
    "count": 8
  },
  "inputFluid": "{FluidName:\"minecraft:lava\",Amount:1000}",
  "type": "industrialforegoing:dissolution_chamber"
  }).id('fluxnetworks:flux_dust')

  //Unob - Allthemodium Alloy Ingot
  event.recipes.powah.energizing(["#forge:ingots/allthemodium", "#forge:ingots/unobtainium"], "#forge:ingots/unobtainium_allthemodium_alloy", 250000).id(`allthemodium:unobtainium_allthemodium_alloy`)

  //Unob - Vibranium Alloy Ingot
  event.recipes.powah.energizing(["#forge:ingots/unobtainium", "#forge:ingots/vibranium"], "#forge:ingots/unobtainium_vibranium_alloy", 250000).id(`allthemodium:unobtainium_vibranium_alloy`)

  //Vibranium - Allthemodium Alloy Ingot
  event.recipes.powah.energizing(["#forge:ingots/allthemodium", "#forge:ingots/vibranium"], "#forge:ingots/vibranium_allthemodium_alloy", 250000).id(`allthemodium:vibranium_allthemodium_alloy`)

  //Red Heart Canister
  event.shaped('bhc:red_heart_canister',
  ['12 ','34 ','   '], {
    1: 'bhc:red_heart', 
    2: '#forge:bones/wither', 
    3: 'bhc:relic_apple', 
    4: 'bhc:canister'
  }).id('bhc:red_heart_canister')

  //Tiny Dark Runestone
  event.custom({
    "type": "create:pressing", "ingredients": [{"item": "forbidden_arcanus:darkstone","count": 1}],
    "results": [{"item": "kubejs:artifact_runestone_dark_tiny"}]
  }).id('create:pressing/tiny_dark_runestone')

  //Tiny Dark Runestone - Thermal Press
  event.custom({
    type: 'thermal:press',
    ingredient: 'forbidden_arcanus:darkstone',
    result: 'kubejs:artifact_runestone_dark_tiny',
    energy: 200
  }).id('thermal:press/tiny_dark_runestone')

  //Small Dark Runestone
  event.shapeless(
    Item.of('kubejs:artifact_runestone_dark_small'),
    [ 
      '2x kubejs:artifact_runestone_dark_tiny'
    ]
  ).id('impostor:dark_runestone_small')

  //Medium Dark Runestone
  event.shapeless(
    Item.of('kubejs:artifact_runestone_dark_medium'),
    [ 
      '2x kubejs:artifact_runestone_dark_small'
    ]
  ).id('impostor:dark_runestone_medium')

  //Large Dark Runestone
  event.shapeless(
    Item.of('kubejs:artifact_runestone_dark_large'),
    [ 
      '2x kubejs:artifact_runestone_dark_medium'
    ]
  ).id('impostor:dark_runestone_large')

  //Tiny Seeping Runestone
  event.custom({
    "type": "evilcraft:blood_infuser",
    "item": "kubejs:artifact_runestone_dark_tiny",
    "fluid": {
      "fluid": "evilcraft:blood",
      "amount": 100
    },
    "result": {
      "item": "kubejs:artifact_seeping_stone_tiny"
    },
    "duration": 10,
    "xp": 0.5,
    "tier": 0
  }).id('impostor:artifact_seeping_stone_tiny')

  //Small Seeping Runestone
  event.custom({
    "type": "evilcraft:blood_infuser",
    "item": "kubejs:artifact_runestone_dark_small",
    "fluid": {
      "fluid": "evilcraft:blood",
      "amount": 250
    },
    "result": {
      "item": "kubejs:artifact_seeping_stone_small"
    },
    "duration": 10,
    "xp": 0.5,
    "tier":0
  }).id('impostor:artifact_seeping_stone_small')

  //Medium Seeping Runestone
  event.custom({
    "type": "evilcraft:blood_infuser",
    "item": "kubejs:artifact_runestone_dark_medium",
    "fluid": {
      "fluid": "evilcraft:blood",
      "amount": 500
    },
    "result": {
      "item": "kubejs:artifact_seeping_stone_medium"
    },
    "duration": 10,
    "xp": 0.5,
    "tier": 0
  }).id('impostor:artifact_seeping_stone_medium')

  //Large Seeping Runestone
  event.custom({
    "type": "evilcraft:blood_infuser",
    "item": "kubejs:artifact_runestone_dark_large",
    "fluid": {
      "fluid": "evilcraft:blood",
      "amount": 1000
    },
    "result": {
      "item": "kubejs:artifact_seeping_stone_large"
    },
    "duration": 10,
    "xp": 0.5,
    "tier":0
  }).id('impostor:artifact_seeping_stone_large')

  //Tiny Inscribed Dark Runestone
  event.recipes.ars_nouveau.imbuement(
      "kubejs:artifact_seeping_stone_tiny", // input item
      "kubejs:artifact_runestone_dark_inscribed_tiny", // output
      100, // source cost
      []
  ).id('impostor:inscribed_dark_runestone_tiny')

  //Small Inscribed Dark Runestone
  event.recipes.ars_nouveau.imbuement(
      "kubejs:artifact_seeping_stone_small", // input item
      "kubejs:artifact_runestone_dark_inscribed_small", // output
      250, // source cost
      []
  ).id('impostor:inscribed_dark_runestone_small')

  //Medium Inscribed Dark Runestone
  event.recipes.ars_nouveau.imbuement(
      "kubejs:artifact_seeping_stone_medium", // input item
      "kubejs:artifact_runestone_dark_inscribed_medium", // output
      500, // source cost
      []
  ).id('impostor:inscribed_dark_runestone_medium')

  //Large Inscribed Dark Runestone
  event.recipes.ars_nouveau.imbuement(
      "kubejs:artifact_seeping_stone_large", // input item
      "kubejs:artifact_runestone_dark_inscribed_large", // output
      1000, // source cost
      []
  ).id('impostor:inscribed_dark_runestone_large')

  //Ancient Debris - Crushing Wheels
  event.recipes.createCrushing([
    'minecraft:netherite_scrap',
    Item.of('minecraft:ancient_debris').withChance(0.66)
  ], 'minecraft:ancient_debris')

  //All The Compressed Lumium Fix
  event.replaceInput(
    { mod: 'allthecompressed' },
    'allthecompressed:glowstone_block_1x',
    'allthecompressed:glowstone_1x' 
  )
  event.replaceInput(
    { mod: 'allthecompressed' }, // Arg 1: the filter
    'allthecompressed:glowstone_block_2x',            // Arg 2: the item to replace
    'allthecompressed:glowstone_2x'         // Arg 3: the item to replace it with
  )
  event.replaceInput(
    { mod: 'allthecompressed' }, // Arg 1: the filter
    'allthecompressed:glowstone_block_3x',            // Arg 2: the item to replace
    'allthecompressed:glowstone_3x'         // Arg 3: the item to replace it with
  )
  event.replaceInput(
    { mod: 'allthecompressed' }, // Arg 1: the filter
    'allthecompressed:glowstone_block_4x',            // Arg 2: the item to replace
    'allthecompressed:glowstone_4x'         // Arg 3: the item to replace it with
  )
  event.replaceInput(
    { mod: 'allthecompressed' }, // Arg 1: the filter
    'allthecompressed:glowstone_block_5x',            // Arg 2: the item to replace
    'allthecompressed:glowstone_5x'         // Arg 3: the item to replace it with
  )
  event.replaceInput(
    { mod: 'allthecompressed' }, // Arg 1: the filter
    'allthecompressed:glowstone_block_6x',            // Arg 2: the item to replace
    'allthecompressed:glowstone_6x'         // Arg 3: the item to replace it with
  )
  event.replaceInput(
    { mod: 'allthecompressed' }, // Arg 1: the filter
    'allthecompressed:glowstone_block_7x',            // Arg 2: the item to replace
    'allthecompressed:glowstone_7x'         // Arg 3: the item to replace it with
  )
  event.replaceInput(
    { mod: 'allthecompressed' }, // Arg 1: the filter
    'allthecompressed:glowstone_block_8x',            // Arg 2: the item to replace
    'allthecompressed:glowstone_8x'         // Arg 3: the item to replace it with
  )
  event.replaceInput(
    { mod: 'allthecompressed' }, // Arg 1: the filter
    'allthecompressed:glowstone_block_9x',            // Arg 2: the item to replace
    'allthecompressed:glowstone_9x'         // Arg 3: the item to replace it with
  )

  //Solidified Experience -> Essence of Knowledge (Magma Crucible)
  event.custom({
    "type": "thermal:crucible",
    "energy": 400,
    "ingredients": [
      {
        "count": 1,
        "item": "actuallyadditions:solidified_experience"
      }
    ],
    "result": [
      {
        "amount": 100,
        "fluid": "industrialforegoing:essence"
      }
    ]
  }).id('thermal:crucible/solidified_experience')

  //Emerald -> Obsidian Generator
  event.custom({
    "type": "minecraft:crafting_shaped",
    "pattern": [
      "III",
      "IGI",
      "IRI"
    ],
    "key": {
      "G": {
        "item": "generatorgalore:emerald_generator"
      },
      "I": {
        "item": "minecraft:obsidian"
      },
      "R": {
        "tag": "forge:storage_blocks/redstone"
      }
    },
    "result": {
      "item": "generatorgalore:obsidian_generator"
    }
  }).id('generatorgalore:generators/obsidian')

  //Emerald -> Obsidian Generator Upgrade
  event.custom({
    "type": "minecraft:crafting_shaped",
    "pattern": [
      "III",
      "IFI",
      "IRI"
    ],
    "key": {
      "F": {
        "item": "minecraft:item_frame"
      },
      "I": {
        "item": "minecraft:obsidian"
      },
      "R": {
        "tag": "forge:storage_blocks/redstone"
      }
    },
    "result": {
      "item": "generatorgalore:emerald_to_obsidian_upgrade"
    }
  }).id('generatorgalore:generators/emerald_to_obsidian_upgrade')

  //Obsidian -> Netherite Generator
  event.custom({
    "type": "minecraft:smithing_transform",
    "base": {
      "item": "generatorgalore:obsidian_generator"
    },
    "addition": {
      "tag": "forge:ingots/netherite"
    },
    "result": {
      "item": "generatorgalore:netherite_generator"
    },
    "template": {
      "item": "minecraft:netherite_upgrade_smithing_template"
    }
  }).id('generatorgalore:generators/netherite')

  //Obsidian -> Netherite Generator Upgrade
  event.custom({
    "type": "minecraft:smithing_transform",
    "base": {
      "item": "generatorgalore:emerald_to_obsidian_upgrade"
    },
    "addition": {
      "tag": "forge:ingots/netherite"
    },
    "result": {
      "item": "generatorgalore:obsidian_to_netherite_upgrade"
    },
    "template": {
      "item": "minecraft:netherite_upgrade_smithing_template"
    }
  }).id('generatorgalore:generators/obsidian_to_netherite_upgrade')

  //Fiery Ingot
  event.custom({
    "type": "minecraft:crafting_shapeless",
    "category": "misc",
    "ingredients": [
      {
        "tag": "twilightforest:fiery_vial"
      },
      {
        "tag": "forge:ingots/brass"
      }
    ],
    "result": {
      "item": "twilightforest:fiery_ingot"
    }
  }).id('twilightforest:equipment/fiery_ingot_crafting')
})