ServerEvents.recipes(event => {
    event.remove({id: 'voidminers:rubetine'})
    event.remove({id: 'voidminers:frame_base'})
    event.remove({id: 'voidminers:structure_panel'})
    event.remove({id: 'voidminers:null_modifier'})
    event.remove({id: 'voidminers:rubetine_miner'})
    event.remove({id: 'voidminers:aurantium_miner'})
    event.remove({id: 'voidminers:citrinetine_miner'})
    event.remove({id: 'voidminers:verdium_miner'})
    event.remove({id: 'voidminers:azurine_miner'})
    event.remove({id: 'voidminers:caerium_miner'})
    event.remove({id: 'voidminers:amethystine_miner'})
    event.remove({id: 'voidminers:rosarium_miner'})
    event.remove({id: 'voidminers:ultimate_miner'})
    event.remove({id: 'voidminers:ultimate_block'})
})

ServerEvents.recipes(event => {
  //Rubetine
  event.shaped('2x voidminers:rubetine',
  ['121','232','121'], {
      1: 'minecraft:redstone',
      2: 'minecraft:blaze_powder',
      3: 'enderio:grains_of_infinity'
  }).id('voidminers:rubetine')

  //Frame Base
  event.shaped('voidminers:frame_base',
  ['121','232','121'], {
      1: '#forge:ingots/electrum',
      2: '#forge:ingots/brass',
      3: 'voidminers:rubetine'
  }).id('voidminers:frame_base')

  //Structure Panel
  event.shaped('voidminers:structure_panel',
    ['121','232','121'], {
        2: '#forge:nuggets/electrum',
        1: '#forge:ingots/brass',
        3: 'voidminers:rubetine'
    }).id('voidminers:structure_panel')

  //Null Modifier
  event.shaped('voidminers:null_modifier',
    ['121','232','121'], {
        1: 'minecraft:obsidian',
        2: '#forge:ingots/brass',
        3: 'voidminers:rubetine_block'
    }).id('voidminers:null_modifier')

  //Rubetine Miner - 1
  event.shaped('voidminers:rubetine_miner',
    ['111','121','343'], {
        1: '#forge:glass',
        2: 'create:precision_mechanism',
        3: 'voidminers:rubetine_block',
        4: 'minecraft:obsidian'
    }).id('voidminers:rubetine_miner')

  //Aurantium Miner - 2
  event.shaped('voidminers:aurantium_miner',
    ['111','121','343'], {
        1: '#forge:glass',
        2: 'enderio:void_chassis',
        3: 'voidminers:aurantium_block',
        4: 'voidminers:rubetine_miner'
    }).id('voidminers:aurantium_miner')

  //Citrinetine Miner - 3
  event.shaped('voidminers:citrinetine_miner',
    ['111','121','343'], {
      1: '#forge:glass',
      2: 'ars_technica:calibrated_precision_mechanism',
      3: 'voidminers:citrinetine_block',
      4: 'voidminers:aurantium_miner'
    }).id('voidminers:citrinetine_miner')

  //Verdium Miner - 4
  event.shaped('voidminers:verdium_miner',
    ['111','121','343'], {
      1: '#forge:glass',
      2: 'actuallyadditions:empowered_emeradic_crystal_block',
      3: 'voidminers:verdium_block',
      4: 'voidminers:citrinetine_miner'
    }).id('voidminers:verdium_miner')

  //Azurine Miner - 5
  event.shaped('voidminers:azurine_miner',
    ['111','121','343'], {
      1: '#forge:glass',
      2: 'minecraft:dragon_head',
      3: 'voidminers:azurine_block',
      4: 'voidminers:verdium_miner'
    }).id('voidminers:azurine_miner')

  //Caerium Miner - 6
  event.shaped('voidminers:caerium_miner',
    ['111','121','343'], {
      1: '#forge:glass',
      2: 'thermal:machine_frame',
      3: 'voidminers:caerium_block',
      4: 'voidminers:azurine_miner'
    }).id('voidminers:caerium_miner')

  //Amethystine Miner - 7
  event.shaped('voidminers:amethystine_miner',
    ['111','121','343'], {
      1: '#forge:glass',
      2: '#forge:ingots/gaia',
      3: 'voidminers:amethystine_block',
      4: 'voidminers:caerium_miner'
    }).id('voidminers:amethystine_miner')

  //Rosarium Miner - 8
  event.shaped('voidminers:rosarium_miner',
    ['111','121','343'], {
      1: '#forge:glass',
      2: 'draconicevolution:chaotic_core',
      3: 'voidminers:rosarium_block',
      4: 'voidminers:amethystine_miner'
    }).id('voidminers:rosarium_miner')

  //Ultimate Miner - 9
  event.shaped('voidminers:ultimate_miner',
    ['111','232','424'], {
      1: '#forge:glass',
      2: 'voidminers:rosarium_miner',
      3: 'voidminers:ultimate_stellar_core',
      4: 'voidminers:ultimate_block'
    }).id('voidminers:ultimate_miner')

  //Ultimate Block
  event.shaped('voidminers:ultimate_block',
    ['111','121','111'], {
      1: 'voidminers:rosarium_block',
      2: 'botania:life_essence'
    }).id('voidminers:ultimate_block')

  //Ores
  function addOres(name, weight, minTier) {
    event.custom({
      "type": "voidminers:miner",
      "dimension": 'minecraft:overworld',
      "minTier": minTier,
      "output": {
        "item": name,
        "weight": weight
      }
    })

    event.custom({
      "type": "voidminers:miner",
      "dimension": 'minecraft:the_end',
      "minTier": minTier,
      "output": {
        "item": name,
        "weight": weight
      }
    })

    event.custom({
      "type": "voidminers:miner",
      "dimension": 'minecraft:the_nether',
      "minTier": minTier,
      "output": {
        "item": name,
        "weight": weight
      }
    })
    
    event.custom({
      "type": "voidminers:miner",
      "dimension": 'javd:void',
      "minTier": minTier,
      "output": {
        "item": name,
        "weight": weight
      }
    })
    
    event.custom({
      "type": "voidminers:miner",
      "dimension": 'allthemodium:mining',
      "minTier": minTier,
      "output": {
        "item": name,
        "weight": weight
      }
    })
    
    event.custom({
      "type": "voidminers:miner",
      "dimension": 'allthemodium:the_beyond',
      "minTier": minTier,
      "output": {
        "item": name,
        "weight": weight
      }
    })
  }

  //Base Ores
  addOres('minecraft:coal_ore', 16.0, 1)
  addOres('minecraft:copper_ore', 14.0, 1)
  addOres('minecraft:diamond_ore', 8.0, 1)
  addOres('minecraft:emerald_ore', 6.0, 1)
  addOres('minecraft:gold_ore', 12.0, 1)
  addOres('minecraft:iron_ore', 14.0, 1)
  addOres('minecraft:lapis_ore', 10.0, 1)
  addOres('minecraft:redstone_ore', 10.0, 1)
  addOres('minecraft:nether_quartz_ore', 10.0, 1)
  addOres('minecraft:ancient_debris', 4.0, 1)
  addOres('minecraft:glowstone', 10.0, 1)

  //Void Gems
  addOres('voidminers:rubetine', 8.0, 1)
  addOres('voidminers:aurantium', 12.0, 1)
  addOres('voidminers:citrinetine', 12.0, 2)
  addOres('voidminers:verdium', 12.0, 3)
  addOres('voidminers:azurine', 12.0, 4)
  addOres('voidminers:caerium', 12.0, 5)
  addOres('voidminers:amethystine', 12.0, 6)
  addOres('voidminers:rosarium', 12.0, 7)

  //Modded Ores
  addOres('mysticalagriculture:prosperity_ore', 8.0, 1)
  addOres('mysticalagriculture:inferium_ore', 8.0, 1)
  addOres('alltheores:aluminum_ore', 14.0, 1)
  addOres('alltheores:lead_ore', 10.0, 1)
  addOres('alltheores:osmium_ore', 12.0, 1)
  addOres('alltheores:nickel_ore', 12.0, 1)
  addOres('alltheores:platinum_ore', 10.0, 1)
  addOres('alltheores:silver_ore', 10.0, 1)
  addOres('alltheores:tin_ore', 14.0, 1)
  addOres('alltheores:uranium_ore', 10.0, 1)
  addOres('alltheores:zinc_ore', 12.0, 1)
  addOres('alltheores:ruby_ore', 10.0, 1)
  addOres('alltheores:sapphire_ore', 10.0, 1)
  addOres('alltheores:peridot_ore', 10.0, 1)
  addOres('mekanism:fluorite_ore', 10.0, 1)
  addOres('elementalcraft:inert_crystal_ore', 8.0, 1)
  addOres('allthemodium:unobtainium_ore', 2.0, 6)
  addOres('allthemodium:vibranium_ore', 2.5, 4)
  addOres('allthemodium:allthemodium_ore', 3.0, 3)
  addOres('rftoolsbase:dimensionalshard_overworld', 6.0, 1)
  addOres('powah:uraninite_ore_poor', 12.0, 1)
  addOres('powah:uraninite_ore', 10.0, 4)
  addOres('powah:uraninite_ore_dense', 8.0, 5)
  addOres('thermal:apatite_ore', 12.0, 1)
  addOres('thermal:cinnabar_ore', 10.0, 1)
  addOres('thermal:niter_ore', 10.0, 1)
  addOres('thermal:sulfur_ore', 10.0, 1)
  addOres('evilcraft:dark_ore', 8.0, 1)
  addOres('occultism:iesnium_ore', 2.0, 6)
  addOres('silentgear:crimson_iron_ore', 8.0, 3)
  addOres('silentgear:azure_silver_ore', 8.0, 6)
  addOres('aether:ambrosium_ore', 8.0, 4)
  addOres('aether:zanite_ore', 8.0, 4)
  addOres('aether:gravitite_ore', 8.0, 4)
  addOres('forbidden_arcanus:arcane_crystal_ore', 8.0, 4)
  addOres('mekanism_extras:end_naquadah_ore', 8.0, 8)

  //Extras
  addOres('projecte:dark_matter', 1.0, 8)
  addOres('powah:dielectric_paste', 1.0, 8)
  addOres('mysticalagradditions:insanium_essence', 2.0, 7)
  addOres('mysticalagriculture:supremium_essence', 3.0, 6)
  addOres('mysticalagriculture:imperium_essence', 4.0, 5)
  addOres('mysticalagriculture:tertium_essence', 6.0, 4)
  addOres('mysticalagriculture:prudentium_essence', 7.0, 3)
  addOres('mysticalagriculture:inferium_essence', 8.0, 2)
  addOres('deep_aether:sterling_aercloud', 8.0, 4)
})