ServerEvents.recipes(event => {
  event.remove({id: 'occultism:crafting/golden_sacrificial_bowl'})
  event.remove({id: 'occultism:crafting/spirit_attuned_crystal'})
  event.remove({id: 'occultism:crafting/chalk_white_impure'})
  event.remove({id: 'occultism:crafting/chalk_gold_impure'})
  event.remove({id: 'occultism:crafting/chalk_purple_impure'})
  event.remove({id: 'occultism:crafting/chalk_red_impure'})
  event.remove({id: 'occultism:crafting/storage_controller'})
  event.remove({id: 'occultism:crafting/storage_remote_inert'})
  event.remove({id: 'occultism:crafting/otherstone_frame'})
  event.remove({id: 'occultism:spirit_fire/otherstone'})
  event.remove({id: 'occultism:ritual/craft_dimensional_matrix'})
  event.remove({id: 'occultism:ritual/craft_storage_controller_base'})
  event.remove({id: 'occultism:ritual/craft_stabilizer_tier1'})
  event.remove({id: 'occultism:ritual/craft_stabilizer_tier2'})
  event.remove({id: 'occultism:ritual/craft_stabilizer_tier3'})
  event.remove({id: 'occultism:ritual/craft_stabilizer_tier4'})
  event.remove({id: 'occultism:spirit_fire/chalk_red'})
  event.remove({id: 'occultism:spirit_fire/chalk_purple'})
  event.remove({id: 'occultism:spirit_fire/spirit_attuned_gem'})
  event.remove({id: 'ars_ocultas:spirit_attuned_gem'})
  event.remove({id: 'ars_ocultas:craft_stabilizer_tier4'})
  event.remove({id: 'occultism:spirit_fire/purified_ink'})
})

