ServerEvents.recipes(event => {
    event.remove({id: 'occultism:crafting/golden_sacrificial_bowl'})
    event.remove({id: 'occultism:crafting/storage_controller'})
    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/spirit_attuned_gem'})
    event.remove({id: 'ars_ocultas:spirit_attuned_gem'})
})

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')

    //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')
    
    //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/emerald"
    },
    "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",
  "#forge:storage_blocks/vibrant_alloy",
  "#forge:ingots/fireite",
],
'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",
  "#forge:storage_blocks/lumium",
  "eidolon:crimson_gem",
  "occultism:spirit_attuned_gem",
  "occultism:spirit_attuned_gem",
],
'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/cyanite",
  "industrialforegoing:machine_frame_advanced",
  "#forge:storage_blocks/cyanite",
],
'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/ridiculite",
  "mekanism:steel_casing",
  "#forge:storage_blocks/ridiculite",
],
'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', 'immersiveengineering:concrete')
})