ServerEvents.recipes((event) => {
  // =========================================
  // Ore/Gem Veins
  // =========================================
  event.recipes.createoreexcavation
    .vein('{"text": "Dimensional Dungeon Ore Vein"}', "thermal:raw_lead")
    .placement(2, 1, 2)
    .biomeWhitelist("dimdungeons:ore_veins")
    .id("createoreexcavation:dim_dungeon_ore_vein");
  event.recipes.createoreexcavation
    .vein('{"text": "Dimensional Dungeon Gem Vein"}', "thermal:ruby")
    .placement(3, 2, 47)
    .biomeWhitelist("dimdungeons:ore_veins")
    .id("createoreexcavation:dim_dungeon_gem_vein");
  event.recipes.createoreexcavation
    .vein('{"text": "Overworld Ore Vein"}', "minecraft:raw_iron")
    .placement(8, 4, 69)
    .biomeWhitelist("minecraft:is_overworld")
    .id("createoreexcavation:overworld_ore_vein");
  event.recipes.createoreexcavation
    .vein('{"text": "Overworld Gem Vein"}', "createoreexcavation:raw_diamond")
    .placement(8, 4, 420)
    .biomeWhitelist("minecraft:is_overworld")
    .id("createoreexcavation:overworld_gem_vein");
  event.recipes.createoreexcavation
    .vein('{"text": "Undergarden Ore Vein"}', "undergarden:raw_cloggrum")
    .placement(8, 4, 420)
    .biomeWhitelist("undergarden:is_undergarden")
    .id("createoreexcavation:undergarden_ore_vein");
  event.recipes.createoreexcavation
    .vein('{"text": "Moon Ore Vein"}', "ad_astra:raw_desh")
    .placement(8, 4, 187)
    .biomeWhitelist("ad_astra:moon_ore_veins")
    .id("createoreexcavation:moon_ore_vein");
  event.recipes.createoreexcavation
    .vein('{"text": "Mars Ore Vein"}', "ad_astra:raw_ostrum")
    .placement(8, 4, 69)
    .biomeWhitelist("ad_astra:mars_ore_veins")
    .id("createoreexcavation:mars_ore_vein");
  event.recipes.createoreexcavation
    .vein('{"text": "Venus Ore Vein"}', "ad_astra:raw_calorite")
    .placement(8, 4, 69420)
    .biomeWhitelist("ad_astra:venus_ore_veins")
    .id("createoreexcavation:venus_ore_vein");

  event.recipes.createoreexcavation
    .drilling(
      [
        Item.of("thermal:raw_lead").withChance(0.25),
        Item.of("thermal:raw_nickel").withChance(0.25),
        Item.of("thermal:raw_silver").withChance(0.25),
        Item.of("thermal:raw_tin").withChance(0.25),
      ],
      "createoreexcavation:dim_dungeon_ore_vein",
      500
    )
    .drill("createoreexcavation:steel_drill")
    .fluid("createdieselgenerators:lubricant 10")
    .priority(1)
    .id("createoreexcavation:dim_dungeon_ore_vein2");

  event.recipes.createoreexcavation
    .drilling(
      [
        Item.of("thermal:ruby").withChance(0.25),
        Item.of("thermal:sapphire").withChance(0.25),
        Item.of("thermal:sulfur").withChance(0.2),
        Item.of("thermal:niter").withChance(0.2),
        Item.of("thermal:apatite").withChance(0.05),
        Item.of("thermal:cinnabar").withChance(0.05),
      ],
      "createoreexcavation:dim_dungeon_gem_vein",
      500
    )
    .drill("createoreexcavation:steel_drill")
    .fluid("createdieselgenerators:lubricant 10")
    .id("createoreexcavation:dim_dungeon_gem_vein2");

  event.recipes.createoreexcavation
    .drilling(
      [
        Item.of("minecraft:raw_iron").withChance(0.3),
        Item.of("minecraft:raw_copper").withChance(0.3),
        Item.of("minecraft:raw_gold").withChance(0.2),
        Item.of("create:raw_zinc").withChance(0.2),
      ],
      "createoreexcavation:overworld_ore_vein",
      500
    )
    .drill("createoreexcavation:drill")
    .fluid("createdieselgenerators:lubricant 10")
    .id("createoreexcavation:overworld_ore_vein2");

  event.recipes.createoreexcavation
    .drilling(
      [
        Item.of("minecraft:coal").withChance(0.35),
        Item.of("createoreexcavation:raw_diamond").withChance(0.15),
        Item.of("createoreexcavation:raw_emerald").withChance(0.15),
        Item.of("createoreexcavation:raw_redstone").withChance(0.2),
        Item.of("minecraft:lapis_lazuli").withChance(0.15),
      ],
      "createoreexcavation:overworld_gem_vein",
      500
    )
    .drill("createoreexcavation:diamond_drill")
    .fluid("createdieselgenerators:lubricant 10")
    .priority(1)
    .id("createoreexcavation:overworld_gem_vein2");

  event.recipes.createoreexcavation
    .drilling(
      [
        Item.of("undergarden:raw_cloggrum").withChance(0.3),
        Item.of("undergarden:raw_froststeel").withChance(0.3),
        Item.of("undergarden:utheric_shard").withChance(0.2),
        Item.of("undergarden:regalium_crystal").withChance(0.1),
        Item.of("undergarden:forgotten_nugget").withChance(0.1),
      ],
      "createoreexcavation:undergarden_ore_vein",
      500
    )
    .drill("createoreexcavation:forgotten_drill")
    .fluid("createdieselgenerators:lubricant 10")
    .id("createoreexcavation:undergarden_ore_vein2");

  event.recipes.createoreexcavation
    .drilling(
      [
        Item.of("ad_astra:raw_desh").withChance(0.3),
        Item.of("minecraft:raw_iron").withChance(0.3),
        Item.of("ad_astra:cheese").withChance(0.2),
        Item.of("ad_astra:ice_shard").withChance(0.2),
      ],
      "createoreexcavation:moon_ore_vein",
      500
    )
    .drill("createoreexcavation:desh_drill")
    .fluid("createdieselgenerators:lubricant 10")
    .id("createoreexcavation:moon_ore_vein2");

  event.recipes.createoreexcavation
    .drilling(
      [
        Item.of("ad_astra:raw_ostrum").withChance(0.3),
        Item.of("minecraft:raw_iron").withChance(0.3),
        Item.of("createoreexcavation:raw_diamond").withChance(0.2),
        Item.of("ad_astra:ice_shard").withChance(0.2),
      ],
      "createoreexcavation:mars_ore_vein",
      500
    )
    .drill("createoreexcavation:ostrum_drill")
    .fluid("createdieselgenerators:lubricant 10")
    .id("createoreexcavation:mars_ore_vein2");

  event.recipes.createoreexcavation
    .drilling(
      [
        Item.of("ad_astra:raw_calorite").withChance(0.3),
        Item.of("minecraft:coal").withChance(0.3),
        Item.of("minecraft:raw_iron").withChance(0.2),
        Item.of("createoreexcavation:raw_diamond").withChance(0.2),
      ],
      "createoreexcavation:venus_ore_vein",
      500
    )
    .drill("createoreexcavation:calorite_drill")
    .fluid("createdieselgenerators:lubricant 10")
    .id("createoreexcavation:venus_ore_vein2");

  // =========================================
  // Fluid Veins
  // =========================================

  event.recipes.createoreexcavation
    .vein('{"text": "Honey Deposit"}', "the_bumblezone:honey_bucket")
    .placement(8, 4, 69)
    .biomeWhitelist("the_bumblezone:the_bumblezone")
    .id("createoreexcavation:bumblezone_honey_deposit");
  event.recipes.createoreexcavation
    .extracting(
      "the_bumblezone:honey_fluid_still 1000",
      "createoreexcavation:bumblezone_honey_deposit",
      40
    )
    .id("createoreexcavation:bumblezone_honey_deposit2");

  event.recipes.createoreexcavation
    .vein('{"text": "Milk Deposit"}', "minecraft:milk_bucket")
    .placement(8, 4, 69)
    .biomeWhitelist("ad_astra:moon_ore_veins")
    .id("createoreexcavation:moon_milk_deposit");
  event.recipes.createoreexcavation
    .extracting(
      "minecraft:milk 1000",
      "createoreexcavation:moon_milk_deposit",
      40
    )
    .id("createoreexcavation:moon_milk_deposit2");

  event.recipes.createoreexcavation
    .vein('{"text": "Acid Deposit"}', "alexscaves:acid_bucket")
    .placement(8, 4, 69)
    .biomeWhitelist("alexscaves:toxic_ore_veins")
    .id("createoreexcavation:toxic_acid_deposit");
  event.recipes.createoreexcavation
    .extracting(
      "alexscaves:acid 1000",
      "createoreexcavation:toxic_acid_deposit",
      40
    )
    .drill("createoreexcavation:forgotten_drill")
    .id("createoreexcavation:toxic_acid_deposit2");

  // =========================================
  // Drill Heads
  // =========================================

  // Regular Drill
  event.replaceInput(
    { id: "createoreexcavation:drill" }, 
    "#forge:ingots/iron", 
    "alexscaves:corrodent_teeth"
  );

  // Steel Drill
  event
    .shaped("createoreexcavation:steel_drill", [
        "AB ", 
        "BCB", 
        " BB"
    ], 
    {
        A: "#forge:storage_blocks/steel",
        B: "#forge:ingots/steel",
        C: "createoreexcavation:drill",
    })
    .id("createoreexcavation:steel_drill");

  // Forgotten Drill
  event
    .shaped("createoreexcavation:forgotten_drill", [
        "AB ", 
        "BCB", 
        " BB"
    ], 
    {
        A: "#forge:storage_blocks/forgotten_metal",
        B: "#forge:ingots/forgotten_metal",
        C: "createoreexcavation:drill",
    })
    .id("createoreexcavation:forgotten_drill");

  // Desh Drill
  event
    .shaped("createoreexcavation:desh_drill", [
        "AB ", 
        "BCB", 
        " BB"
    ], 
    {
        A: "#forge:storage_blocks/desh",
        B: "#forge:ingots/desh",
        C: "createoreexcavation:drill",
    })
    .id("createoreexcavation:desh_drill");

  // Ostrum Drill
  event
    .shaped("createoreexcavation:ostrum_drill", [
        "AB ", 
        "BCB", 
        " BB"
    ], 
    {
        A: "#forge:storage_blocks/ostrum",
        B: "#forge:ingots/ostrum",
        C: "createoreexcavation:drill",
    })
    .id("createoreexcavation:ostrum_drill");

  // Calorite Drill
  event
    .shaped("createoreexcavation:calorite_drill", [
        "AB ", 
        "BCB", 
        " BB"
    ], 
    {
        A: "#forge:storage_blocks/calorite",
        B: "#forge:ingots/calorite",
        C: "createoreexcavation:drill",
    })
    .id("createoreexcavation:calorite_drill");
});
