ServerEvents.recipes((event) => {
  // Milling
  event.remove({ type: "create:milling", input: "minecraft:gravel" });
  event.remove({ type: "create:milling", input: "minecraft:sand" });
  event.remove({ output: 'create:empty_blaze_burner' })
  event.remove({ output: 'create:blaze_burner' })
  event.remove({ output: 'create:mechanical_crafter' })
  event.remove({ output: 'create:deployer' })

  event.shaped('3x create:mechanical_crafter', [' W ', ' B ', ' C '], { B: 'create:brass_casing', C: 'minecraft:crafting_table', W: 'create:cogwheel' })
  event.shaped('create:deployer', [' S ', ' B ', ' H '], { S: 'create:shaft', B: 'create:brass_casing', H: 'create:brass_hand' })

  event.recipes.create.milling(
    [
      Item.of("create:crushed_raw_iron").withChance(0.25),
      Item.of("create:crushed_raw_copper").withChance(0.25),
      Item.of("create:crushed_raw_zinc").withChance(0.25),
      Item.of("minecraft:coal").withChance(0.35),
    ],
    "minecraft:gravel"
  );
  event.recipes.create.milling(
    [
      Item.of("minecraft:kelp").withChance(0.2),
      Item.of("minecraft:glowstone_dust").withChance(0.2),
      Item.of("exdeorum:dust").withChance(0.4),
    ],
    Item.of("minecraft:sand")
  );
  event.recipes.create.milling(
    [
      Item.of("minecraft:quartz").withChance(0.2),
      Item.of("minecraft:blaze_powder").withChance(0.2),
      Item.of("minecraft:magma_cream").withChance(0.2),
    ],
    Item.of("exdeorum:crushed_netherrack")
  );
  // Misc
  event.recipes.create
    .mixing(Fluid.of("create:honey", 250), [
      Item.of("minecraft:sugar", 4),
    ])
     .heated();

  // Molten Metals
  event.recipes.create
    .mixing(Fluid.of("tconstruct:molten_iron", 1000), [
      Item.of("minecraft:iron_ingot", 8),
    ])
    .heated();
  event.recipes.create
    .mixing(Fluid.of("tconstruct:molten_copper", 1000), [
      Item.of("minecraft:copper_ingot", 8),
    ])
    .heated();
  event.recipes.create
    .mixing(Fluid.of("tconstruct:molten_zinc", 1000), [
      Item.of("create:zinc_ingot", 8),
    ])
    .heated();
  event.recipes.create
    .mixing(Fluid.of("kubejs:molten_coal", 1000), [
      Item.of("minecraft:coal", 16),
    ])
    .heated();

  // Basic Core Assemblys

  event
    .custom({
      type: "create:sequenced_assembly",
      ingredient: { item: "kubejs:basic_resource_shell" },
      loops: 1,
      results: [{ item: "kubejs:iron_resource_core" }],
      sequence: [
        {
          type: "create:filling",
          ingredients: [
            { item: "kubejs:incomplete_basic" },
            { fluid: "tconstruct:molten_iron", amount: 500 },
          ],
          results: [{ item: "kubejs:incomplete_basic" }],
        },
        {
          type: "create:filling",
          ingredients: [
            { item: "kubejs:incomplete_basic" },
            { fluid: "tconstruct:molten_iron", amount: 500 },
          ],
          results: [{ item: "kubejs:incomplete_basic" }],
        },
        {
          type: "create:pressing",
          ingredients: [{ item: "kubejs:incomplete_basic" }],
          results: [{ item: "kubejs:incomplete_basic" }],
        },
      ],
      transitionalItem: { item: "kubejs:incomplete_basic" },
    })
    .id("kubejs:iron_resource_core");

  event
    .custom({
      type: "create:sequenced_assembly",
      ingredient: { item: "kubejs:basic_resource_shell" },
      loops: 1,
      results: [{ item: "kubejs:copper_resource_core" }],
      sequence: [
        {
          type: "create:filling",
          ingredients: [
            { item: "kubejs:incomplete_basic" },
            { fluid: "tconstruct:molten_copper", amount: 500 },
          ],
          results: [{ item: "kubejs:incomplete_basic" }],
        },
        {
          type: "create:filling",
          ingredients: [
            { item: "kubejs:incomplete_basic" },
            { fluid: "tconstruct:molten_copper", amount: 500 },
          ],
          results: [{ item: "kubejs:incomplete_basic" }],
        },
        {
          type: "create:pressing",
          ingredients: [{ item: "kubejs:incomplete_basic" }],
          results: [{ item: "kubejs:incomplete_basic" }],
        },
      ],
      transitionalItem: { item: "kubejs:incomplete_basic" },
    })
    .id("kubejs:copper_resource_core");

  event
    .custom({
      type: "create:sequenced_assembly",
      ingredient: { item: "kubejs:basic_resource_shell" },
      loops: 1,
      results: [{ item: "kubejs:coal_resource_core" }],
      sequence: [
        {
          type: "create:filling",
          ingredients: [
            { item: "kubejs:incomplete_basic" },
            { fluid: "kubejs:molten_coal", amount: 500 },
          ],
          results: [{ item: "kubejs:incomplete_basic" }],
        },
        {
          type: "create:filling",
          ingredients: [
            { item: "kubejs:incomplete_basic" },
            { fluid: "kubejs:molten_coal", amount: 500 },
          ],
          results: [{ item: "kubejs:incomplete_basic" }],
        },
        {
          type: "create:pressing",
          ingredients: [{ item: "kubejs:incomplete_basic" }],
          results: [{ item: "kubejs:incomplete_basic" }],
        },
      ],
      transitionalItem: { item: "kubejs:incomplete_basic" },
    })
    .id("kubejs:coal_resource_core");

  event
    .custom({
      type: "create:sequenced_assembly",
      ingredient: { item: "kubejs:basic_resource_shell" },
      loops: 1,
      results: [{ item: "kubejs:zinc_resource_core" }],
      sequence: [
        {
          type: "create:filling",
          ingredients: [
            { item: "kubejs:incomplete_basic" },
            { fluid: "tconstruct:molten_zinc", amount: 500 },
          ],
          results: [{ item: "kubejs:incomplete_basic" }],
        },
        {
          type: "create:filling",
          ingredients: [
            { item: "kubejs:incomplete_basic" },
            { fluid: "tconstruct:molten_zinc", amount: 500 },
          ],
          results: [{ item: "kubejs:incomplete_basic" }],
        },
        {
          type: "create:pressing",
          ingredients: [{ item: "kubejs:incomplete_basic" }],
          results: [{ item: "kubejs:incomplete_basic" }],
        },
      ],
      transitionalItem: { item: "kubejs:incomplete_basic" },
    })
    .id("kubejs:zinc_resource_core");

  event
    .custom({
      type: "create:sequenced_assembly",
      ingredient: { item: "kubejs:basic_resource_shell" },
      loops: 1,
      results: [{ item: "kubejs:basic_blob" }],
      sequence: [
        {
          type: "create:deploying",
          ingredients: [
            {
              item: "kubejs:incomplete_basic",
            },
            {
              item: "kubejs:iron_resource_core",
            },
          ],
          results: [
            {
              item: "kubejs:incomplete_basic",
            },
          ],
        },
        {
          type: "create:deploying",
          ingredients: [
            {
              item: "kubejs:incomplete_basic",
            },
            {
              item: "kubejs:copper_resource_core",
            },
          ],
          results: [
            {
              item: "kubejs:incomplete_basic",
            },
          ],
        },
        {
          type: "create:deploying",
          ingredients: [
            {
              item: "kubejs:incomplete_basic",
            },
            {
              item: "kubejs:coal_resource_core",
            },
          ],
          results: [
            {
              item: "kubejs:incomplete_basic",
            },
          ],
        },
        {
          type: "create:deploying",
          ingredients: [
            {
              item: "kubejs:incomplete_basic",
            },
            {
              item: "kubejs:zinc_resource_core",
            },
          ],
          results: [
            {
              item: "kubejs:incomplete_basic",
            },
          ],
        },
        {
          type: "create:pressing",
          ingredients: [{ item: "kubejs:incomplete_basic" }],
          results: [{ item: "kubejs:incomplete_basic" }],
        },
      ],
      transitionalItem: { item: "kubejs:incomplete_basic" },
    })
    .id("kubejs:basic_blob");

  event
    .custom({
      type: "create:sequenced_assembly",
      ingredient: { item: "kubejs:basic_blob" },
      loops: 10,
      results: [{ item: "kubejs:basic_shard" }],
      sequence: [
        {
          type: "create:pressing",
          ingredients: [{ item: "kubejs:incomplete_basic" }],
          results: [{ item: "kubejs:incomplete_basic" }],
        },
      ],
      transitionalItem: { item: "kubejs:incomplete_basic" },
    })
    .id("kubejs:basic_shard");

    // TIER 2
    event.recipes.create.crushing(
      [
        Item.of("minecraft:lapis_lazuli"),
        Item.of("create:crushed_raw_gold"),
        Item.of("minecraft:redstone"),
      ],
      "kubejs:basic_shard"
    );
    // Tier 3
    event.recipes.create.crushing([
      Item.of("thermal:tin_ingot"),
      Item.of("thermal:nickel_ingot"),
      Item.of("thermal:silver_ingot"),
      Item.of("thermal:lead_ingot"),
      Item.of("minecraft:diamond"),
    ],
    "kubejs:magic_shard"
  )
  
});