ServerEvents.recipes(event => {
    //Golden Sacrificial Bowl
    event.shaped('occultism:golden_sacrificial_bowl',
      ['121','232','121'], {
        1: '#forge:ingots/arcane_gold', 
        2: '#forge:ingots/soularium', 
        3: 'occultism:sacrificial_bowl'
    }).id('occultism:golden_sacrificial_bowl')

    //Spirit Attuned Crystal
    event.shaped('occultism:spirit_attuned_crystal',
      [' 1 ','121',' 1 '], {
        1: 'occultism:spirit_attuned_gem', 
        2: 'enderio:weather_crystal'
    }).id('occultism:spirit_attuned_crystal')

    //Impure White Chalk
    event.shaped('occultism:chalk_white_impure',
      ['151','767','151'], {
        1: 'hexerei:moon_dust',
        5: 'occultism:burnt_otherstone', 
        6: 'eidolon:shadow_gem',
        7: '#forge:dusts/ender_pearl'
    }).id('occultism:chalk_white_impure')

    //Impure Gold Chalk
    event.shaped('occultism:chalk_gold_impure',
      ['12 ','3  ','   '], {
        1: 'occultism:chalk_white_impure', 
        2: 'bloodmagic:reinforcedslate', 
        3: 'alexsmobs:komodo_spit'
    }).id('occultism:chalk_gold_impure')

    //Impure Purple Chalk
    event.shaped('occultism:chalk_purple_impure',
      ['12 ','3  ','   '], {
        1: 'occultism:chalk_gold_impure', 
        2: 'bloodmagic:demonslate', 
        3: 'alexsmobs:komodo_spit'
    }).id('occultism:chalk_purple_impure')

    //Impure Red Chalk
    event.shaped('occultism:chalk_red_impure',
      ['12 ','34 ','   '], {
        1: 'occultism:afrit_essence', 
        2: 'occultism:chalk_white_impure', 
        3: 'occultism:chalk_gold_impure', 
        4: 'occultism:chalk_purple_impure'
    }).id('occultism:chalk_red_impure')

    //Inert Storage Accessor
    event.shaped('occultism:storage_remote_inert',
      ['121','343','333'], {
        1: '#forge:ingots/allthemodium', 
        2: 'occultism:otherstone_tablet', 
        3: '#minecraft:buttons', 
        4: 'occultism:stable_wormhole'
    }).id('occultism:storage_remote_inert')

    //Storage Controller
    event.shaped('occultism:storage_controller',
      ['121',' 3 ','141'], {
        1: 'prettypipes:pipe', 
        2: 'occultism:dimensional_matrix', 
        3: 'rftoolsstorage:storage_scanner', 
        4: 'occultism:storage_controller_base'
    }).id('occultism:storage_controller')

    //Otherstone Frame
    event.shaped('occultism:otherstone_frame',
      ['111','121','111'], {
        1: 'occultism:otherstone', 
        2: 'entangled:block'
    }).id('occultism:otherstone_frame')
    
    //Dimensional Crystal Matrix
	event.recipes.occultism.ritual(
		'occultism:dimensional_matrix',
		[
      "allthecompressed:quartz_block_2x",
      "bloodmagic:etherealslate",
      "allthecompressed:quartz_block_2x",
      "allthecompressed:quartz_block_2x",
		],
		'occultism:book_of_binding_bound_djinni',
		'occultism:craft_djinni'
	).duration("40").id('occultism:dimensional_matrix')

  //Spirit Attuned Gem
  event.custom ({
    "type": "bloodmagic:altar",
    "input": {
      "tag": "forge:gems/shadow_gem"
    },
    "output": {
      "item": "occultism:spirit_attuned_gem"
    },
    "upgradeLevel": 3,
    "altarSyphon": 2500,
    "consumptionRate": 40,
    "drainRate": 100
  }).id('occultism:altar/spirit_attuned_gem')
    
  //Storage Actuator Base
event.recipes.occultism.ritual(
  'occultism:storage_controller_base',
  [
    "occultism:otherstone_pedestal",
    "#forge:ingots/vibrant_alloy",
    "#forge:ingots/vibrant_alloy",
    "#forge:ingots/vibrant_alloy",
  ],
  'occultism:book_of_binding_bound_foliot',
  'occultism:craft_foliot'
).duration("40").id('occultism:storage_controller_base')
    
//Tier 1 Stabilizer
event.recipes.occultism.ritual(
'occultism:storage_stabilizer_tier1',
[
  "occultism:otherstone_pedestal",
  "#forge:storage_blocks/vibrant_alloy",
  "kubejs:artifact_runestone_dark_inscribed_tiny",
  "#forge:storage_blocks/fiery",
],
'occultism:book_of_binding_bound_foliot',
'occultism:craft_foliot'
).duration("40").id('occultism:storage_stabilizer_tier1')
    
//Tier 2 Stabilizer
event.recipes.occultism.ritual(
'occultism:storage_stabilizer_tier2',
[
  "occultism:storage_stabilizer_tier1",
  "pneumaticcraft:printed_circuit_board",
  "eidolon:crimson_gem",
  "occultism:spirit_attuned_gem",
  "kubejs:artifact_runestone_dark_inscribed_small",
],
'occultism:book_of_binding_bound_djinni',
'occultism:craft_djinni'
).duration("40").id('occultism:storage_stabilizer_tier2')
    
//Tier 3 Stabilizer
event.recipes.occultism.ritual(
'occultism:storage_stabilizer_tier3',
[
  "occultism:storage_stabilizer_tier2",
  "#forge:storage_blocks/end_steel",
  "industrialforegoing:machine_frame_advanced",
  "kubejs:artifact_runestone_dark_inscribed_medium",
],
'occultism:book_of_binding_bound_afrit',
'occultism:craft_afrit'
).duration("40").id('occultism:storage_stabilizer_tier3')
    
//Tier 4 Stabilizer
event.recipes.occultism.ritual(
'occultism:storage_stabilizer_tier4',
[
  "occultism:storage_stabilizer_tier3",
  "#forge:storage_blocks/manyullyn",
  "industrialforegoing:machine_frame_supreme",
  "kubejs:artifact_runestone_dark_inscribed_large",
],
'occultism:book_of_binding_bound_afrit',
'occultism:craft_afrit'
).duration("40").id('occultism:storage_stabilizer_tier4')

//Crushed End Stone - Milling
event.custom({
  "type": "create:milling",
  "ingredients": [
      {
          "tag": 'forge:end_stones'
      }
  ],
  "processingTime": 50,
  "results": [
      {
          "count": 1,
          "tag": 'forge:dusts/end_stone'
      }
  ]
}).id('occultism:milling/crushed_end_stone')

  //Otherstone
  event.recipes.occultism.spirit_fire('occultism:otherstone', 'actuallyadditions:empowered_void_crystal_block')
})