ServerEvents.recipes(event => {
    event.remove({output: 'eidolon:codex'})
    event.remove({output: 'eidolon:pewter_inlay'})
    event.remove({output: 'eidolon:worktable'})
    event.remove({output: 'eidolon:necrotic_focus'})
    event.remove({output: 'eidolon:gold_inlay'})
    event.remove({id: 'eidolon:arcane_gold_ingot_alchemy'})
})

ServerEvents.recipes(event => {
    //Ars Ecclesia
    event.custom({
        "type": "tconstruct:casting_table",
        "cast": {
            "item": "minecraft:writable_book"
        },
        "cast_consumed": true,
        "cooling_time": 120,
        "fluid": {
            "amount": 1000,
            "fluid": "hexerei:blood_fluid"
        },
        "result": "eidolon:codex"
    }).id('eidolon:codex')

    //Pewter Inlay
    event.shaped('eidolon:pewter_inlay',
    [' 1 ','1 1',' 1 '], {
        1: 'eidolon:pewter_ingot'
    }).id('eidolon:pewter_inlay')

    //Gold Inlay
    event.shaped('eidolon:gold_inlay',
    [' 1 ','1 1',' 1 '], {
        1: 'eidolon:arcane_gold_ingot'
    }).id('eidolon:gold_inlay')

    //Arcane Gold Ingot from Nugget
    event.shaped('eidolon:arcane_gold_ingot',
    ['111','111','111'], {
        1: 'eidolon:arcane_gold_nugget'
    }).id('eidolon:arcane_gold_ingot_compress')

    //Magic Workbench
    event.shaped('eidolon:worktable',
    [' 1 ','222','333'], {
        1: 'eidolon:pewter_ingot',
        2: 'hexerei:infused_fabric',
        3: '#forge:treated_wood'
    }).id('eidolon:worktable')

    //Necrotic Focus
    event.shaped('eidolon:necrotic_focus',
    ['111','121','343'], {
        1: 'create:andesite_alloy',
        2: 'meetyourfight:caged_heart',
        3: '#forge:ingots/pewter',
        4: 'eidolon:gold_inlay'
    }).id('eidolon:necrotic_focus')

    //Gold Inlay
    event.custom({
        type: 'eidolon:crucible',
        steps: [
            { 
                items: [
                    {
                        item: 'minecraft:redstone'
                    },
                    {
                        item: 'minecraft:redstone'
                    },
                    {
                        item: 'eidolon:soul_shard'
                    }
                ]
            },
            { 
                items: [
                    {
                        tag: 'forge:ingots/brass'
                    },
                    {
                        tag: 'forge:ingots/brass'
                    }
                ]
            }
        ],
        result: {
            item: 'eidolon:arcane_gold_ingot',
            count: 2
        }
    }).id('eidolon:arcane_gold_ingot')
    
    //Essence of Death - Nature's Aura
    event.custom({
    type: 'naturesaura:altar',
        input:{
            item: 'eidolon:zombie_heart',
        },
        output: {
            item: 'eidolon:death_essence',
        },
        aura: 7500,
        time: 40,
    }).id('naturesaura:altar/death_essence')
    
    //Essence of Death - Nature's Aura Alt
    event.custom({
    type: 'naturesaura:altar',
        input:{
            item: 'reliquary:zombie_heart',
        },
        output: {
            item: 'eidolon:death_essence',
        },
        aura: 7500,
        time: 40,
    }).id('naturesaura:altar/death_essence_alt')
    
    //Soul Shard - Nature's Aura
    event.custom({
    type: 'naturesaura:altar',
        input:{
            tag: 'forge:bones',
        },
        output: {
            item: 'eidolon:soul_shard',
        },
        aura: 7500,
        time: 40,
    }).id('naturesaura:altar/soul_shard')
    
    //Shadow Gem Block - Occultism
	event.recipes.occultism.ritual(
		'eidolon:shadow_gem_block',
		[
            "minecraft:ghast_tear",
            "eidolon:soul_shard",
            "eidolon:soul_shard",
            "#forge:storage_blocks/coal",
            "eidolon:death_essence",
            "eidolon:death_essence",
            "eidolon:death_essence",
            "eidolon:death_essence",
            "#forge:storage_blocks/coal",
            "eidolon:soul_shard",
            "eidolon:soul_shard",
            "minecraft:ghast_tear",
		],
		'minecraft:diamond_block',
		'occultism:craft_djinni'
	).duration("20").id('occultism:ritual/shadow_gem_block')
  
    //Arcane Gold Ingot - Induction
    event.custom({
        "type": "thermal:smelter",
        "ingredients": [
          {
            "value": [
              {"tag": "forge:dusts/redstone"}
            ],
            "count": 2
          },
          {
            "value": [
              {"tag": "forge:ingots/brass"}
            ],
            "count": 2
          },
          {
            "value": [
              {"item": "eidolon:soul_shard"}
            ],
            "count": 1
          }
        ],
        "result": [
          {
            "tag": "forge:ingots/arcane_gold",
            "count": 2
          }
        ],
        "energy": 4000
      }).id('eidolon:induction/arcane_gold')
})