// priority: 0

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

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

ServerEvents.recipes(event => {
    // You can replace `event` with any name you like, as
    // long as you change it inside the callback too!
      event.shaped(
        Item.of('cobblemon:ability_capsule', 1),
        [
          'AAA',
          'BCB',
          'AAA'
        ],
        {
          A: 'minecraft:glass',
          B: 'minecraft:shulker_shell',
          C: 'minecraft:diamond'
        }
      ),

      event.shaped(
        Item.of('cobblemon:ability_patch', 1),
        [
          'ABA',
          'BCB',
          'ABA'
        ],
        {
          A: 'minecraft:paper',
          B: 'minecraft:diamond',
          C: 'cobblemon:ability_capsule'
        }
      ),

      event.shaped(
        Item.of('cobblemon:lucky_egg', 1),
        [
          'ABA',
          'BCB',
          'ABA'
        ],
        {
          A: 'minecraft:diamond',
          B: 'minecraft:rabbit_foot',
          C: 'minecraft:turtle_egg'
        }
      ),

      event.shaped(
        Item.of('kubejs:portable_pc', 1),
        [
          'CBC',
          'BAB',
          'CBC'
        ],
        {
          A: 'minecraft:nether_star',
          B: 'cobblemon:pc',
          C: 'minecraft:netherite_ingot'
        }
      ),

      event.shaped(
        Item.of('kubejs:portable_healer', 1),
        [
          'CBC',
          'BAB',
          'CBC'
        ],
        {
          A: 'minecraft:nether_star',
          B: 'cobblemon:healing_machine',
          C: 'minecraft:netherite_ingot'
        }
      ),

    event.shapeless(
      Item.of('kubejs:gold_bottle_cap', 1),
        [
          'minecraft:enchanted_golden_apple',
          'cobblemon:pomeg_berry',
          'cobblemon:kelpsy_berry',
          'cobblemon:qualot_berry',
          'cobblemon:hondew_berry',
          'cobblemon:grepa_berry',
          'cobblemon:tamato_berry'
        ],
    ),

    event.shaped(
      Item.of('kubejs:white_bottle_cap', 1),
      [
        'CBC',
        'BAB',
        'CBC'
      ],
      {
        A: 'minecraft:iron_block',
        B: 'cobblemon:white_mint_leaf',
        C: 'cobblemon:pomeg_berry'
      }
    ),

    event.shaped(
      Item.of('kubejs:red_bottle_cap', 1),
      [
        'CBC',
        'BAB',
        'CBC'
      ],
      {
        A: 'minecraft:iron_block',
        B: 'cobblemon:red_mint_leaf',
        C: 'cobblemon:kelpsy_berry'
      }
    ),

    event.shaped(
      Item.of('kubejs:blue_bottle_cap', 1),
      [
        'CBC',
        'BAB',
        'CBC'
      ],
      {
        A: 'minecraft:iron_block',
        B: 'cobblemon:blue_mint_leaf',
        C: 'cobblemon:qualot_berry'
      }
    ),

    event.shaped(
      Item.of('kubejs:cyan_bottle_cap', 1),
      [
        'CBC',
        'BAB',
        'CBC'
      ],
      {
        A: 'minecraft:iron_block',
        B: 'cobblemon:cyan_mint_leaf',
        C: 'cobblemon:hondew_berry'
      }
    ),

    event.shaped(
      Item.of('kubejs:pink_bottle_cap', 1),
      [
        'CBC',
        'BAB',
        'CBC'
      ],
      {
        A: 'minecraft:iron_block',
        B: 'cobblemon:pink_mint_leaf',
        C: 'cobblemon:grepa_berry'
      }
    ),

    event.shaped(
      Item.of('kubejs:green_bottle_cap', 1),
      [
        'CBC',
        'BAB',
        'CBC'
      ],
      {
        A: 'minecraft:iron_block',
        B: 'cobblemon:green_mint_leaf',
        C: 'cobblemon:tamato_berry'
      }
    ),

    event.shapeless(
      Item.of('kubejs:perma_weak', 1),
        [
          'minecraft:honey_bottle',
          '3x cobblemon:red_mint_leaf'
        ],
    ),

    event.shapeless(
      Item.of('kubejs:perma_slow', 1),
        [
          'minecraft:honey_bottle',
          '3x cobblemon:green_mint_leaf'
        ],
    ),

    event.shapeless(
      Item.of('kubejs:ev_reset', 1),
        [
          'minecraft:honey_bottle',
          'minecraft:milk_bucket',
          'minecraft:gold_ingot'
        ],
    ),

    event.shapeless(
      Item.of('kubejs:hp_reset', 1),
        [
          'minecraft:glass_bottle',
          'cobblemon:white_mint_leaf'
        ],
    ),

    event.shapeless(
      Item.of('kubejs:attack_reset', 1),
        [
          'minecraft:glass_bottle',
          'cobblemon:red_mint_leaf'
        ],
    ),

    event.shapeless(
      Item.of('kubejs:defense_reset', 1),
        [
          'minecraft:glass_bottle',
          'cobblemon:blue_mint_leaf'
        ],
    ),

    event.shapeless(
      Item.of('kubejs:special_attack_reset', 1),
        [
          'minecraft:glass_bottle',
          'cobblemon:cyan_mint_leaf'
        ],
    ),

    event.shapeless(
      Item.of('kubejs:special_defense_reset', 1),
        [
          'minecraft:glass_bottle',
          'cobblemon:pink_mint_leaf'
        ],
    ),

    event.shapeless(
      Item.of('kubejs:speed_reset', 1),
        [
          'minecraft:glass_bottle',
          'cobblemon:green_mint_leaf'
        ],
    ),

    event.shapeless(
      Item.of('kubejs:hp_max', 1),
        [
          '3x cobblemon:hp_up',
          '3x cobblemon:white_mint_leaf',
          'minecraft:gold_ingot'
        ],
    ),

    event.shapeless(
      Item.of('kubejs:protein_max', 1),
        [
          '3x cobblemon:protein',
          '3x cobblemon:red_mint_leaf',
          'minecraft:gold_ingot'
        ],
    ),

    event.shapeless(
      Item.of('kubejs:iron_max', 1),
        [
          '3x cobblemon:iron',
          '3x cobblemon:blue_mint_leaf',
          'minecraft:gold_ingot'
        ],
    ),

    event.shapeless(
      Item.of('kubejs:calcium_max', 1),
        [
          '3x cobblemon:calcium',
          '3x cobblemon:cyan_mint_leaf',
          'minecraft:gold_ingot'
        ],
    ),

    event.shapeless(
      Item.of('kubejs:zinc_max', 1),
        [
          '3x cobblemon:zinc',
          '3x cobblemon:pink_mint_leaf',
          'minecraft:gold_ingot'
        ],
    ),

    event.shapeless(
      Item.of('kubejs:carbos_max', 1),
        [
          '3x cobblemon:carbos',
          '3x cobblemon:green_mint_leaf',
          'minecraft:gold_ingot'
        ],
    ),

    event.shaped(
      Item.of('simpletms:tr_blank', 1),
      [
        ' B ',
        'BAB',
        ' B '
      ],
      {
        A: 'minecraft:compass',
        B: 'minecraft:gold_ingot'
      }
    ),

    event.shaped(
      Item.of('simpletms:tm_blank', 1),
      [
        ' B ',
        'BAB',
        ' B '
      ],
      {
        A: 'minecraft:diamond',
        B: 'simpletms:tr_blank'
      }
    ),

    event.shaped(
      Item.of('kubejs:shiny_dust', 1),
      [
        'CBC',
        'BAB',
        'CBC'
      ],
      {
        A: 'minecraft:glowstone_dust',
        B: 'minecraft:nether_star',
        C: 'minecraft:echo_shard'
      }
    ),

    event.shaped(
      Item.of('cobblemon:galarica_cuff', 1),
      [
        'BAA',
        'B A',
        'BBB'
      ],
      {
        A: 'minecraft:spore_blossom',
        B: 'minecraft:stick'
      }
    ),

    event.shaped(
      Item.of('cobblemon:galarica_wreath', 1),
      [
        'ABA',
        'B B',
        'ABA'
      ],
      {
        A: 'minecraft:spore_blossom',
        B: 'minecraft:stick'
      }
    ),

    event.remove({ id: 'create_cobblemon:candy_s_to_m' }),
    event.remove({ id: 'create_cobblemon:candy_m_to_l' }),
    event.remove({ id: 'create_cobblemon:candy_l_to_xl' }),

    event.shapeless(
      Item.of('cobblemon:exp_candy_m', 1),
        [
          '3x cobblemon:exp_candy_s'
        ],
    ),

    event.shapeless(
      Item.of('cobblemon:exp_candy_l', 1),
        [
          '3x cobblemon:exp_candy_m'
        ],
    ),

    event.shapeless(
      Item.of('cobblemon:exp_candy_xl', 1),
        [
          '3x cobblemon:exp_candy_l'
        ],
    ),

    event.recipes.create.crushing([
      Item.of('cobblemon:exp_candy_xs').withChance(0.75), 
      Item.of('cobblemon:exp_candy_s').withChance(0.2),
      Item.of('cobblemon:exp_candy_m').withChance(0.08),
      Item.of('cobblemon:exp_candy_l').withChance(0.02),
      Item.of('cobblemon:exp_candy_xl').withChance(0.005)], 
    'create:experience_nugget'),

    event.shapeless(
      Item.of('simpletms:tm_toxic', 1),
        [
          'simpletms:tm_blank',
          'cobblemon:kebia_berry',
          'minecraft:poisonous_potato'
        ],
    ),

    event.shapeless(
      Item.of('simpletms:tm_teleport', 1),
        [
          'simpletms:tm_blank',
          'cobblemon:payapa_berry',
          'minecraft:ender_pearl'
        ],
    ),

    event.shapeless(
      Item.of('simpletms:tm_uturn', 1),
        [
          'simpletms:tm_blank',
          'cobblemon:tanga_berry',
          'minecraft:minecart'
        ],
    ),

    event.shapeless(
      Item.of('simpletms:tm_voltswitch', 1),
        [
          'simpletms:tm_blank',
          'cobblemon:wacan_berry',
          'minecraft:redstone_torch'
        ],
    ),

    event.shapeless(
      Item.of('simpletms:tm_flipturn', 1),
        [
          'simpletms:tm_blank',
          'cobblemon:passho_berry',
          'minecraft:lily_pad'
        ],
    ),

    event.shapeless(
      Item.of('simpletms:tm_knockoff', 1),
        [
          'simpletms:tm_blank',
          'cobblemon:colbur_berry',
          'minecraft:piston'
        ],
    ),

    event.shapeless(
      Item.of('simpletms:tm_roost', 1),
        [
          'simpletms:tm_blank',
          'cobblemon:coba_berry',
          'minecraft:feather'
        ],
    ),

    event.shapeless(
      Item.of('simpletms:tm_defog', 1),
        [
          'simpletms:tm_blank',
          'cobblemon:coba_berry',
          'quark:bottled_cloud'
        ],
    ),

    event.shapeless(
      Item.of('simpletms:tm_stealthrock', 1),
        [
          'simpletms:tm_blank',
          'cobblemon:charti_berry',
          'minecraft:dripstone'
        ],
    ),

    event.shapeless(
      Item.of('simpletms:tm_spikes', 1),
        [
          'simpletms:tm_blank',
          'cobblemon:shuca_berry',
          'minecraft:pointed_dripstone'
        ],
    ),

    event.shapeless(
      Item.of('simpletms:tm_toxicspikes', 1),
        [
          'simpletms:tm_blank',
          'cobblemon:kebia_berry',
          'minecraft:pointed_dripstone'
        ],
    ),

    event.shapeless(
      Item.of('simpletms:tm_dragondance', 1),
        [
          'simpletms:tm_blank',
          'cobblemon:haban_berry',
          'minecraft:dragon_breath'
        ],
    ),

    event.shapeless(
      Item.of('simpletms:tm_swordsdance', 1),
        [
          'simpletms:tm_blank',
          'cobblemon:chilan_berry',
          'minecraft:golden_sword'
        ],
    ),

    event.shapeless(
      Item.of('simpletms:tm_nastyplot', 1),
        [
          'simpletms:tm_blank',
          'cobblemon:colbur_berry',
          'minecraft:blaze_powder'
        ],
    ),

    event.shapeless(
      Item.of('simpletms:tm_scald', 1),
        [
          'simpletms:tm_blank',
          'cobblemon:passho_berry',
          'minecraft:lava_bucket'
        ],
    ),

    event.shapeless(
      Item.of('simpletms:tm_scaleshot', 1),
        [
          'simpletms:tm_blank',
          'cobblemon:haban_berry',
          'cobblemon:dragon_scale'
        ],
    ),

    event.shapeless(
      Item.of('simpletms:tm_tripleaxel', 1),
        [
          'simpletms:tm_blank',
          'cobblemon:yache_berry',
          'minecraft:golden_sword'
        ],
    ),

    event.shapeless(
      Item.of('simpletms:tm_substitute', 1),
        [
          'simpletms:tm_blank',
          'cobblemon:chilan_berry',
          'minecraft:shield'
        ],
    ),

    event.shapeless(
      Item.of('simpletms:tm_protect', 1),
        [
          'simpletms:tm_blank',
          'cobblemon:chilan_berry',
          'minecraft:iron_chestplate'
        ],
    ),
  
    console.log('Hello! The recipe event has fired!')
  })