// Scripts for gourmet farming

ServerEvents.tags('item', event => {
	
// Tags for raw crystal catalyst
event.add('kubejs:gourmet_crops', 'kubejs:gourmet_apple')
event.add('kubejs:gourmet_crops', 'kubejs:gourmet_potato')
event.add('kubejs:gourmet_crops', 'kubejs:gourmet_beetroot')
event.add('kubejs:gourmet_crops', 'kubejs:gourmet_pumpkin_slice')
event.add('kubejs:gourmet_crops', 'kubejs:gourmet_cactus_slice')
event.add('kubejs:gourmet_crops', 'kubejs:gourmet_sugar_cane')
event.add('kubejs:gourmet_crops', 'kubejs:gourmet_carrot')
event.add('kubejs:gourmet_crops', 'kubejs:gourmet_sweet_berries')
event.add('kubejs:gourmet_crops', 'kubejs:gourmet_melon_slice')
event.add('kubejs:gourmet_crops', 'kubejs:gourmet_wheat')
	
})

ServerEvents.recipes(event => {

// Sugar glass jars
event.recipes.create.compacting(['kubejs:glass_jar'], [Fluid.of(('minecraft:water'), 1000), Fluid.of(('thermal:syrup'), 250), '4x minecraft:sugar']).heated()

// Jellies
event.recipes.create.compacting(['kubejs:apple_jelly'], ['kubejs:glass_jar', 'kubejs:gourmet_apple', 'minecraft:slime_ball', 'minecraft:snowball'])
event.recipes.create.compacting(['kubejs:potato_jelly'], ['kubejs:glass_jar', 'kubejs:gourmet_potato', 'minecraft:slime_ball', 'minecraft:snowball'])
event.recipes.create.compacting(['kubejs:beetroot_jelly'], ['kubejs:glass_jar', 'kubejs:gourmet_beetroot', 'minecraft:slime_ball', 'minecraft:snowball'])
event.recipes.create.compacting(['kubejs:pumpkin_jelly'], ['kubejs:glass_jar', 'kubejs:gourmet_pumpkin_slice', 'minecraft:slime_ball', 'minecraft:snowball'])
event.recipes.create.compacting(['kubejs:cactus_jelly'], ['kubejs:glass_jar', 'kubejs:gourmet_cactus_slice', 'minecraft:slime_ball', 'minecraft:snowball'])
event.recipes.create.compacting(['kubejs:sugar_jelly'], ['kubejs:glass_jar', 'kubejs:gourmet_sugar_cane', 'minecraft:slime_ball', 'minecraft:snowball'])
event.recipes.create.compacting(['kubejs:carrot_jelly'], ['kubejs:glass_jar', 'kubejs:gourmet_carrot', 'minecraft:slime_ball', 'minecraft:snowball'])
event.recipes.create.compacting(['kubejs:sweet_jelly'], ['kubejs:glass_jar', 'kubejs:gourmet_sweet_berries', 'minecraft:slime_ball', 'minecraft:snowball'])
event.recipes.create.compacting(['kubejs:melon_jelly'], ['kubejs:glass_jar', 'kubejs:gourmet_melon_slice', 'minecraft:slime_ball', 'minecraft:snowball'])
event.recipes.create.compacting(['kubejs:wheat_jelly'], ['kubejs:glass_jar', 'kubejs:gourmet_wheat', 'minecraft:slime_ball', 'minecraft:snowball'])

// Mid-Tier Jelly
event.recipes.create.mixing(['kubejs:fruit_jelly'], ['kubejs:apple_jelly', 'kubejs:pumpkin_jelly', 'kubejs:sugar_jelly', 'kubejs:sweet_jelly', 'kubejs:melon_jelly'])
event.recipes.create.mixing(['kubejs:vegetable_jelly'], ['kubejs:carrot_jelly', 'kubejs:potato_jelly', 'kubejs:beetroot_jelly', 'kubejs:cactus_jelly', 'kubejs:wheat_jelly'])
event.recipes.create.deploying('kubejs:rainbow_jelly', ['kubejs:fruit_jelly', 'kubejs:vegetable_jelly'])

// Mash
event.recipes.create.compacting(['kubejs:apple_mash'], ['minecraft:apple'])
event.recipes.create.compacting(['kubejs:potato_mash'], ['minecraft:potato'])
event.recipes.create.compacting(['kubejs:beetroot_mash'], ['minecraft:beetroot'])
event.recipes.create.compacting(['kubejs:pumpkin_mash'], ['minecraft:pumpkin'])
event.recipes.create.compacting(['kubejs:cactus_mash'], ['minecraft:cactus'])
event.recipes.create.compacting(['kubejs:sugar_cane_mash'], ['minecraft:sugar_cane'])
event.recipes.create.compacting(['kubejs:carrot_mash'], ['minecraft:carrot'])
event.recipes.create.compacting(['kubejs:sweet_berry_mash'], ['minecraft:sweet_berries'])
event.recipes.create.compacting(['kubejs:melon_mash'], ['minecraft:melon_slice'])
event.recipes.create.compacting(['kubejs:wheat_mash'], ['minecraft:wheat'])

// Enr Seeds
event.recipes.create.mixing(['kubejs:enriched_apple_seed'], ['64x kubejs:apple_mash', '8x mekanism:bio_fuel', '8x minecraft:bone_meal'])
event.recipes.create.mixing(['kubejs:enriched_potato_seed'], ['64x kubejs:potato_mash', '8x mekanism:bio_fuel', '8x minecraft:bone_meal'])
event.recipes.create.mixing(['kubejs:enriched_beetroot_seed'], ['64x kubejs:beetroot_mash', '8x mekanism:bio_fuel', '8x minecraft:bone_meal'])
event.recipes.create.mixing(['kubejs:enriched_pumpkin_seed'], ['64x kubejs:pumpkin_mash', '8x mekanism:bio_fuel', '8x minecraft:bone_meal'])
event.recipes.create.mixing(['kubejs:enriched_cactus_seed'], ['64x kubejs:cactus_mash', '8x mekanism:bio_fuel', '8x minecraft:bone_meal'])
event.recipes.create.mixing(['kubejs:enriched_sugar_cane_seed'], ['64x kubejs:sugar_cane_mash', '8x mekanism:bio_fuel', '8x minecraft:bone_meal'])
event.recipes.create.mixing(['kubejs:enriched_carrot_seed'], ['64x kubejs:carrot_mash', '8x mekanism:bio_fuel', '8x minecraft:bone_meal'])
event.recipes.create.mixing(['kubejs:enriched_sweet_berry_seed'], ['64x kubejs:sweet_berry_mash', '8x mekanism:bio_fuel', '8x minecraft:bone_meal'])
event.recipes.create.mixing(['kubejs:enriched_melon_seed'], ['64x kubejs:melon_mash', '8x mekanism:bio_fuel', '8x minecraft:bone_meal'])
event.recipes.create.mixing(['kubejs:enriched_wheat_seed'], ['64x kubejs:wheat_mash', '8x mekanism:bio_fuel', '8x minecraft:bone_meal'])

// Seed growing
event.custom({
  "type": "thermal:insolator",
  "ingredient": {
    "item": "kubejs:enriched_apple_seed"
  },
  "result": [
    {
      "item": "kubejs:gourmet_apple",
      "chance": 1
    },
	{
      "item": "kubejs:enriched_apple_seed",
      "chance": 0.5
    }
  ],
  "experience": 0.15
})

event.custom({
  "type": "thermal:insolator",
  "ingredient": {
    "item": "kubejs:enriched_potato_seed"
  },
  "result": [
    {
      "item": "kubejs:gourmet_potato",
      "chance": 1
    },
	{
      "item": "kubejs:enriched_potato_seed",
      "chance": 0.5
    }
  ],
  "experience": 0.15
})

event.custom({
  "type": "thermal:insolator",
  "ingredient": {
    "item": "kubejs:enriched_beetroot_seed"
  },
  "result": [
    {
      "item": "kubejs:gourmet_beetroot",
      "chance": 1
    },
	{
      "item": "kubejs:enriched_beetroot_seed",
      "chance": 0.5
    }
  ],
  "experience": 0.15
})

event.custom({
  "type": "thermal:insolator",
  "ingredient": {
    "item": "kubejs:enriched_pumpkin_seed"
  },
  "result": [
    {
      "item": "kubejs:gourmet_pumpkin_slice",
      "chance": 1
    },
	{
      "item": "kubejs:enriched_pumpkin_seed",
      "chance": 0.5
    }
  ],
  "experience": 0.15
})

event.custom({
  "type": "thermal:insolator",
  "ingredient": {
    "item": "kubejs:enriched_cactus_seed"
  },
  "result": [
    {
      "item": "kubejs:gourmet_cactus_slice",
      "chance": 1
    },
	{
      "item": "kubejs:enriched_cactus_seed",
      "chance": 0.5
    }
  ],
  "experience": 0.15
})

event.custom({
  "type": "thermal:insolator",
  "ingredient": {
    "item": "kubejs:enriched_sugar_cane_seed"
  },
  "result": [
    {
      "item": "kubejs:gourmet_sugar_cane",
      "chance": 1
    },
	{
      "item": "kubejs:enriched_sugar_cane_seed",
      "chance": 0.5
    }
  ],
  "experience": 0.15
})

event.custom({
  "type": "thermal:insolator",
  "ingredient": {
    "item": "kubejs:enriched_carrot_seed"
  },
  "result": [
    {
      "item": "kubejs:gourmet_carrot",
      "chance": 1
    },
	{
      "item": "kubejs:enriched_carrot_seed",
      "chance": 0.5
    }
  ],
  "experience": 0.15
})

event.custom({
  "type": "thermal:insolator",
  "ingredient": {
    "item": "kubejs:enriched_sweet_berry_seed"
  },
  "result": [
    {
      "item": "kubejs:gourmet_sweet_berries",
      "chance": 1
    },
	{
      "item": "kubejs:enriched_sweet_berry_seed",
      "chance": 0.5
    }
  ],
  "experience": 0.15
})

event.custom({
  "type": "thermal:insolator",
  "ingredient": {
    "item": "kubejs:enriched_melon_seed"
  },
  "result": [
    {
      "item": "kubejs:gourmet_melon_slice",
      "chance": 1
    },
	{
      "item": "kubejs:enriched_melon_seed",
      "chance": 0.5
    }
  ],
  "experience": 0.15
})

event.custom({
  "type": "thermal:insolator",
  "ingredient": {
    "item": "kubejs:enriched_wheat_seed"
  },
  "result": [
    {
      "item": "kubejs:gourmet_wheat",
      "chance": 1
    },
	{
      "item": "kubejs:enriched_wheat_seed",
      "chance": 0.5
    }
  ],
  "experience": 0.15
})

})