// This File has been authored by AllTheMods Staff, or a Community contributor for use in AllTheMods.
// As all AllTheMods packs are licensed under All Rights Reserved, this file is not allowed to be used in any public packs not released by the AllTheMods Team, without explicit permission.

ServerEvents.recipes((allthemods) => {
  // Dragon Soul
  if (
    Platform.isLoaded("apothic_enchanting") &&
    Platform.isLoaded("occultism") &&
    Platform.isLoaded("productivetrees") &&
    Platform.isLoaded("hostilenetworks") &&
    Platform.isLoaded("cataclysm") &&
    Platform.isLoaded("justdirethings")
  ) {
    allthemods
      .shaped("allthetweaks:dragon_soul", ["CDA", "SNI", "BGE"], {
        C: "apothic_enchanting:infused_breath",
        D: "occultism:soul_gem",
        A: Ingredient.of('justdirethings:creaturecatcher[justdirethings:entitytype="occultism:dragon_familiar"]').or(
          "occultism:spawn_egg/familiar_dragon"
        ),
        S: "productivetrees:socotra_dragon_sapling",
        N: [
          'hostilenetworks:data_model[hostilenetworks:data_model="hostilenetworks:ender_dragon",hostilenetworks:data=1255]',
          'hostilenetworks:data_model[hostilenetworks:data_model="hostilenetworks:ender_dragon",hostilenetworks:data=1254]'
        ],
        I: "allthemodium:piglich_heart_block",
        B: 'productivebees:spawn_egg_configurable_bee[entity_data={id:"productivebees:configurable_bee",type:"productivebees:soul_lava"}]',
        G: "cataclysm:abyssal_sacrifice",
        E: Platform.isLoaded("eternal_starlight")
          ? "eternal_starlight:chain_of_souls"
          : 'ftbquests:missing_item[ftbquests:missing_item="eternal_starlight:chain_of_souls"]'
      })
      .id("allthemods:allthetweaks/dragon_soul")
  }

  if (
    Platform.isLoaded("mekanism") &&
    Platform.isLoaded("ae2") &&
    (Platform.isLoaded("megacells") || Platform.isLoaded("modern_industrialization")) &&
    Platform.isLoaded("pneumaticcraft") &&
    Platform.isLoaded("ironfurnaces") &&
    Platform.isLoaded("irons_spellbooks")
  ) {
    // Improbable Probability Device
    allthemods
      .shaped("allthetweaks:improbable_probability_device", ["ABA", "CGC", "FDF"], {
        A: "mekanism:pellet_antimatter",
        B: "ae2:singularity",
        C: Ingredient.of(["megacells:portable_item_cell_256m", "modern_industrialization:blastproof_casing"]),
        D: "pneumaticcraft:aerial_interface",
        F: "ironfurnaces:million_furnace",
        G: "irons_spellbooks:lightning_upgrade_orb"
      })
      .id("allthemods:allthetweaks/improbable_probability_device")
  }

  if (Platform.isLoaded("allthecompressed")) {
    // Dimensional Seed Recipe
    allthemods
      .shaped("allthetweaks:dimensional_seed", ["ABC", "DEF", "GHI"], {
        A: "allthecompressed:netherrack_6x",
        B: "allthecompressed:dirt_6x",
        C: "allthecompressed:obsidian_5x",
        D: "allthetweaks:mini_exit",
        E: "allthetweaks:mini_nether",
        F: "allthetweaks:mini_end",
        G: "allthecompressed:end_stone_5x",
        H: "allthecompressed:emerald_block_4x",
        I: "allthecompressed:diamond_block_4x"
      })
      .id("allthemods:allthetweaks/dimensional_seed")
  }

  if (
    Platform.isLoaded("productivebees") &&
    Platform.isLoaded("industrialforegoing") &&
    Platform.isLoaded("deeperdarker") &&
    Platform.isLoaded("generatorgalore") &&
    Platform.isLoaded("irons_spellbooks") &&
    Platform.isLoaded("mysticalagriculture") &&
    Platform.isLoaded("ars_nouveau") &&
    Platform.isLoaded("mysticalagradditions") &&
    Platform.isLoaded("apothic_attributes")
  ) {
    // Withers Compass
    allthemods
      .shaped("allthetweaks:withers_compass", ["ABC", "DEF", "GHI"], {
        A: 'productivebees:configurable_comb[productivebees:bee_type="productivebees:withered"]',
        B: "industrialforegoing:wither_builder",
        C: "deeperdarker:heart_of_the_deep",
        D: "generatorgalore:netherstar_generator_64x",
        E: 'irons_spellbooks:scroll[irons_spellbooks:spell_container={data:[{id:"irons_spellbooks:wither_skull",index:0,level:10,locked:1b}],maxSpells:1,mustEquip:0b,spellWheel:0b}]',
        F: "mysticalagriculture:witherproof_bricks",
        G: 'minecraft:tipped_arrow[potion_contents={potion:"apothic_attributes:long_wither"}]',
        H: "ars_nouveau:glyph_wither",
        I: "mysticalagradditions:nether_star_crux"
      })
      .id("allthemods:allthetweaks/withers_compass")
  }

  if (
    Platform.isLoaded("generatorgalore") &&
    Platform.isLoaded("ironfurnaces") &&
    Platform.isLoaded("bigreactors") &&
    (Platform.isLoaded("modern_industrialization") || Platform.isLoaded("create")) &&
    Platform.isLoaded("mysticalagradditions") &&
    Platform.isLoaded("forbidden_arcanus") &&
    Platform.isLoaded("mysticalagriculture") &&
    Platform.isLoaded("evilcraft")
  ) {
    // Philosopher's Fuel
    allthemods
      .shaped("allthetweaks:philosophers_fuel", ["ABC", "DEF", "GHI"], {
        A: "generatorgalore:ender_generator",
        B: "ironfurnaces:rainbow_coal",
        C: "bigreactors:insanite_block",
        D: Ingredient.of(["modern_industrialization:uranium_fuel_rod_quad", "create:blaze_burner"]),
        E: "mysticalagradditions:insanium_coal_block",
        F: "forbidden_arcanus:smelter_prism",
        G: "mysticalagriculture:awakened_supremium_ingot_block",
        H: "generatorgalore:magmatic_generator_64x",
        I: 'evilcraft:dark_tank[cyclopscore:fluid_content={amount:16000,id:"justdirethings:refined_t4_fluid_source"}]'
      })
      .id("allthemods:allthetweaks/philosophers_fuel")
  }

  if (
    Platform.isLoaded("powah") &&
    Platform.isLoaded("ae2wtlib") &&
    Platform.isLoaded("mekanism") &&
    (Platform.isLoaded("modern_industrialization") || Platform.isLoaded("create")) &&
    Platform.isLoaded("immersiveengineering") &&
    Platform.isLoaded("advanced_ae") &&
    Platform.isLoaded("aeinfinitybooster")
  ) {
    // Nexium Emitter
    allthemods
      .shaped("allthetweaks:nexium_emitter", ["A B", " CF", "GED"], {
        A: "powah:player_transmitter_nitro",
        B: "ae2wtlib:wireless_universal_terminal[ae2wtlib:has_ex_pattern_access_terminal={},ae2wtlib:has_pattern_encoding_terminal={},ae2wtlib:has_crafting_terminal={},ae2wtlib:has_pattern_access_terminal={},ae2:stored_energy=6400000.0d]",
        F: [Item.of("mekanism:module_gravitational_modulating_unit")],
        D: Ingredient.of(["modern_industrialization:large_advanced_motor", "create:mechanical_arm"]),
        E: "immersiveengineering:tesla_coil",
        C: "advanced_ae:quantum_multi_threader",
        G: "aeinfinitybooster:infinity_card"
      })
      .id("allthemods:allthetweaks/nexium_emitter")
  }

  if (
    Platform.isLoaded("forbidden_arcanus") &&
    Platform.isLoaded("evilcraft") &&
    Platform.isLoaded("stevescarts") &&
    Platform.isLoaded("cataclysm") &&
    Platform.isLoaded("twilightforest")
  ) {
    // Oblivion Shard
    allthemods
      .shaped("allthetweaks:oblivion_shard", ["DAB", "ECF", "BGD"], {
        A: "forbidden_arcanus:eternal_stella",
        C: 'evilcraft:mace_of_destruction[cyclopscore:fluid_content={amount:4000,id:"evilcraft:blood"}]',
        B: "evilcraft:piercing_vengeance_focus",
        D: "stevescarts:module_galgadorian_drill",
        E: "cataclysm:meat_shredder",
        G: "twilightforest:snow_queen_trophy",
        F: "cataclysm:void_forge"
      })
      .id("allthemods:allthetweaks/oblivion_shard")
  }

  if (
    Platform.isLoaded("oritech") &&
    Platform.isLoaded("ae2") &&
    Platform.isLoaded("pneumaticcraft") &&
    Platform.isLoaded("justdirethings") &&
    Platform.isLoaded("pocketstorage") &&
    Platform.isLoaded("occultism") &&
    Platform.isLoaded("rootsclassic") &&
    Platform.isLoaded("industrialforegoing") &&
    Platform.isLoaded("evilcraft")
  ) {
    // Pulsating Black Hole
    allthemods
      .shaped("allthetweaks:pulsating_black_hole", ["ABC", "DEF", "GHI"], {
        A: "oritech:nuke",
        B: "ae2:quantum_ring",
        C: "pneumaticcraft:micromissiles",
        D: "justdirethings:paradoxmachine",
        E: "pocketstorage:psu_4",
        F: "occultism:stable_wormhole",
        G: "rootsclassic:crystal_staff",
        H: "industrialforegoing:mycelial_explosive",
        I: "evilcraft:lightning_bomb"
      })
      .id("allthemods:pressure/allthetweaks/pulsating_black_hole")
  }

  if (Platform.isLoaded("mysticalagradditions")) {
    // Creative Essence
    allthemods
      .shaped("mysticalagradditions:creative_essence", ["CAC", "ABA", "CAC"], {
        A: "mysticalagradditions:insanium_block",
        C: "mysticalagradditions:insanium_gemstone_block",
        B: "mysticalagriculture:master_infusion_crystal"
      })
      .id("allthemods:allthetweaks/creative_essence")
  }
})

// This File has been authored by AllTheMods Staff, or a Community contributor for use in AllTheMods.
// As all AllTheMods packs are licensed under All Rights Reserved, this file is not allowed to be used in any public packs not released by the AllTheMods Team, without explicit permission.
