// Scripts for HNN

ServerEvents.recipes(event => {

// Slice 'n' Splice Helper Function
function slicing(output, in1, in2, in3, in4, in5, in6, energy) {
	event.custom({
		"type": "enderio:slicing",
		"energy": energy,
		"inputs": [
			{
				"item": in1
			},
			{
				"item": in2
			},
			{
				"item": in3
			},
			{
				"item": in4
			},
			{
				"item": in5
			},
			{
				"item": in6
			}
		],
		"output": output
	})
}	

// Change recipes for hnn machines

event.replaceInput(
  { output: 'hostilenetworks:sim_chamber' },
  'minecraft:obsidian',
  'enderio:ensouled_chassis'
)

event.replaceInput(
  { output: 'hostilenetworks:loot_fabricator' },
  'minecraft:obsidian',
  'enderio:ensouled_chassis'
)

event.replaceInput(
  { output: 'hostilenetworks:loot_fabricator' },
  'minecraft:netherite_ingot',
  'draconicevolution:draconium_ingot'
)

event.replaceInput(
  { output: 'sanguine_networks:virtual_sacrificer' },
  'minecraft:obsidian',
  'enderio:ensouled_chassis'
)

event.replaceInput(
  { output: 'sanguine_networks:virtual_sacrificer' },
  'minecraft:comparator',
  'bloodmagic:ingot_hellforged'
)

event.replaceInput(
  { output: 'hostilenetworks:blank_data_model' },
  'minecraft:smooth_stone',
  'enderio:zombie_electrode'
)

// Prediction Matrix Recipe
event.remove({output: 'hostilenetworks:prediction_matrix'})

event.shaped(
  Item.of('hostilenetworks:prediction_matrix'),
  [
    'ECE',
    'ABA',
    'EDE'
  ],
  {
    A: 'enderio:octadic_capacitor',
    B: 'minecraft:clay',
	C: 'enderio:frank_n_zombie',
	D: 'enderio:sentient_ender',
	E: 'kubejs:prisma_dust'
  }
)

// Prediction Dupe Cycle
event.recipes.create.mixing(['4x hostilenetworks:prediction_matrix'], ['hostilenetworks:prediction_matrix', 'projecte:high_covalence_dust', 'enderio:soul_powder', Fluid.of(('thermal:ender'), 1000)]).superheated()

// Model recipes and deep learner change
event.remove({output: 'hostilenetworks:deep_learner'})

event.shaped(
  Item.of('hostilenetworks:deep_learner'),
  [
    'ABA',
    'CDC',
    'AEA'
  ],
  {
    A: 'extendedcrafting:black_iron_ingot',
    B: 'bloodmagic:etherealslate',
	C: 'enderio:prescient_crystal',
	D: 'botania:elf_glass',
	E: 'mekanism_extras:absolute_control_circuit'
  }
)

// Overworld
slicing(Item.of('hostilenetworks:data_model', '{data_model:{data:6,id:"hostilenetworks:zombie"}}'), 
'minecraft:rotten_flesh', 'hostilenetworks:blank_data_model', 'minecraft:rotten_flesh', 'thermal_extra:soul_infused_gear', 'mekanism_extras:absolute_control_circuit', 'thermal_extra:soul_infused_gear', 50000)

slicing(Item.of('hostilenetworks:data_model', '{data_model:{data:6,id:"hostilenetworks:skeleton"}}'), 
'minecraft:bone', 'hostilenetworks:blank_data_model', 'minecraft:bone', 'thermal_extra:soul_infused_gear', 'mekanism_extras:absolute_control_circuit', 'thermal_extra:soul_infused_gear', 50000)

slicing(Item.of('hostilenetworks:data_model', '{data_model:{data:6,id:"hostilenetworks:creeper"}}'), 
'minecraft:gunpowder', 'hostilenetworks:blank_data_model', 'minecraft:gunpowder', 'thermal_extra:soul_infused_gear', 'mekanism_extras:absolute_control_circuit', 'thermal_extra:soul_infused_gear', 50000)

slicing(Item.of('hostilenetworks:data_model', '{data_model:{data:6,id:"hostilenetworks:spider"}}'), 
'minecraft:spider_eye', 'hostilenetworks:blank_data_model', 'minecraft:spider_eye', 'thermal_extra:soul_infused_gear', 'mekanism_extras:absolute_control_circuit', 'thermal_extra:soul_infused_gear', 50000)

slicing(Item.of('hostilenetworks:data_model', '{data_model:{data:6,id:"hostilenetworks:witch"}}'), 
'minecraft:glowstone_dust', 'hostilenetworks:blank_data_model', 'minecraft:glowstone_dust', 'thermal_extra:soul_infused_gear', 'mekanism_extras:absolute_control_circuit', 'thermal_extra:soul_infused_gear', 50000)

slicing(Item.of('hostilenetworks:data_model', '{data_model:{data:6,id:"hostilenetworks:slime"}}'), 
'minecraft:slime_ball', 'hostilenetworks:blank_data_model', 'minecraft:slime_ball', 'thermal_extra:soul_infused_gear', 'mekanism_extras:absolute_control_circuit', 'thermal_extra:soul_infused_gear', 50000)

slicing(Item.of('hostilenetworks:data_model', '{data_model:{data:6,id:"hostilenetworks:guardian"}}'), 
'minecraft:prismarine_shard', 'hostilenetworks:blank_data_model', 'minecraft:prismarine_shard', 'thermal_extra:soul_infused_gear', 'mekanism_extras:absolute_control_circuit', 'thermal_extra:soul_infused_gear', 50000)

// Nether

slicing(Item.of('hostilenetworks:data_model', '{data_model:{data:6,id:"hostilenetworks:blaze"}}'), 
'minecraft:blaze_rod', 'hostilenetworks:blank_data_model', 'minecraft:blaze_rod', 'thermal_extra:shellite_gear', 'mekanism_extras:absolute_control_circuit', 'thermal_extra:shellite_gear', 100000)

slicing(Item.of('hostilenetworks:data_model', '{data_model:{data:6,id:"hostilenetworks:ghast"}}'), 
'minecraft:ghast_tear', 'hostilenetworks:blank_data_model', 'minecraft:ghast_tear', 'thermal_extra:shellite_gear', 'mekanism_extras:absolute_control_circuit', 'thermal_extra:shellite_gear', 100000)

slicing(Item.of('hostilenetworks:data_model', '{data_model:{data:6,id:"hostilenetworks:wither_skeleton"}}'), 
'minecraft:wither_skeleton_skull', 'hostilenetworks:blank_data_model', 'minecraft:wither_skeleton_skull', 'thermal_extra:shellite_gear', 'mekanism_extras:absolute_control_circuit', 'thermal_extra:shellite_gear', 100000)

// End

slicing(Item.of('hostilenetworks:data_model', '{data_model:{data:6,id:"hostilenetworks:enderman"}}'), 
'minecraft:ender_pearl', 'hostilenetworks:blank_data_model', 'minecraft:ender_pearl', 'thermal_extra:twinite_gear', 'mekanism_extras:absolute_control_circuit', 'thermal_extra:twinite_gear', 250000)

slicing(Item.of('hostilenetworks:data_model', '{data_model:{data:6,id:"hostilenetworks:shulker"}}'), 
'minecraft:shulker_shell', 'hostilenetworks:blank_data_model', 'minecraft:shulker_shell', 'thermal_extra:twinite_gear', 'mekanism_extras:absolute_control_circuit', 'thermal_extra:twinite_gear', 250000)

// Bosses
slicing(Item.of('hostilenetworks:data_model', '{data_model:{data:6,id:"hostilenetworks:ender_dragon"}}'), 
'draconicevolution:dragon_heart', 'hostilenetworks:blank_data_model', 'draconicevolution:dragon_heart', 'thermal_extra:abyssal_gear', 'mekanism_extras:absolute_control_circuit', 'thermal_extra:abyssal_gear', 1000000)

slicing(Item.of('hostilenetworks:data_model', '{data_model:{data:6,id:"hostilenetworks:wither"}}'), 
'minecraft:nether_star', 'hostilenetworks:blank_data_model', 'minecraft:nether_star', 'thermal_extra:abyssal_gear', 'mekanism_extras:absolute_control_circuit', 'thermal_extra:abyssal_gear', 1000000)

slicing(Item.of('hostilenetworks:data_model', '{data_model:{data:6,id:"hostilenetworks:warden"}}'), 
'minecraft:echo_shard', 'hostilenetworks:blank_data_model', 'minecraft:echo_shard', 'thermal_extra:abyssal_gear', 'mekanism_extras:absolute_control_circuit', 'thermal_extra:abyssal_gear', 1000000)

slicing(Item.of('hostilenetworks:data_model', '{data_model:{data:6,id:"hostilenetworks:tower_guard"}}'), 
'bloodmagic:corrupted_dust', 'hostilenetworks:blank_data_model', 'bloodmagic:corrupted_dust', 'thermal_extra:abyssal_gear', 'bloodmagic:hellforgedparts', 'thermal_extra:abyssal_gear', 1000000)

slicing(Item.of('hostilenetworks:data_model', '{data_model:{data:6,id:"hostilenetworks:starbuncle"}}'), 
'kubejs:prismatter', 'hostilenetworks:blank_data_model', 'kubejs:prismatter', 'botania:gaia_ingot', 'mekanism_extras:infinite_control_circuit', 'botania:gaia_ingot', 1000000)

slicing(Item.of('hostilenetworks:data_model', '{data_model:{data:6,id:"hostilenetworks:starbuncle"}}'), 
'kubejs:emc_prismatter', 'hostilenetworks:blank_data_model', 'kubejs:emc_prismatter', 'botania:gaia_ingot', 'mekanism_extras:infinite_control_circuit', 'botania:gaia_ingot', 1000000)

})