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

// Opening recipe commands.

ServerEvents.recipes(event => {

// Waystone recipe.

event.remove({ output: 'waystones:warp_stone' })

event.shaped(
  Item.of('waystones:warp_stone'), // arg 1: output
  [
    'ACA',
    'CBC', // arg 2: the shape (array of strings)
    'ACA'
  ],
  {
    A: 'minecraft:amethyst_shard',
	B: 'minecraft:ender_pearl',
    C: 'minecraft:diamond',  
  }
)

// Drill recipe.

event.remove({ output: 'create:mechanical_drill' })

event.shaped(
  Item.of('create:mechanical_drill'), // arg 1: output
  [
    ' B ',
    'BAB', // arg 2: the shape (array of strings)
    ' B '
  ],
  {
    A: 'create:powdered_obsidian',
	B: 'minecraft:diamond'
  }
)

// Explorer's compass recipe.

event.remove({ output: 'explorerscompass:explorerscompass' })

event.shaped(
  Item.of('explorerscompass:explorerscompass'), // arg 1: output
  [
    'ACA',
    'CBC', // arg 2: the shape (array of strings)
    'ACA'
  ],
  {
    A: 'minecraft:redstone',
	B: 'minecraft:compass',
    C: 'aether:zanite_gemstone',  
  }
)

// String from wool.
    
event.shapeless(
  Item.of('minecraft:string', 4), // arg 1: output
  [
    'minecraft:white_wool', 	       // arg 2: the array of inputs
  ]
)
    
// Easier arrows.
    
event.shaped(
  Item.of('minecraft:arrow', 16), // arg 1: output
  [
    '  A',
    ' B ', // arg 2: the shape (array of strings)
    'C  '
  ],
  {
    A: 'minecraft:iron_nugget',
	B: 'minecraft:stick',
    C: 'minecraft:string',  
  }
)
    
event.shaped(
  Item.of('minecraft:arrow', 16), // arg 1: output
  [
    '  A',
    ' B ', // arg 2: the shape (array of strings)
    'C  '
  ],
  {
    A: 'minecraft:flint',
	B: 'minecraft:stick',
    C: 'minecraft:feather',  
  }
)
 
// Green dye for colorblind people.

event.shapeless(
  Item.of('minecraft:green_dye', 2), // arg 1: output
  [
    'minecraft:white_dye', 	       // arg 2: the array of inputs
	'minecraft:brown_dye'
  ]
)

event.shapeless(
  Item.of('minecraft:green_dye', 2), // arg 1: output
  [
    'minecraft:kelp' 	       // arg 2: the array of inputs
  ]
)

// Hearth and harvest replacer.

event.replaceInput(
  { input: 'hearthandharvest:cotton' }, // Arg 1: the filter
  'hearthandharvest:cotton',            // Arg 2: the item to replace
  'rusticdelight:cotton_boll'         // Arg 3: the item to replace it with
  // Note: tagged fluid ingredients do not work on Fabric, but tagged items do.
)

event.replaceInput(
  { input: 'hearthandharvest:cotton_seeds' }, // Arg 1: the filter
  'hearthandharvest:cotton_seeds',            // Arg 2: the item to replace
  'rusticdelight:cotton_seeds'         // Arg 3: the item to replace it with
  // Note: tagged fluid ingredients do not work on Fabric, but tagged items do.
)

event.replaceInput(
  { input: 'hearthandharvest:wild_cotton' }, // Arg 1: the filter
  'hearthandharvest:wild_cotton',            // Arg 2: the item to replace
  'rusticdelight:wild_cotton'         // Arg 3: the item to replace it with
  // Note: tagged fluid ingredients do not work on Fabric, but tagged items do.
)

event.replaceInput(
  { input: 'hearthandharvest:cooking_oil' }, // Arg 1: the filter
  'hearthandharvest:cooking_oil',            // Arg 2: the item to replace
  'rusticdelight:cooking_oil'         // Arg 3: the item to replace it with
  // Note: tagged fluid ingredients do not work on Fabric, but tagged items do.
)

event.replaceInput(
  { input: 'hearthandharvest:salt' }, // Arg 1: the filter
  'hearthandharvest:salt',            // Arg 2: the item to replace
  'cookscollection:salt'         // Arg 3: the item to replace it with
  // Note: tagged fluid ingredients do not work on Fabric, but tagged items do.
)

event.replaceInput(
  { input: 'cookscollection:cooking_oil' }, // Arg 1: the filter
  'cookscollection:cooking_oil',            // Arg 2: the item to replace
  'rusticdelight:cooking_oil'         // Arg 3: the item to replace it with
  // Note: tagged fluid ingredients do not work on Fabric, but tagged items do.
)

// Salty stuff.

event.shapeless(
  Item.of('cookscollection:salt', 9), // arg 1: output
  [
    'galosphere:pink_salt_shard' 	       // arg 2: the array of inputs
  ]
)

// Rope replace.

event.replaceInput(
  { input: 'quark:rope' }, // Arg 1: the filter
  'quark:rope',            // Arg 2: the item to replace
  'supplementaries:rope'         // Arg 3: the item to replace it with
  // Note: tagged fluid ingredients do not work on Fabric, but tagged items do.
)

event.replaceInput(
  { input: 'farmersdelight:rope' }, // Arg 1: the filter
  'farmersdelight:rope',            // Arg 2: the item to replace
  'supplementaries:rope'         // Arg 3: the item to replace it with
  // Note: tagged fluid ingredients do not work on Fabric, but tagged items do.
)

// Full Blone Block to Bone Meal.

event.shapeless(
  Item.of('minecraft:bone_meal', 4), // arg 1: output
  [
    'betternether:bone_block' 	       // arg 2: the array of inputs
  ]
)

// Slime ball recipe.

event.smelting('minecraft:kelp', 'minecraft:slime_ball')

// 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'
  }
)

// Change hammer Recipe

event.shaped(
  Item.of('onlyhammersandexcavators:stone_hammer', 1), // arg 1: output
  [
    'ACA',
    ' B ', // arg 2: the shape (array of strings)
    ' B '
  ],
  {
    A: 'minecraft:cobblestone',
	B: 'minecraft:stick',
	C: 'minecraft:iron_nugget'
  }
)

// 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'
  }
)

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

// 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.

	}
)
