// If there are any errors, it's probably due to me misspelling an ID or putting in a non-existent one
ServerEvents.recipes(event => {
  
  // Extra recipe relating to variants
  
  // Cutting using a Stonecutter
  let stoneCrafting = (
    // Deal with stairs/slabs/walls/etc at some point
    base, 
    base_mossy, 
    polished, 
    polished_mossy, 
    polished_cracked, 
    bricks, 
    bricks_mossy, 
    bricks_cracked,
    tiles,
    tiles_mossy,
    tiles_cracked,
    chiseled,
    pillar,
    polished_slab,
    bricks_slab,
    mosstype
  ) => { 
    // Remove all previous recipes for those blocks
    // event.remove({ output: base})
    event.remove({ output: base_mossy})
    event.remove({ output: polished})
    event.remove({ output: polished_mossy})
    event.remove({ output: polished_cracked})
    event.remove({ output: bricks})
    event.remove({ output: bricks_mossy})
    event.remove({ output: bricks_cracked})
    event.remove({ output: tiles})
    event.remove({ output: tiles_mossy})
    event.remove({ output: tiles_cracked})
    event.remove({ output: chiseled})
    event.remove({ output: pillar})
    
    event.stonecutting(polished, base)
    event.stonecutting(bricks, base)
    event.stonecutting(tiles, base)
    event.stonecutting(chiseled, base)
    event.stonecutting(pillar, base)
    
    event.stonecutting(bricks, polished)
    event.stonecutting(tiles, polished)
    event.stonecutting(chiseled, polished)
    event.stonecutting(pillar, polished)
    
    event.stonecutting(tiles, bricks)
    event.stonecutting(chiseled, bricks)
    
    event.shapeless(base_mossy, [base, mosstype])
    event.shapeless(polished_mossy, [polished, mosstype])
    event.shapeless(bricks_mossy, [bricks, mosstype])
    event.shapeless(tiles_mossy, [tiles, mosstype])
    
    event.smelting(polished_cracked, polished).xp(0.1)
    event.smelting(bricks_cracked, bricks).xp(0.1)
    event.smelting(tiles_cracked, tiles).xp(0.1)

    event.custom({
      "type": "clayworks:baking",
      "category": "blocks",
      "cookingtime": 100,
      "experience": 0.1,
      "ingredient": {"item": polished},
      "result": polished_cracked
    })
    event.custom({
      "type": "clayworks:baking",
      "category": "blocks",
      "cookingtime": 100,
      "experience": 0.1,
      "ingredient": {"item": bricks},
      "result": bricks_cracked
    })
    event.custom({
      "type": "clayworks:baking",
      "category": "blocks",
      "cookingtime": 100,
      "experience": 0.1,
      "ingredient": {"item": tiles},
      "result": tiles_cracked
    })
    
    event.shaped(pillar, [
      'S  ',
      'S  ',
      '   '
    ],{
      S: polished_slab
    })
    
    event.shaped(chiseled, [
      'S  ',
      'S  ',
      '   '
    ],{
      S: bricks_slab
    })
    
    event.shaped("4x "+polished, [
      'BB ',
      'BB ',
      '   '
    ],{
      B: base
    })
    
    event.shaped("4x "+bricks, [
      'BB ',
      'BB ',
      '   '
    ],{
      B: polished
    })
    
    event.shaped("4x "+tiles, [
      'BB ',
      'BB ',
      '   '
    ],{
      B: bricks
    })  
    
    
    
  }
  
  
  
  // Cutting ratios:
  // 1 for full block or wall
  // 2 for slab or stairs
  // 4 for anything else, e.g chain, door, trapdoor

  stoneCrafting(
    'minecraft:cobblestone', 
    'minecraft:mossy_cobblestone', 
    'quark:cobblestone_bricks', 
    'quark:mossy_cobblestone_bricks', 
    'kubejs:utility', // PLACEHOLDER
    'caverns_and_chasms:cobblestone_bricks', 
    'caverns_and_chasms:mossy_cobblestone_bricks', 
    'kubejs:utility', // PLACEHOLDER
    'caverns_and_chasms:cobblestone_tiles', 
    'caverns_and_chasms:mossy_cobblestone_tiles', 
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'quark:cobblestone_brick_slab',    
    'caverns_and_chasms:cobblestone_brick_slab',    
    '#forge:moss'
  )

  stoneCrafting(
    'minecraft:cobbled_deepslate', 
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'caverns_and_chasms:cobbled_deepslate_bricks', 
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'caverns_and_chasms:cobbled_deepslate_tiles', 
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'caverns_and_chasms:cobbled_deepslate_brick_slab',    
    'kubejs:utility', // PLACEHOLDER
  )

  stoneCrafting(
    'deep_aether:cobbled_aseterite', 
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER  
    'kubejs:utility', // PLACEHOLDER
  )
  
  stoneCrafting(
    'minecraft:stone', 
    'kubejs:utility', // PLACEHOLDER
    'kubejs:polished_stone', 
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'minecraft:stone_bricks', 
    'minecraft:mossy_stone_bricks', 
    'minecraft:cracked_stone_bricks',
    'supplementaries:stone_tile',
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'minecraft:chiseled_stone_bricks', 
    'kubejs:stone_pillar', 
    'kubejs:utility', // PLACEHOLDER
    'minecraft:stone_brick_slab',    
    '#forge:moss'
  )
  
  stoneCrafting(
    'minecraft:granite', 
    'kubejs:utility', // PLACEHOLDER
    'minecraft:polished_granite', 
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'quark:granite_bricks', 
    'kubejs:mossy_granite_bricks', 
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'quark:chiseled_granite_bricks', 
    'quark:granite_pillar', 
    'minecraft:polished_granite_slab',    
    'quark:granite_bricks_slab',    
    '#forge:moss'
  )
  
  
  stoneCrafting(
    'minecraft:diorite', 
    'kubejs:utility', // PLACEHOLDER
    'minecraft:polished_diorite', 
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'quark:diorite_bricks', 
    'kubejs:mossy_diorite_bricks', 
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'quark:chiseled_diorite_bricks', 
    'quark:diorite_pillar', 
    'minecraft:polished_diorite_slab',    
    'quark:diorite_bricks_slab',    
    '#forge:moss'
  )
  
  stoneCrafting(
    'minecraft:andesite', 
    'kubejs:utility', // PLACEHOLDER
    'minecraft:polished_andesite', 
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'quark:andesite_bricks', 
    'kubejs:mossy_andesite_bricks', 
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'quark:chiseled_andesite_bricks', 
    'quark:andesite_pillar', 
    'minecraft:polished_andesite_slab',    
    'quark:andesite_bricks_slab',    
    '#forge:moss'
  )
  
  stoneCrafting(
    'oreganized:glance', 
    'kubejs:utility', // PLACEHOLDER
    'oreganized:polished_glance', 
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'oreganized:glance_bricks', 
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'oreganized:chiseled_glance', 
    'kubejs:glance_pillar', 
    'oreganized:polished_glance_slab',    
    'oreganized:glance_brick_slab',    
    '#forge:moss'
  )

  stoneCrafting(
    'quark:limestone', 
    'kubejs:utility', // PLACEHOLDER
    'quark:polished_limestone', 
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'quark:limestone_bricks', 
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'quark:chiseled_limestone_bricks', 
    'quark:limestone_pillar', 
    'quark:polished_limestone_slab',    
    'quark:limestone_bricks_slab',    
    '#forge:moss'
  )

  stoneCrafting(
    'quark:jasper', 
    'kubejs:utility', // PLACEHOLDER
    'quark:polished_jasper', 
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'quark:jasper_bricks', 
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'quark:chiseled_jasper_bricks', 
    'quark:jasper_pillar', 
    'quark:polished_jasper_slab',    
    'quark:jasper_bricks_slab',    
    '#forge:moss'
  )

  stoneCrafting(
    'quark:shale', 
    'kubejs:utility', // PLACEHOLDER
    'quark:polished_shale', 
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'quark:shale_bricks', 
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'quark:chiseled_shale_bricks', 
    'quark:shale_pillar', 
    'quark:polished_shale_slab',    
    'quark:shale_bricks_slab',    
    '#forge:moss'
  )

  stoneCrafting(
    'quark:myalite', 
    'kubejs:utility', // PLACEHOLDER
    'quark:polished_myalite', 
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'quark:myalite_bricks', 
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'quark:chiseled_myalite_bricks', 
    'quark:myalite_pillar', 
    'quark:polished_myalite_slab',    
    'quark:myalite_bricks_slab',    
    'kubejs:utility', // PLACEHOLDER
  )

  stoneCrafting(
    'quark:permafrost', 
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'quark:permafrost_bricks', 
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'quark:permafrost_bricks_slab',    
    'kubejs:utility', // PLACEHOLDER
  )

  stoneCrafting(
    'minecraft:calcite', 
    'kubejs:utility', // PLACEHOLDER
    'caverns_and_chasms:polished_calcite', 
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'quark:calcite_bricks', 
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'quark:chiseled_calcite_bricks', 
    'quark:calcite_pillar', 
    'caverns_and_chasms:polished_calcite_slab',    
    'quark:calcite_bricks_slab',    
    'kubejs:utility', // PLACEHOLDER
  ) 

  stoneCrafting(
    'minecraft:dripstone_block', 
    'kubejs:utility', // PLACEHOLDER
    'quark:polished_dripstone', 
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'quark:dripstone_bricks', 
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'caverns_and_chasms:dripstone_shingles', 
    'kubejs:utility', // PLACEHOLDER
    'caverns_and_chasms:flooded_dripstone_shingles', 
    'quark:chiseled_dripstone_bricks', 
    'quark:dripstone_pillar', 
    'quark:polished_dripstone_slab',    
    'quark:dripstone_bricks_slab',    
    'kubejs:utility', // PLACEHOLDER
  ) 

  stoneCrafting(
    'minecraft:tuff', 
    'kubejs:utility', // PLACEHOLDER
    'quark:polished_tuff', 
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'quark:tuff_bricks', 
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'quark:chiseled_tuff_bricks', 
    'quark:tuff_pillar', 
    'quark:polished_tuff_slab',    
    'quark:tuff_bricks_slab',    
    'kubejs:utility', // PLACEHOLDER
  ) 
  
  stoneCrafting(
    'minecraft:deepslate', 
    'kubejs:utility', // PLACEHOLDER
    'minecraft:polished_deepslate', 
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'minecraft:deepslate_bricks', 
    'kubejs:utility', // PLACEHOLDER
    'minecraft:cracked_deepslate_bricks', 
    'minecraft:deepslate_tiles', 
    'kubejs:utility', // PLACEHOLDER
    'minecraft:cracked_deepslate_tiles', 
    'minecraft:chiseled_deepslate', 
    'kubejs:utility', // PLACEHOLDER
    'minecraft:polished_deepslate_slab',    
    'minecraft:deepslate_brick_slab',    
    'kubejs:utility', // PLACEHOLDER
  )

  // Should dirt be on this list?
/*  stoneCrafting(
    'minecraft:dirt', 
    'kubejs:utility', // PLACEHOLDER
    'quark:dirt_bricks', 
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'environmental:dirt_bricks', 
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'environmental:dirt_tiles', 
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'kubejs:utility', // PLACEHOLDER
    'quark:dirt_brickslate_slab',    
    'environmental:dirt_brick_slab', 
    'kubejs:utility', // PLACEHOLDER
  )*/
  
  
})