ServerEvents.recipes(event => {
    event.remove({id: 'pipez:item_pipe'})
    event.remove({id: 'pipez:fluid_pipe'})
    event.remove({id: 'pipez:energy_pipe'})
    event.remove({id: 'pipez:gas_pipe'})
    event.remove({id: 'pipez:universal_pipe'})
    event.remove({id: 'pipez:basic_upgrade'})
    event.remove({id: 'pipez:improved_upgrade'})
    event.remove({id: 'pipez:advanced_upgrade'})
    event.remove({id: 'pipez:ultimate_upgrade'})
})

ServerEvents.recipes(event => {
  //Item Pipe
  event.shaped('8x pipez:item_pipe',
    ['111','232','111'], {
      1: '#forge:ingots/steel', 
      2: 'minecraft:dropper', 
      3: 'prettypipes:pipe'
  }).id('pipez:item_pipe')
  
  //Fluid Pipe
  event.shaped('8x pipez:fluid_pipe',
    ['111','232','111'], {
      1: '#forge:ingots/steel', 
      2: 'minecraft:bucket', 
      3: 'prettypipes:pipe'
  }).id('pipez:fluid_pipe')
  
  //Energy Pipe
  event.shaped('8x pipez:energy_pipe',
    ['111','232','111'], {
      1: '#forge:ingots/steel', 
      2: 'minecraft:redstone_block', 
      3: 'prettypipes:pipe'
  }).id('pipez:energy_pipe')
  
  //Gas Pipe
  event.shaped('8x pipez:gas_pipe',
    ['111','232','111'], {
      1: '#forge:ingots/steel', 
      2: 'mekanism:alloy_infused', 
      3: 'prettypipes:pipe'
  }).id('pipez:gas_pipe')
  
  //Universal Pipe
  event.shaped('8x pipez:universal_pipe',
    ['123','454','321'], {
      1: 'pipez:item_pipe', 
      2: 'pipez:fluid_pipe', 
      3: 'pipez:energy_pipe', 
      4: 'pipez:gas_pipe', 
      5: 'minecraft:redstone_block'
  }).id('pipez:universal_pipe')

  //Filter Destination Tool
  event.replaceInput(
      { id: 'pipez:filter_destination_tool' }, // Arg 1: the filter
      'minecraft:iron_ingot',            // Arg 2: the item to replace
      'alltheores:steel_ingot'         // Arg 3: the item to replace it with
  )
  
  //Basic Pipe Upgrade
  event.shaped('pipez:basic_upgrade',
    ['121','232','121'], {
      1: '#forge:ingots/steel', 
      2: '#forge:ingots/brass', 
      3: 'minecraft:redstone'
  }).id('pipez:basic_upgrade')
  
  //Improved Pipe Upgrade
  event.shaped('pipez:improved_upgrade',
    ['121','232','121'], {
      1: 'naturesaura:tainted_gold', 
      2: 'naturesaura:infused_iron', 
      3: 'pipez:basic_upgrade'
  }).id('pipez:improved_upgrade')
  
  //Advanced Pipe Upgrade
  event.shaped('pipez:advanced_upgrade',
    ['121','232','121'], {
      1: '#forge:ingots/compressed_iron', 
      2: '#forge:ingots/drenched_iron', 
      3: 'pipez:improved_upgrade'
  }).id('pipez:advanced_upgrade')
  
  //Advanced Pipe Upgrade
  event.shaped('pipez:ultimate_upgrade',
    ['121','232','121'], {
      1: 'industrialforegoing:pink_slime_ingot', 
      2: '#forge:ingots/fireite', 
      3: 'pipez:advanced_upgrade'
  }).id('pipez:ultimate_upgrade')
})