// These are all the recipe changes for the Reimagined Modpack. They'll be categorized by group.

// Opening recipe commands.

ServerEvents.recipes(event => {

// Andesite recipe

event.shapeless(
  Item.of('minecraft:andesite', 1), // arg 1: output
  [
    'minecraft:cobblestone',
    'minecraft:gravel', 	       // arg 2: the array of inputs
  ]
)
	
//Add recipe for nametags.

event.shaped(
  Item.of('minecraft:name_tag', 1), // arg 1: output
  [
    ' B ',
    ' B ', // arg 2: the shape (array of strings)
    ' A '
  ],
  {
    A: 'minecraft:paper',
	B: 'create:iron_sheet'
  }
)

// Smelt rotten flesh into leather.

event.smoking('minecraft:leather', 'minecraft:rotten_flesh').xp(0.15)

event.campfireCooking('minecraft:leather', 'minecraft:rotten_flesh', 0.15, 20)

// Recipe changes for tom's simple storage.

event.remove({ output: 'toms_storage:inventory_connector' })
event.remove({ output: 'toms_storage:crafting_terminal' })
event.remove({ output: 'toms_storage:storage_terminal' })

event.shaped(
  Item.of('toms_storage:inventory_connector', 1), // arg 1: output
  [
    'A B',
    ' C ', // arg 2: the shape (array of strings)
    'B A'
  ],
  {
    A: 'minecraft:copper_ingot',
    B: 'create:andesite_casing',  //arg 3: the mapping object
    C: 'minecraft:chest'
  }
)

event.shaped(
  Item.of('toms_storage:storage_terminal', 1), // arg 1: output
  [
    'A B',
    ' C ', // arg 2: the shape (array of strings)
    'B A'
  ],
  {
    A: 'create:andesite_alloy',
    B: 'minecraft:redstone',  //arg 3: the mapping object
    C: 'create:andesite_casing'
  }
)

event.shaped(
  Item.of('toms_storage:crafting_terminal', 1), // arg 1: output
  [
    'A B',
    ' C ', // arg 2: the shape (array of strings)
    'B A'
  ],
  {
    A: 'minecraft:copper_ingot',
    B: 'minecraft:crafting_table',  //arg 3: the mapping object
    C: 'toms_storage:storage_terminal'
  }
)
// Recipe changes for backpacked

event.shaped(
  Item.of('backpacked:backpack', 1), // arg 1: output
  [
    'ACA',
    ' B ', // arg 2: the shape (array of strings)
    'A A'
  ],
  {
    A: 'minecraft:leather',
    B: 'minecraft:chest',  //arg 3: the mapping object
    C: 'create:iron_sheet'
  }
)

// Eyes of ender require variety

event.remove({ output: 'minecraft:ender_eye' })

event.shaped(
  Item.of('minecraft:ender_eye', 4), // arg 1: output
  [
    'B C',
    'ADA', // arg 2: the shape (array of strings)
    'E F'
  ],
  {
    A: 'minecraft:blaze_powder',
    B: 'minecraft:breeze_rod',  //arg 3: the mapping object
	C: 'minecraft:echo_shard',
	D: 'minecraft:ender_pearl',
	E: 'minecraft:prismarine_shard',
	F: 'aether:zanite_gemstone'
  }
)

// Cataclysm armor requires aeternium armor

event.remove({ output: 'cataclysm:ignitium_helmet' })
event.remove({ output: 'cataclysm:ignitium_chestplate' })
event.remove({ output: 'cataclysm:ignitium_boots' })
event.remove({ output: 'cataclysm:ignitium_leggings' })
event.remove({ output: 'cataclysm:cursium_helmet' })
event.remove({ output: 'cataclysm:cursium_chestplate' })
event.remove({ output: 'cataclysm:cursium_boots' })
event.remove({ output: 'cataclysm:cursium_leggings' })

event.smithing(
  'cataclysm:ignitium_helmet',                     // arg 1: output
  'cataclysm:ignitium_upgrade_smithing_template', // arg 2: the smithing template
  'betterend:aeternium_helmet',                          // arg 3: the item to be upgraded
  'cataclysm:ignitium_ingot'                            // arg 4: the upgrade item
)

event.smithing(
  'cataclysm:ignitium_chestplate',                     // arg 1: output
  'cataclysm:ignitium_upgrade_smithing_template', // arg 2: the smithing template
  'betterend:aeternium_chestplate',                          // arg 3: the item to be upgraded
  'cataclysm:ignitium_ingot'                            // arg 4: the upgrade item
)

event.smithing(
  'cataclysm:ignitium_boots',                     // arg 1: output
  'cataclysm:ignitium_upgrade_smithing_template', // arg 2: the smithing template
  'betterend:aeternium_leggings',                          // arg 3: the item to be upgraded
  'cataclysm:ignitium_ingot'                            // arg 4: the upgrade item
)

event.smithing(
  'cataclysm:ignitium_leggings',                     // arg 1: output
  'cataclysm:ignitium_upgrade_smithing_template', // arg 2: the smithing template
  'betterend:aeternium_boots',                          // arg 3: the item to be upgraded
  'cataclysm:ignitium_ingot'                            // arg 4: the upgrade item
)

event.smithing(
  'cataclysm:cursium_helmet',                     // arg 1: output
  'cataclysm:cursium_upgrade_smithing_template', // arg 2: the smithing template
  'betterend:aeternium_helmet',                          // arg 3: the item to be upgraded
  'cataclysm:cursium_ingot'                            // arg 4: the upgrade item
)

event.smithing(
  'cataclysm:cursium_chestplate',                     // arg 1: output
  'cataclysm:cursium_upgrade_smithing_template', // arg 2: the smithing template
  'betterend:aeternium_chestplate',                          // arg 3: the item to be upgraded
  'cataclysm:cursium_ingot'                            // arg 4: the upgrade item
)

event.smithing(
  'cataclysm:cursium_boots',                     // arg 1: output
  'cataclysm:cursium_upgrade_smithing_template', // arg 2: the smithing template
  'betterend:aeternium_leggings',                          // arg 3: the item to be upgraded
  'cataclysm:cursium_ingot'                            // arg 4: the upgrade item
)

event.smithing(
  'cataclysm:cursium_leggings',                     // arg 1: output
  'cataclysm:cursium_upgrade_smithing_template', // arg 2: the smithing template
  'betterend:aeternium_boots',                          // arg 3: the item to be upgraded
  'cataclysm:cursium_ingot'                            // arg 4: the upgrade item
)

// Armor requires sheets and netherite requires sturdy sheets

event.replaceInput({ id: 'minecraft:golden_helmet' }, 'minecraft:gold_ingot', 'create:golden_sheet')
event.replaceInput({ id: 'minecraft:golden_chestplate' }, 'minecraft:gold_ingot', 'create:golden_sheet')
event.replaceInput({ id: 'minecraft:golden_leggings' }, 'minecraft:gold_ingot', 'create:golden_sheet')
event.replaceInput({ id: 'minecraft:golden_boots' }, 'minecraft:gold_ingot', 'create:golden_sheet')
event.replaceInput({ id: 'minecraft:iron_helmet' }, 'minecraft:iron_ingot', 'create:iron_sheet')
event.replaceInput({ id: 'minecraft:iron_chestplate' }, 'minecraft:iron_ingot', 'create:iron_sheet')
event.replaceInput({ id: 'minecraft:iron_leggings' }, 'minecraft:iron_ingot', 'create:iron_sheet')
event.replaceInput({ id: 'minecraft:iron_boots' }, 'minecraft:iron_ingot', 'create:iron_sheet')
event.replaceInput({ id: 'simplest_copper_gear:copper_helmet' }, 'minecraft:copper_ingot', 'create:copper_sheet')
event.replaceInput({ id: 'simplest_copper_gear:copper_chestplate' }, 'minecraft:copper_ingot', 'create:copper_sheet')
event.replaceInput({ id: 'simplest_copper_gear:copper_leggings' }, 'minecraft:copper_ingot', 'create:copper_sheet')
event.replaceInput({ id: 'simplest_copper_gear:copper_boots' }, 'minecraft:copper_ingot', 'create:copper_sheet')
event.replaceInput({ id: 'minecraft:chain' }, 'minecraft:iron_ingot', 'create:iron_sheet')
event.replaceInput({ id: 'paladins:paladin_armor_head' }, 'minecraft:iron_ingot', 'create:iron_sheet')
event.replaceInput({ id: 'paladins:paladin_armor_chest' }, 'minecraft:iron_ingot', 'create:iron_sheet')
event.replaceInput({ id: 'paladins:paladin_armor_legs' }, 'minecraft:iron_ingot', 'create:iron_sheet')
event.replaceInput({ id: 'paladins:paladin_armor_feet' }, 'minecraft:iron_ingot', 'create:iron_sheet')
event.replaceInput({ id: 'paladins:crusader_armor_head' }, 'minecraft:iron_ingot', 'create:iron_sheet')
event.replaceInput({ id: 'paladins:crusader_armor_chest' }, 'minecraft:iron_ingot', 'create:iron_sheet')
event.replaceInput({ id: 'paladins:crusader_armor_legs' }, 'minecraft:iron_ingot', 'create:iron_sheet')
event.replaceInput({ id: 'paladins:crusader_armor_feet' }, 'minecraft:iron_ingot', 'create:iron_sheet')
event.replaceInput({ id: 'paladins:paladin_armor_head' }, 'minecraft:copper_ingot', 'create:copper_sheet')
event.replaceInput({ id: 'paladins:paladin_armor_chest' }, 'minecraft:copper_ingot', 'create:copper_sheet')
event.replaceInput({ id: 'paladins:paladin_armor_legs' }, 'minecraft:copper_ingot', 'create:copper_sheet')
event.replaceInput({ id: 'paladins:paladin_armor_feet' }, 'minecraft:copper_ingot', 'create:copper_sheet')
event.replaceInput({ id: 'paladins:crusader_armor_head' }, 'minecraft:gold_ingot', 'create:golden_sheet')
event.replaceInput({ id: 'paladins:crusader_armor_chest' }, 'minecraft:gold_ingot', 'create:golden_sheet')
event.replaceInput({ id: 'paladins:crusader_armor_legs' }, 'minecraft:gold_ingot', 'create:golden_sheet')
event.replaceInput({ id: 'paladins:crusader_armor_feet' }, 'minecraft:gold_ingot', 'create:golden_sheet')
event.replaceInput({ id: 'paladins:prior_robe_head' }, 'minecraft:gold_ingot', 'create:golden_sheet')
event.replaceInput({ id: 'paladins:prior_robe_chest' }, 'minecraft:gold_ingot', 'create:golden_sheet')
event.replaceInput({ id: 'paladins:prior_robe_legs' }, 'minecraft:gold_ingot', 'create:golden_sheet')
event.replaceInput({ id: 'paladins:prior_robe_feet' }, 'minecraft:gold_ingot', 'create:golden_sheet')
event.replaceInput({ id: 'rogues:assassin_armor_head' }, 'minecraft:gold_ingot', 'create:golden_sheet')
event.replaceInput({ id: 'rogues:assassin_armor_chest' }, 'minecraft:gold_ingot', 'create:golden_sheet')
event.replaceInput({ id: 'rogues:assassin_armor_legs' }, 'minecraft:gold_ingot', 'create:golden_sheet')
event.replaceInput({ id: 'rogues:assassin_armor_feet' }, 'minecraft:gold_ingot', 'create:golden_sheet')
event.replaceInput({ id: 'rogues:warrior_armor_head' }, 'minecraft:iron_ingot', 'create:iron_sheet')
event.replaceInput({ id: 'rogues:warrior_armor_chest' }, 'minecraft:iron_ingot', 'create:iron_sheet')
event.replaceInput({ id: 'rogues:warrior_armor_legs' }, 'minecraft:iron_ingot', 'create:iron_sheet')
event.replaceInput({ id: 'rogues:warrior_armor_feet' }, 'minecraft:iron_ingot', 'create:iron_sheet')
event.replaceInput({ id: 'minecraft:netherite_ingot' }, 'minecraft:gold_ingot', 'create:sturdy_sheet')

// Diamond armor mechanical crafter

event.remove({ output: 'minecraft:diamond_chestplate' })
event.remove({ output: 'minecraft:diamond_leggings' })
event.remove({ output: 'minecraft:diamond_boots' })
event.remove({ output: 'minecraft:diamond_helmet' })

	event.recipes.create.mechanical_crafting(
	'diamond_helmet', [
	'AAA',
	'A A'
	], {
	A: 'diamond'
	}).id('minecraft:diamond_helmet')
	event.recipes.create.mechanical_crafting(
	'diamond_chestplate', [
	'A A',
	'AAA',
	'AAA'
	], {
	A: 'diamond'
	}).id('minecraft:diamond_chestplate')
	event.recipes.create.mechanical_crafting(
	'diamond_leggings', [
	'AAA',
	'A A',
	'A A'
	], {
	A: 'diamond'
	}).id('minecraft:diamond_leggings')
	event.recipes.create.mechanical_crafting(
	'diamond_boots', [
	'A A',
	'A A'
	], {
	A: 'diamond'
	}).id('minecraft:diamond_boots')
	
// Betterend Armor and Tool Changes

event.recipes.create.compacting('betterend:terminite_ingot', 'betterend:terminite_forged_plate')
event.recipes.create.compacting('betterend:aeternium_ingot', 'betterend:aeternium_forged_plate')


event.remove({ output: 'betterend:terminite_pickaxe' })
event.remove({ output: 'betterend:terminite_hoe' })
event.remove({ output: 'betterend:terminite_shovel' })
event.remove({ output: 'betterend:terminite_axe' })
event.remove({ output: 'betterend:terminite_sword' })
event.remove({ output: 'betterend:aeternium_pickaxe' })
event.remove({ output: 'betterend:aeternium_hoe' })
event.remove({ output: 'betterend:aeternium_shovel' })
event.remove({ output: 'betterend:aeternium_axe' })
event.remove({ output: 'betterend:aeternium_sword' })

event.shaped(
  Item.of('betterend:terminite_sword', 1), // arg 1: output
  [
    ' A ',
    ' A ', // arg 2: the shape (array of strings)
    ' B '
  ],
  {
    A: 'betterend:terminite_ingot',
    B: 'minecraft:stick'
  }
)

event.shaped(
  Item.of('betterend:terminite_axe', 1), // arg 1: output
  [
    ' AA',
    ' BA', // arg 2: the shape (array of strings)
    ' B '
  ],
  {
    A: 'betterend:terminite_ingot',
    B: 'minecraft:stick'
  }
)

event.shaped(
  Item.of('betterend:terminite_shovel', 1), // arg 1: output
  [
    ' A ',
    ' B ', // arg 2: the shape (array of strings)
    ' B '
  ],
  {
    A: 'betterend:terminite_ingot',
    B: 'minecraft:stick'
  }
)

event.shaped(
  Item.of('betterend:terminite_hoe', 1), // arg 1: output
  [
    ' AA',
    ' B ', // arg 2: the shape (array of strings)
    ' B '
  ],
  {
    A: 'betterend:terminite_ingot',
    B: 'minecraft:stick'
  }
)

event.shaped(
  Item.of('betterend:terminite_pickaxe', 1), // arg 1: output
  [
    'AAA',
    ' B ', // arg 2: the shape (array of strings)
    ' B '
  ],
  {
    A: 'betterend:terminite_ingot',
    B: 'minecraft:stick'
  }
)

event.shaped(
  Item.of('betterend:aeternium_sword', 1), // arg 1: output
  [
    ' A ',
    ' A ', // arg 2: the shape (array of strings)
    ' B '
  ],
  {
    A: 'betterend:aeternium_ingot',
    B: 'minecraft:stick'
  }
)

event.shaped(
  Item.of('betterend:aeternium_axe', 1), // arg 1: output
  [
    ' AA',
    ' BA', // arg 2: the shape (array of strings)
    ' B '
  ],
  {
    A: 'betterend:aeternium_ingot',
    B: 'minecraft:stick'
  }
)

event.shaped(
  Item.of('betterend:aeternium_shovel', 1), // arg 1: output
  [
    ' A ',
    ' B ', // arg 2: the shape (array of strings)
    ' B '
  ],
  {
    A: 'betterend:aeternium_ingot',
    B: 'minecraft:stick'
  }
)

event.shaped(
  Item.of('betterend:aeternium_hoe', 1), // arg 1: output
  [
    ' AA',
    ' B ', // arg 2: the shape (array of strings)
    ' B '
  ],
  {
    A: 'betterend:aeternium_ingot',
    B: 'minecraft:stick'
  }
)

event.shaped(
  Item.of('betterend:aeternium_pickaxe', 1), // arg 1: output
  [
    'AAA',
    ' B ', // arg 2: the shape (array of strings)
    ' B '
  ],
  {
    A: 'betterend:aeternium_ingot',
    B: 'minecraft:stick'
  }
)

event.shaped(
  Item.of('betterend:aeternium_ingot', 1), // arg 1: output
  [
    ' A ',
    ' B ', // arg 2: the shape (array of strings)
    ' A '
  ],
  {
    A: 'minecraft:netherite_scrap',
    B: 'aether:enchanted_gravitite'
  }
)

//Closing brackets.

	}
)