// priority: 0

// Visit the wiki for more info - https://kubejs.com/

console.info('Hello, World! (Loaded server scripts)')

ServerEvents.loaded((event) => {
    event.server.runCommandSilent('reload')
  })
  
ServerEvents.recipes(event => {

    //Slabs To Blocks
    event.forEachRecipe({ type: 'minecraft:crafting_shaped', output: '#minecraft:slabs' }, r => {
        let ingredients = r.originalRecipeIngredients 
        let output = r.originalRecipeResult    
        event.shaped(ingredients[0], ['S', 'S'], { S: output })
    })
    
    event.shaped('2x caveopolis:green_colored_wooden_planks', ['C'], {C: 'minecraft:cactus'}).id('desertopolis:planks_from_cactus')
    event.shaped('1x minecraft:campfire', [' S ', 'SLS', 'LLL'], {L: '#minecraft:planks', S: stick}).id('minecraft:campfire')

    event.shapeless('1x minecraft:crafting_table', ['#caveopolis:colored_wooden_plank_crafting_tables']).id('minecraft:crafting_table')
    event.shaped('1x minecraft:crafting_table', ['CC', 'CC'], {C: '#desertopolis:vanilla_planks'}).id('desertopolis:crafting_table')


    event.campfireCooking('1x minecraft:glass', '#forge:sand').id('desertopolis:glass')
    event.campfireCooking('3x opolisutilities:mini_charcoal', '#minecraft:planks').id('desertopolis:mini_charcoal')
    event.campfireCooking('1x desertopolis:cooked_cactus_slice', 'desertopolis:cactus_slice').id('desertopolis:cooked_cactus_slice')
    event.campfireCooking('1x desertopolis:hardened_sandstone', 'minecraft:smooth_sandstone').id('desertopolis:hardened_sandstone')
    event.campfireCooking('1x minecraft:smooth_sandstone', 'minecraft:sandstone').id('desertopolis:smooth_sandstone')
    event.campfireCooking('1x toughasnails:purified_water_bottle', Item.of('minecraft:potion', '{Potion:"minecraft:water"}').strongNBT()).id('desertopolis:purified_water_bottle')
    
    event.smelting('1x desertopolis:cooked_cactus_slice', 'desertopolis:cactus_slice').id('desertopolis:smelting_cooked_cactus_slice')
    event.smelting('1x desertopolis:hardened_sandstone', 'minecraft:smooth_sandstone').id('desertopolis:smelting_hardened_sandstone')

    event.shaped('1x desertopolis:sandstone_pickaxe', ['SSS', ' T ', ' T '], {T: stick, S: 'desertopolis:hardened_sandstone'}).id('desertopolis:sandstone_pickaxe')
    event.shaped('1x desertopolis:sandstone_axe', ['SS ', 'ST ', ' T '], {T: stick, S: 'desertopolis:hardened_sandstone'}).id('desertopolis:sandstone_axe')
    event.shaped('1x desertopolis:sandstone_shovel', [' S ', ' T ', ' T '], {T: stick, S: 'desertopolis:hardened_sandstone'}).id('desertopolis:sandstone_shovel')
    event.shaped('1x desertopolis:sandstone_hoe', ['SS ', ' T ', ' T '], {T: stick, S: 'desertopolis:hardened_sandstone'}).id('desertopolis:sandstone_hoe')
    event.shaped('1x desertopolis:sandstone_sword', [' S ', ' S ', ' T '], {T: stick, S: 'desertopolis:hardened_sandstone'}).id('desertopolis:sandstone_sword')

    event.shaped('1x enderio:dark_bimetal_gear', [' N ', 'NGN', ' N '], {N: 'enderio:dark_steel_nugget', G: 'enderio:iron_gear'}).id('enderio:dark_bimetal_gear')
    event.shaped('1x enderio:vibrant_gear', [' N ', 'NGN', ' N '], {N: 'enderio:vibrant_alloy_nugget', G: 'enderio:energized_gear'}).id('enderio:vibrant_gear')
    event.shaped('1x enderio:energized_gear', [' N ', 'NGN', ' N '], {N: 'enderio:energetic_alloy_nugget', G: 'enderio:iron_gear'}).id('enderio:energized_gear')


    //Farmers Delight

    event.custom({type: "farmersdelight:cutting", ingredients: [{item: "minecraft:cactus"}],result: [{item: "desertopolis:cactus_slice", count: 4}],
    tool: {type: "farmersdelight:tool_action", action: "axe_dig"}}).id('desertopolis:cactus_slice')

    event.replaceInput({mod: 'toughasnails'}, '#minecraft:leaves', 'minecraft:cactus');

    //Extractinator

    event.custom({
      "type": "extractinator:extractinating",
      "input": {
        "tag": "minecraft:terracotta"
      },
      "drops": [
        {
          "drop": "#desertopolis:terracotta_drops",
          "drop_chance": 0.80,
          "min_drop_count": 1,
          "max_drop_count": 1
        },
        {
          "drop": "#desertopolis:terracotta_rare_drops",
          "drop_chance": 0.50
        }
      ]
  }).id('desertopolis:extractinator_terracotta')

    event.custom({
      "type": "extractinator:extractinating",
      "input": {
        "item": "minecraft:deepslate"
      },
      "drops": [
        {
          "drop": "#desertopolis:deepslate_drops",
          "drop_chance": 0.80,
          "min_drop_count": 1,
          "max_drop_count": 1
        },
        {
          "drop": "#desertopolis:deepslate_rare_drops",
          "drop_chance": 0.50
        }
      ]
  }).id('desertopolis:extractinator_deepslate')

    event.custom({
      "type": "extractinator:extractinating",
      "input": {
        "item": "minecraft:hay_block"
      },
      "drops": [
        {
          "drop": "#desertopolis:hay_drops",
          "drop_chance": 0.80,
          "min_drop_count": 1,
          "max_drop_count": 5
        },
        {
          "drop": "#desertopolis:hay_rare_drops",
          "drop_chance": 0.50,
          "min_drop_count": 2,
          "max_drop_count": 4
        }
      ]
  }).id('desertopolis:extractinator_hay')

  event.remove({mod:'extractinator'})
  event.shaped('1x extractinator:extractinator', ['TFT', 'TFT', 'TFT'], {T: '#minecraft:terracotta', F: 'minecraft:grindstone'}).id('desertopolis:extractinator')
  
  //Opolis Utils

  event.custom({
    "type": "opolisutilities:resource_generator",
    "ingredients": [
      Item.of('avaritia:record_fragment')
    ],
    "duration": 250,
    "output": 
      Item.of('avaritia:record_fragment')
  }).id("desertopolis:record_fragment_dupe")

  event.custom({type: "opolisutilities:soaking_table", ingredient:[{item: "minecraft:stone"}], count: 1, duration: 200,
  output: {item: "caveopolis:mossy_stone", count: 1}}).id('desertopolis:mossy_stone')

  event.custom({
    type: "opolisutilities:fluid_generator",
    fluid: "pneumaticcraft:oil",
    fluidAmount: 10
  })

  event.custom({
    "type": "opolisutilities:rg2_blocks",
    "block": "forge:sandstone"
  })

  //Catalogue 'relics:researching_table'

  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 24, result: "relics:researching_table", itemOutCount: 1}).id('desertopolis:researching_table')
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 12, result: "caveopolis:sprayer", itemOutCount: 1}).id('desertopolis:sprayer')
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 1, result: "minecraft:blue_dye", itemOutCount: 1}).id('desertopolis:blue_dye')
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 1, result: "minecraft:light_blue_dye", itemOutCount: 1}).id('desertopolis:light_blue_dye')
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 1, result: "minecraft:light_gray_dye", itemOutCount: 1}).id('desertopolis:light_gray_dye')
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 1, result: "minecraft:gray_dye", itemOutCount: 1}).id('desertopolis:gray_dye')
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 1, result: "minecraft:brown_dye", itemOutCount: 1}).id('desertopolis:brown_dye')
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 1, result: "minecraft:black_dye", itemOutCount: 1}).id('desertopolis:black_dye')
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 1, result: "minecraft:white_dye", itemOutCount: 1}).id('desertopolis:white_dye')
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 1, result: "minecraft:yellow_dye", itemOutCount: 1}).id('desertopolis:yellow_dye')
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 1, result: "minecraft:green_dye", itemOutCount: 1}).id('desertopolis:green_dye')
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 1, result: "minecraft:lime_dye", itemOutCount: 1}).id('desertopolis:lime_dye')
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 1, result: "minecraft:cyan_dye", itemOutCount: 1}).id('desertopolis:cyan_dye')
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 1, result: "minecraft:orange_dye", itemOutCount: 1}).id('desertopolis:orange_dye')
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 1, result: "minecraft:pink_dye", itemOutCount: 1}).id('desertopolis:pink_dye')
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 1, result: "minecraft:magenta_dye", itemOutCount: 1}).id('desertopolis:magenta_dye')
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 1, result: "minecraft:purple_dye", itemOutCount: 1}).id('desertopolis:purple_dye')
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 1, result: "minecraft:red_dye", itemOutCount: 1}).id('desertopolis:red_dye')


  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 40, result: 'resourcechickens:dye_blue_chicken_spawn_egg', itemOutCount: 1}).id('desertopolis:blue_dye_chicken_spawn_egg')
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 40, result: "resourcechickens:dye_light_blue_chicken_spawn_egg", itemOutCount: 1}).id('desertopolis:light_blue_dye_chicken_spawn_egg')
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 40, result: "resourcechickens:dye_light_gray_chicken_spawn_egg", itemOutCount: 1}).id('desertopolis:light_gray_dye_chicken_spawn_egg')
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 40, result: "resourcechickens:dye_gray_chicken_spawn_egg", itemOutCount: 1}).id('desertopolis:gray_dye_chicken_spawn_egg')
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 40, result: "resourcechickens:dye_brown_chicken_spawn_egg", itemOutCount: 1}).id('desertopolis:brown_dye_chicken_spawn_egg')
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 40, result: "resourcechickens:dye_black_chicken_spawn_egg", itemOutCount: 1}).id('desertopolis:black_dye_chicken_spawn_egg')
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 40, result: "resourcechickens:dye_white_chicken_spawn_egg", itemOutCount: 1}).id('desertopolis:white_dye_chicken_spawn_egg')
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 40, result: "resourcechickens:dye_yellow_chicken_spawn_egg", itemOutCount: 1}).id('desertopolis:yellow_dye_chicken_spawn_egg')
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 40, result: "resourcechickens:dye_green_chicken_spawn_egg", itemOutCount: 1}).id('desertopolis:green_dye_chicken_spawn_egg')
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 40, result: "resourcechickens:dye_lime_chicken_spawn_egg", itemOutCount: 1}).id('desertopolis:lime_dye_chicken_spawn_egg')
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 40, result: "resourcechickens:dye_cyan_chicken_spawn_egg", itemOutCount: 1}).id('desertopolis:cyan_dye_chicken_spawn_egg')
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 40, result: "resourcechickens:dye_orange_chicken_spawn_egg", itemOutCount: 1}).id('desertopolis:orange_dye_chicken_spawn_egg')
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 40, result: "resourcechickens:dye_pink_chicken_spawn_egg", itemOutCount: 1}).id('desertopolis:pink_dye_chicken_spawn_egg')
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 40, result: "resourcechickens:dye_magenta_chicken_spawn_egg", itemOutCount: 1}).id('desertopolis:magenta_dye_chicken_spawn_egg')
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 40, result: "resourcechickens:dye_purple_chicken_spawn_egg", itemOutCount: 1}).id('desertopolis:purple_dye_chicken_spawn_egg')
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 40, result: "resourcechickens:dye_red_chicken_spawn_egg", itemOutCount: 1}).id('desertopolis:red_dye_chicken_spawn_egg')

  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 3, result : "festive_delight:festive_chicken_block", itemOutCount: 1})
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 3, result : "festive_delight:christmas_tea", itemOutCount: 1})
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 3, result : "festive_delight:gingerbread_man", itemOutCount: 1})
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 3, result : "festive_delight:sugar_cane", itemOutCount: 1})
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 3, result : "festive_delight:salmon_verrines", itemOutCount: 1})

  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 1, result : "christmasfestivity:garland", itemOutCount: 4})
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 1, result : "christmasfestivity:garland_round", itemOutCount: 4})
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 1, result : "christmasfestivity:snowy_garland", itemOutCount: 4})
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 1, result : "christmasfestivity:snowy_garland_round", itemOutCount: 4})
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 1, result : "christmasfestivity:candy_canes_block", itemOutCount: 4})
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 1, result : "christmasfestivity:candy_canes_tall", itemOutCount: 4})
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 1, result : "christmasfestivity:christmas_tree", itemOutCount: 1})
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 1, result : "christmasfestivity:snowy_christmas_tree", itemOutCount: 1})
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 1, result : "christmasfestivity:santa_claus_block", itemOutCount: 1})
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 1, result : "christmasfestivity:tall_santa_claus_block", itemOutCount: 1})
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 1, result : "christmasfestivity:christmas_bells", itemOutCount: 1})
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 1, result : "christmasfestivity:christmas_hat", itemOutCount: 1})
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 1, result : "christmasfestivity:black_hat", itemOutCount: 1})
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 1, result : "christmasfestivity:disc_marrychristmas", itemOutCount: 1})
  event.custom({type: "opolisutilities:catalogue", ingredient: {item: "opolisutilities:b_bucks"}, itemInCount: 1, result : "christmasfestivity:disc_jinglebells", itemOutCount: 1})



  //Resource Generator

  event.custom({
    "type": "opolisutilities:rg2_blocks",
    "block": "minecraft:blackstone"
  })

  event.custom({
   "type": "opolisutilities:rg2_speed_blocks",
   "block": "integrateddynamics:crystalized_menril_block",
   "tickRate": 90
 })

  //Strainers

  event.remove({type:'strainers:strainer'})
  event.shaped('1x strainers:wooden_strainer', ['SHS', 'SHS', 'MMM'], {M: '#integrateddynamics:menril_logs', S: stick, H:'#strainers:meshes'}).id('strainers:strainer')
  
  event.custom({type: "strainers:strainer", aboveFluid: "integrateddynamics:menril_resin", chance: 0.7, chanceIncreasePerTier: 0.1, duration: 120, ingredients: [{item: "integrateddynamics:menril_planks"}], minMeshTier: 3,
  output: {item: 'integrateddynamics:crystalized_menril_chunk', count: 1}}).id("desertopolis:menril_from_strainers_fluid")
  
  event.custom({type: "strainers:strainer", aboveBlock: "integrateddynamics:crystalized_menril_block", chance: 0.7, chanceIncreasePerTier: 0.1, duration: 120, ingredients: [{item: "integrateddynamics:menril_planks"}], minMeshTier: 3,
  output: {item: 'integrateddynamics:crystalized_menril_chunk', count: 1}}).id("desertopolis:menril_from_strainers_block")  
  
  event.custom({type: "strainers:strainer", aboveFluid: "integrateddynamics:menril_resin", chance: 1.0, chanceIncreasePerTier: 0.0, duration: 120, ingredients: [{item: "integrateddynamics:menril_berries"}], minMeshTier: 4,
  output: {item: 'integrateddynamics:crystalized_menril_chunk', count: 2}}).id("desertopolis:menril_from_strainers_fluid_berries")  
  
  event.custom({type: "strainers:strainer", aboveBlock: "integrateddynamics:crystalized_menril_block", chance: 1.0, chanceIncreasePerTier: 0.0, duration: 120, ingredients: [{item: "integrateddynamics:menril_berries"}], minMeshTier: 4,
  output: {item: 'integrateddynamics:crystalized_menril_chunk', count: 2}}).id("desertopolis:menril_from_strainers_block_berries")  
  
  event.custom({type: "strainers:strainer", aboveBlock: "integrateddynamics:crystalized_menril_block", chance: 0.5, chanceIncreasePerTier: 0.1, duration: 120, ingredients: [{item: "minecraft:blackstone"}], minMeshTier: 3,
  output: {item: 'minecraft:gilded_blackstone', count: 1}}).id("desertopolis:gilded_blackstone_from_strainers_block")  
  
  event.custom({type: "strainers:strainer", aboveFluid: "strainers:eroding_water_fluid", chance: 0.5, chanceIncreasePerTier: 0.15, duration: 120, ingredients: [{item: "minecraft:gilded_blackstone"}], minMeshTier: 3,
  output: {item: 'minecraft:gold_nugget', count: 3}}).id("desertopolis:gold_nugget_from_strainers_block")  

  event.custom({type: "strainers:strainer", aboveFluid: "strainers:eroding_water_fluid", chance: 1, chanceIncreasePerTier: 0.0, duration: 40, ingredients: [{item: "integrateddynamics:crystalized_menril_chunk"}], minMeshTier: 3,
  output: {item: 'minecraft:redstone', count: 1}}).id("desertopolis:redstone_from_strainers")  

  event.custom({type: "strainers:strainer", aboveFluid: "strainers:eroding_water_fluid", chance: 1, chanceIncreasePerTier: 0.0, duration: 300, ingredients: [{item: "integrateddynamics:crystalized_menril_block"}], minMeshTier: 3,
  output: {item: 'minecraft:redstone_block', count: 1}}).id("desertopolis:redstone_block_from_strainers")  

  event.custom({type: "strainers:strainer", aboveFluid: "strainers:eroding_water_fluid", chance: 0.5, chanceIncreasePerTier: 0.1, duration: 60, ingredients: [{item: "minecraft:cactus"}], minMeshTier: 3,
  output: {item: 'minecraft:slime_ball', count: 1}}).id("desertopolis:slime_ball")  

  event.custom({type: "strainers:strainer", aboveFluid: "bigreactors:cyanite", chance: 0.2, chanceIncreasePerTier: 0.1, duration: 100, ingredients: [{tag: "forge:stone"}], minMeshTier: 1,
  output: {item: 'minecraft:netherrack', count: 1}}).id("desertopolis:netherrack")  

  event.custom({type: "strainers:strainer", aboveFluid: "bigreactors:cyanite", chance: 0.2, chanceIncreasePerTier: 0.1, duration: 100, ingredients: [{item: "minecraft:dirt"}], minMeshTier: 1,
  output: {item: 'minecraft:sculk', count: 1}}).id("desertopolis:sculk")  

  event.custom({type: "strainers:strainer", aboveFluid: "bigreactors:cyanite", chance: 0.2, chanceIncreasePerTier: 0.1, duration: 100, ingredients: [{tag: "forge:sand"}], minMeshTier: 1,
  output: {item: 'minecraft:soul_sand', count: 1}}).id("desertopolis:soul_sand")  

  event.custom({type: "strainers:strainer", aboveFluid: "minecraft:lava", chance: 0.05, chanceIncreasePerTier: 0.05, duration: 100, ingredients: [{item: 'minecraft:netherrack'}], minMeshTier: 4,
  output: {item: 'minecraft:ancient_debris', count: 1}}).id("desertopolis:ancient_debris")  

  event.custom({type: "strainers:strainer", aboveFluid: "strainers:eroding_water_fluid", chance: 1.0, chanceIncreasePerTier: 0.0, duration: 100, ingredients: [{item: 'minecraft:ancient_debris'}], minMeshTier: 4,
  output: {item: 'minecraft:netherite_scrap', count: 1}}).id("desertopolis:netherite_scrap")  

  event.custom({type: "strainers:strainer", aboveFluid: "strainers:eroding_water_fluid", chance: 0.4, chanceIncreasePerTier: 0.1, duration: 100, ingredients: [{item: 'minecraft:sculk'}], minMeshTier: 4,
  output: {item: 'minecraft:echo_shard', count: 1}}).id("desertopolis:echo_shard")  

  event.custom({type: "strainers:strainer", aboveFluid: "strainers:eroding_water_fluid", chance: 0.4, chanceIncreasePerTier: 0.1, duration: 100, ingredients: [{item: 'minecraft:soul_sand'}], minMeshTier: 4,
  output: {item: 'minecraft:wither_skeleton_skull', count: 1}}).id("desertopolis:wither_skeleton_skull") 
  
  event.custom({type: "strainers:strainer", aboveFluid: "bigreactors:cyanite", chance: 0.1, chanceIncreasePerTier: 0.0, duration: 100, ingredients: [{item: "minecraft:netherrack"}], minMeshTier: 6,
  output: {item: 'bigreactors:benitoite_crystal', count: 1}}).id("desertopolis:benitoite_crystal")  
  
  event.custom({type: "strainers:strainer", aboveFluid: "bigreactors:cyanite", chance: 0.1, chanceIncreasePerTier: 0.0, duration: 100, ingredients: [{item: "minecraft:netherrack"}], minMeshTier: 6,
  output: {item: 'bigreactors:anglesite_crystal', count: 1}}).id("desertopolis:anglesite_crystal")  

  event.custom({type: "strainers:summoning", blockBelow: "minecraft:sandstone",ingredients: [{item: "minecraft:leather"},{item: "minecraft:phantom_spawn_egg"}],summonedMob: "minecraft:phantom"})

  event.replaceInput({id: 'strainers:eroding_salt_mulch'}, 'strainers:stone_pebble','integrateddynamics:crystalized_menril_chunk');
  event.replaceInput({id: 'strainers:eroding_salt_mulch'}, 'minecraft:andesite',stone);
  event.replaceInput({id: 'strainers:eroding_salt_mulch'}, 'minecraft:granite',stone);
  event.replaceInput({id: 'strainers:eroding_salt_mulch'}, 'minecraft:diorite',stone);


  //AE2

  event.replaceInput({id: 'ae2:network/blocks/crystal_processing_charger'}, copper_ingot,'integrateddynamics:crystalized_menril_block');
  event.replaceInput({id: 'ae2:network/blocks/crank'}, copper_ingot,'integrateddynamics:crystalized_menril_block');
  event.custom({type: "ae2:charger", ingredient: {item: 'integrateddynamics:crystalized_menril_chunk'}, result: {item: "minecraft:quartz"}}).id('desertopolis:quartz')
  event.custom({type: "ae2:charger", ingredient: {item: 'integrateddynamics:crystalized_menril_block'}, result: {item: "minecraft:blackstone"}}).id('desertopolis:blackstone')
  event.custom({
    "type": "ae2:entropy",
    "input": {
      "block": {
        "id": "minecraft:iron_block"
      }
    },
    "mode": "cool",
    "output": {
      "drops": [
        {
          "item": 'pneumaticcraft:ingot_iron_compressed',
          "count": 3
        }
      ]
    }
  }).id('pneumaticcraft:explosion_crafting/compressed_iron_ingot')

  event.shaped('1x ae2:silicon_press', [' S ', 'SIS', ' S '], {I: '#forge:storage_blocks/iron', S: silicon}).id('desertopolis:silicon_press')

  
  //Ender IO

  event.remove({id:'enderio:fire_crafting/infinity'})
  event.replaceInput({id: 'enderio:primitive_alloy_smelter'}, 'enderio:grains_of_infinity', diamond)
  event.replaceInput({id: 'enderio:void_chassis'}, 'enderio:grains_of_infinity', diamond)
  event.replaceInput({id: 'enderio:void_chassis'}, iron_ingot, 'enderio:grains_of_infinity')
  event.replaceInput({id: 'enderio:sag_mill'}, 'minecraft:piston', 'extractinator:extractinator')
  event.replaceInput({id: 'enderio:photovoltaic_composite'}, '#forge:silicon', "pneumaticcraft:ingot_iron_compressed")
  event.smelting('1x enderio:photovoltaic_plate', 'enderio:photovoltaic_composite').id('enderio:alloy_smelting/photovoltaic_plate')
  event.replaceInput({id: 'enderio:energetic_photovoltaic_module'}, 'enderio:basic_capacitor', "pneumaticcraft:ingot_iron_compressed")


  event.recipes.enderio.alloy_smelting('minecraft:netherite_ingot', ['4x minecraft:netherite_scrap', '4x #forge:ingots/gold']).id('minecraft:netherite_ingot')
  event.recipes.enderio.alloy_smelting('enderio:vibrant_alloy_ingot', ['1x opolisutilities:ender_pearl_fragment', '1x #forge:ingots/energetic_alloy']).id('enderio:alloy_smelting/vibrant_alloy_ingot')
  event.recipes.enderio.alloy_smelting('6x desertopolis:fused_alloy', ['16x desertopolis:hardened_sandstone', '5x enderio:grains_of_infinity', '2x pneumaticcraft:ingot_iron_compressed']).id('desertopolis:fused_alloy')
  event.recipes.enderio.alloy_smelting('5x desertopolis:dullstone', ['desertopolis:fused_alloy', '16x #forge:stone']).id('desertopolis:dullstone')
  event.recipes.enderio.alloy_smelting('1x minecraft:ender_pearl', ['1x desertopolis:fused_alloy', 'opolisutilities:ender_pearl_fragment']).id('desertopolis:ender_pearl_dupe')
  event.recipes.enderio.alloy_smelting('2x minecraft:end_stone', ['minecraft:end_stone', '#forge:stone']).id('desertopolis:end_stone_dupe')
  event.recipes.enderio.alloy_smelting('1x enderio:conductive_alloy_ingot', ['minecraft:redstone', 'minecraft:iron_ingot']).id('enderio:alloy_smelting/conductive_alloy_ingot')
  event.recipes.enderio.alloy_smelting('1x enderio:pulsating_alloy_ingot', ['opolisutilities:ender_pearl_fragment', 'minecraft:iron_ingot']).id('enderio:alloy_smelting/pulsating_alloy_ingot')

  event.custom({type: "enderio:sag_milling","energy": 2400,"input": {"item": "minecraft:deepslate"},
  "outputs": [
      {"chance": 0.05, "item": "enderio:grains_of_infinity"},
      {"chance": 0.01, "item": "enderio:grains_of_infinity"}
    ]
  }).id('desertopolis:more_infinity_dust')

  event.custom({type: "enderio:sag_milling","energy": 2400,"input": {"item": "desertopolis:dullstone"},
  "outputs": [
      {"chance": 1.0, "item": "minecraft:glowstone_dust", "count": 3},
      {"chance": 0.8, "item": "minecraft:glowstone_dust"}
    ]
  }).id('desertopolis:glowstone_dust_dullstone')

  //Pneumaticcraft

  event.custom({type: "pneumaticcraft:pressure_chamber",inputs: [{item: 'enderio:pulsating_powder'}],pressure: 3.0, results: [{count: 8, item: 'bigreactors:yellorium_dust'}]}).id('desertopolis:yellorium_dust')
  event.custom({type: "pneumaticcraft:pressure_chamber",inputs: [{tag: 'forge:dusts/coal'}],pressure: 1.5, results: [{count: 1, item: 'bigreactors:graphite_dust'}]}).id('desertopolis:graphite_dust')
  event.custom({type: "pneumaticcraft:pressure_chamber",inputs: [{tag: 'forge:storage_blocks/lapis'}],pressure: 1.0, results: [{count: 5, item: 'integrateddynamics:crystalized_menril_chunk'}]}).id('desertopolis:crystalized_menril_chunk_pressure_camber')
  event.custom({type: "pneumaticcraft:pressure_chamber",inputs: [{type:"pneumaticcraft:stacked_item", item: "minecraft:wither_skeleton_skull", count: 3}, {type:"pneumaticcraft:stacked_item", item: "minecraft:soul_sand", count: 4}, {item: "minecraft:nether_star"}],pressure: 4.0, results: [{count: 2, item: 'minecraft:nether_star'}]}).id('desertopolis:nether_star')
  event.custom({type: "pneumaticcraft:pressure_chamber",inputs: [{type:"pneumaticcraft:stacked_item", item: "minecraft:slime_block", count: 1}],pressure: 0.25, results: [{count: 32, item: 'refinedstorage:processor_binding'}]}).id('desertopolis:processor_binding')
  
  event.custom({
    "type": "pneumaticcraft:heat_properties",
    "block": "desertopolis:scorching_iron_block",
    "temperature": 1900,
    "thermalResistance": 100,
    "transformCold": {
      "block": "minecraft:iron_block"
    },
    "heatCapacity": 10000
  })

  event.custom({
    "type": "pneumaticcraft:fluid_mixer",
    "input1": {
      "type": "pneumaticcraft:fluid",
      "amount": 50,
      "fluid": "pneumaticcraft:lpg"
    },
    "input2": {
      "type": "pneumaticcraft:fluid",
      "amount": 50,
      "fluid": "pneumaticcraft:diesel"
    },
    "item_output": {
      "item": "minecraft:coal",
      "count": 2
    },
    "pressure": 1.0,
    "time": 80
  }).id('desertopolis:coal_1')

  event.custom({
    "type": "pneumaticcraft:fluid_mixer",
    "input1": {
      "type": "pneumaticcraft:fluid",
      "amount": 50,
      "fluid": "pneumaticcraft:gasoline"
    },
    "input2": {
      "type": "pneumaticcraft:fluid",
      "amount": 50,
      "fluid": "pneumaticcraft:kerosene"
    },
    "item_output": {
      "item": "minecraft:coal",
      "count": 3
    },
    "pressure": 1.0,
    "time": 80
  }).id('desertopolis:coal_2')

  event.custom({
    "type": "pneumaticcraft:fluid_mixer",
    "input1": {
      "type": "pneumaticcraft:fluid",
      "amount": 10,
      "fluid": "integrateddynamics:menril_resin"
    },
    "input2": {
      "type": "pneumaticcraft:fluid",
      "amount": 10,
      "fluid": "minecraft:water"
    },
    "item_output": {
      "item": "integrateddynamics:crystalized_menril_chunk",
      "count": 1
    },
    "pressure": 1.0,
    "time": 80
  }).id('desertopolis:menril_chunk_fluid_mixer')

  event.custom({
    "type": "pneumaticcraft:pressure_chamber",
    "inputs": [
      {
        "item": "minecraft:water_bucket"
      },
      {
        "type": "pneumaticcraft:stacked_item",
        "count": 1,
        "item": "pneumaticcraft:compressed_stone"
      }
    ],
    "pressure": 1.0,
    "results": [
      {
        "count": 1,
        "item": "minecraft:dripstone_block"
      },
      {
        "item": "minecraft:bucket"
      }
    ]
  }).id('desertopolis:dripstone_pressure_chamber')

  event.replaceInput({id: 'pneumaticcraft:refinery_output'}, 'minecraft:diamond', 'ae2:fluix_block')

  //Reactors

  event.replaceInput({id: 'bigreactors:reactor/basic/casing'}, '#forge:sand', '#forge:nuggets/yellorium')
  event.remove({id: 'bigreactors:reactor/reinforced/casing_alt'})


  //Integrated Dynamics

  event.remove({type:'integrateddynamics:drying_basin'})
  event.remove({type:'integrateddynamics:mechanical_drying_basin'})
  event.remove({output:'integrateddynamics:drying_basin'})
  event.remove({output:'integrateddynamics:mechanical_drying_basin'})
  event.custom({type: "integrateddynamics:squeezer", item: "bigreactors:cyanite_ingot", result: {"fluid": {"fluid": "bigreactors:cyanite","amount": 1000}}}).id('desertopolis:liquid_cyanite')


  //MISC

  event.shaped('1x brickfurnace:brick_blast_furnace', ['BBB', 'BFB', 'RRR'], {B:'minecraft:brick', R: 'minecraft:bricks', F: 'brickfurnace:brick_furnace'}).id('brickfurnace:brick_blast_furnace')
  event.shaped('1x minecraft:oak_sapling', ['MMM', 'SM ', 'MM '], {M:'caveopolis:moss_ball', S: 'minecraft:dead_bush'}).id('desertopolis:oak_sapling')
  event.shaped('1x minecraft:birch_sapling', ['MMM', ' S ', 'MMM'], {M:'caveopolis:moss_ball', S: 'minecraft:dead_bush'}).id('desertopolis:birch_sapling')
  event.shaped('1x minecraft:jungle_sapling', ['MMM', '  S', 'MMM'], {M:'caveopolis:moss_ball', S: 'minecraft:dead_bush'}).id('desertopolis:jungle_sapling')
  event.shaped('1x minecraft:acacia_sapling', ['MMM', 'SM ', 'MM '], {M:'caveopolis:moss_ball', S: '#minecraft:saplings'}).id('desertopolis:acacia_sapling')
  event.shaped('1x minecraft:spruce_sapling', ['MMM', ' S ', 'MMM'], {M:'caveopolis:moss_ball', S: '#minecraft:saplings'}).id('desertopolis:spruce_sapling')
  event.shaped('1x minecraft:dark_oak_sapling', ['MMM', '  S', 'MMM'], {M:'caveopolis:moss_ball', S: '#minecraft:saplings'}).id('desertopolis:dark_oak_sapling')
  event.shaped('1x minecraft:cherry_sapling', ['M M', 'MSM', 'M M'], {M:'caveopolis:moss_ball', S: 'minecraft:dead_bush'}).id('desertopolis:cherry_sapling')
  event.shaped('1x minecraft:mangrove_propagule', ['MSM', 'M M', 'M M'], {M:'caveopolis:moss_ball', S: 'minecraft:dead_bush'}).id('desertopolis:mangrove_propagule')

  event.shaped('1x integrateddynamics:menril_sapling', ['MMM', 'WSW', 'MMM'], {M:'caveopolis:moss_ball', S: '#minecraft:saplings', W:'minecraft:water_bucket'}).id('desertopolis:menril_sapling')
  event.shaped('1x minecraft:popped_chorus_fruit', [' F ', 'FAF', ' F '], {F:'ae2:fluix_dust', A: 'minecraft:apple'}).id('desertopolis:popped_chorus_fruit')

  event.shaped('4x minecraft:dragon_breath', [' G ', 'GHG', ' G '], {H:'minecraft:dragon_head', G: 'minecraft:glass_bottle'}).id('desertopolis:dragons_breath')

  event.shaped('1x integratedterminals:menril_glass', ['GGG', 'GMG', 'GGG'], {G:'minecraft:glass', M: 'integrateddynamics:crystalized_menril_chunk'}).id('integrateddynamics:menril_glass')

  event.smelting('1x desertopolis:scorching_iron_block', 'minecraft:iron_block').id('desertopolis:scorching_iron_block')
  event.smelting('3x minecraft:copper_ingot', 'desertopolis:fused_alloy').id('desertopolis:copper_ingot_fused_alloy')
  event.smelting('1x minecraft:emerald', 'enderio:pulsating_powder').id('desertopolis:emerald_from_pulsating_powder')
  event.smelting(Item.of('toughasnails:purified_water_canteen', '{Damage:0}'), Item.of('toughasnails:water_canteen', '{Damage:0}')).id('desertopolis:purified_water_canteen')

  event.replaceInput({id: 'pipez:wrench'}, flint,'integrateddynamics:crystalized_menril_chunk');
  event.replaceInput({id: 'enderio:pulsating_crystal'}, "enderio:pulsating_alloy_ingot",'enderio:pulsating_alloy_nugget');
  event.replaceInput({id: 'enderio:vibrant_crystal'}, "enderio:vibrant_alloy_ingot",'enderio:vibrant_alloy_nugget');
  event.remove({id:'minecraft:netherite_scrap_from_blasting'})
  event.remove({id:'minecraft:netherite_scrap'})
  event.remove({id:'integrateddynamics:squeezer/ore/netherrite_scrap'})
  event.remove({id:'integrateddynamics:mechanical_squeezer/ore/netherrite_scrap'})
  event.remove({id:'bigreactors:blasting/graphite_from_charcoal'})
  event.remove({id:'bigreactors:blasting/graphite_from_coal'})
  event.remove({id:'bigreactors:smelting/graphite_from_charcoal'})
  event.remove({id:'bigreactors:smelting/graphite_from_coal'})
  event.remove({id:'bigreactors:smelting/graphite_from_coalblock'})
  event.remove({id:'bigreactors:blasting/graphite_from_coalblock'})
  event.remove({id:'relics:researching_table'})
  event.remove({id:'integrateddynamics:mechanical_squeezer/ore/gold_nugget_blackstone'})
  event.remove({id:'integrateddynamics:squeezer/ore/gold_nugget_blackstone'})
  event.remove({id:'avaritia:infinity_catalyst'})
  event.remove({type:'avaritia:infinity_catalyst_craft'})
  event.remove({id:'avaritia:infinity_catalyst_craft'})
  event.remove({id:'minecraft:wheat'})
  event.remove({id:'toughasnails:water_purifier'})
  event.remove({id:'pneumaticcraft:explosion_crafting/compressed_iron_block'})
  event.remove({id:'constructionwand:infinity_wand'})
  event.remove({id: 'storagedrawers:conversion_upgrade'})
  event.replaceInput({mod:'dimensional_traders'}, 'minecraft:emerald', 'minecraft:nether_star') 
  event.replaceInput({mod:'dimensional_traders'}, 'minecraft:end_stone', 'minecraft:sandstone') 
  event.replaceInput({mod:'dimensional_traders'}, 'minecraft:obsidian', 'minecraft:netherite_ingot') 
  event.replaceInput({id:'enderio:photovoltaic_composite'}, 'enderio:powdered_lapis_lazuli', 'minecraft:lapis_lazuli') 
  event.remove({type: "opolisutilities:resource_generator"})

  event.shaped('1x pipe_connector:pipe_connector', ['SSS', 'PPP', 'SSS'], {S:'#forge:string', P: '#desertopolis:pipes'}).id('pipe_connector:pipe_connector')

  event.replaceInput({id: 'bigreactors:reactor/reinforced/casing_upgrade_alt'}, "minecraft:iron_block",'minecraft:iron_ingot');
  event.replaceInput({id: 'bigreactors:reactor/reinforced/fuelrod_alt_ingots_uranium'}, "minecraft:iron_block",'minecraft:iron_ingot');
  event.replaceInput({id: 'bigreactors:reactor/reinforced/fuelrod_alt_ingots_yellorium'}, "minecraft:iron_block",'minecraft:iron_ingot');
  event.replaceInput({id: 'bigreactors:reactor/reinforced/fuelrod_alt_ingots_uranium'}, "#forge:glass",'minecraft:iron_ingot');
  event.replaceInput({id: 'bigreactors:reactor/reinforced/fuelrod_alt_ingots_yellorium'}, "#forge:glass",'minecraft:iron_ingot');
  event.replaceInput({id: 'bigreactors:reactor/reinforced/controlrod_alt'}, "minecraft:iron_block",'minecraft:iron_ingot');
  event.replaceInput({id: 'bigreactors:reactor/reinforced/soildaccessport_alt'}, "minecraft:iron_block",'minecraft:iron_ingot');
  event.replaceInput({id: 'bigreactors:reactor/reinforced/fluidaccessport_alt'}, "minecraft:iron_block",'minecraft:iron_ingot');
  event.replaceInput({id: 'bigreactors:reactor/reinforced/redstoneport_alt'}, "minecraft:iron_block",'minecraft:iron_ingot');
  event.replaceInput({id: 'bigreactors:reactor/reinforced/computerport_alt'}, "minecraft:iron_block",'minecraft:iron_ingot');

  event.replaceInput({id: 'bigreactors:turbine/basic/controller'}, "bigreactors:cyanite_block",'bigreactors:cyanite_ingot');
  event.replaceInput({id: 'bigreactors:turbine/basic/casing'}, "bigreactors:cyanite_ingot",'minecraft:iron_nugget');
  event.replaceInput({id: 'bigreactors:turbine/reinforced/controller'}, "bigreactors:cyanite_block",'bigreactors:cyanite_ingot');
  event.replaceInput({id: 'bigreactors:turbine/reinforced/casing_alt'}, "minecraft:iron_block",'minecraft:iron_ingot');
  event.replaceInput({id: 'bigreactors:turbine/reinforced/bearing_alt'}, "minecraft:iron_block",'minecraft:iron_ingot');
  event.replaceInput({id: 'bigreactors:turbine/reinforced/shaft_alt'}, "bigreactors:cyanite_ingot",'bigreactors:basic_turbinerotorshaft');
  event.replaceInput({id: 'bigreactors:turbine/reinforced/shaft_alt'}, "minecraft:iron_block",'bigreactors:cyanite_ingot');
  event.replaceInput({id: 'bigreactors:turbine/reinforced/blade_alt'}, "bigreactors:cyanite_ingot",'bigreactors:basic_turbinerotorblade');
  event.replaceInput({id: 'bigreactors:turbine/reinforced/blade_alt'}, "minecraft:iron_block",'bigreactors:cyanite_ingot');

 
  event.remove({output: 'storagedrawers:conversion_upgrade'})


  //Mass Smelting Removal

  event.remove({output:'#forge:ingots', input:'#forge:raw_materials', type:'minecraft:smelting'})
  event.remove({output:'#forge:dusts', input:'#forge:raw_materials', type:'minecraft:smelting'})

  event.remove({output:'#forge:ingots', input:'#forge:ores', type:'minecraft:smelting'})
  event.remove({output:'#forge:dusts', input:'#forge:ores', type:'minecraft:smelting'})

})