// priority: 0

//Loot Table Modification

MoreJSEvents.villagerTrades((event) => {

  event.removeVanillaTrades();
  event.removeModdedTrades();

  //Farmer

  /*

  event.addTrade("farmer", 1, '14x minecraft:wheat', '1x opolisutilities:b_bucks').villagerExperience(4)
  event.addTrade("farmer", 1, '14x minecraft:beetroot', '1x opolisutilities:b_bucks').villagerExperience(4)
  event.addTrade("farmer", 1, '14x minecraft:carrot', '1x opolisutilities:b_bucks').villagerExperience(4)
  event.addTrade("farmer", 1, '14x minecraft:potato', '1x opolisutilities:b_bucks').villagerExperience(4)
  event.addTrade("farmer", 1, '12x minecraft:cactus', '1x opolisutilities:b_bucks').villagerExperience(4)

  event.addTrade("farmer", 2, '2x opolisutilities:b_bucks', '4x minecraft:bread').villagerExperience(12)
  event.addTrade("farmer", 2, '14x farmersdelight:cabbage', '4x opolisutilities:b_bucks').villagerExperience(12)
  event.addTrade("farmer", 2, '14x farmersdelight:tomato', '4x opolisutilities:b_bucks').villagerExperience(12)
  event.addTrade("farmer", 2, '14x farmersdelight:onion', '4x opolisutilities:b_bucks').villagerExperience(12)

  event.addTrade("farmer", 3, '2x farmersdelight:onion', '4x opolisutilities:b_bucks').villagerExperience(21)
  event.addTrade("farmer", 3, '5x opolisutilities:b_bucks', '3x farmersdelight:organic_compost').villagerExperience(21)
  event.addTrade("farmer", 3, '6x opolisutilities:b_bucks', '2x farmersdelight:apple_pie').villagerExperience(21)
  event.addTrade("farmer", 3, '6x opolisutilities:b_bucks', '2x farmersdelight:sweet_berry_cheesecake').villagerExperience(21)
  event.addTrade("farmer", 3, '6x opolisutilities:b_bucks', '2x farmersdelight:chocolate_pie').villagerExperience(21)

  event.addTrade("farmer", 4, ['8x farmersdelight:horse_feed', '16x opolisutilities:b_bucks'], '2x villagersellanimals:crate_foal').villagerExperience(50)
  event.addTrade("farmer", 4, ['8x minecraft:bone', '16x opolisutilities:b_bucks'], '2x villagersellanimals:crate_wolf_pup').villagerExperience(50)

  event.addTrade("farmer", 5, ['8x minecraft:red_mushroom', '16x opolisutilities:b_bucks'], '2x villagersellanimals:crate_red_mooshroom')
  event.addTrade("farmer", 5, ['8x minecraft:brown_mushroom', '16x opolisutilities:b_bucks'], '2x villagersellanimals:crate_brown_mooshroom')

  //Armorer

  event.addTrade("armorer", 1, '3x opolisutilities:b_bucks', Item.of('toughasnails:leaf_helmet', '{Damage:0}').enchant('minecraft:unbreaking', 3).enchant('enderio:soulbound', 1)).villagerExperience(4)
  event.addTrade("armorer", 1, '3x opolisutilities:b_bucks', Item.of('toughasnails:leaf_chestplate', '{Damage:0}').enchant('minecraft:unbreaking', 3).enchant('enderio:soulbound', 1)).villagerExperience(4)
  event.addTrade("armorer", 1, '3x opolisutilities:b_bucks', Item.of('toughasnails:leaf_leggings', '{Damage:0}').enchant('minecraft:unbreaking', 3).enchant('enderio:soulbound', 1)).villagerExperience(4)
  event.addTrade("armorer", 1, '3x opolisutilities:b_bucks', Item.of('toughasnails:leaf_boots', '{Damage:0}').enchant('minecraft:unbreaking', 3).enchant('enderio:soulbound', 1)).villagerExperience(4)
  event.addTrade("armorer", 1, '3x opolisutilities:b_bucks', 'minecraft:stone_sword').villagerExperience(4)
  
  event.addTrade("armorer", 2, '6x opolisutilities:b_bucks', Item.of('bettercopper:copper_helmet', '{Damage:0}').enchant('minecraft:unbreaking', 3).enchant('enderio:soulbound', 1)).villagerExperience(12)
  event.addTrade("armorer", 2, '6x opolisutilities:b_bucks', Item.of('bettercopper:copper_chestplate', '{Damage:0}').enchant('minecraft:unbreaking', 3).enchant('enderio:soulbound', 1)).villagerExperience(12)
  event.addTrade("armorer", 2, '6x opolisutilities:b_bucks', Item.of('bettercopper:copper_leggings', '{Damage:0}').enchant('minecraft:unbreaking', 3).enchant('enderio:soulbound', 1)).villagerExperience(12)
  event.addTrade("armorer", 2, '6x opolisutilities:b_bucks', Item.of('bettercopper:copper_boots', '{Damage:0}').enchant('minecraft:unbreaking', 3).enchant('enderio:soulbound', 1)).villagerExperience(12)
  event.addTrade("armorer", 2, '4x opolisutilities:b_bucks', 'bettercopper:copper_sword').villagerExperience(12)
  
  event.addTrade("armorer", 3, '1x minecraft:leather_horse_armor', '3x opolisutilities:b_bucks').villagerExperience(50)
  event.addTrade("armorer", 3, '1x minecraft:diamond_horse_armor', '12x opolisutilities:b_bucks').villagerExperience(50)
  event.addTrade("armorer", 3, '1x minecraft:golden_horse_armor', '9x opolisutilities:b_bucks').villagerExperience(50)
  event.addTrade("armorer", 3, '1x minecraft:iron_horse_armor', '6x opolisutilities:b_bucks').villagerExperience(50)
   
  event.addTrade("armorer", 4, '9x opolisutilities:b_bucks', Item.of('lapis_lazuli:lapislazuli_armor_helmet', '{Damage:0}').enchant('minecraft:unbreaking', 3).enchant('enderio:soulbound', 1)).villagerExperience(21)
  event.addTrade("armorer", 4, '9x opolisutilities:b_bucks', Item.of('lapis_lazuli:lapislazuli_armor_chestplate', '{Damage:0}').enchant('minecraft:unbreaking', 3).enchant('enderio:soulbound', 1)).villagerExperience(21)
  event.addTrade("armorer", 4, '9x opolisutilities:b_bucks', Item.of('lapis_lazuli:lapislazuli_armor_leggings', '{Damage:0}').enchant('minecraft:unbreaking', 3).enchant('enderio:soulbound', 1)).villagerExperience(21)
  event.addTrade("armorer", 4, '9x opolisutilities:b_bucks', Item.of('lapis_lazuli:lapislazuli_armor_boots', '{Damage:0}').enchant('minecraft:unbreaking', 3).enchant('enderio:soulbound', 1)).villagerExperience(21)
  event.addTrade("armorer", 4, '9x opolisutilities:b_bucks', 'lapis_lazuli:lapislazuli_sword').villagerExperience(21)
   
  event.addTrade("armorer", 5, '9x opolisutilities:b_bucks', 'minecraft:netherite_upgrade_smithing_template')

  //Butcher
  /*

  event.addTrade("butcher", 1, '8x minecraft:chicken', '4x opolisutilities:b_bucks').villagerExperience(4)
  event.addTrade("butcher", 1, '3x minecraft:leather', '5x opolisutilities:b_bucks').villagerExperience(4)

  event.addTrade("butcher", 2, '3x opolisutilities:b_bucks', '2x farmersdelight:beef_stew').villagerExperience(12)
  event.addTrade("butcher", 2, '3x opolisutilities:b_bucks', '2x minecraft:rabbit_stew').villagerExperience(12)
  event.addTrade("butcher", 2, '3x opolisutilities:b_bucks', '7x opolisutilities:jerky').villagerExperience(12)

  event.addTrade("butcher", 3, '2x opolisutilities:b_bucks', '1x farmersdelight:flint_knife').villagerExperience(21)
  event.addTrade("butcher", 3, '5x opolisutilities:b_bucks', '1x farmersdelight:iron_knife').villagerExperience(21)
  event.addTrade("butcher", 3, '5x opolisutilities:b_bucks', '1x farmersdelight:golden_knife').villagerExperience(21)

//event.addTrade("butcher", 4, '5x opolisutilities:b_bucks', '1x farmersdelight:golden_knife').villagerExperience(21)
//event.addTrade("butcher", 5, '5x opolisutilities:b_bucks', '1x farmersdelight:golden_knife').villagerExperience(21)


  //Cartographer



  event.addTrade("cartographer", 1, '12x opolisutilities:b_bucks', '1x minecraft:sugar_cane').villagerExperience(4)
  event.addTrade("cartographer", 1, '3x minecraft:paper', '1x opolisutilities:b_bucks').villagerExperience(4)

  event.addTrade("cartographer", 2, '8x opolisutilities:b_bucks', 'desertopolis:pillager_map').villagerExperience(50)
  event.addTrade("cartographer", 2, '1x opolisutilities:b_bucks', '3x minecraft:item_frame').villagerExperience(12)

  event.addTrade("cartographer", 3, '8x opolisutilities:b_bucks', 'desertopolis:village_map').villagerExperience(50)
  event.addTrade("cartographer", 3, '5x opolisutilities:b_bucks', '1x minecraft:piglin_banner_pattern').villagerExperience(12)

  event.addTrade("cartographer", 4, '32x opolisutilities:b_bucks', 'desertopolis:mineshaft_map').villagerExperience(50)
  event.addTrade("cartographer", 4, '20x opolisutilities:b_bucks', '1x minecraft:enchanted_golden_apple').villagerExperience(50)

  event.addTrade("cartographer", 5, '32x opolisutilities:b_bucks', 'desertopolis:great_pyramid_map').villagerExperience(50)
  event.addTrade("cartographer", 5, '32x opolisutilities:b_bucks', 'desertopolis:red_sandstone_temple_map').villagerExperience(50)
  
  //Fisherman

  event.addTrade("fisherman", 1, '4x minecraft:string', '1x opolisutilities:b_bucks').villagerExperience(4)
  event.addTrade("fisherman", 1, '4x minecraft:stick', '1x opolisutilities:b_bucks').villagerExperience(4)
  event.addTrade("fisherman", 1, '2x opolisutilities:b_bucks', '8x minecraft:salmon').villagerExperience(12)
  event.addTrade("fisherman", 1, '2x opolisutilities:b_bucks', '8x minecraft:cod').villagerExperience(12)

  event.addTrade("fisherman", 2, '8x opolisutilities:b_bucks', '1x minecraft:tropical_fish').villagerExperience(12)
  event.addTrade("fisherman", 2, '8x opolisutilities:b_bucks', '1x minecraft:pufferfish').villagerExperience(12)
  event.addTrade("fisherman", 2, '2x opolisutilities:b_bucks', '5x minecraft:bone_meal').villagerExperience(21)

  event.addTrade("fisherman", 3, '5x opolisutilities:b_bucks', '3x minecraft:ink_sac').villagerExperience(21)
  event.addTrade("fisherman", 3, '5x opolisutilities:b_bucks', '3x minecraft:glow_ink_sac').villagerExperience(21)
  event.addTrade("fisherman", 3, '2x opolisutilities:b_bucks', '5x minecraft:bone').villagerExperience(21)

  event.addTrade("fisherman", 4, '6x opolisutilities:b_bucks', Item.of('strainers:bamboo_mesh', '{Damage:0}').enchant('minecraft:unbreaking', 3)).villagerExperience(21)
  event.addTrade("fisherman", 4, '7x opolisutilities:b_bucks', Item.of('strainers:string_mesh', '{Damage:0}').enchant('minecraft:unbreaking', 3)).villagerExperience(21)
  event.addTrade("fisherman", 4, '16x opolisutilities:b_bucks', Item.of('strainers:iron_mesh', '{Damage:0}').enchant('minecraft:unbreaking', 3)).villagerExperience(21)
  event.addTrade("fisherman", 4, '16x opolisutilities:b_bucks', Item.of('strainers:gold_mesh', '{Damage:0}').enchant('minecraft:unbreaking', 3)).villagerExperience(21)
  event.addTrade("fisherman", 4, '6x opolisutilities:b_bucks', Item.of('strainers:flint_mesh', '{Damage:0}').enchant('minecraft:unbreaking', 3)).villagerExperience(21)
  
  event.addTrade("fisherman", 5, '30x opolisutilities:b_bucks', 'strainers:specialized_mesh_upgrade')
  event.addTrade("fisherman", 5, '30x opolisutilities:b_bucks', 'strainers:specialized_input_upgrade')


  //Leatherworker

  /*

  event.addTrade("leatherworker", 1, '6x minecraft:leather', '1x opolisutilities:b_bucks').villagerExperience(4)
  event.addTrade("leatherworker", 1, '1x opolisutilities:b_bucks', '1x minecraft:leather_helmet').villagerExperience(4)
  
  event.addTrade("leatherworker", 2, '1x opolisutilities:b_bucks', '1x minecraft:leather_chestplate').villagerExperience(12)
  event.addTrade("leatherworker", 2, '1x opolisutilities:b_bucks', '1x minecraft:leather_leggings').villagerExperience(12)
  event.addTrade("leatherworker", 2, '1x opolisutilities:b_bucks', '1x minecraft:leather_boots').villagerExperience(12)




  event.addTrade("leatherworker", 5, '24x opolisutilities:b_bucks', '1x villagersellanimals:crate_calf')
  event.addTrade("leatherworker", 5, '24x opolisutilities:b_bucks', '1x relics:leather_belt')

  






  //Librarian

  event.addTrade("librarian", 1, '12x minecraft:paper', '1x opolisutilities:b_bucks').villagerExperience(4)
  event.addTrade("librarian", 1, '3x minecraft:book', '1x opolisutilities:b_bucks').villagerExperience(4)

  event.addTrade("librarian", 2, '3x minecraft:ink_sac', '1x opolisutilities:b_bucks').villagerExperience(12)
  event.addTrade("librarian", 2, '3x minecraft:writable_book', '1x opolisutilities:b_bucks').villagerExperience(12)

  event.addTrade("librarian", 3, '8x opolisutilities:b_bucks', Item.of('minecraft:enchanted_book').enchant('minecraft:sharpness', 1)).villagerExperience(21)
  event.addTrade("librarian", 3, '8x opolisutilities:b_bucks', Item.of('minecraft:enchanted_book').enchant('minecraft:unbreaking', 1)).villagerExperience(21)
  event.addTrade("librarian", 3, '8x opolisutilities:b_bucks', Item.of('minecraft:enchanted_book').enchant('minecraft:power', 1)).villagerExperience(21)
  event.addTrade("librarian", 3, '8x opolisutilities:b_bucks', Item.of('minecraft:enchanted_book').enchant('minecraft:flame', 1)).villagerExperience(21)

  event.addTrade("librarian", 4, '12x opolisutilities:b_bucks', Item.of('minecraft:enchanted_book').enchant('minecraft:sharpness', 2)).villagerExperience(21)
  event.addTrade("librarian", 4, '12x opolisutilities:b_bucks', Item.of('minecraft:enchanted_book').enchant('minecraft:unbreaking', 2)).villagerExperience(21)
  event.addTrade("librarian", 4, '12x opolisutilities:b_bucks', Item.of('minecraft:enchanted_book').enchant('minecraft:power', 2)).villagerExperience(21)
  event.addTrade("librarian", 4, '12x opolisutilities:b_bucks', Item.of('minecraft:enchanted_book').enchant('minecraft:knockback', 2)).villagerExperience(21)

  event.addTrade("librarian", 5, '32x opolisutilities:b_bucks', Item.of('minecraft:enchanted_book').enchant('minecraft:mending', 1))
  event.addTrade("librarian", 5, '4x opolisutilities:b_bucks', '8x minecraft:experience_bottle') 

  //Mason

  /*
  event.addTrade("mason", 1, '10x minecraft:clay_ball', '1x opolisutilities:b_bucks').villagerExperience(4)
  event.addTrade("mason", 1, '1x opolisutilities:b_bucks', '5x minecraft:terracotta').villagerExperience(4)
  event.addTrade("mason", 1, '10x minecraft:sandstone', '1x opolisutilities:b_bucks').villagerExperience(4)

  event.addTrade("mason", 2, '10x minecraft:stone', '1x opolisutilities:b_bucks').villagerExperience(4)
  event.addTrade("mason", 2, '12x minecraft:cobblestone', '1x opolisutilities:b_bucks').villagerExperience(4)

  event.addTrade("mason", 3, '3x opolisutilities:b_bucks', '1x minecraft:stonecutter').villagerExperience(4)
  event.addTrade("mason", 3, '8x opolisutilities:b_bucks', '64x minecraft:terracotta').villagerExperience(4)

  event.addTrade("mason", 4, '8x opolisutilities:b_bucks', '64x caveopolis:marble').villagerExperience(4)

  event.addTrade("mason", 5, '32x opolisutilities:b_bucks', '1x constructionwand:infinity_wand').villagerExperience(4)


  //Cleric

  event.addTrade("cleric", 1, '12x minecraft:bone', '1x opolisutilities:b_bucks').villagerExperience(4)
  event.addTrade("cleric", 1, '12x minecraft:rotten_flesh', '1x opolisutilities:b_bucks').villagerExperience(4)
  event.addTrade("cleric", 1, '5x minecraft:spider_eye', '1x opolisutilities:b_bucks').villagerExperience(4)

  event.addTrade("cleric", 2, '2x minecraft:blaze_rod', '4x opolisutilities:b_bucks').villagerExperience(12)
  event.addTrade("cleric", 2, '2x minecraft:ghast_tear', '6x opolisutilities:b_bucks').villagerExperience(12)

  event.addTrade("cleric", 3, '8x opolisutilities:b_bucks', '1x minecraft:rabbit_foot').villagerExperience(12)
  event.addTrade("cleric", 3, '1x opolisutilities:b_bucks', '1x minecraft:rabbit_hide').villagerExperience(12)

  event.addTrade("cleric", 4, '5x opolisutilities:b_bucks', '32x opolisutilities:ender_pearl_fragment').villagerExperience(12)
  event.addTrade("cleric", 4, '3x opolisutilities:b_bucks', '1x minecraft:nether_wart').villagerExperience(12)

  event.addTrade("cleric", 5, '8x opolisutilities:b_bucks', '1x minecraft:sculk_catalyst') 
  event.addTrade("cleric", 5, '4x opolisutilities:b_bucks', '8x minecraft:experience_bottle') 

  //Weaponsmith 

  //event.addTrade("weaponsmith", 1, '12x minecraft:bone', '1x opolisutilities:b_bucks').villagerExperience(4)

  //Toolsmith

  //event.addTrade("toolsmith", 1, '12x minecraft:bone', '1x opolisutilities:b_bucks').villagerExperience(4)

  //Shepherd

  //event.addTrade("shepherd", 1, '12x minecraft:bone', '1x opolisutilities:b_bucks').villagerExperience(4)

  //Fletcher

  //event.addTrade("fletcher", 1, '12x minecraft:bone', '1x opolisutilities:b_bucks').villagerExperience(4)

  //Ender Trader

  event.addTrade("dimensional_traders:end_trader", 1, '16x opolisutilities:b_bucks', '4x minecraft:end_stone').villagerExperience(4)
  event.addTrade("dimensional_traders:end_trader", 1, '16x opolisutilities:b_bucks', '4x minecraft:purpur_block').villagerExperience(4)

  event.addTrade("dimensional_traders:end_trader", 2, '24x opolisutilities:b_bucks', '4x minecraft:chorus_fruit').villagerExperience(12)
  event.addTrade("dimensional_traders:end_trader", 2, '24x opolisutilities:b_bucks', '4x minecraft:chorus_flower').villagerExperience(12)
  event.addTrade("dimensional_traders:end_trader", 2, '24x opolisutilities:b_bucks', '4x minecraft:chorus_plant').villagerExperience(12)

  event.addTrade("dimensional_traders:end_trader", 3, '4x opolisutilities:b_bucks', Item.of('minecraft:magenta_banner', '{BlockEntityTag:{Patterns:[{Color:15,Pattern:"tt"},{Color:15,Pattern:"bt"}],id:"minecraft:banner"}}')).villagerExperience(12)
  event.addTrade("dimensional_traders:end_trader", 3, '32x opolisutilities:b_bucks', '1x relics:enders_hand').villagerExperience(12)

  event.addTrade("dimensional_traders:end_trader", 4, '16x opolisutilities:b_bucks', '1x minecraft:shulker_shell').villagerExperience(21)
  event.addTrade("dimensional_traders:end_trader", 4, ['64x opolisutilities:b_bucks', '64x opolisutilities:b_bucks'], '1x minecraft:elytra').villagerExperience(42)

  event.addTrade("dimensional_traders:end_trader", 5, ['64x opolisutilities:b_bucks', '64x opolisutilities:b_bucks'], '1x minecraft:dragon_head')
  event.addTrade("dimensional_traders:end_trader", 5, ['64x opolisutilities:b_bucks', '64x opolisutilities:b_bucks'], '1x minecraft:dragon_egg')
  
  //Nether Trader

  event.addTrade("dimensional_traders:nether_trader", 1, '16x opolisutilities:b_bucks', '4x minecraft:netherrack').villagerExperience(4)
  event.addTrade("dimensional_traders:nether_trader", 1, '16x opolisutilities:b_bucks', '4x minecraft:nether_wart').villagerExperience(4)
  event.addTrade("dimensional_traders:nether_trader", 1, '16x opolisutilities:b_bucks', '4x minecraft:crimson_fungus').villagerExperience(4)
  event.addTrade("dimensional_traders:nether_trader", 1, '16x opolisutilities:b_bucks', '4x minecraft:warped_fungus').villagerExperience(4)

  event.addTrade("dimensional_traders:nether_trader", 2, '12x opolisutilities:b_bucks', '4x minecraft:quartz').villagerExperience(12)
  event.addTrade("dimensional_traders:nether_trader", 2, '12x opolisutilities:b_bucks', '4x minecraft:soul_sand').villagerExperience(12)
  event.addTrade("dimensional_traders:nether_trader", 2, '12x opolisutilities:b_bucks', '4x minecraft:soul_soil').villagerExperience(12)

  event.addTrade("dimensional_traders:nether_trader", 3, '12x opolisutilities:b_bucks', '4x minecraft:glowstone_dust').villagerExperience(12)
  event.addTrade("dimensional_traders:nether_trader", 3, '12x opolisutilities:b_bucks', '4x minecraft:glowstone').villagerExperience(12)

  event.addTrade("dimensional_traders:nether_trader", 4, '32x opolisutilities:b_bucks', '1x relics:bastion_ring').villagerExperience(21)
  event.addTrade("dimensional_traders:nether_trader", 4, '12x opolisutilities:b_bucks', '1x minecraft:ancient_debris').villagerExperience(21)

  event.addTrade("dimensional_traders:nether_trader", 5, ['64x opolisutilities:b_bucks', '64x opolisutilities:b_bucks'], Item.of('minecraft:spawner', '{BlockEntityTag:{Delay:0s,ForgeCaps:{},MaxNearbyEntities:6s,MaxSpawnDelay:800s,MinSpawnDelay:200s,RequiredPlayerRange:16s,SpawnCount:4s,SpawnData:{entity:{id:"minecraft:blaze"}},SpawnPotentials:[],SpawnRange:4s,id:"minecraft:mob_spawner"},RepairCost:0,display:{Lore:[\'"(+NBT)"\'],Name:\'{"text":"Monster Spawner (Blaze)"}\'}}'))
  event.addTrade("dimensional_traders:nether_trader", 5, '32x opolisutilities:b_bucks', '1x relics:rage_glove')

*/


})