From f97fb99ed36cc13f9e324eae0d9fc988d343996f Mon Sep 17 00:00:00 2001 From: Gavin Lambert Date: Tue, 20 Aug 2024 22:34:46 +1200 Subject: [PATCH] Fix university in 1.21 (#10142) Fixes the research window not opening at all in 1.21. Sorts the Item NBT datagen keys so that they stop swapping around each datagen. Breaking: modifies the research data format to use SizedIngredient rather than our own hand-rolled types, producing simpler code and JSON. --- .../compatibility/itemnbtmatching.json | 316 ++++++------- .../researches/civilian/academic.json | 11 +- .../researches/civilian/agile.json | 11 +- .../minecolonies/researches/civilian/air.json | 11 +- .../researches/civilian/ambition.json | 11 +- .../researches/civilian/athlete.json | 11 +- .../researches/civilian/bachelor.json | 11 +- .../researches/civilian/bandages.json | 11 +- .../researches/civilian/bandaid.json | 11 +- .../researches/civilian/beanstalk.json | 11 +- .../researches/civilian/bookworm.json | 11 +- .../researches/civilian/cast.json | 11 +- .../researches/civilian/circus.json | 11 +- .../researches/civilian/city.json | 11 +- .../researches/civilian/compress.json | 11 +- .../researches/civilian/diligent.json | 11 +- .../researches/civilian/epicure.json | 11 +- .../researches/civilian/festival.json | 11 +- .../researches/civilian/firstaid.json | 11 +- .../researches/civilian/firstaid2.json | 11 +- .../researches/civilian/fortitude.json | 11 +- .../researches/civilian/glutton.json | 11 +- .../researches/civilian/gorger.json | 11 +- .../researches/civilian/gourmand.json | 11 +- .../researches/civilian/gravedecaybonus1.json | 11 +- .../researches/civilian/gravedecaybonus2.json | 11 +- .../researches/civilian/growth.json | 11 +- .../researches/civilian/guardianangel.json | 11 +- .../researches/civilian/guardianangel2.json | 11 +- .../researches/civilian/hamlet.json | 11 +- .../researches/civilian/healingcream.json | 11 +- .../researches/civilian/higherlearning.json | 11 +- .../researches/civilian/hormones.json | 11 +- .../researches/civilian/indefatigability.json | 11 +- .../researches/civilian/keen.json | 11 +- .../researches/civilian/lifesaver.json | 11 +- .../researches/civilian/lifesaver2.json | 11 +- .../researches/civilian/masks.json | 11 +- .../researches/civilian/master.json | 11 +- .../minecolonies/researches/civilian/moq.json | 22 +- .../researches/civilian/morebooks.json | 11 +- .../researches/civilian/nightowl.json | 11 +- .../researches/civilian/nightowl2.json | 11 +- .../researches/civilian/nimble.json | 11 +- .../researches/civilian/nurture.json | 11 +- .../researches/civilian/opera.json | 11 +- .../researches/civilian/outpost.json | 11 +- .../minecolonies/researches/civilian/phd.json | 11 +- .../researches/civilian/puberty.json | 11 +- .../researches/civilian/rails.json | 11 +- .../researches/civilian/raisingthedead.json | 11 +- .../researches/civilian/reflective.json | 11 +- .../researches/civilian/remembrance.json | 11 +- .../researches/civilian/resilience.json | 11 +- .../researches/civilian/resistance.json | 11 +- .../researches/civilian/resurrectchance1.json | 11 +- .../researches/civilian/resurrectchance2.json | 11 +- .../researches/civilian/scholarly.json | 11 +- .../researches/civilian/spectacle.json | 11 +- .../researches/civilian/stamina.json | 11 +- .../researches/civilian/studious.json | 11 +- .../researches/civilian/stuffer.json | 11 +- .../researches/civilian/swift.json | 11 +- .../researches/civilian/theater.json | 11 +- .../civilian/undertakeremergency.json | 11 +- .../researches/civilian/vaccines.json | 11 +- .../researches/civilian/village.json | 11 +- .../researches/civilian/vines.json | 11 +- .../researches/civilian/vitality.json | 11 +- .../researches/combat/accuracy.json | 11 +- .../researches/combat/agilearcher.json | 11 +- .../researches/combat/arrowpierce.json | 22 +- .../researches/combat/arrowuse.json | 11 +- .../minecolonies/researches/combat/avoid.json | 11 +- .../researches/combat/avoidance.json | 11 +- .../researches/combat/boiledleather.json | 11 +- .../researches/combat/captainoftheguard.json | 11 +- .../researches/combat/captaintraining.json | 11 +- .../researches/combat/cleave.json | 11 +- .../researches/combat/deadlyaim.json | 11 +- .../researches/combat/diamondskin.json | 11 +- .../minecolonies/researches/combat/dodge.json | 11 +- .../researches/combat/druidpotion.json | 11 +- .../researches/combat/duelist.json | 11 +- .../minecolonies/researches/combat/evade.json | 11 +- .../researches/combat/evasion.json | 11 +- .../minecolonies/researches/combat/fear.json | 11 +- .../minecolonies/researches/combat/feint.json | 11 +- .../minecolonies/researches/combat/flee.json | 11 +- .../researches/combat/fullretreat.json | 11 +- .../researches/combat/hotfoot.json | 11 +- .../researches/combat/improvedbows.json | 11 +- .../researches/combat/improveddodge.json | 11 +- .../researches/combat/improvedevasion.json | 11 +- .../researches/combat/improvedleather.json | 11 +- .../researches/combat/improvedswords.json | 11 +- .../researches/combat/ironarmor.json | 11 +- .../researches/combat/ironskin.json | 11 +- .../researches/combat/knighttraining.json | 11 +- .../researches/combat/masterbowman.json | 11 +- .../researches/combat/masterswordsman.json | 11 +- .../researches/combat/mightycleave.json | 11 +- .../researches/combat/multishot.json | 11 +- .../minecolonies/researches/combat/parry.json | 11 +- .../researches/combat/penetratingshot.json | 11 +- .../researches/combat/piercingshot.json | 11 +- .../researches/combat/platearmor.json | 11 +- .../researches/combat/powerattack.json | 11 +- .../researches/combat/preciseshot.json | 11 +- .../researches/combat/provost.json | 11 +- .../researches/combat/quickdraw.json | 11 +- .../researches/combat/rapidshot.json | 11 +- .../researches/combat/regeneration.json | 11 +- .../researches/combat/retreat.json | 11 +- .../researches/combat/riposte.json | 11 +- .../researches/combat/savagestrike.json | 11 +- .../researches/combat/squiretraining.json | 11 +- .../researches/combat/standard.json | 11 +- .../researches/combat/steelarmor.json | 11 +- .../researches/combat/tactictraining.json | 11 +- .../minecolonies/researches/combat/taunt.json | 33 +- .../researches/combat/telescope.json | 11 +- .../researches/combat/trickshot.json | 11 +- .../researches/combat/whirlwind.json | 33 +- .../researches/combat/woundingshot.json | 11 +- .../researches/technology/ability.json | 11 +- .../researches/technology/alchemist.json | 11 +- .../researches/technology/amazingveins.json | 7 +- .../researches/technology/biodegradable.json | 11 +- .../researches/technology/bonemeal.json | 11 +- .../researches/technology/buildermodes.json | 11 +- .../researches/technology/capacity.json | 11 +- .../researches/technology/cheatsheet.json | 11 +- .../researches/technology/compost.json | 11 +- .../researches/technology/croprotation.json | 22 +- .../researches/technology/deeppockets.json | 11 +- .../researches/technology/depthknowledge.json | 11 +- .../researches/technology/diamondcoated.json | 11 +- .../researches/technology/dung.json | 11 +- .../technology/enhanced_gates1.json | 33 +- .../technology/enhanced_gates2.json | 33 +- .../researches/technology/exoticfruits.json | 11 +- .../researches/technology/fertilizer.json | 11 +- .../researches/technology/flowerpower.json | 11 +- .../researches/technology/fullstock.json | 11 +- .../researches/technology/gargamel.json | 22 +- .../researches/technology/gildedhammer.json | 33 +- .../researches/technology/goodveins.json | 7 +- .../researches/technology/hardened.json | 11 +- .../researches/technology/heavilyloaded.json | 11 +- .../researches/technology/heavymachinery.json | 11 +- .../researches/technology/hittingiron.json | 11 +- .../researches/technology/honeypot.json | 11 +- .../researches/technology/hot.json | 11 +- .../researches/technology/hotboots.json | 22 +- .../researches/technology/isthisredstone.json | 11 +- .../researches/technology/junglemaster.json | 33 +- .../researches/technology/knowtheend.json | 11 +- .../researches/technology/letitgrow.json | 11 +- .../researches/technology/lightning.json | 11 +- .../researches/technology/loaded.json | 11 +- .../researches/technology/madness.json | 11 +- .../researches/technology/magiccompost.json | 11 +- .../researches/technology/memoryaid.json | 11 +- .../researches/technology/morescrolls.json | 33 +- .../researches/technology/motherlode.json | 7 +- .../researches/technology/netherlog.json | 22 +- .../researches/technology/oceanheart.json | 11 +- .../researches/technology/opennether.json | 11 +- .../researches/technology/pavetheroad.json | 7 +- .../researches/technology/podzolchance.json | 11 +- .../researches/technology/podzolchance2.json | 11 +- .../researches/technology/rainbowheaven.json | 11 +- .../researches/technology/rainman.json | 11 +- .../researches/technology/recipebook.json | 11 +- .../technology/redstonepowered.json | 11 +- .../researches/technology/reinforced.json | 11 +- .../researches/technology/richveins.json | 7 +- .../researches/technology/rockingroll.json | 11 +- .../researches/technology/rtm.json | 11 +- .../researches/technology/seemsautomatic.json | 11 +- .../researches/technology/sieving.json | 11 +- .../researches/technology/skills.json | 11 +- .../researches/technology/softshoes.json | 22 +- .../researches/technology/space.json | 11 +- .../researches/technology/steelbracing.json | 11 +- .../researches/technology/stonecake.json | 11 +- .../researches/technology/stringwork.json | 11 +- .../researches/technology/strong.json | 11 +- .../technology/takingdivinglessons.json | 33 +- .../researches/technology/theflintstones.json | 11 +- .../researches/technology/thoselungs.json | 11 +- .../researches/technology/tools.json | 11 +- .../researches/technology/veinminer.json | 7 +- .../technology/warehousemaster.json | 11 +- .../technology/whatisthisspeed.json | 11 +- .../researches/technology/whatyaneed.json | 11 +- .../researches/technology/woodwork.json | 7 +- .../minecolonies/api/IMinecoloniesAPI.java | 3 - .../api/MinecoloniesAPIProxy.java | 7 - .../api/crafting/CountedIngredient.java | 10 +- .../research/AbstractResearchProvider.java | 155 +++--- .../api/research/IGlobalResearch.java | 10 +- .../api/research/ModResearchCostTypes.java | 93 ---- .../api/research/costs/IResearchCost.java | 92 ---- .../minecolonies/api/util/ItemStackUtils.java | 86 ++++ .../apiimp/CommonMinecoloniesAPIImpl.java | 11 - .../ModResearchCostTypeInitializer.java | 36 -- .../com/minecolonies/core/MineColonies.java | 1 - .../core/client/gui/WindowResearchTree.java | 152 +++--- .../gui/modules/UniversityModuleWindow.java | 22 +- .../core/datalistener/ResearchListener.java | 26 +- .../core/event/GatherDataHandler.java | 2 +- .../core/generation/ItemNbtCalculator.java | 9 +- .../defaults/DefaultResearchProvider.java | 447 +++++++++--------- .../core/research/GlobalResearch.java | 58 +-- .../core/research/GlobalResearchFactory.java | 44 +- .../core/research/LocalResearchTree.java | 21 +- .../core/research/costs/ListItemCost.java | 162 ------- .../core/research/costs/SimpleItemCost.java | 140 ------ .../core/research/costs/TagItemCost.java | 150 ------ .../minecolonies/lang/manual_en_us.json | 3 +- 222 files changed, 1600 insertions(+), 2848 deletions(-) delete mode 100644 src/main/java/com/minecolonies/api/research/ModResearchCostTypes.java delete mode 100644 src/main/java/com/minecolonies/api/research/costs/IResearchCost.java delete mode 100644 src/main/java/com/minecolonies/apiimp/initializer/ModResearchCostTypeInitializer.java delete mode 100644 src/main/java/com/minecolonies/core/research/costs/ListItemCost.java delete mode 100644 src/main/java/com/minecolonies/core/research/costs/SimpleItemCost.java delete mode 100644 src/main/java/com/minecolonies/core/research/costs/TagItemCost.java diff --git a/src/datagen/generated/minecolonies/data/minecolonies/compatibility/itemnbtmatching.json b/src/datagen/generated/minecolonies/data/minecolonies/compatibility/itemnbtmatching.json index 4cf03821430..93084104710 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/compatibility/itemnbtmatching.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/compatibility/itemnbtmatching.json @@ -112,8 +112,8 @@ }, { "checkednbtkeys": [ - "minecraft:block_state", - "domum_ornamentum:texture_data" + "domum_ornamentum:texture_data", + "minecraft:block_state" ], "item": "domum_ornamentum:fancy_door" }, @@ -125,8 +125,8 @@ }, { "checkednbtkeys": [ - "minecraft:block_state", - "domum_ornamentum:texture_data" + "domum_ornamentum:texture_data", + "minecraft:block_state" ], "item": "domum_ornamentum:fancy_trapdoors" }, @@ -231,8 +231,8 @@ }, { "checkednbtkeys": [ - "minecraft:block_state", - "domum_ornamentum:texture_data" + "domum_ornamentum:texture_data", + "minecraft:block_state" ], "item": "domum_ornamentum:panel" }, @@ -253,8 +253,8 @@ }, { "checkednbtkeys": [ - "minecraft:block_state", - "domum_ornamentum:texture_data" + "domum_ornamentum:texture_data", + "minecraft:block_state" ], "item": "domum_ornamentum:post" }, @@ -335,8 +335,8 @@ }, { "checkednbtkeys": [ - "minecraft:block_state", - "domum_ornamentum:texture_data" + "domum_ornamentum:texture_data", + "minecraft:block_state" ], "item": "domum_ornamentum:vanilla_doors_compat" }, @@ -366,8 +366,8 @@ }, { "checkednbtkeys": [ - "minecraft:block_state", - "domum_ornamentum:texture_data" + "domum_ornamentum:texture_data", + "minecraft:block_state" ], "item": "domum_ornamentum:vanilla_trapdoors_compat" }, @@ -407,8 +407,8 @@ { "checkednbtkeys": [ "minecraft:enchantments", - "minecraft:repair_cost", - "minecraft:max_damage" + "minecraft:max_damage", + "minecraft:repair_cost" ], "item": "minecolonies:banner_rally_guards" }, @@ -638,10 +638,10 @@ { "checkednbtkeys": [ "minecraft:attribute_modifiers", - "minecraft:tool", "minecraft:enchantments", + "minecraft:max_damage", "minecraft:repair_cost", - "minecraft:max_damage" + "minecraft:tool" ], "item": "minecolonies:chiefsword" }, @@ -747,10 +747,10 @@ { "checkednbtkeys": [ "minecraft:attribute_modifiers", - "minecraft:tool", "minecraft:enchantments", + "minecraft:max_damage", "minecraft:repair_cost", - "minecraft:max_damage" + "minecraft:tool" ], "item": "minecolonies:iron_scimitar" }, @@ -832,8 +832,8 @@ { "checkednbtkeys": [ "minecraft:enchantments", - "minecraft:repair_cost", - "minecraft:max_damage" + "minecraft:max_damage", + "minecraft:repair_cost" ], "item": "minecolonies:pharaoscepter" }, @@ -966,9 +966,9 @@ }, { "checkednbtkeys": [ - "structurize:pos_selection", "minecraft:enchantments", - "minecraft:max_damage" + "minecraft:max_damage", + "structurize:pos_selection" ], "item": "minecolonies:scan_analyzer" }, @@ -978,8 +978,8 @@ { "checkednbtkeys": [ "minecraft:enchantments", - "minecraft:repair_cost", - "minecraft:max_damage" + "minecraft:max_damage", + "minecraft:repair_cost" ], "item": "minecolonies:scepterguard" }, @@ -989,8 +989,8 @@ { "checkednbtkeys": [ "minecraft:enchantments", - "minecraft:repair_cost", - "minecraft:max_damage" + "minecraft:max_damage", + "minecraft:repair_cost" ], "item": "minecolonies:scepterpermission" }, @@ -1049,8 +1049,8 @@ { "checkednbtkeys": [ "minecraft:enchantments", - "minecraft:repair_cost", - "minecraft:max_damage" + "minecraft:max_damage", + "minecraft:repair_cost" ], "item": "minecolonies:spear" }, @@ -1540,8 +1540,8 @@ { "checkednbtkeys": [ "minecraft:enchantments", - "minecraft:repair_cost", - "minecraft:max_damage" + "minecraft:max_damage", + "minecraft:repair_cost" ], "item": "minecraft:bow" }, @@ -1710,40 +1710,40 @@ { "checkednbtkeys": [ "minecraft:attribute_modifiers", - "minecraft:enchantments", - "minecraft:repair_cost", "minecraft:dyed_color", - "minecraft:max_damage" + "minecraft:enchantments", + "minecraft:max_damage", + "minecraft:repair_cost" ], "item": "minecraft:chainmail_boots" }, { "checkednbtkeys": [ "minecraft:attribute_modifiers", - "minecraft:enchantments", - "minecraft:repair_cost", "minecraft:dyed_color", - "minecraft:max_damage" + "minecraft:enchantments", + "minecraft:max_damage", + "minecraft:repair_cost" ], "item": "minecraft:chainmail_chestplate" }, { "checkednbtkeys": [ "minecraft:attribute_modifiers", - "minecraft:enchantments", - "minecraft:repair_cost", "minecraft:dyed_color", - "minecraft:max_damage" + "minecraft:enchantments", + "minecraft:max_damage", + "minecraft:repair_cost" ], "item": "minecraft:chainmail_helmet" }, { "checkednbtkeys": [ "minecraft:attribute_modifiers", - "minecraft:enchantments", - "minecraft:repair_cost", "minecraft:dyed_color", - "minecraft:max_damage" + "minecraft:enchantments", + "minecraft:max_damage", + "minecraft:repair_cost" ], "item": "minecraft:chainmail_leggings" }, @@ -2091,10 +2091,10 @@ }, { "checkednbtkeys": [ + "minecraft:charged_projectiles", "minecraft:enchantments", - "minecraft:repair_cost", "minecraft:max_damage", - "minecraft:charged_projectiles" + "minecraft:repair_cost" ], "item": "minecraft:crossbow" }, @@ -2347,10 +2347,10 @@ { "checkednbtkeys": [ "minecraft:attribute_modifiers", - "minecraft:tool", "minecraft:enchantments", + "minecraft:max_damage", "minecraft:repair_cost", - "minecraft:max_damage" + "minecraft:tool" ], "item": "minecraft:diamond_axe" }, @@ -2360,30 +2360,30 @@ { "checkednbtkeys": [ "minecraft:attribute_modifiers", - "minecraft:enchantments", - "minecraft:repair_cost", "minecraft:dyed_color", - "minecraft:max_damage" + "minecraft:enchantments", + "minecraft:max_damage", + "minecraft:repair_cost" ], "item": "minecraft:diamond_boots" }, { "checkednbtkeys": [ "minecraft:attribute_modifiers", - "minecraft:enchantments", - "minecraft:repair_cost", "minecraft:dyed_color", - "minecraft:max_damage" + "minecraft:enchantments", + "minecraft:max_damage", + "minecraft:repair_cost" ], "item": "minecraft:diamond_chestplate" }, { "checkednbtkeys": [ "minecraft:attribute_modifiers", - "minecraft:enchantments", - "minecraft:repair_cost", "minecraft:dyed_color", - "minecraft:max_damage" + "minecraft:enchantments", + "minecraft:max_damage", + "minecraft:repair_cost" ], "item": "minecraft:diamond_helmet" }, @@ -2397,10 +2397,10 @@ { "checkednbtkeys": [ "minecraft:attribute_modifiers", - "minecraft:enchantments", - "minecraft:repair_cost", "minecraft:dyed_color", - "minecraft:max_damage" + "minecraft:enchantments", + "minecraft:max_damage", + "minecraft:repair_cost" ], "item": "minecraft:diamond_leggings" }, @@ -2410,10 +2410,10 @@ { "checkednbtkeys": [ "minecraft:attribute_modifiers", - "minecraft:tool", "minecraft:enchantments", + "minecraft:max_damage", "minecraft:repair_cost", - "minecraft:max_damage" + "minecraft:tool" ], "item": "minecraft:diamond_sword" }, @@ -2503,15 +2503,15 @@ }, { "checkednbtkeys": [ - "minecraft:stored_enchantments", - "minecraft:enchantment_glint_override" + "minecraft:enchantment_glint_override", + "minecraft:stored_enchantments" ], "item": "minecraft:enchanted_book" }, { "checkednbtkeys": [ - "minecraft:food", - "minecraft:enchantment_glint_override" + "minecraft:enchantment_glint_override", + "minecraft:food" ], "item": "minecraft:enchanted_golden_apple" }, @@ -2758,20 +2758,20 @@ { "checkednbtkeys": [ "minecraft:attribute_modifiers", - "minecraft:tool", "minecraft:enchantments", + "minecraft:max_damage", "minecraft:repair_cost", - "minecraft:max_damage" + "minecraft:tool" ], "item": "minecraft:golden_axe" }, { "checkednbtkeys": [ "minecraft:attribute_modifiers", - "minecraft:enchantments", - "minecraft:repair_cost", "minecraft:dyed_color", - "minecraft:max_damage" + "minecraft:enchantments", + "minecraft:max_damage", + "minecraft:repair_cost" ], "item": "minecraft:golden_boots" }, @@ -2784,20 +2784,20 @@ { "checkednbtkeys": [ "minecraft:attribute_modifiers", - "minecraft:enchantments", - "minecraft:repair_cost", "minecraft:dyed_color", - "minecraft:max_damage" + "minecraft:enchantments", + "minecraft:max_damage", + "minecraft:repair_cost" ], "item": "minecraft:golden_chestplate" }, { "checkednbtkeys": [ "minecraft:attribute_modifiers", - "minecraft:enchantments", - "minecraft:repair_cost", "minecraft:dyed_color", - "minecraft:max_damage" + "minecraft:enchantments", + "minecraft:max_damage", + "minecraft:repair_cost" ], "item": "minecraft:golden_helmet" }, @@ -2811,20 +2811,20 @@ { "checkednbtkeys": [ "minecraft:attribute_modifiers", - "minecraft:enchantments", - "minecraft:repair_cost", "minecraft:dyed_color", - "minecraft:max_damage" + "minecraft:enchantments", + "minecraft:max_damage", + "minecraft:repair_cost" ], "item": "minecraft:golden_leggings" }, { "checkednbtkeys": [ "minecraft:attribute_modifiers", - "minecraft:tool", "minecraft:enchantments", + "minecraft:max_damage", "minecraft:repair_cost", - "minecraft:max_damage" + "minecraft:tool" ], "item": "minecraft:golden_sword" }, @@ -3050,10 +3050,10 @@ { "checkednbtkeys": [ "minecraft:attribute_modifiers", - "minecraft:tool", "minecraft:enchantments", + "minecraft:max_damage", "minecraft:repair_cost", - "minecraft:max_damage" + "minecraft:tool" ], "item": "minecraft:iron_axe" }, @@ -3066,20 +3066,20 @@ { "checkednbtkeys": [ "minecraft:attribute_modifiers", - "minecraft:enchantments", - "minecraft:repair_cost", "minecraft:dyed_color", - "minecraft:max_damage" + "minecraft:enchantments", + "minecraft:max_damage", + "minecraft:repair_cost" ], "item": "minecraft:iron_boots" }, { "checkednbtkeys": [ "minecraft:attribute_modifiers", - "minecraft:enchantments", - "minecraft:repair_cost", "minecraft:dyed_color", - "minecraft:max_damage" + "minecraft:enchantments", + "minecraft:max_damage", + "minecraft:repair_cost" ], "item": "minecraft:iron_chestplate" }, @@ -3092,10 +3092,10 @@ { "checkednbtkeys": [ "minecraft:attribute_modifiers", - "minecraft:enchantments", - "minecraft:repair_cost", "minecraft:dyed_color", - "minecraft:max_damage" + "minecraft:enchantments", + "minecraft:max_damage", + "minecraft:repair_cost" ], "item": "minecraft:iron_helmet" }, @@ -3112,10 +3112,10 @@ { "checkednbtkeys": [ "minecraft:attribute_modifiers", - "minecraft:enchantments", - "minecraft:repair_cost", "minecraft:dyed_color", - "minecraft:max_damage" + "minecraft:enchantments", + "minecraft:max_damage", + "minecraft:repair_cost" ], "item": "minecraft:iron_leggings" }, @@ -3128,10 +3128,10 @@ { "checkednbtkeys": [ "minecraft:attribute_modifiers", - "minecraft:tool", "minecraft:enchantments", + "minecraft:max_damage", "minecraft:repair_cost", - "minecraft:max_damage" + "minecraft:tool" ], "item": "minecraft:iron_sword" }, @@ -3222,30 +3222,30 @@ { "checkednbtkeys": [ "minecraft:attribute_modifiers", - "minecraft:enchantments", - "minecraft:repair_cost", "minecraft:dyed_color", - "minecraft:max_damage" + "minecraft:enchantments", + "minecraft:max_damage", + "minecraft:repair_cost" ], "item": "minecraft:leather_boots" }, { "checkednbtkeys": [ "minecraft:attribute_modifiers", - "minecraft:enchantments", - "minecraft:repair_cost", "minecraft:dyed_color", - "minecraft:max_damage" + "minecraft:enchantments", + "minecraft:max_damage", + "minecraft:repair_cost" ], "item": "minecraft:leather_chestplate" }, { "checkednbtkeys": [ "minecraft:attribute_modifiers", - "minecraft:enchantments", - "minecraft:repair_cost", "minecraft:dyed_color", - "minecraft:max_damage" + "minecraft:enchantments", + "minecraft:max_damage", + "minecraft:repair_cost" ], "item": "minecraft:leather_helmet" }, @@ -3259,10 +3259,10 @@ { "checkednbtkeys": [ "minecraft:attribute_modifiers", - "minecraft:enchantments", - "minecraft:repair_cost", "minecraft:dyed_color", - "minecraft:max_damage" + "minecraft:enchantments", + "minecraft:max_damage", + "minecraft:repair_cost" ], "item": "minecraft:leather_leggings" }, @@ -3441,9 +3441,9 @@ "checkednbtkeys": [ "minecraft:attribute_modifiers", "minecraft:enchantments", - "minecraft:tool", + "minecraft:max_damage", "minecraft:repair_cost", - "minecraft:max_damage" + "minecraft:tool" ], "item": "minecraft:mace" }, @@ -3695,12 +3695,12 @@ }, { "checkednbtkeys": [ - "minecraft:fire_resistant", "minecraft:attribute_modifiers", - "minecraft:tool", "minecraft:enchantments", + "minecraft:fire_resistant", + "minecraft:max_damage", "minecraft:repair_cost", - "minecraft:max_damage" + "minecraft:tool" ], "item": "minecraft:netherite_axe" }, @@ -3712,34 +3712,34 @@ }, { "checkednbtkeys": [ - "minecraft:fire_resistant", "minecraft:attribute_modifiers", - "minecraft:enchantments", - "minecraft:repair_cost", "minecraft:dyed_color", - "minecraft:max_damage" + "minecraft:enchantments", + "minecraft:fire_resistant", + "minecraft:max_damage", + "minecraft:repair_cost" ], "item": "minecraft:netherite_boots" }, { "checkednbtkeys": [ - "minecraft:fire_resistant", "minecraft:attribute_modifiers", - "minecraft:enchantments", - "minecraft:repair_cost", "minecraft:dyed_color", - "minecraft:max_damage" + "minecraft:enchantments", + "minecraft:fire_resistant", + "minecraft:max_damage", + "minecraft:repair_cost" ], "item": "minecraft:netherite_chestplate" }, { "checkednbtkeys": [ - "minecraft:fire_resistant", "minecraft:attribute_modifiers", - "minecraft:enchantments", - "minecraft:repair_cost", "minecraft:dyed_color", - "minecraft:max_damage" + "minecraft:enchantments", + "minecraft:fire_resistant", + "minecraft:max_damage", + "minecraft:repair_cost" ], "item": "minecraft:netherite_helmet" }, @@ -3751,12 +3751,12 @@ }, { "checkednbtkeys": [ - "minecraft:fire_resistant", "minecraft:attribute_modifiers", - "minecraft:enchantments", - "minecraft:repair_cost", "minecraft:dyed_color", - "minecraft:max_damage" + "minecraft:enchantments", + "minecraft:fire_resistant", + "minecraft:max_damage", + "minecraft:repair_cost" ], "item": "minecraft:netherite_leggings" }, @@ -3768,12 +3768,12 @@ }, { "checkednbtkeys": [ - "minecraft:fire_resistant", "minecraft:attribute_modifiers", - "minecraft:tool", "minecraft:enchantments", + "minecraft:fire_resistant", + "minecraft:max_damage", "minecraft:repair_cost", - "minecraft:max_damage" + "minecraft:tool" ], "item": "minecraft:netherite_sword" }, @@ -4539,10 +4539,10 @@ }, { "checkednbtkeys": [ - "minecraft:enchantments", "minecraft:banner_patterns", - "minecraft:repair_cost", - "minecraft:max_damage" + "minecraft:enchantments", + "minecraft:max_damage", + "minecraft:repair_cost" ], "item": "minecraft:shield" }, @@ -4777,10 +4777,10 @@ { "checkednbtkeys": [ "minecraft:attribute_modifiers", - "minecraft:tool", "minecraft:enchantments", + "minecraft:max_damage", "minecraft:repair_cost", - "minecraft:max_damage" + "minecraft:tool" ], "item": "minecraft:stone_axe" }, @@ -4811,10 +4811,10 @@ { "checkednbtkeys": [ "minecraft:attribute_modifiers", - "minecraft:tool", "minecraft:enchantments", + "minecraft:max_damage", "minecraft:repair_cost", - "minecraft:max_damage" + "minecraft:tool" ], "item": "minecraft:stone_sword" }, @@ -4982,9 +4982,9 @@ "checkednbtkeys": [ "minecraft:attribute_modifiers", "minecraft:enchantments", - "minecraft:tool", + "minecraft:max_damage", "minecraft:repair_cost", - "minecraft:max_damage" + "minecraft:tool" ], "item": "minecraft:trident" }, @@ -5039,10 +5039,10 @@ { "checkednbtkeys": [ "minecraft:attribute_modifiers", - "minecraft:enchantments", - "minecraft:repair_cost", "minecraft:dyed_color", - "minecraft:max_damage" + "minecraft:enchantments", + "minecraft:max_damage", + "minecraft:repair_cost" ], "item": "minecraft:turtle_helmet" }, @@ -5288,9 +5288,9 @@ }, { "checkednbtkeys": [ - "minecraft:item_name", "minecraft:banner_patterns", - "minecraft:hide_additional_tooltip" + "minecraft:hide_additional_tooltip", + "minecraft:item_name" ], "item": "minecraft:white_banner" }, @@ -5357,9 +5357,9 @@ { "checkednbtkeys": [ "minecraft:attribute_modifiers", - "minecraft:repair_cost", "minecraft:dyed_color", - "minecraft:max_damage" + "minecraft:max_damage", + "minecraft:repair_cost" ], "item": "minecraft:wolf_armor" }, @@ -5369,20 +5369,20 @@ { "checkednbtkeys": [ "minecraft:attribute_modifiers", - "minecraft:tool", "minecraft:enchantments", + "minecraft:max_damage", "minecraft:repair_cost", - "minecraft:max_damage" + "minecraft:tool" ], "item": "minecraft:wooden_axe" }, { "checkednbtkeys": [ "minecraft:attribute_modifiers", - "minecraft:tool", "minecraft:enchantments", + "minecraft:max_damage", "minecraft:repair_cost", - "minecraft:max_damage" + "minecraft:tool" ], "item": "minecraft:wooden_sword" }, @@ -5475,19 +5475,19 @@ }, { "checkednbtkeys": [ - "structurize:pos_selection", "minecraft:enchantments", - "structurize:scan_tool", - "minecraft:max_damage" + "minecraft:max_damage", + "structurize:pos_selection", + "structurize:scan_tool" ], "item": "structurize:sceptersteel" }, { "checkednbtkeys": [ - "structurize:pos_selection", "minecraft:enchantments", - "structurize:tags", - "minecraft:max_damage" + "minecraft:max_damage", + "structurize:pos_selection", + "structurize:tags" ], "item": "structurize:sceptertag" }, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/academic.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/academic.json index 4e9390e2501..aaac5067209 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/academic.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/academic.json @@ -9,13 +9,10 @@ "parentResearch": "minecolonies:civilian/reflective", "requirements": [ { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:book" - ] - }, - "quantity": 128 + "items": { + "count": 128, + "item": "minecraft:book" + } } ], "researchLevel": 6, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/agile.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/agile.json index 27810aeec31..b1abf0c4d86 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/agile.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/agile.json @@ -13,13 +13,10 @@ "level": 4 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:rabbit_foot" - ] - }, - "quantity": 10 + "items": { + "count": 10, + "item": "minecraft:rabbit_foot" + } } ], "researchLevel": 4, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/air.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/air.json index 25864ef7daf..9afb0d005d1 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/air.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/air.json @@ -9,13 +9,10 @@ "parentResearch": "minecolonies:civilian/ambition", "requirements": [ { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:heart_of_the_sea" - ] - }, - "quantity": 1 + "items": { + "count": 1, + "item": "minecraft:heart_of_the_sea" + } } ], "researchLevel": 2, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/ambition.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/ambition.json index da2e16e1f16..7c07b756e22 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/ambition.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/ambition.json @@ -8,13 +8,10 @@ "icon": "minecolonies:blockhutmysticalsite", "requirements": [ { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:diamond" - ] - }, - "quantity": 1 + "items": { + "count": 1, + "item": "minecraft:diamond" + } } ], "researchLevel": 1, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/athlete.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/athlete.json index f018816305e..63817ebecf7 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/athlete.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/athlete.json @@ -9,13 +9,10 @@ "parentResearch": "minecolonies:civilian/swift", "requirements": [ { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:rabbit_foot" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:rabbit_foot" + } } ], "researchLevel": 6, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/bachelor.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/bachelor.json index e7838f1a017..d7f34dbe63d 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/bachelor.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/bachelor.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:bookshelf" - ] - }, - "quantity": 12 + "items": { + "count": 12, + "item": "minecraft:bookshelf" + } } ], "researchLevel": 4, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/bandages.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/bandages.json index 6cae5266874..b1aee63ca48 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/bandages.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/bandages.json @@ -13,13 +13,10 @@ "level": 4 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:golden_carrot" - ] - }, - "quantity": 16 + "items": { + "count": 16, + "item": "minecraft:golden_carrot" + } } ], "researchLevel": 4 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/bandaid.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/bandaid.json index 05c17f47d85..077be4f014c 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/bandaid.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/bandaid.json @@ -13,13 +13,10 @@ "level": 2 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:golden_carrot" - ] - }, - "quantity": 1 + "items": { + "count": 1, + "item": "minecraft:golden_carrot" + } } ], "researchLevel": 2 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/beanstalk.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/beanstalk.json index 91be7d2844b..ed54f2df10f 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/beanstalk.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/beanstalk.json @@ -9,13 +9,10 @@ "parentResearch": "minecolonies:civilian/growth", "requirements": [ { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:cooked_chicken" - ] - }, - "quantity": 512 + "items": { + "count": 512, + "item": "minecraft:cooked_chicken" + } } ], "researchLevel": 6, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/bookworm.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/bookworm.json index a30eae0e66d..2cbf8f27be5 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/bookworm.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/bookworm.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:bookshelf" - ] - }, - "quantity": 6 + "items": { + "count": 6, + "item": "minecraft:bookshelf" + } } ], "researchLevel": 3, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/cast.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/cast.json index 030b7978d1f..3df5f29bd3d 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/cast.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/cast.json @@ -9,13 +9,10 @@ "parentResearch": "minecolonies:civilian/compress", "requirements": [ { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:golden_carrot" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:golden_carrot" + } } ], "researchLevel": 6 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/circus.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/circus.json index 03ab7ea5955..973e87a5932 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/circus.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/circus.json @@ -13,13 +13,10 @@ "level": 2 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:cake" - ] - }, - "quantity": 1 + "items": { + "count": 1, + "item": "minecraft:cake" + } } ], "researchLevel": 2, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/city.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/city.json index 8a20dc2d506..be1d1c42390 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/city.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/city.json @@ -13,13 +13,10 @@ "level": 5 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:cooked_beef" - ] - }, - "quantity": 512 + "items": { + "count": 512, + "item": "minecraft:cooked_beef" + } } ], "researchLevel": 5 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/compress.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/compress.json index aba4d7fe9ae..ffd9146d916 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/compress.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/compress.json @@ -13,13 +13,10 @@ "level": 5 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:golden_carrot" - ] - }, - "quantity": 32 + "items": { + "count": 32, + "item": "minecraft:golden_carrot" + } } ], "researchLevel": 5 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/diligent.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/diligent.json index 26e4154eeaa..1d329120370 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/diligent.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/diligent.json @@ -13,13 +13,10 @@ "level": 2 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:book" - ] - }, - "quantity": 6 + "items": { + "count": 6, + "item": "minecraft:book" + } } ], "researchLevel": 2, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/epicure.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/epicure.json index 97208609809..062b00a946d 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/epicure.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/epicure.json @@ -13,13 +13,10 @@ "level": 5 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:cookie" - ] - }, - "quantity": 256 + "items": { + "count": 256, + "item": "minecraft:cookie" + } } ], "researchLevel": 5 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/festival.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/festival.json index 06dc04a21ae..a26e8f07a78 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/festival.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/festival.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:cake" - ] - }, - "quantity": 9 + "items": { + "count": 9, + "item": "minecraft:cake" + } } ], "researchLevel": 3, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/firstaid.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/firstaid.json index b2307930526..b5b4508d150 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/firstaid.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/firstaid.json @@ -12,13 +12,10 @@ "level": 1 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:hay_block" - ] - }, - "quantity": 8 + "items": { + "count": 8, + "item": "minecraft:hay_block" + } } ], "researchLevel": 1, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/firstaid2.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/firstaid2.json index 87963c43cc4..d92845b97a6 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/firstaid2.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/firstaid2.json @@ -13,13 +13,10 @@ "level": 2 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:hay_block" - ] - }, - "quantity": 16 + "items": { + "count": 16, + "item": "minecraft:hay_block" + } } ], "researchLevel": 2, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/fortitude.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/fortitude.json index b4f338bca03..c3c091318dc 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/fortitude.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/fortitude.json @@ -13,13 +13,10 @@ "level": 5 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:golden_apple" - ] - }, - "quantity": 32 + "items": { + "count": 32, + "item": "minecraft:golden_apple" + } } ], "researchLevel": 5 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/glutton.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/glutton.json index d510c5131b0..ec52a2223f6 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/glutton.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/glutton.json @@ -9,13 +9,10 @@ "parentResearch": "minecolonies:civilian/epicure", "requirements": [ { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:cookie" - ] - }, - "quantity": 512 + "items": { + "count": 512, + "item": "minecraft:cookie" + } } ], "researchLevel": 6, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/gorger.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/gorger.json index de793a0df00..a780991282c 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/gorger.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/gorger.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:cookie" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:cookie" + } } ], "researchLevel": 3, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/gourmand.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/gourmand.json index f5b2f4dbde8..7b86a39f97a 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/gourmand.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/gourmand.json @@ -13,13 +13,10 @@ "level": 2 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:cookie" - ] - }, - "quantity": 32 + "items": { + "count": 32, + "item": "minecraft:cookie" + } } ], "researchLevel": 2, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/gravedecaybonus1.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/gravedecaybonus1.json index 6870a0d0c51..a615a354d8f 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/gravedecaybonus1.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/gravedecaybonus1.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:rotten_flesh" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:rotten_flesh" + } } ], "researchLevel": 2, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/gravedecaybonus2.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/gravedecaybonus2.json index 12c8fbc8b26..20e4866c948 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/gravedecaybonus2.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/gravedecaybonus2.json @@ -13,13 +13,10 @@ "level": 5 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:nether_wart_block" - ] - }, - "quantity": 8 + "items": { + "count": 8, + "item": "minecraft:nether_wart_block" + } } ], "researchLevel": 3, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/growth.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/growth.json index 9d0288d5677..38a84f396fb 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/growth.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/growth.json @@ -13,13 +13,10 @@ "level": 5 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:cooked_chicken" - ] - }, - "quantity": 256 + "items": { + "count": 256, + "item": "minecraft:cooked_chicken" + } } ], "researchLevel": 5 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/guardianangel.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/guardianangel.json index ca11483d3bf..d240005528c 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/guardianangel.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/guardianangel.json @@ -13,13 +13,10 @@ "level": 5 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:hay_block" - ] - }, - "quantity": 128 + "items": { + "count": 128, + "item": "minecraft:hay_block" + } } ], "researchLevel": 5 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/guardianangel2.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/guardianangel2.json index f868c472744..baf6d37f06c 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/guardianangel2.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/guardianangel2.json @@ -9,13 +9,10 @@ "parentResearch": "minecolonies:civilian/guardianangel", "requirements": [ { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:hay_block" - ] - }, - "quantity": 256 + "items": { + "count": 256, + "item": "minecraft:hay_block" + } } ], "researchLevel": 6 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/hamlet.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/hamlet.json index d3e673ffd9f..4726c6c0a66 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/hamlet.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/hamlet.json @@ -13,13 +13,10 @@ "level": 5 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:cooked_beef" - ] - }, - "quantity": 128 + "items": { + "count": 128, + "item": "minecraft:cooked_beef" + } } ], "researchLevel": 3 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/healingcream.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/healingcream.json index 2656c128321..4326107ad01 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/healingcream.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/healingcream.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:golden_carrot" - ] - }, - "quantity": 8 + "items": { + "count": 8, + "item": "minecraft:golden_carrot" + } } ], "researchLevel": 3, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/higherlearning.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/higherlearning.json index 8892cd90659..8d3b3e51b34 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/higherlearning.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/higherlearning.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:book" - ] - }, - "quantity": 3 + "items": { + "count": 3, + "item": "minecraft:book" + } } ], "researchLevel": 1, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/hormones.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/hormones.json index 64e53192633..a70d5899a0c 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/hormones.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/hormones.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:cooked_chicken" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:cooked_chicken" + } } ], "researchLevel": 3, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/indefatigability.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/indefatigability.json index bac460f4583..7bee3746c10 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/indefatigability.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/indefatigability.json @@ -9,13 +9,10 @@ "parentResearch": "minecolonies:civilian/fortitude", "requirements": [ { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:golden_apple" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:golden_apple" + } } ], "researchLevel": 6 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/keen.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/keen.json index e34a51f3505..1792c60573a 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/keen.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/keen.json @@ -12,13 +12,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:book" - ] - }, - "quantity": 3 + "items": { + "count": 3, + "item": "minecraft:book" + } } ], "researchLevel": 1, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/lifesaver.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/lifesaver.json index ea5e916abd3..d3f608ecfaa 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/lifesaver.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/lifesaver.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:hay_block" - ] - }, - "quantity": 32 + "items": { + "count": 32, + "item": "minecraft:hay_block" + } } ], "researchLevel": 3 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/lifesaver2.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/lifesaver2.json index 8f2b0951ecf..e82d5655089 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/lifesaver2.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/lifesaver2.json @@ -13,13 +13,10 @@ "level": 4 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:hay_block" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:hay_block" + } } ], "researchLevel": 4 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/masks.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/masks.json index ead4f9eba0d..3bdc2b9f863 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/masks.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/masks.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:white_wool" - ] - }, - "quantity": 32 + "items": { + "count": 32, + "item": "minecraft:white_wool" + } } ], "researchLevel": 3, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/master.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/master.json index 8e57cb2661f..efc1a50e0aa 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/master.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/master.json @@ -13,13 +13,10 @@ "level": 5 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:bookshelf" - ] - }, - "quantity": 32 + "items": { + "count": 32, + "item": "minecraft:bookshelf" + } } ], "researchLevel": 5, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/moq.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/moq.json index 0a2fdfa594e..31e246e0f88 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/moq.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/moq.json @@ -13,22 +13,16 @@ "level": 9 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecolonies:clipboard" - ] - }, - "quantity": 1 + "items": { + "count": 1, + "item": "minecolonies:clipboard" + } }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:book" - ] - }, - "quantity": 16 + "items": { + "count": 16, + "item": "minecraft:book" + } } ], "researchLevel": 3, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/morebooks.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/morebooks.json index 144bff9784a..8d663c2cefd 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/morebooks.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/morebooks.json @@ -13,13 +13,10 @@ "level": 1 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:book" - ] - }, - "quantity": 6 + "items": { + "count": 6, + "item": "minecraft:book" + } } ], "researchLevel": 2, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/nightowl.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/nightowl.json index 993922c4f9a..f7fb3d27a62 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/nightowl.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/nightowl.json @@ -13,13 +13,10 @@ "level": 2 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:golden_carrot" - ] - }, - "quantity": 25 + "items": { + "count": 25, + "item": "minecraft:golden_carrot" + } } ], "researchLevel": 3, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/nightowl2.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/nightowl2.json index fd89d0a7260..36cfb7bbfc8 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/nightowl2.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/nightowl2.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:golden_carrot" - ] - }, - "quantity": 75 + "items": { + "count": 75, + "item": "minecraft:golden_carrot" + } } ], "researchLevel": 4, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/nimble.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/nimble.json index 05f3b9e3cc8..57d77e693f8 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/nimble.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/nimble.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:rabbit_foot" - ] - }, - "quantity": 1 + "items": { + "count": 1, + "item": "minecraft:rabbit_foot" + } } ], "researchLevel": 3, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/nurture.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/nurture.json index 473849fcb79..30ea2abeaa5 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/nurture.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/nurture.json @@ -13,13 +13,10 @@ "level": 1 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:cooked_chicken" - ] - }, - "quantity": 32 + "items": { + "count": 32, + "item": "minecraft:cooked_chicken" + } } ], "researchLevel": 2, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/opera.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/opera.json index 84f7aafc04c..8dbf1f62835 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/opera.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/opera.json @@ -13,13 +13,10 @@ "level": 5 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:cake" - ] - }, - "quantity": 27 + "items": { + "count": 27, + "item": "minecraft:cake" + } } ], "researchLevel": 5, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/outpost.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/outpost.json index a756cf644f7..4ee60bb6026 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/outpost.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/outpost.json @@ -13,13 +13,10 @@ "level": 4 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:cooked_beef" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:cooked_beef" + } } ], "researchLevel": 2 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/phd.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/phd.json index fb35a1178d7..67640bdbec6 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/phd.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/phd.json @@ -9,13 +9,10 @@ "parentResearch": "minecolonies:civilian/master", "requirements": [ { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:bookshelf" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:bookshelf" + } } ], "researchLevel": 6, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/puberty.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/puberty.json index 18b9174d600..a3acb5566ad 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/puberty.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/puberty.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:cooked_chicken" - ] - }, - "quantity": 128 + "items": { + "count": 128, + "item": "minecraft:cooked_chicken" + } } ], "researchLevel": 4, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/rails.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/rails.json index e2b72e89f7d..22f35275925 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/rails.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/rails.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:rail" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:rail" + } } ], "researchLevel": 2, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/raisingthedead.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/raisingthedead.json index 230c0494670..cd06f24bc9d 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/raisingthedead.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/raisingthedead.json @@ -13,13 +13,10 @@ "level": 5 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:totem_of_undying" - ] - }, - "quantity": 1 + "items": { + "count": 1, + "item": "minecraft:totem_of_undying" + } } ], "researchLevel": 4, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/reflective.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/reflective.json index f66ce20bf6a..9db30b96649 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/reflective.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/reflective.json @@ -13,13 +13,10 @@ "level": 5 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:book" - ] - }, - "quantity": 48 + "items": { + "count": 48, + "item": "minecraft:book" + } } ], "researchLevel": 5, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/remembrance.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/remembrance.json index 20167ebd78c..e7de76a1eb2 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/remembrance.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/remembrance.json @@ -12,13 +12,10 @@ "level": 2 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:bone" - ] - }, - "quantity": 8 + "items": { + "count": 8, + "item": "minecraft:bone" + } } ], "researchLevel": 1, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/resilience.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/resilience.json index de940a0bf7a..9e5ae2b7291 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/resilience.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/resilience.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:golden_apple" - ] - }, - "quantity": 8 + "items": { + "count": 8, + "item": "minecraft:golden_apple" + } } ], "researchLevel": 3 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/resistance.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/resistance.json index 62fae31ab20..600cd34e861 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/resistance.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/resistance.json @@ -13,13 +13,10 @@ "level": 2 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:golden_apple" - ] - }, - "quantity": 1 + "items": { + "count": 1, + "item": "minecraft:golden_apple" + } } ], "researchLevel": 2, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/resurrectchance1.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/resurrectchance1.json index 438ff8d1495..7116519687a 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/resurrectchance1.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/resurrectchance1.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:ghast_tear" - ] - }, - "quantity": 1 + "items": { + "count": 1, + "item": "minecraft:ghast_tear" + } } ], "researchLevel": 2, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/resurrectchance2.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/resurrectchance2.json index ee115727d31..280a671a02a 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/resurrectchance2.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/resurrectchance2.json @@ -13,13 +13,10 @@ "level": 5 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:chorus_fruit" - ] - }, - "quantity": 16 + "items": { + "count": 16, + "item": "minecraft:chorus_fruit" + } } ], "researchLevel": 3, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/scholarly.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/scholarly.json index a1e8af1feb3..2f8d19f606f 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/scholarly.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/scholarly.json @@ -13,13 +13,10 @@ "level": 4 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:book" - ] - }, - "quantity": 24 + "items": { + "count": 24, + "item": "minecraft:book" + } } ], "researchLevel": 4, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/spectacle.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/spectacle.json index 7c59e372e95..2b90023a40b 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/spectacle.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/spectacle.json @@ -13,13 +13,10 @@ "level": 4 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:cake" - ] - }, - "quantity": 18 + "items": { + "count": 18, + "item": "minecraft:cake" + } } ], "researchLevel": 4 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/stamina.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/stamina.json index 33e5669d9d4..80baa3d6b0c 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/stamina.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/stamina.json @@ -9,13 +9,10 @@ "icon": "minecolonies:blockhuthospital", "requirements": [ { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:carrot" - ] - }, - "quantity": 1 + "items": { + "count": 1, + "item": "minecraft:carrot" + } } ], "researchLevel": 1 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/studious.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/studious.json index e761bd3977d..2d2ad82a864 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/studious.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/studious.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:book" - ] - }, - "quantity": 12 + "items": { + "count": 12, + "item": "minecraft:book" + } } ], "researchLevel": 3 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/stuffer.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/stuffer.json index 966b8f21feb..b1b8defef55 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/stuffer.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/stuffer.json @@ -13,13 +13,10 @@ "level": 4 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:cookie" - ] - }, - "quantity": 128 + "items": { + "count": 128, + "item": "minecraft:cookie" + } } ], "researchLevel": 4 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/swift.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/swift.json index 51f9ecaafbe..e9408fda078 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/swift.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/swift.json @@ -13,13 +13,10 @@ "level": 5 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:rabbit_foot" - ] - }, - "quantity": 32 + "items": { + "count": 32, + "item": "minecraft:rabbit_foot" + } } ], "researchLevel": 5, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/theater.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/theater.json index d3abf98497a..1f3ea8cbbfd 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/theater.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/theater.json @@ -9,13 +9,10 @@ "parentResearch": "minecolonies:civilian/opera", "requirements": [ { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:enchanted_golden_apple" - ] - }, - "quantity": 16 + "items": { + "count": 16, + "item": "minecraft:enchanted_golden_apple" + } } ], "researchLevel": 6, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/undertakeremergency.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/undertakeremergency.json index 99ad526256b..0e08ae25348 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/undertakeremergency.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/undertakeremergency.json @@ -13,13 +13,10 @@ "level": 2 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:iron_boots" - ] - }, - "quantity": 1 + "items": { + "count": 1, + "item": "minecraft:iron_boots" + } } ], "researchLevel": 2, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/vaccines.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/vaccines.json index c1adf3c6572..6d1fee7a8d2 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/vaccines.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/vaccines.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:egg" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:egg" + } } ], "researchLevel": 4, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/village.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/village.json index d44088854d6..cc95c67f35b 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/village.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/village.json @@ -13,13 +13,10 @@ "level": 4 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:cooked_beef" - ] - }, - "quantity": 256 + "items": { + "count": 256, + "item": "minecraft:cooked_beef" + } } ], "researchLevel": 4 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/vines.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/vines.json index 593155d4651..614e0c9ab7a 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/vines.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/vines.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:vine" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:vine" + } } ], "researchLevel": 2, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/vitality.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/vitality.json index 6de9e9945c2..f3200897791 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/vitality.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/civilian/vitality.json @@ -13,13 +13,10 @@ "level": 4 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:golden_apple" - ] - }, - "quantity": 16 + "items": { + "count": 16, + "item": "minecraft:golden_apple" + } } ], "researchLevel": 4 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/accuracy.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/accuracy.json index 3ad5feec898..bc64d8f4e25 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/accuracy.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/accuracy.json @@ -13,13 +13,10 @@ "level": 1 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:iron_ingot" - ] - }, - "quantity": 16 + "items": { + "count": 16, + "item": "minecraft:iron_ingot" + } } ], "researchLevel": 1 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/agilearcher.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/agilearcher.json index 2c2379c3745..523fcbab9c3 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/agilearcher.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/agilearcher.json @@ -9,13 +9,10 @@ "parentResearch": "minecolonies:combat/improvedevasion", "requirements": [ { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:diamond" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:diamond" + } } ], "researchLevel": 6, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/arrowpierce.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/arrowpierce.json index bc138a3d25a..93694d8f9c7 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/arrowpierce.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/arrowpierce.json @@ -13,22 +13,16 @@ "level": 1 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:arrow" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:arrow" + } }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:redstone" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:redstone" + } } ], "researchLevel": 3 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/arrowuse.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/arrowuse.json index b63666b5cf8..6f2d66705e4 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/arrowuse.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/arrowuse.json @@ -13,13 +13,10 @@ "level": 2 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:arrow" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:arrow" + } } ], "researchLevel": 2, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/avoid.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/avoid.json index 3e013e62c1b..eb555310407 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/avoid.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/avoid.json @@ -13,13 +13,10 @@ "level": 4 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:emerald" - ] - }, - "quantity": 8 + "items": { + "count": 8, + "item": "minecraft:emerald" + } } ], "researchLevel": 3, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/avoidance.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/avoidance.json index c06a3e3bca5..da72f3f79ec 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/avoidance.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/avoidance.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:iron_block" - ] - }, - "quantity": 3 + "items": { + "count": 3, + "item": "minecraft:iron_block" + } } ], "researchLevel": 1, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/boiledleather.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/boiledleather.json index 83aae4e412b..25876c9b82a 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/boiledleather.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/boiledleather.json @@ -13,13 +13,10 @@ "level": 2 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:leather" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:leather" + } } ], "researchLevel": 2, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/captainoftheguard.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/captainoftheguard.json index e00fad6efe3..80286670379 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/captainoftheguard.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/captainoftheguard.json @@ -9,13 +9,10 @@ "parentResearch": "minecolonies:combat/captaintraining", "requirements": [ { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:shield" - ] - }, - "quantity": 27 + "items": { + "count": 27, + "item": "minecraft:shield" + } } ], "researchLevel": 6 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/captaintraining.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/captaintraining.json index 5d6c0a5d276..125049fd159 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/captaintraining.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/captaintraining.json @@ -13,13 +13,10 @@ "level": 5 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:shield" - ] - }, - "quantity": 16 + "items": { + "count": 16, + "item": "minecraft:shield" + } } ], "researchLevel": 5 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/cleave.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/cleave.json index c3e83066289..b9e503d9a8b 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/cleave.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/cleave.json @@ -13,13 +13,10 @@ "level": 10 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:iron_block" - ] - }, - "quantity": 8 + "items": { + "count": 8, + "item": "minecraft:iron_block" + } } ], "researchLevel": 4 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/deadlyaim.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/deadlyaim.json index d81c0875cca..443b9ceae3c 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/deadlyaim.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/deadlyaim.json @@ -9,13 +9,10 @@ "parentResearch": "minecolonies:combat/woundingshot", "requirements": [ { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:flint" - ] - }, - "quantity": 256 + "items": { + "count": 256, + "item": "minecraft:flint" + } } ], "researchLevel": 6, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/diamondskin.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/diamondskin.json index a1dd6649b5b..99b49eba247 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/diamondskin.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/diamondskin.json @@ -9,13 +9,10 @@ "parentResearch": "minecolonies:combat/steelarmor", "requirements": [ { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:diamond" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:diamond" + } } ], "researchLevel": 6 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/dodge.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/dodge.json index 11dbbca1f9d..56a69f6e0f7 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/dodge.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/dodge.json @@ -13,13 +13,10 @@ "level": 1 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:leather" - ] - }, - "quantity": 16 + "items": { + "count": 16, + "item": "minecraft:leather" + } } ], "researchLevel": 2, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/druidpotion.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/druidpotion.json index 0e08e8f61e3..83830df37f4 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/druidpotion.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/druidpotion.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecolonies:mistletoe" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecolonies:mistletoe" + } } ], "researchLevel": 3 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/duelist.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/duelist.json index 6cf0d906844..692cf473894 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/duelist.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/duelist.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:iron_ingot" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:iron_ingot" + } } ], "researchLevel": 4 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/evade.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/evade.json index ea92cddea2e..5093fb3bb8b 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/evade.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/evade.json @@ -13,13 +13,10 @@ "level": 8 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:emerald" - ] - }, - "quantity": 16 + "items": { + "count": 16, + "item": "minecraft:emerald" + } } ], "researchLevel": 4 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/evasion.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/evasion.json index 1408c94b051..467813003dd 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/evasion.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/evasion.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:leather" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:leather" + } } ], "researchLevel": 4, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/fear.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/fear.json index 46230207f94..655b0b08a42 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/fear.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/fear.json @@ -13,13 +13,10 @@ "level": 8 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:emerald" - ] - }, - "quantity": 16 + "items": { + "count": 16, + "item": "minecraft:emerald" + } } ], "researchLevel": 4 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/feint.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/feint.json index be14138ea57..7f6d452c53b 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/feint.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/feint.json @@ -13,13 +13,10 @@ "level": 4 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:emerald" - ] - }, - "quantity": 8 + "items": { + "count": 8, + "item": "minecraft:emerald" + } } ], "researchLevel": 3 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/flee.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/flee.json index 4ef6955c1fb..7a4dc06f137 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/flee.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/flee.json @@ -13,13 +13,10 @@ "level": 12 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:emerald" - ] - }, - "quantity": 32 + "items": { + "count": 32, + "item": "minecraft:emerald" + } } ], "researchLevel": 5, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/fullretreat.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/fullretreat.json index 43e8a9b55c5..35c6967065c 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/fullretreat.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/fullretreat.json @@ -9,13 +9,10 @@ "parentResearch": "minecolonies:combat/retreat", "requirements": [ { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:emerald" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:emerald" + } } ], "researchLevel": 6 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/hotfoot.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/hotfoot.json index eaa84d4fe60..f1b5859bf65 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/hotfoot.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/hotfoot.json @@ -9,13 +9,10 @@ "parentResearch": "minecolonies:combat/flee", "requirements": [ { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:emerald" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:emerald" + } } ], "researchLevel": 6 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/improvedbows.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/improvedbows.json index bdd5a973522..dfa385bb917 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/improvedbows.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/improvedbows.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:iron_block" - ] - }, - "quantity": 6 + "items": { + "count": 6, + "item": "minecraft:iron_block" + } } ], "researchLevel": 2, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/improveddodge.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/improveddodge.json index df39f68ab53..aa90c82e2a9 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/improveddodge.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/improveddodge.json @@ -13,13 +13,10 @@ "level": 1 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:leather" - ] - }, - "quantity": 32 + "items": { + "count": 32, + "item": "minecraft:leather" + } } ], "researchLevel": 3, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/improvedevasion.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/improvedevasion.json index b63bf42dec4..189b2c90020 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/improvedevasion.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/improvedevasion.json @@ -13,13 +13,10 @@ "level": 5 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:diamond" - ] - }, - "quantity": 16 + "items": { + "count": 16, + "item": "minecraft:diamond" + } } ], "researchLevel": 5, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/improvedleather.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/improvedleather.json index 46f084683d8..927c152e288 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/improvedleather.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/improvedleather.json @@ -12,13 +12,10 @@ "level": 1 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:leather" - ] - }, - "quantity": 32 + "items": { + "count": 32, + "item": "minecraft:leather" + } } ], "researchLevel": 1, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/improvedswords.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/improvedswords.json index d273b646836..bc052bde594 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/improvedswords.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/improvedswords.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:iron_block" - ] - }, - "quantity": 6 + "items": { + "count": 6, + "item": "minecraft:iron_block" + } } ], "researchLevel": 2, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/ironarmor.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/ironarmor.json index a3a602da586..454453221c9 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/ironarmor.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/ironarmor.json @@ -13,13 +13,10 @@ "level": 4 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:iron_ingot" - ] - }, - "quantity": 32 + "items": { + "count": 32, + "item": "minecraft:iron_ingot" + } } ], "researchLevel": 4 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/ironskin.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/ironskin.json index 9c632809b50..b97d7f0983f 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/ironskin.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/ironskin.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:iron_ingot" - ] - }, - "quantity": 16 + "items": { + "count": 16, + "item": "minecraft:iron_ingot" + } } ], "researchLevel": 3 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/knighttraining.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/knighttraining.json index 93b6de1142f..4721a9cf8f8 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/knighttraining.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/knighttraining.json @@ -13,13 +13,10 @@ "level": 4 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:shield" - ] - }, - "quantity": 8 + "items": { + "count": 8, + "item": "minecraft:shield" + } } ], "researchLevel": 4 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/masterbowman.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/masterbowman.json index 9aac957c029..f9a7f4f0ad2 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/masterbowman.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/masterbowman.json @@ -9,13 +9,10 @@ "parentResearch": "minecolonies:combat/rapidshot", "requirements": [ { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:bow" - ] - }, - "quantity": 27 + "items": { + "count": 27, + "item": "minecraft:bow" + } } ], "researchLevel": 6 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/masterswordsman.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/masterswordsman.json index 58e061c6b3a..3a9ff70f8bc 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/masterswordsman.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/masterswordsman.json @@ -9,13 +9,10 @@ "parentResearch": "minecolonies:combat/provost", "requirements": [ { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:diamond" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:diamond" + } } ], "researchLevel": 6 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/mightycleave.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/mightycleave.json index f5ec993aa79..8619955b6be 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/mightycleave.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/mightycleave.json @@ -13,13 +13,10 @@ "level": 5 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:iron_block" - ] - }, - "quantity": 16 + "items": { + "count": 16, + "item": "minecraft:iron_block" + } } ], "researchLevel": 5 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/multishot.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/multishot.json index c6efa19bc5a..a916a4e3937 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/multishot.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/multishot.json @@ -13,13 +13,10 @@ "level": 4 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:bow" - ] - }, - "quantity": 9 + "items": { + "count": 9, + "item": "minecraft:bow" + } } ], "researchLevel": 4, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/parry.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/parry.json index 5ea5c8b7169..1538bd75509 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/parry.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/parry.json @@ -13,13 +13,10 @@ "level": 1 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:iron_ingot" - ] - }, - "quantity": 16 + "items": { + "count": 16, + "item": "minecraft:iron_ingot" + } } ], "researchLevel": 2 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/penetratingshot.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/penetratingshot.json index 9c7b0a1b17e..8d7df7bfd64 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/penetratingshot.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/penetratingshot.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:flint" - ] - }, - "quantity": 32 + "items": { + "count": 32, + "item": "minecraft:flint" + } } ], "researchLevel": 3 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/piercingshot.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/piercingshot.json index f24d93fe98b..acf75c8bb10 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/piercingshot.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/piercingshot.json @@ -13,13 +13,10 @@ "level": 10 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:flint" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:flint" + } } ], "researchLevel": 4 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/platearmor.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/platearmor.json index 81698d80d15..8ad1eaf7a8c 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/platearmor.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/platearmor.json @@ -13,13 +13,10 @@ "mandatory-building": "blacksmith" }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:iron_ingot" - ] - }, - "quantity": 32 + "items": { + "count": 32, + "item": "minecraft:iron_ingot" + } } ], "researchLevel": 5, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/powerattack.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/powerattack.json index 4406fb5f1c1..28ca111e80a 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/powerattack.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/powerattack.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:iron_block" - ] - }, - "quantity": 4 + "items": { + "count": 4, + "item": "minecraft:iron_block" + } } ], "researchLevel": 3 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/preciseshot.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/preciseshot.json index 7617e88c3e3..5f55e42dbfe 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/preciseshot.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/preciseshot.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:flint" - ] - }, - "quantity": 16 + "items": { + "count": 16, + "item": "minecraft:flint" + } } ], "researchLevel": 2, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/provost.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/provost.json index 6df88e211a3..ccf25713eb8 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/provost.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/provost.json @@ -13,13 +13,10 @@ "level": 5 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:diamond" - ] - }, - "quantity": 16 + "items": { + "count": 16, + "item": "minecraft:diamond" + } } ], "researchLevel": 5 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/quickdraw.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/quickdraw.json index abdf810d207..8c1c59fdd57 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/quickdraw.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/quickdraw.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:iron_block" - ] - }, - "quantity": 2 + "items": { + "count": 2, + "item": "minecraft:iron_block" + } } ], "researchLevel": 2 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/rapidshot.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/rapidshot.json index a4bf7c3b17f..ebb7bd944b5 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/rapidshot.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/rapidshot.json @@ -13,13 +13,10 @@ "level": 5 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:bow" - ] - }, - "quantity": 18 + "items": { + "count": 18, + "item": "minecraft:bow" + } } ], "researchLevel": 5, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/regeneration.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/regeneration.json index 20ad7b2b0ae..cd822b5829b 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/regeneration.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/regeneration.json @@ -14,13 +14,10 @@ "level": 2 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:emerald" - ] - }, - "quantity": 1 + "items": { + "count": 1, + "item": "minecraft:emerald" + } } ], "researchLevel": 2, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/retreat.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/retreat.json index 3bd690afdef..82e6c908fda 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/retreat.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/retreat.json @@ -13,13 +13,10 @@ "level": 12 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:emerald" - ] - }, - "quantity": 32 + "items": { + "count": 32, + "item": "minecraft:emerald" + } } ], "researchLevel": 5, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/riposte.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/riposte.json index d3a7167240b..c75048cda70 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/riposte.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/riposte.json @@ -13,13 +13,10 @@ "level": 1 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:iron_ingot" - ] - }, - "quantity": 32 + "items": { + "count": 32, + "item": "minecraft:iron_ingot" + } } ], "researchLevel": 3, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/savagestrike.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/savagestrike.json index de53a219999..ff04af5793e 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/savagestrike.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/savagestrike.json @@ -9,13 +9,10 @@ "parentResearch": "minecolonies:combat/mightycleave", "requirements": [ { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:iron_block" - ] - }, - "quantity": 32 + "items": { + "count": 32, + "item": "minecraft:iron_block" + } } ], "researchLevel": 6 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/squiretraining.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/squiretraining.json index d20b12e5d0d..ee6ca144578 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/squiretraining.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/squiretraining.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:shield" - ] - }, - "quantity": 4 + "items": { + "count": 4, + "item": "minecraft:shield" + } } ], "researchLevel": 3, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/standard.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/standard.json index 0fb1852a985..67654cc5fa1 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/standard.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/standard.json @@ -13,13 +13,10 @@ "level": 4 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:emerald" - ] - }, - "quantity": 32 + "items": { + "count": 32, + "item": "minecraft:emerald" + } } ], "researchLevel": 5 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/steelarmor.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/steelarmor.json index c1a8519c456..769158c39f4 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/steelarmor.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/steelarmor.json @@ -13,13 +13,10 @@ "level": 5 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:iron_ingot" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:iron_ingot" + } } ], "researchLevel": 5, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/tactictraining.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/tactictraining.json index 25fb460b37f..e282ba1242e 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/tactictraining.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/tactictraining.json @@ -12,13 +12,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:iron_block" - ] - }, - "quantity": 3 + "items": { + "count": 3, + "item": "minecraft:iron_block" + } } ], "researchLevel": 1, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/taunt.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/taunt.json index 920e2c62354..26b8b1994c1 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/taunt.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/taunt.json @@ -12,31 +12,22 @@ "level": 1 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:rotten_flesh" - ] - }, - "quantity": 8 + "items": { + "count": 8, + "item": "minecraft:rotten_flesh" + } }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:bone" - ] - }, - "quantity": 8 + "items": { + "count": 8, + "item": "minecraft:bone" + } }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:spider_eye" - ] - }, - "quantity": 8 + "items": { + "count": 8, + "item": "minecraft:spider_eye" + } } ], "researchLevel": 1, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/telescope.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/telescope.json index f7b5e5423da..b124ef6f824 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/telescope.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/telescope.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:emerald" - ] - }, - "quantity": 16 + "items": { + "count": 16, + "item": "minecraft:emerald" + } } ], "researchLevel": 4 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/trickshot.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/trickshot.json index ebf85167b2b..f8eebf06d67 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/trickshot.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/trickshot.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:bow" - ] - }, - "quantity": 5 + "items": { + "count": 5, + "item": "minecraft:bow" + } } ], "researchLevel": 3 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/whirlwind.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/whirlwind.json index 5383bde89ee..fbf746368e9 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/whirlwind.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/whirlwind.json @@ -13,31 +13,22 @@ "level": 4 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:redstone" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:redstone" + } }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:gold_ingot" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:gold_ingot" + } }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:lapis_lazuli" - ] - }, - "quantity": 128 + "items": { + "count": 128, + "item": "minecraft:lapis_lazuli" + } } ], "researchLevel": 4 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/woundingshot.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/woundingshot.json index e35c5cd52e0..8eeac6b71d1 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/woundingshot.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/combat/woundingshot.json @@ -13,13 +13,10 @@ "level": 5 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:flint" - ] - }, - "quantity": 128 + "items": { + "count": 128, + "item": "minecraft:flint" + } } ], "researchLevel": 5 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/ability.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/ability.json index 796a4b8cd46..3049f5b7724 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/ability.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/ability.json @@ -13,13 +13,10 @@ "level": 1 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:iron_ingot" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:iron_ingot" + } } ], "researchLevel": 2 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/alchemist.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/alchemist.json index 9163e3cb2ed..a582a9d99ea 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/alchemist.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/alchemist.json @@ -9,13 +9,10 @@ "parentResearch": "minecolonies:technology/opennether", "requirements": [ { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:nether_wart" - ] - }, - "quantity": 16 + "items": { + "count": 16, + "item": "minecraft:nether_wart" + } } ], "researchLevel": 3, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/amazingveins.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/amazingveins.json index 8b75b1840f1..d46aba5f3d6 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/amazingveins.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/amazingveins.json @@ -13,11 +13,10 @@ "level": 5 }, { - "type": "minecolonies:item_tag", - "item": { + "items": { + "count": 64, "tag": "minecraft:gold_ores" - }, - "quantity": 64 + } } ], "researchLevel": 5 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/biodegradable.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/biodegradable.json index 8a9c3dd1bee..7d67e11469b 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/biodegradable.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/biodegradable.json @@ -12,13 +12,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:bone_meal" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:bone_meal" + } } ], "researchLevel": 1, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/bonemeal.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/bonemeal.json index 5d9b62ed9a5..9de953f0e47 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/bonemeal.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/bonemeal.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:wheat_seeds" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:wheat_seeds" + } } ], "researchLevel": 2, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/buildermodes.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/buildermodes.json index 46619590f5a..3877e341f58 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/buildermodes.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/buildermodes.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:diamond_axe" - ] - }, - "quantity": 1 + "items": { + "count": 1, + "item": "minecraft:diamond_axe" + } } ], "researchLevel": 3, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/capacity.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/capacity.json index f1b97642314..4d14424e6cf 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/capacity.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/capacity.json @@ -13,13 +13,10 @@ "level": 4 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecolonies:blockminecoloniesrack" - ] - }, - "quantity": 32 + "items": { + "count": 32, + "item": "minecolonies:blockminecoloniesrack" + } } ], "researchLevel": 4, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/cheatsheet.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/cheatsheet.json index bad9c44b7d2..757b95ae3f4 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/cheatsheet.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/cheatsheet.json @@ -13,13 +13,10 @@ "level": 2 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:paper" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:paper" + } } ], "researchLevel": 3, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/compost.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/compost.json index 9dd2fa6b1a7..fee6f369fc9 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/compost.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/compost.json @@ -13,13 +13,10 @@ "level": 5 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:wheat_seeds" - ] - }, - "quantity": 256 + "items": { + "count": 256, + "item": "minecraft:wheat_seeds" + } } ], "researchLevel": 4 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/croprotation.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/croprotation.json index d5d30e71708..305fc170403 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/croprotation.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/croprotation.json @@ -13,22 +13,16 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:sugar_cane" - ] - }, - "quantity": 32 + "items": { + "count": 32, + "item": "minecraft:sugar_cane" + } }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:cactus" - ] - }, - "quantity": 32 + "items": { + "count": 32, + "item": "minecraft:cactus" + } } ], "researchLevel": 3, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/deeppockets.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/deeppockets.json index 3db64ba5e2e..d140702fb45 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/deeppockets.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/deeppockets.json @@ -13,13 +13,10 @@ "level": 4 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:emerald" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:emerald" + } } ], "researchLevel": 4, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/depthknowledge.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/depthknowledge.json index b7b5fc1ac7d..9d7b32dc86a 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/depthknowledge.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/depthknowledge.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:deepslate" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:deepslate" + } } ], "researchLevel": 3, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/diamondcoated.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/diamondcoated.json index 8c629a4e852..56d7999c0a5 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/diamondcoated.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/diamondcoated.json @@ -9,13 +9,10 @@ "parentResearch": "minecolonies:technology/steelbracing", "requirements": [ { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:diamond" - ] - }, - "quantity": 128 + "items": { + "count": 128, + "item": "minecraft:diamond" + } } ], "researchLevel": 6 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/dung.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/dung.json index 428e5a51d53..e0ef6e7d9a2 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/dung.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/dung.json @@ -13,13 +13,10 @@ "level": 4 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:wheat_seeds" - ] - }, - "quantity": 128 + "items": { + "count": 128, + "item": "minecraft:wheat_seeds" + } } ], "researchLevel": 3, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/enhanced_gates1.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/enhanced_gates1.json index 7b864221201..5b0ae3d586e 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/enhanced_gates1.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/enhanced_gates1.json @@ -9,31 +9,22 @@ "parentResearch": "minecolonies:technology/whatyaneed", "requirements": [ { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecolonies:gate_wood" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecolonies:gate_wood" + } }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecolonies:ancienttome" - ] - }, - "quantity": 2 + "items": { + "count": 2, + "item": "minecolonies:ancienttome" + } }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:iron_block" - ] - }, - "quantity": 5 + "items": { + "count": 5, + "item": "minecraft:iron_block" + } } ], "researchLevel": 3 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/enhanced_gates2.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/enhanced_gates2.json index 600f606a94f..5291638aa83 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/enhanced_gates2.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/enhanced_gates2.json @@ -9,31 +9,22 @@ "parentResearch": "minecolonies:technology/enhanced_gates1", "requirements": [ { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecolonies:gate_iron" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecolonies:gate_iron" + } }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecolonies:ancienttome" - ] - }, - "quantity": 2 + "items": { + "count": 2, + "item": "minecolonies:ancienttome" + } }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:obsidian" - ] - }, - "quantity": 32 + "items": { + "count": 32, + "item": "minecraft:obsidian" + } } ], "researchLevel": 4 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/exoticfruits.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/exoticfruits.json index 00f62e2ef47..5b4a5711f5a 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/exoticfruits.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/exoticfruits.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:glow_berries" - ] - }, - "quantity": 32 + "items": { + "count": 32, + "item": "minecraft:glow_berries" + } } ], "researchLevel": 3, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/fertilizer.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/fertilizer.json index 55fb3019084..edf350ef03a 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/fertilizer.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/fertilizer.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:wheat_seeds" - ] - }, - "quantity": 512 + "items": { + "count": 512, + "item": "minecraft:wheat_seeds" + } } ], "researchLevel": 5, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/flowerpower.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/flowerpower.json index dc17c7a54da..dd483704dcb 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/flowerpower.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/flowerpower.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecolonies:compost" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecolonies:compost" + } } ], "researchLevel": 2 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/fullstock.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/fullstock.json index 460b91bf194..d47d39f89b6 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/fullstock.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/fullstock.json @@ -13,13 +13,10 @@ "level": 5 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecolonies:blockminecoloniesrack" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecolonies:blockminecoloniesrack" + } } ], "researchLevel": 5, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/gargamel.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/gargamel.json index cef12af5f3b..77a7d7799f0 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/gargamel.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/gargamel.json @@ -17,22 +17,16 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:crimson_fungus" - ] - }, - "quantity": 16 + "items": { + "count": 16, + "item": "minecraft:crimson_fungus" + } }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:warped_fungus" - ] - }, - "quantity": 16 + "items": { + "count": 16, + "item": "minecraft:warped_fungus" + } } ], "researchLevel": 4, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/gildedhammer.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/gildedhammer.json index 8a5cf6f0476..5e1b640bd65 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/gildedhammer.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/gildedhammer.json @@ -13,31 +13,22 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:gravel" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:gravel" + } }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:sand" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:sand" + } }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:clay" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:clay" + } } ], "researchLevel": 3, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/goodveins.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/goodveins.json index 5e369290031..b31856c2a49 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/goodveins.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/goodveins.json @@ -13,11 +13,10 @@ "level": 2 }, { - "type": "minecolonies:item_tag", - "item": { + "items": { + "count": 64, "tag": "minecraft:iron_ores" - }, - "quantity": 64 + } } ], "researchLevel": 3 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/hardened.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/hardened.json index 794e7f23e66..1148e712dc2 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/hardened.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/hardened.json @@ -13,13 +13,10 @@ "level": 2 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:diamond" - ] - }, - "quantity": 16 + "items": { + "count": 16, + "item": "minecraft:diamond" + } } ], "researchLevel": 3 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/heavilyloaded.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/heavilyloaded.json index 76fc03f6dd4..ba2b7241ce6 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/heavilyloaded.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/heavilyloaded.json @@ -10,13 +10,10 @@ "parentResearch": "minecolonies:technology/loaded", "requirements": [ { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:emerald" - ] - }, - "quantity": 256 + "items": { + "count": 256, + "item": "minecraft:emerald" + } } ], "researchLevel": 6 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/heavymachinery.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/heavymachinery.json index 2c662502449..f07e602609b 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/heavymachinery.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/heavymachinery.json @@ -9,13 +9,10 @@ "parentResearch": "minecolonies:technology/redstonepowered", "requirements": [ { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:redstone" - ] - }, - "quantity": 512 + "items": { + "count": 512, + "item": "minecraft:redstone" + } } ], "researchLevel": 4 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/hittingiron.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/hittingiron.json index b858aeaa87c..014470d56f8 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/hittingiron.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/hittingiron.json @@ -12,13 +12,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:anvil" - ] - }, - "quantity": 1 + "items": { + "count": 1, + "item": "minecraft:anvil" + } } ], "researchLevel": 1, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/honeypot.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/honeypot.json index 03560674fe7..27f4b5f6550 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/honeypot.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/honeypot.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:beehive" - ] - }, - "quantity": 16 + "items": { + "count": 16, + "item": "minecraft:beehive" + } } ], "researchLevel": 3, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/hot.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/hot.json index 42a25df4ebd..4db6e39ed37 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/hot.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/hot.json @@ -12,13 +12,10 @@ "level": 2 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:lava_bucket" - ] - }, - "quantity": 4 + "items": { + "count": 4, + "item": "minecraft:lava_bucket" + } } ], "researchLevel": 1, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/hotboots.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/hotboots.json index f39cf38861d..845c2984eca 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/hotboots.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/hotboots.json @@ -13,22 +13,16 @@ "level": 1 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:leather" - ] - }, - "quantity": 32 + "items": { + "count": 32, + "item": "minecraft:leather" + } }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:iron_ingot" - ] - }, - "quantity": 16 + "items": { + "count": 16, + "item": "minecraft:iron_ingot" + } } ], "researchLevel": 3, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/isthisredstone.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/isthisredstone.json index 82057e59fc7..3f85466f15e 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/isthisredstone.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/isthisredstone.json @@ -9,13 +9,10 @@ "parentResearch": "minecolonies:technology/hot", "requirements": [ { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:redstone" - ] - }, - "quantity": 128 + "items": { + "count": 128, + "item": "minecraft:redstone" + } } ], "researchLevel": 2 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/junglemaster.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/junglemaster.json index 8be8504823e..3f6f4bf2fe9 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/junglemaster.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/junglemaster.json @@ -13,31 +13,22 @@ "level": 2 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:bamboo" - ] - }, - "quantity": 16 + "items": { + "count": 16, + "item": "minecraft:bamboo" + } }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:cocoa_beans" - ] - }, - "quantity": 16 + "items": { + "count": 16, + "item": "minecraft:cocoa_beans" + } }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:vine" - ] - }, - "quantity": 16 + "items": { + "count": 16, + "item": "minecraft:vine" + } } ], "researchLevel": 3, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/knowtheend.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/knowtheend.json index f5e93bff6ee..5a2805830f4 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/knowtheend.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/knowtheend.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:chorus_fruit" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:chorus_fruit" + } } ], "researchLevel": 3, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/letitgrow.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/letitgrow.json index 64778f31103..a519de61ee8 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/letitgrow.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/letitgrow.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecolonies:compost" - ] - }, - "quantity": 16 + "items": { + "count": 16, + "item": "minecolonies:compost" + } } ], "researchLevel": 2, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/lightning.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/lightning.json index fbacffdbab6..90aabd86301 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/lightning.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/lightning.json @@ -9,13 +9,10 @@ "parentResearch": "minecolonies:technology/whatisthisspeed", "requirements": [ { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:redstone" - ] - }, - "quantity": 2048 + "items": { + "count": 2048, + "item": "minecraft:redstone" + } } ], "researchLevel": 6, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/loaded.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/loaded.json index b9a204e6022..8fb09a5e7af 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/loaded.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/loaded.json @@ -13,13 +13,10 @@ "level": 5 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:emerald" - ] - }, - "quantity": 128 + "items": { + "count": 128, + "item": "minecraft:emerald" + } } ], "researchLevel": 5 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/madness.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/madness.json index 7b4e8ceb9e8..7c971f37bdb 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/madness.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/madness.json @@ -9,13 +9,10 @@ "parentResearch": "minecolonies:technology/seemsautomatic", "requirements": [ { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:iron_ingot" - ] - }, - "quantity": 1024 + "items": { + "count": 1024, + "item": "minecraft:iron_ingot" + } } ], "researchLevel": 6 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/magiccompost.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/magiccompost.json index f4593a8b1b6..61a2aaa0bab 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/magiccompost.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/magiccompost.json @@ -9,13 +9,10 @@ "parentResearch": "minecolonies:technology/fertilizer", "requirements": [ { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:wheat_seeds" - ] - }, - "quantity": 2048 + "items": { + "count": 2048, + "item": "minecraft:wheat_seeds" + } } ], "researchLevel": 6 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/memoryaid.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/memoryaid.json index 8dcf6628c65..e87ffa7b1b4 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/memoryaid.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/memoryaid.json @@ -13,13 +13,10 @@ "level": 1 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:paper" - ] - }, - "quantity": 32 + "items": { + "count": 32, + "item": "minecraft:paper" + } } ], "researchLevel": 2, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/morescrolls.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/morescrolls.json index e9922130d7a..af664bbf6af 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/morescrolls.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/morescrolls.json @@ -12,31 +12,22 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:paper" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:paper" + } }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecolonies:ancienttome" - ] - }, - "quantity": 1 + "items": { + "count": 1, + "item": "minecolonies:ancienttome" + } }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:lapis_lazuli" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:lapis_lazuli" + } } ], "researchLevel": 1, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/motherlode.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/motherlode.json index 7d982676656..cb787b746bd 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/motherlode.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/motherlode.json @@ -9,11 +9,10 @@ "parentResearch": "minecolonies:technology/amazingveins", "requirements": [ { - "type": "minecolonies:item_tag", - "item": { + "items": { + "count": 64, "tag": "minecraft:diamond_ores" - }, - "quantity": 64 + } } ], "researchLevel": 6 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/netherlog.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/netherlog.json index b650888e1bd..c1ffe9cd534 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/netherlog.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/netherlog.json @@ -9,22 +9,16 @@ "parentResearch": "minecolonies:technology/opennether", "requirements": [ { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:ender_eye" - ] - }, - "quantity": 16 + "items": { + "count": 16, + "item": "minecraft:ender_eye" + } }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecolonies:ancienttome" - ] - }, - "quantity": 1 + "items": { + "count": 1, + "item": "minecolonies:ancienttome" + } }, { "building": "netherworker", diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/oceanheart.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/oceanheart.json index df56f7d34cb..00373aa3c22 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/oceanheart.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/oceanheart.json @@ -13,13 +13,10 @@ "level": 4 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:heart_of_the_sea" - ] - }, - "quantity": 1 + "items": { + "count": 1, + "item": "minecraft:heart_of_the_sea" + } } ], "researchLevel": 4, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/opennether.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/opennether.json index a631a8984c5..69feb981929 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/opennether.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/opennether.json @@ -9,13 +9,10 @@ "parentResearch": "minecolonies:technology/morescrolls", "requirements": [ { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:gilded_blackstone" - ] - }, - "quantity": 3 + "items": { + "count": 3, + "item": "minecraft:gilded_blackstone" + } } ], "researchLevel": 2, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/pavetheroad.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/pavetheroad.json index 4c7502da6cd..b4684085a8e 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/pavetheroad.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/pavetheroad.json @@ -13,11 +13,10 @@ "level": 1 }, { - "type": "minecolonies:item_tag", - "item": { + "items": { + "count": 32, "tag": "minecolonies:concrete" - }, - "quantity": 32 + } } ], "researchLevel": 3, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/podzolchance.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/podzolchance.json index f6f889b3df9..ae1703c956f 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/podzolchance.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/podzolchance.json @@ -13,13 +13,10 @@ "level": 2 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:podzol" - ] - }, - "quantity": 8 + "items": { + "count": 8, + "item": "minecraft:podzol" + } } ], "researchLevel": 2, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/podzolchance2.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/podzolchance2.json index 4043647fd43..a87eeff80f3 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/podzolchance2.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/podzolchance2.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:podzol" - ] - }, - "quantity": 32 + "items": { + "count": 32, + "item": "minecraft:podzol" + } } ], "researchLevel": 3, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/rainbowheaven.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/rainbowheaven.json index 27ab9ab3ff2..b3cc78d624d 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/rainbowheaven.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/rainbowheaven.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:poppy" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:poppy" + } } ], "researchLevel": 2, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/rainman.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/rainman.json index 0f7208c3efb..d9cb22ddae3 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/rainman.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/rainman.json @@ -9,13 +9,10 @@ "parentResearch": "minecolonies:technology/rtm", "requirements": [ { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:salmon_bucket" - ] - }, - "quantity": 27 + "items": { + "count": 27, + "item": "minecraft:salmon_bucket" + } } ], "researchLevel": 6, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/recipebook.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/recipebook.json index df11179bbf3..4b93b2200fe 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/recipebook.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/recipebook.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:paper" - ] - }, - "quantity": 128 + "items": { + "count": 128, + "item": "minecraft:paper" + } } ], "researchLevel": 4 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/redstonepowered.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/redstonepowered.json index 6deefbf7fd5..4f4bbf77391 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/redstonepowered.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/redstonepowered.json @@ -9,13 +9,10 @@ "parentResearch": "minecolonies:technology/isthisredstone", "requirements": [ { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:redstone" - ] - }, - "quantity": 256 + "items": { + "count": 256, + "item": "minecraft:redstone" + } } ], "researchLevel": 3, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/reinforced.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/reinforced.json index cb9ae9d5436..527ed752dcd 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/reinforced.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/reinforced.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:diamond" - ] - }, - "quantity": 32 + "items": { + "count": 32, + "item": "minecraft:diamond" + } } ], "researchLevel": 4 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/richveins.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/richveins.json index f077c7458a7..328100bd2c4 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/richveins.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/richveins.json @@ -13,11 +13,10 @@ "level": 4 }, { - "type": "minecolonies:item_tag", - "item": { + "items": { + "count": 32, "tag": "minecraft:gold_ores" - }, - "quantity": 32 + } } ], "researchLevel": 4 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/rockingroll.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/rockingroll.json index 25189458f94..5eeedcdd524 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/rockingroll.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/rockingroll.json @@ -13,13 +13,10 @@ "level": 1 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:stone" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:stone" + } } ], "researchLevel": 2 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/rtm.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/rtm.json index c798fb72e27..01fd1b6d457 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/rtm.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/rtm.json @@ -13,13 +13,10 @@ "level": 4 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:paper" - ] - }, - "quantity": 256 + "items": { + "count": 256, + "item": "minecraft:paper" + } } ], "researchLevel": 5, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/seemsautomatic.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/seemsautomatic.json index 34273080f87..21b41dcf94d 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/seemsautomatic.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/seemsautomatic.json @@ -13,13 +13,10 @@ "level": 5 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:iron_ingot" - ] - }, - "quantity": 512 + "items": { + "count": 512, + "item": "minecraft:iron_ingot" + } } ], "researchLevel": 5, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/sieving.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/sieving.json index 61e8f1c5f45..da319f538fc 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/sieving.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/sieving.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:string" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:string" + } } ], "researchLevel": 2, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/skills.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/skills.json index 07c253e1e45..66ad2e43e04 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/skills.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/skills.json @@ -13,13 +13,10 @@ "level": 2 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:iron_ingot" - ] - }, - "quantity": 128 + "items": { + "count": 128, + "item": "minecraft:iron_ingot" + } } ], "researchLevel": 3, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/softshoes.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/softshoes.json index b79035d2591..29b44b56082 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/softshoes.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/softshoes.json @@ -8,22 +8,16 @@ "icon": "minecraft:leather_boots", "requirements": [ { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:white_wool" - ] - }, - "quantity": 16 + "items": { + "count": 16, + "item": "minecraft:white_wool" + } }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:feather" - ] - }, - "quantity": 16 + "items": { + "count": 16, + "item": "minecraft:feather" + } } ], "researchLevel": 1, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/space.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/space.json index b45dff12003..470fcaa679f 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/space.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/space.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecolonies:blockminecoloniesrack" - ] - }, - "quantity": 16 + "items": { + "count": 16, + "item": "minecolonies:blockminecoloniesrack" + } } ], "researchLevel": 3, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/steelbracing.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/steelbracing.json index e7c33968b6b..78c457fd5f8 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/steelbracing.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/steelbracing.json @@ -13,13 +13,10 @@ "level": 5 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:diamond" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:diamond" + } } ], "researchLevel": 5 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/stonecake.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/stonecake.json index 6c735bed0db..dbb394abd16 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/stonecake.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/stonecake.json @@ -12,13 +12,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:chiseled_stone_bricks" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:chiseled_stone_bricks" + } } ], "researchLevel": 1, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/stringwork.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/stringwork.json index a547bd229db..153e91774d1 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/stringwork.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/stringwork.json @@ -13,13 +13,10 @@ "level": 1 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:string" - ] - }, - "quantity": 16 + "items": { + "count": 16, + "item": "minecraft:string" + } } ], "researchLevel": 2 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/strong.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/strong.json index 906efa4cc36..ba586053c4e 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/strong.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/strong.json @@ -13,13 +13,10 @@ "level": 1 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:diamond" - ] - }, - "quantity": 8 + "items": { + "count": 8, + "item": "minecraft:diamond" + } } ], "researchLevel": 2 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/takingdivinglessons.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/takingdivinglessons.json index 2c3033daa98..bddc8ee774d 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/takingdivinglessons.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/takingdivinglessons.json @@ -13,31 +13,22 @@ "level": 2 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:kelp" - ] - }, - "quantity": 16 + "items": { + "count": 16, + "item": "minecraft:kelp" + } }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:seagrass" - ] - }, - "quantity": 16 + "items": { + "count": 16, + "item": "minecraft:seagrass" + } }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:sea_pickle" - ] - }, - "quantity": 16 + "items": { + "count": 16, + "item": "minecraft:sea_pickle" + } } ], "researchLevel": 3, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/theflintstones.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/theflintstones.json index 97116c20b9a..53142b84d26 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/theflintstones.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/theflintstones.json @@ -13,13 +13,10 @@ "level": 1 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:brick" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:brick" + } } ], "researchLevel": 2, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/thoselungs.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/thoselungs.json index aa5a62ed9fa..f68ad1f69e6 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/thoselungs.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/thoselungs.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:glass" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:glass" + } } ], "researchLevel": 2, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/tools.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/tools.json index 855599721ae..452a999f73d 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/tools.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/tools.json @@ -13,13 +13,10 @@ "level": 4 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:iron_ingot" - ] - }, - "quantity": 256 + "items": { + "count": 256, + "item": "minecraft:iron_ingot" + } } ], "researchLevel": 4, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/veinminer.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/veinminer.json index 4dd50757b8b..d46214d99d7 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/veinminer.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/veinminer.json @@ -13,11 +13,10 @@ "level": 1 }, { - "type": "minecolonies:item_tag", - "item": { + "items": { + "count": 32, "tag": "minecraft:iron_ores" - }, - "quantity": 32 + } } ], "researchLevel": 2 diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/warehousemaster.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/warehousemaster.json index 65138e70191..4f0432d7e82 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/warehousemaster.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/warehousemaster.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecolonies:blockminecoloniesrack" - ] - }, - "quantity": 3 + "items": { + "count": 3, + "item": "minecolonies:blockminecoloniesrack" + } } ], "researchLevel": 3, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/whatisthisspeed.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/whatisthisspeed.json index 0c3823e8c6f..d622f476d88 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/whatisthisspeed.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/whatisthisspeed.json @@ -9,13 +9,10 @@ "parentResearch": "minecolonies:technology/heavymachinery", "requirements": [ { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:redstone" - ] - }, - "quantity": 1024 + "items": { + "count": 1024, + "item": "minecraft:redstone" + } } ], "researchLevel": 5, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/whatyaneed.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/whatyaneed.json index 194879eeca6..d322bb950d1 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/whatyaneed.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/whatyaneed.json @@ -13,13 +13,10 @@ "level": 3 }, { - "type": "minecolonies:item_list", - "item": { - "items": [ - "minecraft:redstone" - ] - }, - "quantity": 64 + "items": { + "count": 64, + "item": "minecraft:redstone" + } } ], "researchLevel": 2, diff --git a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/woodwork.json b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/woodwork.json index ef48ff414f1..93f29c0fcf7 100644 --- a/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/woodwork.json +++ b/src/datagen/generated/minecolonies/data/minecolonies/researches/technology/woodwork.json @@ -12,11 +12,10 @@ "level": 3 }, { - "type": "minecolonies:item_tag", - "item": { + "items": { + "count": 64, "tag": "minecraft:planks" - }, - "quantity": 64 + } } ], "researchLevel": 1, diff --git a/src/main/java/com/minecolonies/api/IMinecoloniesAPI.java b/src/main/java/com/minecolonies/api/IMinecoloniesAPI.java index baf0772bfc3..b7c86c3d6f3 100755 --- a/src/main/java/com/minecolonies/api/IMinecoloniesAPI.java +++ b/src/main/java/com/minecolonies/api/IMinecoloniesAPI.java @@ -26,7 +26,6 @@ import com.minecolonies.api.entity.pathfinding.registry.IPathNavigateRegistry; import com.minecolonies.api.quests.registries.QuestRegistries; import com.minecolonies.api.research.IGlobalResearchTree; -import com.minecolonies.api.research.ModResearchCostTypes.ResearchCostType; import com.minecolonies.api.research.effects.registry.ResearchEffectEntry; import com.minecolonies.api.research.registry.ResearchRequirementEntry; import net.minecraft.core.Registry; @@ -78,8 +77,6 @@ static IMinecoloniesAPI getInstance() Registry getResearchEffectRegistry(); - Registry getResearchCostRegistry(); - Registry getColonyEventRegistry(); Registry getColonyEventDescriptionRegistry(); diff --git a/src/main/java/com/minecolonies/api/MinecoloniesAPIProxy.java b/src/main/java/com/minecolonies/api/MinecoloniesAPIProxy.java index c98e9549d7e..50cc3f7ea60 100755 --- a/src/main/java/com/minecolonies/api/MinecoloniesAPIProxy.java +++ b/src/main/java/com/minecolonies/api/MinecoloniesAPIProxy.java @@ -26,7 +26,6 @@ import com.minecolonies.api.entity.pathfinding.registry.IPathNavigateRegistry; import com.minecolonies.api.quests.registries.QuestRegistries; import com.minecolonies.api.research.IGlobalResearchTree; -import com.minecolonies.api.research.ModResearchCostTypes.ResearchCostType; import com.minecolonies.api.research.effects.registry.ResearchEffectEntry; import com.minecolonies.api.research.registry.ResearchRequirementEntry; import net.minecraft.core.Registry; @@ -160,12 +159,6 @@ public IGlobalResearchTree getGlobalResearchTree() @Override public Registry getResearchEffectRegistry() {return apiInstance.getResearchEffectRegistry();} - @Override - public Registry getResearchCostRegistry() - { - return apiInstance.getResearchCostRegistry(); - } - @Override public Registry getColonyEventRegistry() { diff --git a/src/main/java/com/minecolonies/api/crafting/CountedIngredient.java b/src/main/java/com/minecolonies/api/crafting/CountedIngredient.java index b6d8242b94a..75e4c2abb3f 100644 --- a/src/main/java/com/minecolonies/api/crafting/CountedIngredient.java +++ b/src/main/java/com/minecolonies/api/crafting/CountedIngredient.java @@ -16,6 +16,9 @@ /** * An ingredient that can be used in a vanilla recipe to require more than one item in a particular input slot. + * Similar to {@link net.neoforged.neoforge.common.crafting.SizedIngredient}, but this deliberately skips the + * count check in {@link #test(ItemStack)} to more easily support consuming across multiple inventory slots -- + * and unlike that, it participates as a custom ingredient directly. * * { * "type": "minecolonies:counted", @@ -48,9 +51,14 @@ public record CountedIngredient(@NotNull Ingredient child, int count) implements */ public static Ingredient of(@NotNull final Ingredient child, final int count) { - return new CountedIngredient(child, count).toVanilla(); + return count == 1 ? child : new CountedIngredient(child, count).toVanilla(); } + /** + * Tests if the given stack matches the base ingredient. Note: deliberately does *not* verify the count. + * @param stack the stack to test + * @return true if the stack is the matching ingredient, regardless of count. + */ @Override public boolean test(@Nullable final ItemStack stack) { diff --git a/src/main/java/com/minecolonies/api/research/AbstractResearchProvider.java b/src/main/java/com/minecolonies/api/research/AbstractResearchProvider.java index 86f44ec714f..d432bcd766f 100644 --- a/src/main/java/com/minecolonies/api/research/AbstractResearchProvider.java +++ b/src/main/java/com/minecolonies/api/research/AbstractResearchProvider.java @@ -4,7 +4,9 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.minecolonies.api.blocks.AbstractBlockHut; +import com.minecolonies.api.util.Utils; import com.minecolonies.api.util.constant.Constants; +import net.minecraft.core.HolderLookup; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.data.CachedOutput; import net.minecraft.data.DataProvider; @@ -14,6 +16,7 @@ import net.minecraft.util.Tuple; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; +import net.neoforged.neoforge.common.crafting.SizedIngredient; import org.jetbrains.annotations.NotNull; import java.nio.file.Path; @@ -22,8 +25,7 @@ import java.util.List; import java.util.concurrent.CompletableFuture; -import static com.minecolonies.api.research.ModResearchCostTypes.LIST_ITEM_COST_ID; -import static com.minecolonies.api.research.ModResearchCostTypes.TAG_ITEM_COST_ID; +import static com.minecolonies.core.research.GlobalResearch.RESEARCH_ITEM_LIST_PROP; /** * A class for creating the Research-related JSONs, including Research, ResearchEffects, and (optional) Branches. @@ -36,14 +38,18 @@ public abstract class AbstractResearchProvider implements DataProvider { protected final PackOutput packOutput; + private final CompletableFuture providerFuture; + protected HolderLookup.Provider provider; /** * The abstract variant of a ResearchProvider, to register to fires during runData. * @param packOutput the pack output. */ - public AbstractResearchProvider(@NotNull final PackOutput packOutput) + public AbstractResearchProvider(@NotNull final PackOutput packOutput, + @NotNull final CompletableFuture provider) { this.packOutput = packOutput; + this.providerFuture = provider; } /** @@ -76,46 +82,51 @@ public AbstractResearchProvider(@NotNull final PackOutput packOutput) @Override public CompletableFuture run(@NotNull final CachedOutput cache) { - final JsonObject langJson = new JsonObject(); - - for(final ResearchBranch branch : getResearchBranchCollection()) - { - research.add(new Tuple<>(branch.json, new Tuple<>(branch.id.getNamespace(), branch.id.getPath()))); - if(branch.translatedName != null && !branch.translatedName.isEmpty()) - { - addLanguageKeySafe(langJson, "com." + branch.id.getNamespace() + ".research." + branch.id.getPath().replaceAll("[/]",".") + ".name", branch.translatedName); - } - if(branch.translatedSubtitle != null && !branch.translatedSubtitle.isEmpty()) - { - addLanguageKeySafe(langJson, "com." + branch.id.getNamespace() + ".research." + branch.id.getPath().replaceAll("[/]",".") + ".subtitle", branch.translatedSubtitle); - } - } - for(final ResearchEffect effect : getResearchEffectCollection()) + return providerFuture.thenCompose(p -> { - research.add(new Tuple<>(effect.json, new Tuple<>(effect.id.getNamespace(), effect.id.getPath()))); - if(effect.translatedName != null && !effect.translatedName.isEmpty()) - { - addLanguageKeySafe(langJson, "com." + effect.id.getNamespace() + ".research." + effect.id.getPath().replaceAll("[/]",".") + ".description", effect.translatedName); - } - if(effect.translatedSubtitle != null && !effect.translatedSubtitle.isEmpty()) + provider = p; + + final JsonObject langJson = new JsonObject(); + + for(final ResearchBranch branch : getResearchBranchCollection()) { - addLanguageKeySafe(langJson, "com." + effect.id.getNamespace() + ".research." + effect.id.getPath().replaceAll("[/]",".") + ".subtitle", effect.translatedSubtitle); + research.add(new Tuple<>(branch.json, new Tuple<>(branch.id.getNamespace(), branch.id.getPath()))); + if(branch.translatedName != null && !branch.translatedName.isEmpty()) + { + addLanguageKeySafe(langJson, "com." + branch.id.getNamespace() + ".research." + branch.id.getPath().replaceAll("[/]",".") + ".name", branch.translatedName); + } + if(branch.translatedSubtitle != null && !branch.translatedSubtitle.isEmpty()) + { + addLanguageKeySafe(langJson, "com." + branch.id.getNamespace() + ".research." + branch.id.getPath().replaceAll("[/]",".") + ".subtitle", branch.translatedSubtitle); + } } - } - for(final Research research : getResearchCollection()) - { - this.research.add(new Tuple<>(research.json, new Tuple<>(research.id.getNamespace(), research.id.getPath()))); - - if(research.translatedName != null && !research.translatedName.isEmpty()) + for(final ResearchEffect effect : getResearchEffectCollection()) { - addLanguageKeySafe(langJson, "com." + research.id.getNamespace() + ".research." + research.id.getPath().replaceAll("[/]",".") + ".name", research.translatedName); + research.add(new Tuple<>(effect.json, new Tuple<>(effect.id.getNamespace(), effect.id.getPath()))); + if(effect.translatedName != null && !effect.translatedName.isEmpty()) + { + addLanguageKeySafe(langJson, "com." + effect.id.getNamespace() + ".research." + effect.id.getPath().replaceAll("[/]",".") + ".description", effect.translatedName); + } + if(effect.translatedSubtitle != null && !effect.translatedSubtitle.isEmpty()) + { + addLanguageKeySafe(langJson, "com." + effect.id.getNamespace() + ".research." + effect.id.getPath().replaceAll("[/]",".") + ".subtitle", effect.translatedSubtitle); + } } - if(research.translatedSubtitle != null && !research.translatedSubtitle.isEmpty()) + for(final Research research : getResearchCollection()) { - addLanguageKeySafe(langJson, "com." + research.id.getNamespace() + ".research." + research.id.getPath().replaceAll("[/]",".") + ".subtitle", research.translatedSubtitle); + this.research.add(new Tuple<>(research.json, new Tuple<>(research.id.getNamespace(), research.id.getPath()))); + + if(research.translatedName != null && !research.translatedName.isEmpty()) + { + addLanguageKeySafe(langJson, "com." + research.id.getNamespace() + ".research." + research.id.getPath().replaceAll("[/]",".") + ".name", research.translatedName); + } + if(research.translatedSubtitle != null && !research.translatedSubtitle.isEmpty()) + { + addLanguageKeySafe(langJson, "com." + research.id.getNamespace() + ".research." + research.id.getPath().replaceAll("[/]",".") + ".subtitle", research.translatedSubtitle); + } } - } - return generateAll(cache, langJson); + return generateAll(cache, langJson); + }); } protected CompletableFuture generateAll(CachedOutput cache, final JsonObject langJson) @@ -539,65 +550,71 @@ public Research addResearchRequirement(final ResourceLocation researchReq, final * Adds an item cost to the research. This will be consumed when beginning the research, and will not be refunded. * Multiple ItemCosts are supported, but for UI reasons it's encouraged to keep to 5 or less. * - * @param item The item to require. - * @param count The number of the item to require. + * @param item The item to require. + * @param count The count to require. + * @param provider The registry provider. * @return this. */ - public Research addItemCost(final Item item, final int count) + public Research addItemCost(final Item item, final int count, final HolderLookup.Provider provider) { - return addItemCost(List.of(item), count); + return addItemCost(SizedIngredient.of(item, count), provider); } /** * Adds an item cost to the research. This will be consumed when beginning the research, and will not be refunded. * Multiple ItemCosts are supported, but for UI reasons it's encouraged to keep to 5 or less. * - * @param items The item to require. - * @param count The number of the item to require. + * @param tag The tag to require. + * @param count The count to require. + * @param provider The registry provider. * @return this. */ - public Research addItemCost(final List items, final int count) + public Research addItemCost(final TagKey tag, final int count, final HolderLookup.Provider provider) { - final JsonArray reqArray = getRequirementsArray(); - - JsonArray itemArr = new JsonArray(); - for (Item item : items) - { - itemArr.add(BuiltInRegistries.ITEM.getKey(item).toString()); - } - - JsonObject itemObj = new JsonObject(); - itemObj.add("items", itemArr); - - JsonObject req = new JsonObject(); - req.addProperty("type", LIST_ITEM_COST_ID.toString()); - req.add("item",itemObj); - req.addProperty("quantity", count); - reqArray.add(req); + return addItemCost(SizedIngredient.of(tag, count), provider); + } - this.json.add("requirements", reqArray); - return this; + /** + * Adds an item cost to the research. This will be consumed when beginning the research, and will not be refunded. + * Multiple ItemCosts are supported, but for UI reasons it's encouraged to keep to 5 or less. + * + * @param item The item to require. + * @param provider The registry provider. + * @return this. + */ + public Research addItemCost(final SizedIngredient item, final HolderLookup.Provider provider) + { + return addItemCost(List.of(item), provider); } /** * Adds an item cost to the research. This will be consumed when beginning the research, and will not be refunded. * Multiple ItemCosts are supported, but for UI reasons it's encouraged to keep to 5 or less. * - * @param tag The tag to require. - * @param count The number of the item to require. + * @param items The items to require. + * @param provider The registry provider. * @return this. */ - public Research addItemCost(final TagKey tag, final int count) + public Research addItemCost(final List items, final HolderLookup.Provider provider) { final JsonArray reqArray = getRequirementsArray(); - JsonObject itemObj = new JsonObject(); - itemObj.addProperty("tag", tag.location().toString()); + if (items.isEmpty()) + { + return this; + } + final JsonElement itemJson; + if (items.size() == 1) + { + itemJson = Utils.serializeCodecMessToJson(SizedIngredient.FLAT_CODEC, provider, items.getFirst()); + } + else + { + itemJson = Utils.serializeCodecMessToJson(SizedIngredient.FLAT_CODEC.listOf(), provider, items); + } JsonObject req = new JsonObject(); - req.addProperty("type", TAG_ITEM_COST_ID.toString()); - req.add("item", itemObj); - req.addProperty("quantity", count); + req.add(RESEARCH_ITEM_LIST_PROP, itemJson); reqArray.add(req); this.json.add("requirements", reqArray); diff --git a/src/main/java/com/minecolonies/api/research/IGlobalResearch.java b/src/main/java/com/minecolonies/api/research/IGlobalResearch.java index 37c3a740587..d0f2b624dd0 100755 --- a/src/main/java/com/minecolonies/api/research/IGlobalResearch.java +++ b/src/main/java/com/minecolonies/api/research/IGlobalResearch.java @@ -1,10 +1,10 @@ package com.minecolonies.api.research; -import com.minecolonies.api.research.costs.IResearchCost; import com.minecolonies.api.research.effects.IResearchEffect; import net.minecraft.network.chat.contents.TranslatableContents; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; +import net.neoforged.neoforge.common.crafting.SizedIngredient; import net.neoforged.neoforge.items.IItemHandler; import org.jetbrains.annotations.NotNull; @@ -45,7 +45,7 @@ public interface IGlobalResearch * * @return the list. */ - List getCostList(); + List getCostList(); /** * Start the research. @@ -176,10 +176,10 @@ public interface IGlobalResearch void addChild(final ResourceLocation child); /** - * Add an individual cost. - * @param cost the individual item to add to the cost list, as a reseach cost instance. + * Add item costs. + * @param cost the items to add to the cost list. */ - void addCost(final IResearchCost cost); + void addCosts(final List cost); /** * Add an individual effect. diff --git a/src/main/java/com/minecolonies/api/research/ModResearchCostTypes.java b/src/main/java/com/minecolonies/api/research/ModResearchCostTypes.java deleted file mode 100644 index 5042b4e3dcf..00000000000 --- a/src/main/java/com/minecolonies/api/research/ModResearchCostTypes.java +++ /dev/null @@ -1,93 +0,0 @@ -package com.minecolonies.api.research; - -import com.google.gson.JsonObject; -import com.minecolonies.api.research.costs.IResearchCost; -import com.minecolonies.api.util.constant.Constants; -import net.minecraft.resources.ResourceLocation; -import net.neoforged.neoforge.registries.DeferredHolder; -import java.util.function.Function; - -/** - * Registry entries for item cost types. - */ -public class ModResearchCostTypes -{ - public static final ResourceLocation SIMPLE_ITEM_COST_ID = new ResourceLocation(Constants.MOD_ID, "item_simple"); - public static final ResourceLocation LIST_ITEM_COST_ID = new ResourceLocation(Constants.MOD_ID, "item_list"); - public static final ResourceLocation TAG_ITEM_COST_ID = new ResourceLocation(Constants.MOD_ID, "item_tag"); - - public static DeferredHolder simpleItemCost; - - public static DeferredHolder listItemCost; - - public static DeferredHolder tagItemCost; - - /** - * Quest reward entry type. - */ - public static class ResearchCostType - { - /** - * The ID of the cost type. - */ - private final ResourceLocation id; - - /** - * The producer for the cost instance. - */ - private final Function producer; - - /** - * Default constructor. - */ - public ResearchCostType(final ResourceLocation id, final Function productionFunction) - { - this.id = id; - this.producer = productionFunction; - } - - /** - * The ID of this cost type. - * - * @return the id. - */ - public ResourceLocation getId() - { - return id; - } - - /** - * Create an empty cost instance. - * - * @return the cost instance. - */ - public IResearchCost createInstance() - { - return producer.apply(this); - } - - /** - * Checks if this json object has the correct fields for this cost instance. - * - * @param jsonObject the input json object. - * @return true if the json object is in the right format. - */ - public boolean hasCorrectJsonFields(final JsonObject jsonObject) - { - final IResearchCost instance = createInstance(); - return instance.hasCorrectJsonFields(jsonObject); - } - - /** - * Parses the json object on this cost instance. - * - * @param jsonObject the input json object. - */ - public IResearchCost parseFromJson(final JsonObject jsonObject) - { - final IResearchCost instance = createInstance(); - instance.parseFromJson(jsonObject); - return instance; - } - } -} diff --git a/src/main/java/com/minecolonies/api/research/costs/IResearchCost.java b/src/main/java/com/minecolonies/api/research/costs/IResearchCost.java deleted file mode 100644 index 23b4ba5c5ea..00000000000 --- a/src/main/java/com/minecolonies/api/research/costs/IResearchCost.java +++ /dev/null @@ -1,92 +0,0 @@ -package com.minecolonies.api.research.costs; - -import com.google.gson.JsonObject; -import com.minecolonies.api.research.ModResearchCostTypes.ResearchCostType; -import net.minecraft.nbt.CompoundTag; -import net.minecraft.network.RegistryFriendlyByteBuf; -import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.ComponentUtils; -import net.minecraft.world.item.Item; -import org.jetbrains.annotations.NotNull; - -import java.util.List; - -/** - * Cost item for researches. - */ -public interface IResearchCost -{ - /** - * The type for this cost. - * - * @return the type. - */ - ResearchCostType getType(); - - /** - * Get the count for this cost. - * - * @return the count. - */ - int getCount(); - - /** - * Get the list of items for this cost. - * - * @return the list of items. - */ - List getItems(); - - /** - * Get the translated text for this research cost. - * - * @return the translated text. - */ - default Component getTranslatedName() - { - return ComponentUtils.formatList(getItems().stream().map(Item::getDescription).toList(), Component.literal(" / ")); - } - - /** - * Read the cost from NBT. - * - * @param compound the compound. - */ - void read(@NotNull final CompoundTag compound); - - /** - * Write the cost to NBT. - * - * @param compound the compound. - */ - void write(@NotNull final CompoundTag compound); - - /** - * Serialize the cost instance to the given {@link RegistryFriendlyByteBuf}. - * - * @param buf the network buffer. - */ - void serialize(@NotNull final RegistryFriendlyByteBuf buf); - - /** - * Deserialize the {@link RegistryFriendlyByteBuf} to this cost instance. - * - * @param buf the network buffer. - */ - void deserialize(@NotNull final RegistryFriendlyByteBuf buf); - - /** - * Checks if this json object has the correct fields for this cost instance. - * - * @param jsonObject the input json object. - * @return true if the json object is in the right format. - */ - boolean hasCorrectJsonFields(final JsonObject jsonObject); - - /** - * Parses the json object on this cost instance. - * - * @param jsonObject the input json object. - */ - void parseFromJson(final JsonObject jsonObject); -} diff --git a/src/main/java/com/minecolonies/api/util/ItemStackUtils.java b/src/main/java/com/minecolonies/api/util/ItemStackUtils.java index 621306ad842..3230c996c9a 100755 --- a/src/main/java/com/minecolonies/api/util/ItemStackUtils.java +++ b/src/main/java/com/minecolonies/api/util/ItemStackUtils.java @@ -14,9 +14,12 @@ import com.minecolonies.api.util.constant.IToolType; import com.minecolonies.api.util.constant.ToolType; import com.minecolonies.core.util.AdvancementUtils; +import com.mojang.datafixers.util.Pair; import it.unimi.dsi.fastutil.objects.Object2IntMap; +import net.minecraft.client.resources.language.I18n; import net.minecraft.core.Holder; import net.minecraft.core.HolderLookup; +import net.minecraft.core.HolderSet; import net.minecraft.core.component.DataComponentPatch; import net.minecraft.core.component.DataComponentType; import net.minecraft.core.registries.BuiltInRegistries; @@ -25,6 +28,7 @@ import net.minecraft.network.chat.MutableComponent; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.ItemTags; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.EquipmentSlot; @@ -34,15 +38,19 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.food.FoodProperties; import net.minecraft.world.item.*; +import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.item.enchantment.Enchantment; import net.minecraft.world.item.enchantment.Enchantments; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BrewingStandBlockEntity; import net.minecraft.world.level.block.entity.FurnaceBlockEntity; import net.minecraft.world.phys.EntityHitResult; +import net.neoforged.api.distmarker.Dist; +import net.neoforged.api.distmarker.OnlyIn; import net.neoforged.neoforge.common.ItemAbilities; import net.neoforged.neoforge.common.ItemAbility; import net.neoforged.neoforge.common.Tags; +import net.neoforged.neoforge.common.crafting.SizedIngredient; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -1098,5 +1106,83 @@ public static void consumeFood(final ItemStack foodStack, final AbstractEntityCi } citizenData.markDirty(60); } + + /** + * Given an {@link Ingredient}, tries to produce a reasonable friendly UI name for its contents. + * @param ingredient the ingredient to check. + * @return the friendly name. + */ + @OnlyIn(Dist.CLIENT) + public static Component getTranslatedName(@NotNull final SizedIngredient ingredient) + { + if (ingredient.ingredient().hasNoItems()) + { + return Component.empty(); + } + + final ItemStack[] items = ingredient.getItems(); + final Optional> tag = getTagEquivalent(items); + + return Component.translatable("%sx %s", ingredient.count(), tag.map(t -> + { + final String key = "com.minecolonies.coremod.research.tags." + t.location(); + return (Component) (I18n.exists(key) + ? Component.translatable(key) + : Component.translatable("com.minecolonies.coremod.research.tags.other", t.location().toString())); + }).orElseGet(() -> + { + if (items.length == 1) + { + return items[0].getItem().getDescription(); + } + return Component.translatable(String.join("/", Collections.nCopies(items.length, "%s")), + Arrays.stream(items).map(ItemStack::getItem).map(Item::getDescription).toArray()); + })); + } + + /** + * Attempts to find a tag that exactly matches the given list of item stacks. + * @param stacks a list of item stacks. + * @return a tag that seems to match it, if found. + */ + public static Optional> getTagEquivalent(@NotNull final ItemStack[] stacks) + { + final List values = Arrays.stream(stacks) + .map(ItemStack::getItem) + .toList(); + + if (values.size() <= 1) + { + return Optional.empty(); + } + + return BuiltInRegistries.ITEM.getTags() + .filter(e -> + { + HolderSet.Named tag = e.getSecond(); + return areEquivalent(tag, values); + }) + .map(Pair::getFirst) + .findFirst(); + } + + private static boolean areEquivalent(@NotNull final HolderSet.Named tag, @NotNull final List values) + { + final int count = tag.size(); + if (count != values.size()) + { + return false; + } + for (int i = 0; i < count; i++) + { + final Item tagValue = tag.get(i).value(); + final Item value = values.get(i); + if (!value.equals(tagValue)) + { + return false; + } + } + return true; + } } diff --git a/src/main/java/com/minecolonies/apiimp/CommonMinecoloniesAPIImpl.java b/src/main/java/com/minecolonies/apiimp/CommonMinecoloniesAPIImpl.java index fb148899820..5ad78f0ee35 100755 --- a/src/main/java/com/minecolonies/apiimp/CommonMinecoloniesAPIImpl.java +++ b/src/main/java/com/minecolonies/apiimp/CommonMinecoloniesAPIImpl.java @@ -28,7 +28,6 @@ import com.minecolonies.api.entity.pathfinding.registry.IPathNavigateRegistry; import com.minecolonies.api.quests.registries.QuestRegistries; import com.minecolonies.api.research.IGlobalResearchTree; -import com.minecolonies.api.research.ModResearchCostTypes.ResearchCostType; import com.minecolonies.api.research.effects.registry.ResearchEffectEntry; import com.minecolonies.api.research.registry.ResearchRequirementEntry; import com.minecolonies.api.util.constant.Constants; @@ -50,7 +49,6 @@ import net.neoforged.neoforge.registries.RegistryBuilder; import org.jetbrains.annotations.NotNull; -import static com.minecolonies.api.research.ModResearchCostTypes.LIST_ITEM_COST_ID; import static com.minecolonies.api.research.ModResearchRequirements.RESEARCH_RESEARCH_REQ_ID; import static com.minecolonies.api.research.effects.ModResearchEffects.GLOBAL_EFFECT_ID; @@ -67,7 +65,6 @@ public class CommonMinecoloniesAPIImpl implements IMinecoloniesAPI public static final ResourceKey> RECIPE_TYPE_ENTRIES = key("recipetypeentries"); public static final ResourceKey> RESEARCH_REQUIREMENT_TYPES = key("researchrequirementtypes"); public static final ResourceKey> RESEARCH_EFFECT_TYPES = key("researcheffecttypes"); - public static final ResourceKey> RESEARCH_COST_TYPES = key("researchcosttypes"); public static final ResourceKey> QUEST_OBJECTIVES = key("questobjectives"); public static final ResourceKey> QUEST_REWARDS = key("questrewards"); public static final ResourceKey> QUEST_TRIGGERS = key("questtriggers"); @@ -94,7 +91,6 @@ public class CommonMinecoloniesAPIImpl implements IMinecoloniesAPI private Registry colonyEventDescriptionRegistry; private Registry researchRequirementRegistry; private Registry researchEffectRegistry; - private Registry researchCostRegistry; private Registry recipeTypeEntryRegistry; private Registry craftingTypeRegistry; private Registry questObjectiveRegistry; @@ -219,12 +215,6 @@ public IGlobalResearchTree getGlobalResearchTree() @Override public Registry getResearchEffectRegistry() {return researchEffectRegistry;} - @Override - public Registry getResearchCostRegistry() - { - return researchCostRegistry; - } - @Override public void onRegistryNewRegistry(final NewRegistryEvent event) { @@ -239,7 +229,6 @@ public void onRegistryNewRegistry(final NewRegistryEvent event) recipeTypeEntryRegistry = event.create(syncedRegistry(RECIPE_TYPE_ENTRIES, new ResourceLocation(Constants.MOD_ID, "classic"))); researchRequirementRegistry = event.create(syncedRegistry(RESEARCH_REQUIREMENT_TYPES, RESEARCH_RESEARCH_REQ_ID)); researchEffectRegistry = event.create(syncedRegistry(RESEARCH_EFFECT_TYPES, GLOBAL_EFFECT_ID)); - researchCostRegistry = event.create(syncedRegistry(RESEARCH_COST_TYPES, LIST_ITEM_COST_ID)); questObjectiveRegistry = event.create(syncedRegistry(QUEST_OBJECTIVES)); questRewardRegistry = event.create(syncedRegistry(QUEST_REWARDS)); questTriggerRegistry = event.create(syncedRegistry(QUEST_TRIGGERS)); diff --git a/src/main/java/com/minecolonies/apiimp/initializer/ModResearchCostTypeInitializer.java b/src/main/java/com/minecolonies/apiimp/initializer/ModResearchCostTypeInitializer.java deleted file mode 100644 index 1563c2c4b8b..00000000000 --- a/src/main/java/com/minecolonies/apiimp/initializer/ModResearchCostTypeInitializer.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.minecolonies.apiimp.initializer; - -import com.minecolonies.api.research.ModResearchCostTypes; -import com.minecolonies.api.research.ModResearchCostTypes.ResearchCostType; -import com.minecolonies.api.util.constant.Constants; -import com.minecolonies.apiimp.CommonMinecoloniesAPIImpl; -import com.minecolonies.core.research.costs.ListItemCost; -import com.minecolonies.core.research.costs.SimpleItemCost; -import com.minecolonies.core.research.costs.TagItemCost; -import net.neoforged.neoforge.registries.DeferredRegister; - -import static com.minecolonies.api.research.ModResearchCostTypes.*; - -/** - * Registry initializer for the {@link ModResearchCostTypes}. - */ -public class ModResearchCostTypeInitializer -{ - public static final DeferredRegister - DEFERRED_REGISTER = DeferredRegister.create(CommonMinecoloniesAPIImpl.RESEARCH_COST_TYPES, Constants.MOD_ID); - static - { - ModResearchCostTypes.simpleItemCost = - DEFERRED_REGISTER.register(SIMPLE_ITEM_COST_ID.getPath(), () -> new ResearchCostType(SIMPLE_ITEM_COST_ID, SimpleItemCost::new)); - - ModResearchCostTypes.listItemCost = - DEFERRED_REGISTER.register(LIST_ITEM_COST_ID.getPath(), () -> new ResearchCostType(LIST_ITEM_COST_ID, ListItemCost::new)); - - ModResearchCostTypes.tagItemCost = - DEFERRED_REGISTER.register(TAG_ITEM_COST_ID.getPath(), () -> new ResearchCostType(TAG_ITEM_COST_ID, TagItemCost::new)); - } - private ModResearchCostTypeInitializer() - { - throw new IllegalStateException("Tried to initialize: ModResearchCostInitializer but this is a Utility class."); - } -} diff --git a/src/main/java/com/minecolonies/core/MineColonies.java b/src/main/java/com/minecolonies/core/MineColonies.java index 733a9f37f26..a4f2427d2f6 100755 --- a/src/main/java/com/minecolonies/core/MineColonies.java +++ b/src/main/java/com/minecolonies/core/MineColonies.java @@ -114,7 +114,6 @@ public MineColonies(final FMLModContainer modContainer, final Dist dist) ModSoundEvents.SOUND_EVENTS.register(modBus); ModInteractionsInitializer.DEFERRED_REGISTER.register(modBus); ModResearchEffectInitializer.DEFERRED_REGISTER.register(modBus); - ModResearchCostTypeInitializer.DEFERRED_REGISTER.register(modBus); ModLootConditions.DEFERRED_REGISTER.register(modBus); SupplyLoot.GLM.register(modBus); ModBannerPatterns.BANNER_PATTERNS.register(modBus); diff --git a/src/main/java/com/minecolonies/core/client/gui/WindowResearchTree.java b/src/main/java/com/minecolonies/core/client/gui/WindowResearchTree.java index 0902521f9c7..cabe605f5da 100644 --- a/src/main/java/com/minecolonies/core/client/gui/WindowResearchTree.java +++ b/src/main/java/com/minecolonies/core/client/gui/WindowResearchTree.java @@ -9,7 +9,6 @@ import com.minecolonies.api.colony.buildings.views.IBuildingView; import com.minecolonies.api.crafting.ItemStorage; import com.minecolonies.api.research.*; -import com.minecolonies.api.research.costs.IResearchCost; import com.minecolonies.api.research.effects.IResearchEffect; import com.minecolonies.api.research.util.ResearchState; import com.minecolonies.api.util.InventoryUtils; @@ -29,6 +28,7 @@ import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; +import net.neoforged.neoforge.common.crafting.SizedIngredient; import net.neoforged.neoforge.items.wrapper.InvWrapper; import org.jetbrains.annotations.NotNull; @@ -156,6 +156,8 @@ public void onButtonClicked(@NotNull final Button button) parent.removeChild(undoText); } + ResourceLocation id = ResourceLocation.tryParse(button.getID()); + // Check for an empty button Id. These reflect disabled buttons normally // but a sufficiently malformed data pack may also have a blank research id, // and we don't want to try to try to parse that. @@ -168,12 +170,12 @@ public void onButtonClicked(@NotNull final Button button) else if (button.getID().contains("undo:")) { final String undoName = button.getID().substring(button.getID().indexOf(':') + 1); - if(!ResourceLocation.isValidPath(undoName)) + id = ResourceLocation.tryParse(undoName); + if (id == null) { return; } - final ResourceLocation undoID = ResourceLocation.parse(undoName); - final ILocalResearch cancelResearch = building.getColony().getResearchManager().getResearchTree().getResearch(branch, undoID); + final ILocalResearch cancelResearch = building.getColony().getResearchManager().getResearchTree().getResearch(branch, id); if (cancelResearch != null) { // Can't rely on getting an updated research count after the cancellation in any predictable timeframe. @@ -194,86 +196,89 @@ else if (button.getID().contains("undo:")) close(); } } - else if (ResourceLocation.isValidPath(button.getID()) - && IGlobalResearchTree.getInstance().getResearch(branch, ResourceLocation.parse(button.getID())) != null - && (building.getBuildingLevel() >= IGlobalResearchTree.getInstance().getResearch(branch, ResourceLocation.parse(button.getID())).getDepth() - || building.getBuildingLevel() == building.getBuildingMaxLevel())) + else { - final IGlobalResearch research = IGlobalResearchTree.getInstance().getResearch(branch, ResourceLocation.parse(button.getID())); - final ILocalResearch localResearch = building.getColony().getResearchManager().getResearchTree().getResearch(branch, research.getId()); - if (localResearch == null && building.getBuildingLevel() > building.getColony().getResearchManager().getResearchTree().getResearchInProgress().size() && - (research.hasEnoughResources(new InvWrapper(Minecraft.getInstance().player.getInventory())) || (mc.player.isCreative()))) - { - // This side won't actually start research; it'll be overridden the next colony update from the server. - // It will, however, update for the next WindowResearchTree if the colony update is slow to come back. - // Again, the server will prevent someone from paying items twice, but this avoids some confusion. - research.startResearch(building.getColony().getResearchManager().getResearchTree()); - // don't need to offset count here, as the startResearch will pad it until the new Colony data comes in. - last.updateResearchCount(0); - if (research.getDepth() > building.getBuildingMaxLevel()) - { - hasMax = true; - } - new TryResearchMessage(building, research.getId(), research.getBranch(), false).sendToServer(); - close(); - } - else if (localResearch != null) + if (id != null + && IGlobalResearchTree.getInstance().getResearch(branch, id) != null + && (building.getBuildingLevel() >= IGlobalResearchTree.getInstance().getResearch(branch, id).getDepth() + || building.getBuildingLevel() == building.getBuildingMaxLevel())) { - // Generally allow in-progress research to be cancelled. - // This still costs items, so mostly only beneficial to free up a researcher slot. - if (localResearch.getState() == ResearchState.IN_PROGRESS) + final IGlobalResearch research = IGlobalResearchTree.getInstance().getResearch(branch, id); + final ILocalResearch localResearch = building.getColony().getResearchManager().getResearchTree().getResearch(branch, research.getId()); + if (localResearch == null && building.getBuildingLevel() > building.getColony().getResearchManager().getResearchTree().getResearchInProgress().size() && + (research.hasEnoughResources(new InvWrapper(Minecraft.getInstance().player.getInventory())) || (mc.player.isCreative()))) { - drawUndoProgressButton(button); + // This side won't actually start research; it'll be overridden the next colony update from the server. + // It will, however, update for the next WindowResearchTree if the colony update is slow to come back. + // Again, the server will prevent someone from paying items twice, but this avoids some confusion. + research.startResearch(building.getColony().getResearchManager().getResearchTree()); + // don't need to offset count here, as the startResearch will pad it until the new Colony data comes in. + last.updateResearchCount(0); + if (research.getDepth() > building.getBuildingMaxLevel()) + { + hasMax = true; + } + new TryResearchMessage(building, research.getId(), research.getBranch(), false).sendToServer(); + close(); } - if (localResearch.getState() == ResearchState.FINISHED) + else if (localResearch != null) { - // Immutable must never allow UndoComplete. - // Autostart research should not allow undo of completed research as well, as it will attempt to restart it on colony reload. - if(research.isImmutable() || research.isAutostart()) + // Generally allow in-progress research to be cancelled. + // This still costs items, so mostly only beneficial to free up a researcher slot. + if (localResearch.getState() == ResearchState.IN_PROGRESS) { - return; + drawUndoProgressButton(button); } - // don't allow research with completed or in-progress children to be reset. They must be reset individually. - for (ResourceLocation childId : research.getChildren()) + if (localResearch.getState() == ResearchState.FINISHED) { - if (building.getColony().getResearchManager().getResearchTree().getResearch(branch, childId) != null - && building.getColony().getResearchManager().getResearchTree().getResearch(branch, childId).getState() != ResearchState.NOT_STARTED) + // Immutable must never allow UndoComplete. + // Autostart research should not allow undo of completed research as well, as it will attempt to restart it on colony reload. + if(research.isImmutable() || research.isAutostart()) { return; } - } - // Generally allow "unrestricted-tree" branches to undo complete research, if not prohibited. - // This is more meant to allow "unrestricted-tree"-style research's effects to be toggled on and off at a small cost. - // Probably not vital most of the time, but even some beneficial effects may not be desirable in all circumstances. - if (branchType == ResearchBranchType.UNLOCKABLES) - { - drawUndoCompleteButton(button); - } - // above-max-level research prohibits other options, and should be resetable. - if (hasMax && research.getDepth() > building.getBuildingMaxLevel() && building.getBuildingLevel() == building.getBuildingMaxLevel()) - { - drawUndoCompleteButton(button); - return; - } - // researches with an ancestor with OnlyChild status should be undoable, no children are complete or in-progress. - ResourceLocation parentId = IGlobalResearchTree.getInstance().getResearch(branch, research.getId()).getParent(); - while (!parentId.getPath().isEmpty()) - { - if (IGlobalResearchTree.getInstance().getResearch(branch, parentId) != null - && IGlobalResearchTree.getInstance().getResearch(branch, parentId).hasOnlyChild()) + // don't allow research with completed or in-progress children to be reset. They must be reset individually. + for (ResourceLocation childId : research.getChildren()) + { + if (building.getColony().getResearchManager().getResearchTree().getResearch(branch, childId) != null + && building.getColony().getResearchManager().getResearchTree().getResearch(branch, childId).getState() != ResearchState.NOT_STARTED) + { + return; + } + } + // Generally allow "unrestricted-tree" branches to undo complete research, if not prohibited. + // This is more meant to allow "unrestricted-tree"-style research's effects to be toggled on and off at a small cost. + // Probably not vital most of the time, but even some beneficial effects may not be desirable in all circumstances. + if (branchType == ResearchBranchType.UNLOCKABLES) { drawUndoCompleteButton(button); - break; } - parentId = IGlobalResearchTree.getInstance().getResearch(branch, parentId).getParent(); + // above-max-level research prohibits other options, and should be resetable. + if (hasMax && research.getDepth() > building.getBuildingMaxLevel() && building.getBuildingLevel() == building.getBuildingMaxLevel()) + { + drawUndoCompleteButton(button); + return; + } + // researches with an ancestor with OnlyChild status should be undoable, no children are complete or in-progress. + ResourceLocation parentId = IGlobalResearchTree.getInstance().getResearch(branch, research.getId()).getParent(); + while (!parentId.getPath().isEmpty()) + { + if (IGlobalResearchTree.getInstance().getResearch(branch, parentId) != null + && IGlobalResearchTree.getInstance().getResearch(branch, parentId).hasOnlyChild()) + { + drawUndoCompleteButton(button); + break; + } + parentId = IGlobalResearchTree.getInstance().getResearch(branch, parentId).getParent(); + } } } } - } - // Cancel the entire WindowResearchTree - else if (button.getID().equals("cancel")) - { - last.open(); + // Cancel the entire WindowResearchTree + else if (button.getID().equals("cancel")) + { + last.open(); + } } } @@ -670,11 +675,11 @@ private void generateResearchTooltips(final Button tipItem, final IGlobalResearc .append(research.getResearchRequirement().get(txt).getDesc()); } } - for (final IResearchCost cost : research.getCostList()) + for (final SizedIngredient cost : research.getCostList()) { hoverPaneBuilder.paragraphBreak() .append(Component.literal(" - ")) - .append(Component.translatableEscape("com.minecolonies.coremod.research.limit.requirement", cost.getCount(), cost.getTranslatedName())); + .append(Component.translatable("com.minecolonies.coremod.research.limit.cost", ItemStackUtils.getTranslatedName(cost))); if (research.hasEnoughResources(new InvWrapper(Minecraft.getInstance().player.getInventory()))) { hoverPaneBuilder.color(COLOR_TEXT_FULFILLED); @@ -869,7 +874,7 @@ private void drawResearchReqsAndCosts( final List alternateBuildingRequirements = new ArrayList<>(); final List buildingRequirements = new ArrayList<>(); - final List itemRequirements = research.getCostList(); + final List itemRequirements = research.getCostList(); research.getResearchRequirement().forEach(requirement -> { // There will only ever be one AlternateBuildingRequirement per research, under the current implementation. @@ -962,15 +967,12 @@ else if (requirement instanceof BuildingResearchRequirement buildingRequirement) } storageXOffset = COST_OFFSET; - for (final IResearchCost cost : itemRequirements) + for (final SizedIngredient cost : itemRequirements) { final RotatingItemIcon icon = new RotatingItemIcon(); icon.setPosition(offsetX + RESEARCH_WIDTH - storageXOffset - INITIAL_X_OFFSET, offsetY + NAME_LABEL_HEIGHT + TEXT_Y_OFFSET); icon.setSize(DEFAULT_COST_SIZE, DEFAULT_COST_SIZE); - icon.setItems(cost.getItems().stream().map(ItemStack::new).map(stack -> { - stack.setCount(cost.getCount()); - return stack; - }).toList()); + icon.setItems(List.of(cost.getItems())); view.addChild(icon); storageXOffset += COST_OFFSET; } diff --git a/src/main/java/com/minecolonies/core/client/gui/modules/UniversityModuleWindow.java b/src/main/java/com/minecolonies/core/client/gui/modules/UniversityModuleWindow.java index 8e63207d38c..34724ec0eb6 100644 --- a/src/main/java/com/minecolonies/core/client/gui/modules/UniversityModuleWindow.java +++ b/src/main/java/com/minecolonies/core/client/gui/modules/UniversityModuleWindow.java @@ -3,7 +3,10 @@ import com.ldtteam.blockui.Color; import com.ldtteam.blockui.Pane; import com.ldtteam.blockui.PaneBuilders; -import com.ldtteam.blockui.controls.*; +import com.ldtteam.blockui.controls.AbstractTextBuilder; +import com.ldtteam.blockui.controls.Button; +import com.ldtteam.blockui.controls.ButtonImage; +import com.ldtteam.blockui.controls.Text; import com.ldtteam.blockui.views.ScrollingList; import com.minecolonies.api.colony.buildings.views.IBuildingView; import com.minecolonies.api.research.IGlobalResearchTree; @@ -11,6 +14,10 @@ import com.minecolonies.api.util.constant.Constants; import com.minecolonies.core.client.gui.AbstractModuleWindow; import com.minecolonies.core.client.gui.WindowResearchTree; +import net.minecraft.ChatFormatting; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.MutableComponent; +import net.minecraft.network.chat.Style; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.NotNull; @@ -20,12 +27,8 @@ import java.util.List; import static com.minecolonies.api.research.util.ResearchConstants.COLOR_TEXT_UNFULFILLED; -import static com.minecolonies.api.util.constant.WindowConstants.*; - -import net.minecraft.ChatFormatting; -import net.minecraft.network.chat.MutableComponent; -import net.minecraft.network.chat.Style; -import net.minecraft.network.chat.Component; +import static com.minecolonies.api.util.constant.WindowConstants.GUI_LIST_ELEMENT_NAME; +import static com.minecolonies.api.util.constant.WindowConstants.RESOURCE_STRING; /** * BOWindow for the university. @@ -107,9 +110,10 @@ public void onButtonClicked(@NotNull final Button button) { super.onButtonClicked(button); - if (button.getParent() != null && ResourceLocation.isValidPath(button.getParent().getID()) && IGlobalResearchTree.getInstance().getBranches().contains(ResourceLocation.parse(button.getParent().getID()))) + final ResourceLocation id = button.getParent() == null ? null : ResourceLocation.tryParse(button.getParent().getID()); + if (id != null && IGlobalResearchTree.getInstance().getBranches().contains(id)) { - new WindowResearchTree(ResourceLocation.parse(button.getParent().getID()), buildingView, this).open(); + new WindowResearchTree(id, buildingView, this).open(); } } diff --git a/src/main/java/com/minecolonies/core/datalistener/ResearchListener.java b/src/main/java/com/minecolonies/core/datalistener/ResearchListener.java index 24f150763c1..ff35fcdadb0 100644 --- a/src/main/java/com/minecolonies/core/datalistener/ResearchListener.java +++ b/src/main/java/com/minecolonies/core/datalistener/ResearchListener.java @@ -7,7 +7,6 @@ import com.minecolonies.api.MinecoloniesAPIProxy; import com.minecolonies.api.research.IGlobalResearchTree; import com.minecolonies.api.research.IResearchRequirement; -import com.minecolonies.api.research.costs.IResearchCost; import com.minecolonies.api.research.effects.IResearchEffect; import com.minecolonies.api.util.Log; import com.minecolonies.api.util.Tuple; @@ -20,13 +19,12 @@ import net.minecraft.server.packs.resources.ResourceManager; import net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener; import net.minecraft.util.profiling.ProfilerFiller; +import net.minecraft.world.item.ItemStack; +import net.neoforged.neoforge.common.crafting.SizedIngredient; import net.neoforged.neoforge.server.ServerLifecycleHooks; import org.jetbrains.annotations.NotNull; -import java.util.Collection; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; +import java.util.*; import static com.minecolonies.core.research.GlobalResearch.*; import static com.minecolonies.core.research.GlobalResearchBranch.*; @@ -147,12 +145,12 @@ else if (effectJson.has(RESEARCH_EFFECT_PROP)) /** * Parses out a json map for elements containing Researches, validates that they have required fields, and generates a GlobalResearch for each. * - * @param object A Map containing the resource location of each json file, and the element within that json file. - * @param effectCategories A Map containing the effect categories by effectId. - * @param removeResearches A Collection of researches to remove, if present. - * @param removeBranches A Collection of research branches to remove, including all component researches, if present. - * @param checkResourceLoc If the client should check resource locations at the time. This can not be run on the server. - * @return A Map containing the ResearchIds and the GlobalResearches each ID corresponds to. + * @param object A Map containing the resource location of each json file, and the element within that json file. + * @param effectCategories A Map containing the effect categories by effectId. + * @param removeResearches A Collection of researches to remove, if present. + * @param removeBranches A Collection of research branches to remove, including all component researches, if present. + * @param checkResourceLoc If the client should check resource locations at the time. This can not be run on the server. + * @return A Map containing the ResearchIds and the GlobalResearches each ID corresponds to. */ private Map parseResearches(final Map object, final Map effectCategories, final Collection removeResearches, final Collection removeBranches, boolean checkResourceLoc) { @@ -218,7 +216,7 @@ else if (removeBranches.contains(ResourceLocation.parse(researchJson.get(RESEARC //Pretty much anything else should be allowed: it's plausible pack designers may want a research type without a cost or effect. //It's possible we could dynamically derive university levels from parents, but doing so as a rule will prevent research branches that start at T2 or deeper. - final GlobalResearch research = new GlobalResearch(researchJson, entry.getKey(), effectCategories, checkResourceLoc); + final GlobalResearch research = new GlobalResearch(researchJson, entry.getKey(), effectCategories, checkResourceLoc, getRegistryLookup()); Log.getLogger().debug("Parsed research recipe from " + entry.getKey() + " [" + research.getBranch() + "/" + research.getId() + "]"); Log.getLogger().debug(research.getName() + " at " + research.getDepth() + "/" + research.getParent()); @@ -226,9 +224,9 @@ else if (removeBranches.contains(ResourceLocation.parse(researchJson.get(RESEARC { Log.getLogger().debug("Requirement: " + requirement.getDesc()); } - for (IResearchCost itemS : research.getCostList()) + for (SizedIngredient itemS : research.getCostList()) { - Log.getLogger().debug("Cost: " + itemS.toString()); + Log.getLogger().debug("Cost: {}x {}", itemS.count(), String.join("/", Arrays.stream(itemS.ingredient().getItems()).map(ItemStack::toString).toList())); } for (IResearchEffect researchEffect : research.getEffects()) { diff --git a/src/main/java/com/minecolonies/core/event/GatherDataHandler.java b/src/main/java/com/minecolonies/core/event/GatherDataHandler.java index c19727c65a1..c36d3d26694 100755 --- a/src/main/java/com/minecolonies/core/event/GatherDataHandler.java +++ b/src/main/java/com/minecolonies/core/event/GatherDataHandler.java @@ -54,7 +54,7 @@ public static void dataGeneratorSetup(final GatherDataEvent event) generator.addProvider(event.includeServer(), new DefaultItemTagsProvider(generator.getPackOutput(), provider, blockTagsProvider, event.getExistingFileHelper())); generator.addProvider(event.includeServer(), new DefaultEntityTypeTagsProvider(generator.getPackOutput(), provider, event.getExistingFileHelper())); generator.addProvider(event.includeServer(), new DefaultDamageTagsProvider(generator.getPackOutput(), provider, event.getExistingFileHelper())); - generator.addProvider(event.includeServer(), new DefaultResearchProvider(generator.getPackOutput())); + generator.addProvider(event.includeServer(), new DefaultResearchProvider(generator.getPackOutput(), provider)); generator.addProvider(event.includeServer(), new DefaultRecipeProvider(generator.getPackOutput(), provider)); generator.addProvider(event.includeServer(), new DefaultBiomeTagsProvider(generator.getPackOutput(), provider, event.getExistingFileHelper())); diff --git a/src/main/java/com/minecolonies/core/generation/ItemNbtCalculator.java b/src/main/java/com/minecolonies/core/generation/ItemNbtCalculator.java index ae23ca2b80e..334010e430d 100644 --- a/src/main/java/com/minecolonies/core/generation/ItemNbtCalculator.java +++ b/src/main/java/com/minecolonies/core/generation/ItemNbtCalculator.java @@ -7,7 +7,6 @@ import com.ldtteam.domumornamentum.block.IMateriallyTexturedBlockComponent; import com.ldtteam.domumornamentum.client.model.data.MaterialTextureData; import com.ldtteam.domumornamentum.client.model.data.MaterialTextureData.Builder; -import com.ldtteam.domumornamentum.component.ModDataComponents; import com.minecolonies.api.util.CraftingUtils; import net.minecraft.core.HolderLookup; import net.minecraft.core.component.TypedDataComponent; @@ -17,8 +16,10 @@ import net.minecraft.data.PackOutput; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.flag.FeatureFlags; -import net.minecraft.world.item.*; -import net.minecraft.world.level.block.Block; +import net.minecraft.world.item.ArmorItem; +import net.minecraft.world.item.BlockItem; +import net.minecraft.world.item.CreativeModeTab; +import net.minecraft.world.item.ItemStack; import org.jetbrains.annotations.NotNull; import java.nio.file.Path; @@ -86,7 +87,7 @@ public CompletableFuture run(@NotNull final CachedOutput cache) for (final ItemStack stack : allStacks) { final ResourceLocation resourceLocation = stack.getItemHolder().unwrapKey().get().location(); - final Set keys = new HashSet<>(); + final Set keys = new TreeSet<>(); for (final TypedDataComponent key : stack.getComponents()) { keys.add(BuiltInRegistries.DATA_COMPONENT_TYPE.getKey(key.type()).toString()); diff --git a/src/main/java/com/minecolonies/core/generation/defaults/DefaultResearchProvider.java b/src/main/java/com/minecolonies/core/generation/defaults/DefaultResearchProvider.java index 42b30e51fff..af79ddd7edc 100644 --- a/src/main/java/com/minecolonies/core/generation/defaults/DefaultResearchProvider.java +++ b/src/main/java/com/minecolonies/core/generation/defaults/DefaultResearchProvider.java @@ -8,6 +8,7 @@ import com.minecolonies.api.research.ResearchBranchType; import com.minecolonies.api.util.constant.CitizenConstants; import com.minecolonies.api.util.constant.Constants; +import net.minecraft.core.HolderLookup; import net.minecraft.data.PackOutput; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.ItemTags; @@ -17,6 +18,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; +import java.util.concurrent.CompletableFuture; import static com.minecolonies.api.research.util.ResearchConstants.*; @@ -33,9 +35,10 @@ */ public class DefaultResearchProvider extends AbstractResearchProvider { - public DefaultResearchProvider(@NotNull final PackOutput packOutput) + public DefaultResearchProvider(@NotNull final PackOutput packOutput, + @NotNull final CompletableFuture provider) { - super(packOutput); + super(packOutput, provider); } private static final ResourceLocation CIVIL = new ResourceLocation(Constants.MOD_ID, "civilian"); @@ -212,14 +215,14 @@ public Collection getCivilResearch(Collection r) final Research stamina = new Research(new ResourceLocation(Constants.MOD_ID, "civilian/stamina"), CIVIL).setTranslatedName("Stamina") .setOnlyChild() .setIcon(ModBlocks.blockHutHospital.asItem()) - .addItemCost(Items.CARROT, 1) + .addItemCost(Items.CARROT, 1, provider) .addEffect(ModBuildings.hospital.get().getBuildingBlock(), 1) .addToList(r); final Research bandAid = new Research(new ResourceLocation(Constants.MOD_ID, "civilian/bandaid"), CIVIL).setParentResearch(stamina) .setTranslatedName("Band Aid") .setIcon(new ResourceLocation("minecolonies", "textures/icons/research/regeneration1.png")) .addBuildingRequirement(ModBuildings.LIBRARY_ID, 2) - .addItemCost(Items.GOLDEN_CARROT, 1) + .addItemCost(Items.GOLDEN_CARROT, 1, provider) .addEffect(REGENERATION, 1) .addToList(r); final Research healingCream = new Research(new ResourceLocation(Constants.MOD_ID, "civilian/healingcream"), CIVIL).setParentResearch(bandAid) @@ -227,27 +230,27 @@ public Collection getCivilResearch(Collection r) .setTranslatedSubtitle("You missed a spot...") .setIcon(new ResourceLocation("minecolonies", "textures/icons/research/regeneration2.png")) .addBuildingRequirement(ModBuildings.LIBRARY_ID, 3) - .addItemCost(Items.GOLDEN_CARROT, 8) + .addItemCost(Items.GOLDEN_CARROT, 8, provider) .addEffect(REGENERATION, 2) .addToList(r); final Research bandages = new Research(new ResourceLocation(Constants.MOD_ID, "civilian/bandages"), CIVIL).setParentResearch(healingCream) .setTranslatedName("Bandages") .setIcon(new ResourceLocation("minecolonies", "textures/icons/research/regeneration3.png")) .addBuildingRequirement(ModBuildings.LIBRARY_ID, 4) - .addItemCost(Items.GOLDEN_CARROT, 16) + .addItemCost(Items.GOLDEN_CARROT, 16, provider) .addEffect(REGENERATION, 3) .addToList(r); final Research compress = new Research(new ResourceLocation(Constants.MOD_ID, "civilian/compress"), CIVIL).setParentResearch(bandages) .setTranslatedName("Compress") .setIcon(new ResourceLocation("minecolonies", "textures/icons/research/regeneration4.png")) .addBuildingRequirement(ModBuildings.LIBRARY_ID, 5) - .addItemCost(Items.GOLDEN_CARROT, 32) + .addItemCost(Items.GOLDEN_CARROT, 32, provider) .addEffect(REGENERATION, 4) .addToList(r); new Research(new ResourceLocation(Constants.MOD_ID, "civilian/cast"), CIVIL).setParentResearch(compress) .setTranslatedName("Cast") .setIcon(new ResourceLocation("minecolonies", "textures/icons/research/regeneration5.png")) - .addItemCost(Items.GOLDEN_CARROT, 64) + .addItemCost(Items.GOLDEN_CARROT, 64, provider) .addEffect(REGENERATION, 5) .addToList(r); @@ -256,34 +259,34 @@ public Collection getCivilResearch(Collection r) .setSortOrder(2) .setIcon(Items.GLASS_BOTTLE) .addBuildingRequirement(ModBuildings.COOK_ID, 2) - .addItemCost(Items.GOLDEN_APPLE, 1) + .addItemCost(Items.GOLDEN_APPLE, 1, provider) .addEffect(SATLIMIT, 1) .addToList(r); final Research resilience = new Research(new ResourceLocation(Constants.MOD_ID, "civilian/resilience"), CIVIL).setParentResearch(resistance) .setTranslatedName("Resilience") .setIcon(Items.POTION) .addBuildingRequirement(ModBuildings.COOK_ID, 3) - .addItemCost(Items.GOLDEN_APPLE, 8) + .addItemCost(Items.GOLDEN_APPLE, 8, provider) .addEffect(SATLIMIT, 2) .addToList(r); final Research vitality = new Research(new ResourceLocation(Constants.MOD_ID, "civilian/vitality"), CIVIL).setParentResearch(resilience) .setTranslatedName("Vitality") .setIcon(Items.SPLASH_POTION) .addBuildingRequirement(ModBuildings.COOK_ID, 4) - .addItemCost(Items.GOLDEN_APPLE, 16) + .addItemCost(Items.GOLDEN_APPLE, 16, provider) .addEffect(SATLIMIT, 3) .addToList(r); final Research fortitude = new Research(new ResourceLocation(Constants.MOD_ID, "civilian/fortitude"), CIVIL).setParentResearch(vitality) .setTranslatedName("Fortitude") .setIcon(Items.HONEY_BOTTLE) .addBuildingRequirement(ModBuildings.COOK_ID, 5) - .addItemCost(Items.GOLDEN_APPLE, 32) + .addItemCost(Items.GOLDEN_APPLE, 32, provider) .addEffect(SATLIMIT, 4) .addToList(r); new Research(new ResourceLocation(Constants.MOD_ID, "civilian/indefatigability"), CIVIL).setParentResearch(fortitude) .setTranslatedName("Indefatigability") .setIcon(Items.EXPERIENCE_BOTTLE) - .addItemCost(Items.GOLDEN_APPLE, 64) + .addItemCost(Items.GOLDEN_APPLE, 64, provider) .addEffect(SATLIMIT, 5) .addToList(r); @@ -292,35 +295,35 @@ public Collection getCivilResearch(Collection r) .setSortOrder(2) .setIcon(ModBlocks.blockHutLibrary.asItem()) .addBuildingRequirement(ModBuildings.HOME_ID, 3) - .addItemCost(Items.BOOK, 3) + .addItemCost(Items.BOOK, 3, provider) .addEffect(ModBuildings.library.get().getBuildingBlock(), 1) .addToList(r); final Research outpost = new Research(new ResourceLocation(Constants.MOD_ID, "civilian/outpost"), CIVIL).setParentResearch(keen) .setTranslatedName("Outpost") .setIcon(ModBlocks.blockHutHome.asItem(), 50) .addBuildingRequirement(ModBuildings.HOME_ID, 4) - .addItemCost(Items.COOKED_BEEF, 64) + .addItemCost(Items.COOKED_BEEF, 64, provider) .addEffect(CITIZEN_CAP, 2) .addToList(r); final Research hamlet = new Research(new ResourceLocation(Constants.MOD_ID, "civilian/hamlet"), CIVIL).setParentResearch(outpost) .setTranslatedName("Hamlet") .setIcon(ModBlocks.blockHutHome.asItem(), 75) .addBuildingRequirement(ModBuildings.HOME_ID, 5) - .addItemCost(Items.COOKED_BEEF, 128) + .addItemCost(Items.COOKED_BEEF, 128, provider) .addEffect(CITIZEN_CAP, 3) .addToList(r); final Research village = new Research(new ResourceLocation(Constants.MOD_ID, "civilian/village"), CIVIL).setParentResearch(hamlet) .setTranslatedName("Village") .setIcon(ModBlocks.blockHutHome.asItem(), 100) .addBuildingRequirement(ModBuildings.TOWNHALL_ID, 4) - .addItemCost(Items.COOKED_BEEF, 256) + .addItemCost(Items.COOKED_BEEF, 256, provider) .addEffect(CITIZEN_CAP, 4) .addToList(r); new Research(new ResourceLocation(Constants.MOD_ID, "civilian/city"), CIVIL).setParentResearch(village) .setTranslatedName("City") .setIcon(ModBlocks.blockHutHome.asItem(), 200) .addBuildingRequirement(ModBuildings.TOWNHALL_ID, 5) - .addItemCost(Items.COOKED_BEEF, 512) + .addItemCost(Items.COOKED_BEEF, 512, provider) .addEffect(CITIZEN_CAP, 5) .addToList(r); @@ -329,14 +332,14 @@ public Collection getCivilResearch(Collection r) .setSortOrder(2) .setIcon(Items.EXPERIENCE_BOTTLE) .addBuildingRequirement(ModBuildings.LIBRARY_ID, 2) - .addItemCost(Items.BOOK, 6) + .addItemCost(Items.BOOK, 6, provider) .addEffect(LEVELING, 1) .addToList(r); final Research studious = new Research(new ResourceLocation(Constants.MOD_ID, "civilian/studious"), CIVIL).setParentResearch(diligent) .setTranslatedName("Studious") .setIcon(Items.EXPERIENCE_BOTTLE, 2) .addBuildingRequirement(ModBuildings.LIBRARY_ID, 3) - .addItemCost(Items.BOOK, 12) + .addItemCost(Items.BOOK, 12, provider) .addEffect(LEVELING, 2) .addToList(r); final Research scholarly = new Research(new ResourceLocation(Constants.MOD_ID, "civilian/scholarly"), CIVIL).setParentResearch(studious) @@ -344,7 +347,7 @@ public Collection getCivilResearch(Collection r) .setTranslatedSubtitle("Homework for the next decade... check!") .setIcon(Items.EXPERIENCE_BOTTLE, 3) .addBuildingRequirement(ModBuildings.LIBRARY_ID, 4) - .addItemCost(Items.BOOK, 24) + .addItemCost(Items.BOOK, 24, provider) .addEffect(LEVELING, 3) .addToList(r); final Research reflective = new Research(new ResourceLocation(Constants.MOD_ID, "civilian/reflective"), CIVIL).setParentResearch(scholarly) @@ -352,14 +355,14 @@ public Collection getCivilResearch(Collection r) .setTranslatedSubtitle("Let me think about that for a moment.") .setIcon(Items.EXPERIENCE_BOTTLE, 4) .addBuildingRequirement(ModBuildings.LIBRARY_ID, 5) - .addItemCost(Items.BOOK, 48) + .addItemCost(Items.BOOK, 48, provider) .addEffect(LEVELING, 4) .addToList(r); new Research(new ResourceLocation(Constants.MOD_ID, "civilian/academic"), CIVIL).setParentResearch(reflective) .setTranslatedName("Academic") .setTranslatedSubtitle("Think about what you thought when you thought of what you will think now.") .setIcon(Items.EXPERIENCE_BOTTLE, 5) - .addItemCost(Items.BOOK, 128) + .addItemCost(Items.BOOK, 128, provider) .addEffect(LEVELING, 5) .addToList(r); @@ -369,7 +372,7 @@ public Collection getCivilResearch(Collection r) .setSortOrder(3) .setIcon(Items.DETECTOR_RAIL) .addBuildingRequirement(ModBuildings.DELIVERYMAN_ID, 3) - .addItemCost(Items.RAIL, 64) + .addItemCost(Items.RAIL, 64, provider) .addEffect(RAILS, 1) .addToList(r); final Research nimble = new Research(new ResourceLocation(Constants.MOD_ID, "civilian/nimble"), CIVIL).setParentResearch(rails) @@ -377,7 +380,7 @@ public Collection getCivilResearch(Collection r) .setTranslatedSubtitle("Not that we get time to exercise. It must be the morning commute.") .setIcon(new ResourceLocation("minecolonies", "textures/icons/research/speed1.png")) .addBuildingRequirement(ModBuildings.TOWNHALL_ID, 3) - .addItemCost(Items.RABBIT_FOOT, 1) + .addItemCost(Items.RABBIT_FOOT, 1, provider) .addEffect(WALKING, 1) .addToList(r); new Research(new ResourceLocation(Constants.MOD_ID, "civilian/vines"), CIVIL).setParentResearch(keen) @@ -386,7 +389,7 @@ public Collection getCivilResearch(Collection r) .setSortOrder(4) .setIcon(Items.VINE) .addBuildingRequirement(ModBuildings.HOME_ID, 3) - .addItemCost(Items.VINE, 64) + .addItemCost(Items.VINE, 64, provider) .addEffect(VINES, 1) .addToList(r); new Research(new ResourceLocation(Constants.MOD_ID, "civilian/moq"), CIVIL).setParentResearch(rails) @@ -395,8 +398,8 @@ public Collection getCivilResearch(Collection r) .setSortOrder(10) .setIcon(ModItems.clipboard) .addBuildingRequirement(ModBuildings.DELIVERYMAN_ID, 9) - .addItemCost(ModItems.clipboard, 1) - .addItemCost(Items.BOOK, 16) + .addItemCost(ModItems.clipboard, 1, provider) + .addItemCost(Items.BOOK, 16, provider) .addEffect(MIN_ORDER, 1) .addToList(r); final Research agile = new Research(new ResourceLocation(Constants.MOD_ID, "civilian/agile"), CIVIL).setParentResearch(nimble) @@ -404,7 +407,7 @@ public Collection getCivilResearch(Collection r) .setTranslatedSubtitle("So this is how it feels to be young again...") .setIcon(new ResourceLocation("minecolonies", "textures/icons/research/speed2.png")) .addBuildingRequirement(ModBuildings.TOWNHALL_ID, 4) - .addItemCost(Items.RABBIT_FOOT, 10) + .addItemCost(Items.RABBIT_FOOT, 10, provider) .addEffect(WALKING, 2) .addToList(r); final Research swift = new Research(new ResourceLocation(Constants.MOD_ID, "civilian/swift"), CIVIL).setParentResearch(agile) @@ -412,14 +415,14 @@ public Collection getCivilResearch(Collection r) .setTranslatedSubtitle("They'll never see me coming.") .setIcon(new ResourceLocation("minecolonies", "textures/icons/research/speed3.png")) .addBuildingRequirement(ModBuildings.TOWNHALL_ID, 5) - .addItemCost(Items.RABBIT_FOOT, 32) + .addItemCost(Items.RABBIT_FOOT, 32, provider) .addEffect(WALKING, 3) .addToList(r); new Research(new ResourceLocation(Constants.MOD_ID, "civilian/athlete"), CIVIL).setParentResearch(swift) .setTranslatedName("Athlete") .setTranslatedSubtitle("Try thinking as fast as your feet now!") .setIcon(new ResourceLocation("minecolonies", "textures/icons/research/speed4.png")) - .addItemCost(Items.RABBIT_FOOT, 64) + .addItemCost(Items.RABBIT_FOOT, 64, provider) .addEffect(WALKING, 4) .addToList(r); @@ -429,7 +432,7 @@ public Collection getCivilResearch(Collection r) .setSortOrder(3) .setIcon(new ResourceLocation("minecolonies", "textures/icons/research/hp1.png")) .addBuildingRequirement(ModBuildings.TOWNHALL_ID, 1) - .addItemCost(Items.HAY_BLOCK, 8) + .addItemCost(Items.HAY_BLOCK, 8, provider) .addEffect(HEALTH_BOOST, 1) .addToList(r); final Research firstAid2 = new Research(new ResourceLocation(Constants.MOD_ID, "civilian/firstaid2"), CIVIL).setParentResearch(firstAid) @@ -437,34 +440,34 @@ public Collection getCivilResearch(Collection r) .setTranslatedSubtitle("Second Aid?") .setIcon(new ResourceLocation("minecolonies", "textures/icons/research/hp2.png")) .addBuildingRequirement(ModBuildings.TOWNHALL_ID, 2) - .addItemCost(Items.HAY_BLOCK, 16) + .addItemCost(Items.HAY_BLOCK, 16, provider) .addEffect(HEALTH_BOOST, 2) .addToList(r); final Research lifesaver = new Research(new ResourceLocation(Constants.MOD_ID, "civilian/lifesaver"), CIVIL).setParentResearch(firstAid2) .setTranslatedName("Lifesaver") .setIcon(new ResourceLocation("minecolonies", "textures/icons/research/hp3.png")) .addBuildingRequirement(ModBuildings.TOWNHALL_ID, 3) - .addItemCost(Items.HAY_BLOCK, 32) + .addItemCost(Items.HAY_BLOCK, 32, provider) .addEffect(HEALTH_BOOST, 3) .addToList(r); final Research lifesaver2 = new Research(new ResourceLocation(Constants.MOD_ID, "civilian/lifesaver2"), CIVIL).setParentResearch(lifesaver) .setTranslatedName("Lifesaver II") .setIcon(new ResourceLocation("minecolonies", "textures/icons/research/hp4.png")) .addBuildingRequirement(ModBuildings.TOWNHALL_ID, 4) - .addItemCost(Items.HAY_BLOCK, 64) + .addItemCost(Items.HAY_BLOCK, 64, provider) .addEffect(HEALTH_BOOST, 4) .addToList(r); final Research guardianAngel = new Research(new ResourceLocation(Constants.MOD_ID, "civilian/guardianangel"), CIVIL).setParentResearch(lifesaver2) .setTranslatedName("Guardian Angel") .setIcon(new ResourceLocation("minecolonies", "textures/icons/research/hp5.png")) .addBuildingRequirement(ModBuildings.TOWNHALL_ID, 5) - .addItemCost(Items.HAY_BLOCK, 128) + .addItemCost(Items.HAY_BLOCK, 128, provider) .addEffect(HEALTH_BOOST, 5) .addToList(r); new Research(new ResourceLocation(Constants.MOD_ID, "civilian/guardianangel2"), CIVIL).setParentResearch(guardianAngel) .setTranslatedName("Guardian Angel II") .setIcon(new ResourceLocation("minecolonies", "textures/icons/research/hp6.png")) - .addItemCost(Items.HAY_BLOCK, 256) + .addItemCost(Items.HAY_BLOCK, 256, provider) .addEffect(HEALTH_BOOST, 6) .addToList(r); @@ -473,7 +476,7 @@ public Collection getCivilResearch(Collection r) .setTranslatedSubtitle("Solidarity") .setIcon(new ResourceLocation("minecolonies", "textures/icons/research/hp4.png")) .addBuildingRequirement(ModBuildings.LIBRARY_ID, 3) - .addItemCost(Items.WHITE_WOOL, 32) + .addItemCost(Items.WHITE_WOOL, 32, provider) .addEffect(MASKS, 1) .addToList(r); @@ -482,7 +485,7 @@ public Collection getCivilResearch(Collection r) .setTranslatedSubtitle("Obvious Measures") .setIcon(new ResourceLocation("minecolonies", "textures/icons/research/hp5.png")) .addBuildingRequirement(ModBuildings.HOSPITAL_ID, 3) - .addItemCost(Items.EGG, 64) + .addItemCost(Items.EGG, 64, provider) .addEffect(VACCINES, 1) .addToList(r); @@ -491,7 +494,7 @@ public Collection getCivilResearch(Collection r) .setSortOrder(2) .setIcon(new ResourceLocation("minecolonies", "textures/icons/research/happy1.png")) .addBuildingRequirement(ModBuildings.COOK_ID, 2) - .addItemCost(Items.CAKE, 1) + .addItemCost(Items.CAKE, 1, provider) .addEffect(HAPPINESS, 1) .addToList(r); final Research festival = new Research(new ResourceLocation(Constants.MOD_ID, "civilian/festival"), CIVIL).setParentResearch(circus) @@ -499,14 +502,14 @@ public Collection getCivilResearch(Collection r) .setTranslatedSubtitle("We Researchers may not be there, so don't look for us.") .setIcon(new ResourceLocation("minecolonies", "textures/icons/research/happy2.png")) .addBuildingRequirement(ModBuildings.COOK_ID, 3) - .addItemCost(Items.CAKE, 9) + .addItemCost(Items.CAKE, 9, provider) .addEffect(HAPPINESS, 2) .addToList(r); final Research spectacle = new Research(new ResourceLocation(Constants.MOD_ID, "civilian/spectacle"), CIVIL).setParentResearch(festival) .setTranslatedName("Spectacle") .setIcon(new ResourceLocation("minecolonies", "textures/icons/research/happy3.png")) .addBuildingRequirement(ModBuildings.COOK_ID, 4) - .addItemCost(Items.CAKE, 18) + .addItemCost(Items.CAKE, 18, provider) .addEffect(HAPPINESS, 3) .addToList(r); final Research opera = new Research(new ResourceLocation(Constants.MOD_ID, "civilian/opera"), CIVIL).setParentResearch(spectacle) @@ -514,14 +517,14 @@ public Collection getCivilResearch(Collection r) .setTranslatedSubtitle("Ear plugs not included.") .setIcon(new ResourceLocation("minecolonies", "textures/icons/research/happy4.png")) .addBuildingRequirement(ModBuildings.COOK_ID, 5) - .addItemCost(Items.CAKE, 27) + .addItemCost(Items.CAKE, 27, provider) .addEffect(HAPPINESS, 4) .addToList(r); new Research(new ResourceLocation(Constants.MOD_ID, "civilian/theater"), CIVIL).setParentResearch(opera) .setTranslatedName("Theater") .setTranslatedSubtitle("Oh don't be so dramatic!") .setIcon(new ResourceLocation("minecolonies", "textures/icons/research/happy5.png")) - .addItemCost(Items.ENCHANTED_GOLDEN_APPLE, 16) + .addItemCost(Items.ENCHANTED_GOLDEN_APPLE, 16, provider) .addEffect(HAPPINESS, 5) .addToList(r); @@ -531,7 +534,7 @@ public Collection getCivilResearch(Collection r) .setSortOrder(2) .setIcon(Items.CLOCK, 1) .addBuildingRequirement(ModBuildings.LIBRARY_ID, 2) - .addItemCost(Items.GOLDEN_CARROT, 25) + .addItemCost(Items.GOLDEN_CARROT, 25, provider) .addEffect(WORK_LONGER, 1) .addToList(r); new Research(new ResourceLocation(Constants.MOD_ID, "civilian/nightowl2"), CIVIL).setParentResearch(night_owl) @@ -540,7 +543,7 @@ public Collection getCivilResearch(Collection r) .setSortOrder(2) .setIcon(Items.CLOCK, 2) .addBuildingRequirement(ModBuildings.TOWNHALL_ID, 3) - .addItemCost(Items.GOLDEN_CARROT, 75) + .addItemCost(Items.GOLDEN_CARROT, 75, provider) .addEffect(WORK_LONGER, 2) .addToList(r); @@ -549,7 +552,7 @@ public Collection getCivilResearch(Collection r) .setSortOrder(3) .setIcon(new ResourceLocation("minecolonies", "textures/icons/research/saturation1.png")) .addBuildingRequirement(ModBuildings.COOK_ID, 2) - .addItemCost(Items.COOKIE, 32) + .addItemCost(Items.COOKIE, 32, provider) .addEffect(SATURATION, 1) .addToList(r); final Research gorger = new Research(new ResourceLocation(Constants.MOD_ID, "civilian/gorger"), CIVIL).setParentResearch(gourmand) @@ -557,28 +560,28 @@ public Collection getCivilResearch(Collection r) .setTranslatedSubtitle("MORE!???") .setIcon(new ResourceLocation("minecolonies", "textures/icons/research/saturation2.png")) .addBuildingRequirement(ModBuildings.COOK_ID, 3) - .addItemCost(Items.COOKIE, 64) + .addItemCost(Items.COOKIE, 64, provider) .addEffect(SATURATION, 2) .addToList(r); final Research stuffer = new Research(new ResourceLocation(Constants.MOD_ID, "civilian/stuffer"), CIVIL).setParentResearch(gorger) .setTranslatedName("Stuffer") .setIcon(new ResourceLocation("minecolonies", "textures/icons/research/saturation3.png")) .addBuildingRequirement(ModBuildings.COOK_ID, 4) - .addItemCost(Items.COOKIE, 128) + .addItemCost(Items.COOKIE, 128, provider) .addEffect(SATURATION, 3) .addToList(r); final Research epicure = new Research(new ResourceLocation(Constants.MOD_ID, "civilian/epicure"), CIVIL).setParentResearch(stuffer) .setTranslatedName("Epicure") .setIcon(new ResourceLocation("minecolonies", "textures/icons/research/saturation4.png")) .addBuildingRequirement(ModBuildings.COOK_ID, 5) - .addItemCost(Items.COOKIE, 256) + .addItemCost(Items.COOKIE, 256, provider) .addEffect(SATURATION, 4) .addToList(r); new Research(new ResourceLocation(Constants.MOD_ID, "civilian/glutton"), CIVIL).setParentResearch(epicure) .setTranslatedName("Glutton") .setTranslatedSubtitle("I think I'm finally satisfied... so what's for next course?") .setIcon(new ResourceLocation("minecolonies", "textures/icons/research/saturation5.png")) - .addItemCost(Items.COOKIE, 512) + .addItemCost(Items.COOKIE, 512, provider) .addEffect(SATURATION, 5) .addToList(r); @@ -589,7 +592,7 @@ public Collection getCivilResearch(Collection r) .setOnlyChild() .setIcon(ModBlocks.blockHutSchool.asItem()) .addBuildingRequirement("residence", 3) - .addItemCost(Items.BOOK, 3) + .addItemCost(Items.BOOK, 3, provider) .addEffect(ModBuildings.school.get().getBuildingBlock(), 1) .addToList(r); final Research moreBooks = new Research(new ResourceLocation(Constants.MOD_ID, "civilian/morebooks"), CIVIL).setParentResearch(higherLearning) @@ -597,7 +600,7 @@ public Collection getCivilResearch(Collection r) .setTranslatedSubtitle("Of course I'm right, I read it in a book!") .setIcon(new ResourceLocation("minecolonies", "textures/icons/research/xpgain1.png")) .addBuildingRequirement(ModBuildings.SCHOOL_ID, 1) - .addItemCost(Items.BOOK, 6) + .addItemCost(Items.BOOK, 6, provider) .addEffect(TEACHING, 1) .addToList(r); final Research bookworm = new Research(new ResourceLocation(Constants.MOD_ID, "civilian/bookworm"), CIVIL).setParentResearch(moreBooks) @@ -605,7 +608,7 @@ public Collection getCivilResearch(Collection r) .setTranslatedSubtitle("We all know the early bird gets the book!") .setIcon(new ResourceLocation("minecolonies", "textures/icons/research/xpgain2.png")) .addBuildingRequirement(ModBuildings.SCHOOL_ID, 3) - .addItemCost(Items.BOOKSHELF, 6) + .addItemCost(Items.BOOKSHELF, 6, provider) .addEffect(TEACHING, 2) .addToList(r); final Research bachelor = new Research(new ResourceLocation(Constants.MOD_ID, "civilian/bachelor"), CIVIL).setParentResearch(bookworm) @@ -613,7 +616,7 @@ public Collection getCivilResearch(Collection r) .setTranslatedSubtitle("They now look like they know a lot, whether they do or not.") .setIcon(new ResourceLocation("minecolonies", "textures/icons/research/xpgain3.png")) .addBuildingRequirement(ModBuildings.LIBRARY_ID, 3) - .addItemCost(Items.BOOKSHELF, 12) + .addItemCost(Items.BOOKSHELF, 12, provider) .addEffect(TEACHING, 3) .addToList(r); final Research master = new Research(new ResourceLocation(Constants.MOD_ID, "civilian/master"), CIVIL).setParentResearch(bachelor) @@ -621,14 +624,14 @@ public Collection getCivilResearch(Collection r) .setTranslatedSubtitle("At least they get a fancy title this time.") .setIcon(new ResourceLocation("minecolonies", "textures/icons/research/xpgain4.png")) .addBuildingRequirement(ModBuildings.LIBRARY_ID, 5) - .addItemCost(Items.BOOKSHELF, 32) + .addItemCost(Items.BOOKSHELF, 32, provider) .addEffect(TEACHING, 4) .addToList(r); new Research(new ResourceLocation(Constants.MOD_ID, "civilian/phd"), CIVIL).setParentResearch(master) .setTranslatedName("PhD") .setTranslatedSubtitle("Not that sort of doctor.") .setIcon(new ResourceLocation("minecolonies", "textures/icons/research/xpgain5.png")) - .addItemCost(Items.BOOKSHELF, 64) + .addItemCost(Items.BOOKSHELF, 64, provider) .addEffect(TEACHING, 5) .addToList(r); @@ -638,7 +641,7 @@ public Collection getCivilResearch(Collection r) .setSortOrder(2) .setIcon(new ResourceLocation("minecolonies", "textures/icons/research/childgrowth1.png")) .addBuildingRequirement(ModBuildings.SCHOOL_ID, 1) - .addItemCost(Items.COOKED_CHICKEN, 32) + .addItemCost(Items.COOKED_CHICKEN, 32, provider) .addEffect(GROWTH, 1) .addToList(r); final Research hormones = new Research(new ResourceLocation(Constants.MOD_ID, "civilian/hormones"), CIVIL).setParentResearch(nurture) @@ -646,7 +649,7 @@ public Collection getCivilResearch(Collection r) .setTranslatedSubtitle("These are safe, right?") .setIcon(new ResourceLocation("minecolonies", "textures/icons/research/childgrowth2.png")) .addBuildingRequirement(ModBuildings.SCHOOL_ID, 3) - .addItemCost(Items.COOKED_CHICKEN, 64) + .addItemCost(Items.COOKED_CHICKEN, 64, provider) .addEffect(GROWTH, 2) .addToList(r); final Research puberty = new Research(new ResourceLocation(Constants.MOD_ID, "civilian/puberty"), CIVIL).setParentResearch(hormones) @@ -654,21 +657,21 @@ public Collection getCivilResearch(Collection r) .setTranslatedSubtitle("My voice sounds weird...") .setIcon(new ResourceLocation("minecolonies", "textures/icons/research/childgrowth3.png")) .addBuildingRequirement(ModBuildings.LIBRARY_ID, 3) - .addItemCost(Items.COOKED_CHICKEN, 128) + .addItemCost(Items.COOKED_CHICKEN, 128, provider) .addEffect(GROWTH, 3) .addToList(r); final Research growth = new Research(new ResourceLocation(Constants.MOD_ID, "civilian/growth"), CIVIL).setParentResearch(puberty) .setTranslatedName("Growth") .setIcon(new ResourceLocation("minecolonies", "textures/icons/research/childgrowth4.png")) .addBuildingRequirement(ModBuildings.LIBRARY_ID, 5) - .addItemCost(Items.COOKED_CHICKEN, 256) + .addItemCost(Items.COOKED_CHICKEN, 256, provider) .addEffect(GROWTH, 4) .addToList(r); new Research(new ResourceLocation(Constants.MOD_ID, "civilian/beanstalk"), CIVIL).setParentResearch(growth) .setTranslatedName("Beanstalk") .setTranslatedSubtitle("That's one heck of a growth spurt!") .setIcon(new ResourceLocation("minecolonies", "textures/icons/research/childgrowth5.png")) - .addItemCost(Items.COOKED_CHICKEN, 512) + .addItemCost(Items.COOKED_CHICKEN, 512, provider) .addEffect(GROWTH, 5) .addToList(r); @@ -676,7 +679,7 @@ public Collection getCivilResearch(Collection r) final Research ambition = new Research(new ResourceLocation(Constants.MOD_ID, "civilian/ambition"), CIVIL).setTranslatedName("Ambition") .setSortOrder(5) .setIcon(ModBlocks.blockHutMysticalSite.asItem()) - .addItemCost(Items.DIAMOND, 1) + .addItemCost(Items.DIAMOND, 1, provider) .addEffect(ModBuildings.mysticalSite.get().getBuildingBlock(), 1) .addToList(r); @@ -684,7 +687,7 @@ public Collection getCivilResearch(Collection r) .setParentResearch(ambition) .setSortOrder(1) .setIcon(Items.POTION) - .addItemCost(Items.HEART_OF_THE_SEA, 1) + .addItemCost(Items.HEART_OF_THE_SEA, 1, provider) .addEffect(MORE_AIR, 1) .addToList(r); @@ -695,7 +698,7 @@ public Collection getCivilResearch(Collection r) .setIcon(ModBlocks.blockHutGraveyard.asItem()) .addEffect(ModBuildings.graveyard.get().getBuildingBlock(), 1) .addBuildingRequirement(ModBuildings.TOWNHALL_ID, 2) - .addItemCost(Items.BONE, 8) + .addItemCost(Items.BONE, 8, provider) .setTranslatedSubtitle("Our fallen shall not be forgotten!") .addToList(r); @@ -705,7 +708,7 @@ public Collection getCivilResearch(Collection r) .setSortOrder(3) .setIcon(ModBlocks.blockHutGraveyard.asItem()) .addBuildingRequirement(ModBuildings.GRAVEYARD_ID, 2) - .addItemCost(Items.IRON_BOOTS, 1) + .addItemCost(Items.IRON_BOOTS, 1, provider) .addEffect(UNDERTAKER_RUN, 1) .addToList(r); @@ -716,7 +719,7 @@ public Collection getCivilResearch(Collection r) .setSortOrder(1) .setIcon(ModBlocks.blockHutGraveyard.asItem()) .addBuildingRequirement(ModBuildings.GRAVEYARD_ID, 3) - .addItemCost(Items.GHAST_TEAR, 1) + .addItemCost(Items.GHAST_TEAR, 1, provider) .addEffect(RESURRECT_CHANCE, 1) .addToList(r); @@ -727,7 +730,7 @@ public Collection getCivilResearch(Collection r) .setSortOrder(1) .setIcon(ModBlocks.blockHutGraveyard.asItem()) .addBuildingRequirement(ModBuildings.GRAVEYARD_ID, 5) - .addItemCost(Items.CHORUS_FRUIT, 16) + .addItemCost(Items.CHORUS_FRUIT, 16, provider) .addEffect(RESURRECT_CHANCE, 2) .addToList(r); @@ -738,7 +741,7 @@ public Collection getCivilResearch(Collection r) .setSortOrder(1) .setIcon(Items.TOTEM_OF_UNDYING.asItem()) .addBuildingRequirement(ModBuildings.GRAVEYARD_ID, 5) - .addItemCost(Items.TOTEM_OF_UNDYING, 1) + .addItemCost(Items.TOTEM_OF_UNDYING, 1, provider) .addEffect(USE_TOTEM, 1) .addToList(r); @@ -749,7 +752,7 @@ public Collection getCivilResearch(Collection r) .setSortOrder(2) .setIcon(ModBlocks.blockGrave.asItem()) .addBuildingRequirement(ModBuildings.GRAVEYARD_ID, 3) - .addItemCost(Items.ROTTEN_FLESH, 64) + .addItemCost(Items.ROTTEN_FLESH, 64, provider) .addEffect(GRAVE_DECAY_BONUS, 1) .addToList(r); @@ -760,7 +763,7 @@ public Collection getCivilResearch(Collection r) .setSortOrder(2) .setIcon(ModBlocks.blockGrave.asItem()) .addBuildingRequirement(ModBuildings.GRAVEYARD_ID, 5) - .addItemCost(Items.NETHER_WART_BLOCK, 8) + .addItemCost(Items.NETHER_WART_BLOCK, 8, provider) .addEffect(GRAVE_DECAY_BONUS, 2) .addToList(r); @@ -774,41 +777,41 @@ public Collection getCombatResearch(Collection r) .setOnlyChild() .setIcon(Items.LIME_BED) .addBuildingRequirement(ModBuildings.GUARD_TOWER_ID, 1) - .addItemCost(Items.IRON_INGOT, 16) + .addItemCost(Items.IRON_INGOT, 16, provider) .addEffect(SLEEP_LESS, 1) .addToList(r); final Research quickDraw = new Research(new ResourceLocation(Constants.MOD_ID, "combat/quickdraw"), COMBAT).setParentResearch(accuracy) .setTranslatedName("Quick Draw") .setIcon(Items.WOODEN_SWORD) .addBuildingRequirement(ModBuildings.BARRACKS_ID, 3) - .addItemCost(Items.IRON_BLOCK, 2) + .addItemCost(Items.IRON_BLOCK, 2, provider) .addEffect(MELEE_DAMAGE, 1) .addToList(r); final Research powerAttack = new Research(new ResourceLocation(Constants.MOD_ID, "combat/powerattack"), COMBAT).setParentResearch(quickDraw) .setTranslatedName("Power Attack") .setIcon(Items.STONE_SWORD) .addBuildingRequirement(ModBuildings.COMBAT_ACADEMY_ID, 3) - .addItemCost(Items.IRON_BLOCK, 4) + .addItemCost(Items.IRON_BLOCK, 4, provider) .addEffect(MELEE_DAMAGE, 2) .addToList(r); final Research cleave = new Research(new ResourceLocation(Constants.MOD_ID, "combat/cleave"), COMBAT).setParentResearch(powerAttack) .setTranslatedName("Cleave") .setIcon(Items.IRON_SWORD) .addBuildingRequirement(ModBuildings.GUARD_TOWER_ID, 10) - .addItemCost(Items.IRON_BLOCK, 8) + .addItemCost(Items.IRON_BLOCK, 8, provider) .addEffect(MELEE_DAMAGE, 3) .addToList(r); final Research mightyCleave = new Research(new ResourceLocation(Constants.MOD_ID, "combat/mightycleave"), COMBAT).setParentResearch(cleave) .setTranslatedName("Mighty Cleave") .setIcon(Items.GOLDEN_SWORD) .addBuildingRequirement(ModBuildings.BARRACKS_ID, 5) - .addItemCost(Items.IRON_BLOCK, 16) + .addItemCost(Items.IRON_BLOCK, 16, provider) .addEffect(MELEE_DAMAGE, 4) .addToList(r); new Research(new ResourceLocation(Constants.MOD_ID, "combat/savagestrike"), COMBAT).setParentResearch(mightyCleave) .setTranslatedName("Savage Strike") .setIcon(Items.DIAMOND_SWORD) - .addItemCost(Items.IRON_BLOCK, 32) + .addItemCost(Items.IRON_BLOCK, 32, provider) .addEffect(MELEE_DAMAGE, 5) .addToList(r); @@ -817,35 +820,35 @@ public Collection getCombatResearch(Collection r) .setSortOrder(2) .setIcon(Items.ARROW) .addBuildingRequirement(ModBuildings.BARRACKS_ID, 3) - .addItemCost(Items.FLINT, 16) + .addItemCost(Items.FLINT, 16, provider) .addEffect(ARCHER_DAMAGE, 1) .addToList(r); final Research penetratingShot = new Research(new ResourceLocation(Constants.MOD_ID, "combat/penetratingshot"), COMBAT).setParentResearch(preciseShot) .setTranslatedName("Penetrating Shot") .setIcon(Items.BOW) .addBuildingRequirement(ModBuildings.ARCHERY_ID, 3) - .addItemCost(Items.FLINT, 32) + .addItemCost(Items.FLINT, 32, provider) .addEffect(ARCHER_DAMAGE, 2) .addToList(r); final Research piercingShot = new Research(new ResourceLocation(Constants.MOD_ID, "combat/piercingshot"), COMBAT).setParentResearch(penetratingShot) .setTranslatedName("Piercing Shot") .setIcon(Items.CROSSBOW) .addBuildingRequirement(ModBuildings.GUARD_TOWER_ID, 10) - .addItemCost(Items.FLINT, 64) + .addItemCost(Items.FLINT, 64, provider) .addEffect(ARCHER_DAMAGE, 3) .addToList(r); final Research woundingShot = new Research(new ResourceLocation(Constants.MOD_ID, "combat/woundingshot"), COMBAT).setParentResearch(piercingShot) .setTranslatedName("Wounding Shot") .setIcon(ModItems.firearrow) .addBuildingRequirement(ModBuildings.BARRACKS_ID, 5) - .addItemCost(Items.FLINT, 128) + .addItemCost(Items.FLINT, 128, provider) .addEffect(ARCHER_DAMAGE, 4) .addToList(r); new Research(new ResourceLocation(Constants.MOD_ID, "combat/deadlyaim"), COMBAT).setParentResearch(woundingShot) .setTranslatedName("Deadly Aim") .setTranslatedSubtitle("Just don't aim at me!") .setIcon(Items.TIPPED_ARROW) - .addItemCost(Items.FLINT, 256) + .addItemCost(Items.FLINT, 256, provider) .addEffect(ARCHER_DAMAGE, 5) .addToList(r); @@ -854,7 +857,7 @@ public Collection getCombatResearch(Collection r) .setSortOrder(2) .setIcon(ModBlocks.blockHutBarracksTower.asItem()) .addBuildingRequirement(ModBuildings.GUARD_TOWER_ID, 3) - .addItemCost(Items.IRON_BLOCK, 3) + .addItemCost(Items.IRON_BLOCK, 3, provider) .addEffect(ModBuildings.barracks.get().getBuildingBlock(), 1) .addToList(r); final Research improvedSwords = new Research(new ResourceLocation(Constants.MOD_ID, "combat/improvedswords"), COMBAT).setParentResearch(tacticTraining) @@ -862,7 +865,7 @@ public Collection getCombatResearch(Collection r) .setTranslatedSubtitle("Pointy end goes into the zombie.") .setIcon(ModBlocks.blockHutCombatAcademy.asItem()) .addBuildingRequirement(ModBuildings.BARRACKS_ID, 3) - .addItemCost(Items.IRON_BLOCK, 6) + .addItemCost(Items.IRON_BLOCK, 6, provider) .addEffect(ModBuildings.combatAcademy.get().getBuildingBlock(), 1) .addToList(r); final Research squireTraining = new Research(new ResourceLocation(Constants.MOD_ID, "combat/squiretraining"), COMBAT).setParentResearch(improvedSwords) @@ -870,27 +873,27 @@ public Collection getCombatResearch(Collection r) .setTranslatedSubtitle("First lesson: how to mop the floors.") .setIcon(Items.IRON_INGOT) .addBuildingRequirement(ModBuildings.COMBAT_ACADEMY_ID, 3) - .addItemCost(Items.SHIELD, 4) + .addItemCost(Items.SHIELD, 4, provider) .addEffect(BLOCK_ATTACKS, 1) .addToList(r); final Research knightTraining = new Research(new ResourceLocation(Constants.MOD_ID, "combat/knighttraining"), COMBAT).setParentResearch(squireTraining) .setTranslatedName("Knight Training") .setIcon(Items.BARREL) .addBuildingRequirement(ModBuildings.COMBAT_ACADEMY_ID, 4) - .addItemCost(Items.SHIELD, 8) + .addItemCost(Items.SHIELD, 8, provider) .addEffect(BLOCK_ATTACKS, 2) .addToList(r); final Research captainTraining = new Research(new ResourceLocation(Constants.MOD_ID, "combat/captaintraining"), COMBAT).setParentResearch(knightTraining) .setTranslatedName("Captain Training") .setIcon(Items.IRON_BARS) .addBuildingRequirement(ModBuildings.COMBAT_ACADEMY_ID, 5) - .addItemCost(Items.SHIELD, 16) + .addItemCost(Items.SHIELD, 16, provider) .addEffect(BLOCK_ATTACKS, 3) .addToList(r); new Research(new ResourceLocation(Constants.MOD_ID, "combat/captainoftheguard"), COMBAT).setParentResearch(captainTraining) .setTranslatedName("Captain of the Guard") .setIcon(Items.IRON_BLOCK) - .addItemCost(Items.SHIELD, 27) + .addItemCost(Items.SHIELD, 27, provider) .addEffect(BLOCK_ATTACKS, 4) .addToList(r); @@ -900,14 +903,14 @@ public Collection getCombatResearch(Collection r) .setSortOrder(2) .setIcon(ModBlocks.blockHutArchery.asItem()) .addBuildingRequirement(ModBuildings.BARRACKS_ID, 3) - .addItemCost(Items.IRON_BLOCK, 6) + .addItemCost(Items.IRON_BLOCK, 6, provider) .addEffect(ModBuildings.archery.get().getBuildingBlock(), 1) .addToList(r); final Research trickShot = new Research(new ResourceLocation(Constants.MOD_ID, "combat/trickshot"), COMBAT).setParentResearch(improvedBows) .setTranslatedName("Trick Shot") .setIcon(Items.ARROW) .addBuildingRequirement(ModBuildings.ARCHERY_ID, 3) - .addItemCost(Items.BOW, 5) + .addItemCost(Items.BOW, 5, provider) .addEffect(DOUBLE_ARROWS, 1) .addToList(r); final Research multiShot = new Research(new ResourceLocation(Constants.MOD_ID, "combat/multishot"), COMBAT).setParentResearch(trickShot) @@ -915,7 +918,7 @@ public Collection getCombatResearch(Collection r) .setTranslatedSubtitle("Known side effects include double vision double vision.") .setIcon(Items.TIPPED_ARROW) .addBuildingRequirement(ModBuildings.ARCHERY_ID, 4) - .addItemCost(Items.BOW, 9) + .addItemCost(Items.BOW, 9, provider) .addEffect(DOUBLE_ARROWS, 2) .addToList(r); final Research rapidShot = new Research(new ResourceLocation(Constants.MOD_ID, "combat/rapidshot"), COMBAT).setParentResearch(multiShot) @@ -923,13 +926,13 @@ public Collection getCombatResearch(Collection r) .setTranslatedSubtitle("Please leave the bow with more than you brought in.") .setIcon(ModItems.firearrow) .addBuildingRequirement(ModBuildings.ARCHERY_ID, 5) - .addItemCost(Items.BOW, 18) + .addItemCost(Items.BOW, 18, provider) .addEffect(DOUBLE_ARROWS, 3) .addToList(r); new Research(new ResourceLocation(Constants.MOD_ID, "combat/masterbowman"), COMBAT).setParentResearch(rapidShot) .setTranslatedName("Master Bowman") .setIcon(Items.BLAZE_ROD) - .addItemCost(Items.BOW, 27) + .addItemCost(Items.BOW, 27, provider) .addEffect(DOUBLE_ARROWS, 4) .addToList(r); @@ -939,14 +942,14 @@ public Collection getCombatResearch(Collection r) .setOnlyChild() .setIcon(Items.SHIELD) .addBuildingRequirement(ModBuildings.GUARD_TOWER_ID, 3) - .addItemCost(Items.IRON_BLOCK, 3) + .addItemCost(Items.IRON_BLOCK, 3, provider) .addEffect(SHIELD_USAGE, 1) .addToList(r); final Research parry = new Research(new ResourceLocation(Constants.MOD_ID, "combat/parry"), COMBAT).setParentResearch(avoidance) .setTranslatedName("Parry") .setIcon(Items.LEATHER_CHESTPLATE) .addBuildingRequirement(ModBuildings.SMELTERY_ID, 1) - .addItemCost(Items.IRON_INGOT, 16) + .addItemCost(Items.IRON_INGOT, 16, provider) .addEffect(MELEE_ARMOR, 1) .addToList(r); final Research riposte = new Research(new ResourceLocation(Constants.MOD_ID, "combat/riposte"), COMBAT).setParentResearch(parry) @@ -954,27 +957,27 @@ public Collection getCombatResearch(Collection r) .setTranslatedSubtitle("Oh yeah? Well, I, uh, um...") .setIcon(Items.IRON_CHESTPLATE) .addBuildingRequirement(ModBuildings.COMBAT_ACADEMY_ID, 1) - .addItemCost(Items.IRON_INGOT, 32) + .addItemCost(Items.IRON_INGOT, 32, provider) .addEffect(MELEE_ARMOR, 2) .addToList(r); final Research duelist = new Research(new ResourceLocation(Constants.MOD_ID, "combat/duelist"), COMBAT).setParentResearch(riposte) .setTranslatedName("Duelist") .setIcon(Items.CHAINMAIL_CHESTPLATE) .addBuildingRequirement(ModBuildings.SMELTERY_ID, 3) - .addItemCost(Items.IRON_INGOT, 64) + .addItemCost(Items.IRON_INGOT, 64, provider) .addEffect(MELEE_ARMOR, 3) .addToList(r); final Research provost = new Research(new ResourceLocation(Constants.MOD_ID, "combat/provost"), COMBAT).setParentResearch(duelist) .setTranslatedName("Provost") .setIcon(Items.GOLDEN_CHESTPLATE) .addBuildingRequirement(ModBuildings.COMBAT_ACADEMY_ID, 5) - .addItemCost(Items.DIAMOND, 16) + .addItemCost(Items.DIAMOND, 16, provider) .addEffect(MELEE_ARMOR, 4) .addToList(r); new Research(new ResourceLocation(Constants.MOD_ID, "combat/masterswordsman"), COMBAT).setParentResearch(provost) .setTranslatedName("Master Swordsman") .setIcon(Items.DIAMOND_CHESTPLATE) - .addItemCost(Items.DIAMOND, 64) + .addItemCost(Items.DIAMOND, 64, provider) .addEffect(MELEE_ARMOR, 5) .addToList(r); @@ -984,7 +987,7 @@ public Collection getCombatResearch(Collection r) .setSortOrder(2) .setIcon(ModItems.pirateBoots_2.asItem()) .addBuildingRequirement(ModBuildings.SMELTERY_ID, 1) - .addItemCost(Items.LEATHER, 16) + .addItemCost(Items.LEATHER, 16, provider) .addEffect(ARCHER_ARMOR, 1) .addToList(r); final Research improvedDodge = new Research(new ResourceLocation(Constants.MOD_ID, "combat/improveddodge"), COMBAT).setParentResearch(dodge) @@ -992,7 +995,7 @@ public Collection getCombatResearch(Collection r) .setTranslatedSubtitle("Dip") .setIcon(ModItems.pirateBoots_1) .addBuildingRequirement(ModBuildings.ARCHERY_ID, 1) - .addItemCost(Items.LEATHER, 32) + .addItemCost(Items.LEATHER, 32, provider) .addEffect(ARCHER_ARMOR, 2) .addToList(r); final Research evasion = new Research(new ResourceLocation(Constants.MOD_ID, "combat/evasion"), COMBAT).setParentResearch(improvedDodge) @@ -1000,7 +1003,7 @@ public Collection getCombatResearch(Collection r) .setTranslatedSubtitle("\"Duck!\" \"No, that's a goose.\"") .setIcon(Items.IRON_BOOTS) .addBuildingRequirement(ModBuildings.SMELTERY_ID, 3) - .addItemCost(Items.LEATHER, 64) + .addItemCost(Items.LEATHER, 64, provider) .addEffect(ARCHER_ARMOR, 3) .addToList(r); final Research improvedEvasion = new Research(new ResourceLocation(Constants.MOD_ID, "combat/improvedevasion"), COMBAT).setParentResearch(evasion) @@ -1008,14 +1011,14 @@ public Collection getCombatResearch(Collection r) .setTranslatedSubtitle("Dive") .setIcon(Items.GOLDEN_BOOTS) .addBuildingRequirement(ModBuildings.ARCHERY_ID, 5) - .addItemCost(Items.DIAMOND, 16) + .addItemCost(Items.DIAMOND, 16, provider) .addEffect(ARCHER_ARMOR, 4) .addToList(r); new Research(new ResourceLocation(Constants.MOD_ID, "combat/agilearcher"), COMBAT).setParentResearch(improvedEvasion) .setTranslatedName("Agile Archer") .setTranslatedSubtitle("Dodge... Again!") .setIcon(Items.DIAMOND_BOOTS) - .addItemCost(Items.DIAMOND, 64) + .addItemCost(Items.DIAMOND, 64, provider) .addEffect(ARCHER_ARMOR, 5) .addToList(r); @@ -1025,7 +1028,7 @@ public Collection getCombatResearch(Collection r) .setSortOrder(4) .setIcon(Items.LEATHER_HELMET) .addBuildingRequirement(ModBuildings.TOWNHALL_ID, 1) - .addItemCost(Items.LEATHER, 32) + .addItemCost(Items.LEATHER, 32, provider) .addEffect(ARMOR_DURABILITY, 1) .addToList(r); final Research boiledLeather = new Research(new ResourceLocation(Constants.MOD_ID, "combat/boiledleather"), COMBAT).setParentResearch(improvedLeather) @@ -1033,21 +1036,21 @@ public Collection getCombatResearch(Collection r) .setTranslatedSubtitle("Extra leathery!") .setIcon(Items.TURTLE_HELMET) .addBuildingRequirement(ModBuildings.TOWNHALL_ID, 2) - .addItemCost(Items.LEATHER, 64) + .addItemCost(Items.LEATHER, 64, provider) .addEffect(ARMOR_DURABILITY, 2) .addToList(r); final Research ironSkin = new Research(new ResourceLocation(Constants.MOD_ID, "combat/ironskin"), COMBAT).setParentResearch(boiledLeather) .setTranslatedName("Iron Skin") .setIcon(Items.CHAINMAIL_HELMET) .addBuildingRequirement(ModBuildings.TOWNHALL_ID, 3) - .addItemCost(Items.IRON_INGOT, 16) + .addItemCost(Items.IRON_INGOT, 16, provider) .addEffect(ARMOR_DURABILITY, 3) .addToList(r); final Research ironArmor = new Research(new ResourceLocation(Constants.MOD_ID, "combat/ironarmor"), COMBAT).setParentResearch(ironSkin) .setTranslatedName("Iron Armor") .setIcon(Items.IRON_HELMET) .addBuildingRequirement(ModBuildings.TOWNHALL_ID, 4) - .addItemCost(Items.IRON_INGOT, 32) + .addItemCost(Items.IRON_INGOT, 32, provider) .addEffect(ARMOR_DURABILITY, 4) .addToList(r); final Research steelArmor = new Research(new ResourceLocation(Constants.MOD_ID, "combat/steelarmor"), COMBAT).setParentResearch(ironArmor) @@ -1055,7 +1058,7 @@ public Collection getCombatResearch(Collection r) .setSortOrder(1) .setIcon(Items.GOLDEN_HELMET) .addBuildingRequirement(ModBuildings.TOWNHALL_ID, 5) - .addItemCost(Items.IRON_INGOT, 64) + .addItemCost(Items.IRON_INGOT, 64, provider) .addEffect(ARMOR_DURABILITY, 5) .addToList(r); new Research(new ResourceLocation(Constants.MOD_ID, "combat/platearmor"), COMBAT).setParentResearch(ironArmor) @@ -1063,13 +1066,13 @@ public Collection getCombatResearch(Collection r) .setSortOrder(2) .setIcon(ModItems.plateArmorHelmet) .addMandatoryBuildingRequirement(ModBuildings.BLACKSMITH_ID, 4) - .addItemCost(Items.IRON_INGOT, 32) + .addItemCost(Items.IRON_INGOT, 32, provider) .addEffect(PLATE_ARMOR, 1) .addToList(r); new Research(new ResourceLocation(Constants.MOD_ID, "combat/diamondskin"), COMBAT).setParentResearch(steelArmor) .setTranslatedName("Diamond Skin") .setIcon(Items.DIAMOND_HELMET) - .addItemCost(Items.DIAMOND, 64) + .addItemCost(Items.DIAMOND, 64, provider) .addEffect(ARMOR_DURABILITY, 6) .addToList(r); @@ -1077,7 +1080,7 @@ public Collection getCombatResearch(Collection r) .setTranslatedName("Telescope") .setIcon(ModItems.bannerRallyGuards) .addBuildingRequirement(ModBuildings.BARRACKS_ID, 3) - .addItemCost(Items.EMERALD, 16) + .addItemCost(Items.EMERALD, 16, provider) .addEffect(TELESCOPE, 1) .addToList(r); @@ -1085,7 +1088,7 @@ public Collection getCombatResearch(Collection r) .setTranslatedName("Standard") .setIcon(ModItems.bannerRallyGuards) .addBuildingRequirement(ModBuildings.BARRACKS_ID, 4) - .addItemCost(Items.EMERALD, 32) + .addItemCost(Items.EMERALD, 32, provider) .addEffect(STANDARD, 1) .addToList(r); @@ -1095,21 +1098,21 @@ public Collection getCombatResearch(Collection r) .setOnlyChild() .setIcon(Items.GLISTERING_MELON_SLICE) .addBuildingRequirement(ModBuildings.GUARD_TOWER_ID, 2) - .addItemCost(Items.EMERALD, 1) + .addItemCost(Items.EMERALD, 1, provider) .addEffect(RETREAT, 1) .addToList(r); final Research feint = new Research(new ResourceLocation(Constants.MOD_ID, "combat/feint"), COMBAT).setParentResearch(regeneration) .setTranslatedName("Feint") .setIcon(Items.LEATHER_BOOTS) .addBuildingRequirement(ModBuildings.GUARD_TOWER_ID, 4) - .addItemCost(Items.EMERALD, 8) + .addItemCost(Items.EMERALD, 8, provider) .addEffect(FLEEING_DAMAGE, 1) .addToList(r); final Research fear = new Research(new ResourceLocation(Constants.MOD_ID, "combat/fear"), COMBAT).setParentResearch(feint) .setTranslatedName("Fear") .setIcon(Items.IRON_BOOTS) .addBuildingRequirement(ModBuildings.GUARD_TOWER_ID, 8) - .addItemCost(Items.EMERALD, 16) + .addItemCost(Items.EMERALD, 16, provider) .addEffect(FLEEING_DAMAGE, 2) .addToList(r); final Research retreat = new Research(new ResourceLocation(Constants.MOD_ID, "combat/retreat"), COMBAT).setParentResearch(fear) @@ -1117,13 +1120,13 @@ public Collection getCombatResearch(Collection r) .setTranslatedSubtitle("For strategic purposes, I assure you.") .setIcon(Items.GOLDEN_BOOTS) .addBuildingRequirement(ModBuildings.GUARD_TOWER_ID, 12) - .addItemCost(Items.EMERALD, 32) + .addItemCost(Items.EMERALD, 32, provider) .addEffect(FLEEING_DAMAGE, 3) .addToList(r); new Research(new ResourceLocation(Constants.MOD_ID, "combat/fullretreat"), COMBAT).setParentResearch(retreat) .setTranslatedName("Full Retreat") .setIcon(Items.DIAMOND_BOOTS) - .addItemCost(Items.EMERALD, 64) + .addItemCost(Items.EMERALD, 64, provider) .addEffect(FLEEING_DAMAGE, 4) .addToList(r); @@ -1132,14 +1135,14 @@ public Collection getCombatResearch(Collection r) .setSortOrder(2) .setIcon(Items.FEATHER) .addBuildingRequirement(ModBuildings.GUARD_TOWER_ID, 4) - .addItemCost(Items.EMERALD, 8) + .addItemCost(Items.EMERALD, 8, provider) .addEffect(FLEEING_SPEED, 1) .addToList(r); final Research evade = new Research(new ResourceLocation(Constants.MOD_ID, "combat/evade"), COMBAT).setParentResearch(avoid) .setTranslatedName("Evade") .setIcon(Items.FEATHER, 2) .addBuildingRequirement(ModBuildings.GUARD_TOWER_ID, 8) - .addItemCost(Items.EMERALD, 16) + .addItemCost(Items.EMERALD, 16, provider) .addEffect(FLEEING_SPEED, 2) .addToList(r); final Research flee = new Research(new ResourceLocation(Constants.MOD_ID, "combat/flee"), COMBAT).setParentResearch(evade) @@ -1147,13 +1150,13 @@ public Collection getCombatResearch(Collection r) .setTranslatedSubtitle("Sometimes it's better just to run.") .setIcon(Items.FEATHER, 3) .addBuildingRequirement(ModBuildings.GUARD_TOWER_ID, 12) - .addItemCost(Items.EMERALD, 32) + .addItemCost(Items.EMERALD, 32, provider) .addEffect(FLEEING_SPEED, 3) .addToList(r); new Research(new ResourceLocation(Constants.MOD_ID, "combat/hotfoot"), COMBAT).setParentResearch(flee) .setTranslatedName("Hotfoot") .setIcon(Items.CHICKEN) - .addItemCost(Items.EMERALD, 64) + .addItemCost(Items.EMERALD, 64, provider) .addEffect(FLEEING_SPEED, 4) .addToList(r); @@ -1165,9 +1168,9 @@ public Collection getCombatResearch(Collection r) .setSortOrder(5) .setIcon(Items.CHAIN) .addBuildingRequirement(ModBuildings.GUARD_TOWER_ID, 1) - .addItemCost(Items.ROTTEN_FLESH, 8) - .addItemCost(Items.BONE, 8) - .addItemCost(Items.SPIDER_EYE, 8) + .addItemCost(Items.ROTTEN_FLESH, 8, provider) + .addItemCost(Items.BONE, 8, provider) + .addItemCost(Items.SPIDER_EYE, 8, provider) .addEffect(KNIGHT_TAUNT, 1) .addToList(r); final Research arrowUse = new Research(new ResourceLocation(Constants.MOD_ID, "combat/arrowuse"), COMBAT).setParentResearch(taunt) @@ -1175,31 +1178,31 @@ public Collection getCombatResearch(Collection r) .setTranslatedSubtitle("They work better with ammo.") .setIcon(Items.ARROW) .addBuildingRequirement(ModBuildings.GUARD_TOWER_ID, 2) - .addItemCost(Items.ARROW, 64) + .addItemCost(Items.ARROW, 64, provider) .addEffect(ARCHER_USE_ARROWS, 1) .addToList(r); final Research arrowPierce = new Research(new ResourceLocation(Constants.MOD_ID, "combat/arrowpierce"), COMBAT).setParentResearch(arrowUse) .setTranslatedName("Arrow Piercing") .setIcon(Items.ENCHANTED_BOOK) .addBuildingRequirement(ModBuildings.ARCHERY_ID, 1) - .addItemCost(Items.ARROW, 64) - .addItemCost(Items.REDSTONE, 64) + .addItemCost(Items.ARROW, 64, provider) + .addItemCost(Items.REDSTONE, 64, provider) .addEffect(ARROW_PIERCE, 1) .addToList(r); new Research(new ResourceLocation(Constants.MOD_ID, "combat/druidpotion"), COMBAT).setParentResearch(arrowUse) .setTranslatedName("Panoramix") .setIcon(ModItems.mistletoe) .addBuildingRequirement(ModBuildings.BARRACKS_ID, 3) - .addItemCost(ModItems.mistletoe, 64) + .addItemCost(ModItems.mistletoe, 64, provider) .addEffect(DRUID_USE_POTIONS, 1) .addToList(r); new Research(new ResourceLocation(Constants.MOD_ID, "combat/whirlwind"), COMBAT).setParentResearch(arrowPierce) .setTranslatedName("Whirlwind") .setIcon(ModItems.scimitar) .addBuildingRequirement(ModBuildings.BARRACKS_ID, 4) - .addItemCost(Items.REDSTONE, 64) - .addItemCost(Items.GOLD_INGOT, 64) - .addItemCost(Items.LAPIS_LAZULI, 128) + .addItemCost(Items.REDSTONE, 64, provider) + .addItemCost(Items.GOLD_INGOT, 64, provider) + .addItemCost(Items.LAPIS_LAZULI, 128, provider) .addEffect(KNIGHT_WHIRLWIND, 1) .addToList(r); @@ -1213,7 +1216,7 @@ public Collection getTechnologyResearch(Collection r) .setTranslatedSubtitle("Where science meets dirt.") .setIcon(ModBlocks.blockHutComposter.asItem()) .addBuildingRequirement(ModBuildings.FARMER_ID, 3) - .addItemCost(Items.BONE_MEAL, 64) + .addItemCost(Items.BONE_MEAL, 64, provider) .addEffect(ModBuildings.composter.get().getBuildingBlock(), 1) .addToList(r); @@ -1222,7 +1225,7 @@ public Collection getTechnologyResearch(Collection r) .setTranslatedSubtitle("Eww, sticky!") .setIcon(Items.PODZOL) .addBuildingRequirement(ModBuildings.COMPOSTER_ID, 2) - .addItemCost(Items.PODZOL, 8) + .addItemCost(Items.PODZOL, 8, provider) .addEffect(PODZOL_CHANCE, 1) .addToList(r); new Research(new ResourceLocation(Constants.MOD_ID, "technology/podzolchance2"), TECH).setParentResearch(podzolChance) @@ -1230,7 +1233,7 @@ public Collection getTechnologyResearch(Collection r) .setTranslatedSubtitle("Much easier than Silk Touch.") .setIcon(Items.PODZOL) .addBuildingRequirement(ModBuildings.COMPOSTER_ID, 3) - .addItemCost(Items.PODZOL, 32) + .addItemCost(Items.PODZOL, 32, provider) .addEffect(PODZOL_CHANCE, 2) .addToList(r); @@ -1238,7 +1241,7 @@ public Collection getTechnologyResearch(Collection r) .setTranslatedName("Flower Power") .setIcon(ModBlocks.blockHutFlorist.asItem()) .addBuildingRequirement(ModBuildings.COMPOSTER_ID, 3) - .addItemCost(ModItems.compost, 64) + .addItemCost(ModItems.compost, 64, provider) .addEffect(ModBuildings.florist.get().getBuildingBlock(), 1) .addToList(r); final Research rainbowHeaven = new Research(new ResourceLocation(Constants.MOD_ID, "technology/rainbowheaven"), TECH).setParentResearch(biodegradable) @@ -1246,7 +1249,7 @@ public Collection getTechnologyResearch(Collection r) .setTranslatedSubtitle("Now in color! And 3D!") .setIcon(ModBlocks.blockHutComposter.asItem()) .addBuildingRequirement(ModBuildings.COMPOSTER_ID, 3) - .addItemCost(Items.POPPY, 64) + .addItemCost(Items.POPPY, 64, provider) .addEffect(ModBuildings.dyer.get().getBuildingBlock(), 1) .addToList(r); new Research(new ResourceLocation(Constants.MOD_ID, "technology/honeypot"), TECH).setParentResearch(rainbowHeaven) @@ -1254,7 +1257,7 @@ public Collection getTechnologyResearch(Collection r) .setTranslatedSubtitle("Wasn't going to eat it. Just going to taste it.") .setIcon(Items.HONEYCOMB.asItem()) .addBuildingRequirement(ModBuildings.BEEKEEPER_ID, 3) - .addItemCost(Items.BEEHIVE, 16) + .addItemCost(Items.BEEHIVE, 16, provider) .addEffect(BEEKEEP_2, 1) .addToList(r); @@ -1264,7 +1267,7 @@ public Collection getTechnologyResearch(Collection r) .setSortOrder(2) .setIcon(ModBlocks.blockHutPlantation.asItem()) .addBuildingRequirement(ModBuildings.FARMER_ID, 3) - .addItemCost(ModItems.compost, 16) + .addItemCost(ModItems.compost, 16, provider) .addEffect(ModBuildings.plantation.get().getBuildingBlock(), 1) .addToList(r); final Research cropRotation = new Research(new ResourceLocation(Constants.MOD_ID, "technology/croprotation"), TECH).setParentResearch(letItGrow) @@ -1272,8 +1275,8 @@ public Collection getTechnologyResearch(Collection r) .setTranslatedSubtitle("Bigger = better") .setIcon(Items.GREEN_DYE) .addBuildingRequirement(ModBuildings.PLANTATION_ID, 3) - .addItemCost(Items.SUGAR_CANE, 32) - .addItemCost(Items.CACTUS, 32) + .addItemCost(Items.SUGAR_CANE, 32, provider) + .addItemCost(Items.CACTUS, 32, provider) .addEffect(PLANTATION_LARGE, 1) .addToList(r); @@ -1282,9 +1285,9 @@ public Collection getTechnologyResearch(Collection r) .setTranslatedSubtitle("Wimoweh Wimoweh Wimoweh") .setIcon(Items.VINE) .addBuildingRequirement(ModBuildings.PLANTATION_ID, 2) - .addItemCost(Items.BAMBOO, 16) - .addItemCost(Items.COCOA_BEANS, 16) - .addItemCost(Items.VINE, 16) + .addItemCost(Items.BAMBOO, 16, provider) + .addItemCost(Items.COCOA_BEANS, 16, provider) + .addItemCost(Items.VINE, 16, provider) .addEffect(PLANTATION_JUNGLE, 1) .addToList(r); @@ -1293,9 +1296,9 @@ public Collection getTechnologyResearch(Collection r) .setTranslatedSubtitle("*Drowning Noises*") .setIcon(Items.KELP) .addBuildingRequirement(ModBuildings.PLANTATION_ID, 2) - .addItemCost(Items.KELP, 16) - .addItemCost(Items.SEAGRASS, 16) - .addItemCost(Items.SEA_PICKLE, 16) + .addItemCost(Items.KELP, 16, provider) + .addItemCost(Items.SEAGRASS, 16, provider) + .addItemCost(Items.SEA_PICKLE, 16, provider) .addEffect(PLANTATION_SEA, 1) .addToList(r); @@ -1304,7 +1307,7 @@ public Collection getTechnologyResearch(Collection r) .setTranslatedSubtitle("Too Dark Here") .setIcon(Items.GLOW_BERRIES) .addBuildingRequirement(ModBuildings.PLANTATION_ID, 3) - .addItemCost(Items.GLOW_BERRIES, 32) + .addItemCost(Items.GLOW_BERRIES, 32, provider) .addEffect(PLANTATION_EXOTIC, 1) .addToList(r); @@ -1314,8 +1317,8 @@ public Collection getTechnologyResearch(Collection r) .setIcon(Items.CRIMSON_FUNGUS) .addBuildingRequirement(ModBuildings.PLANTATION_ID, 3) .addBuildingRequirement(ModBuildings.NETHERWORKER_ID, 3) - .addItemCost(Items.CRIMSON_FUNGUS, 16) - .addItemCost(Items.WARPED_FUNGUS, 16) + .addItemCost(Items.CRIMSON_FUNGUS, 16, provider) + .addItemCost(Items.WARPED_FUNGUS, 16, provider) .addEffect(PLANTATION_NETHER, 1) .addToList(r); @@ -1325,7 +1328,7 @@ public Collection getTechnologyResearch(Collection r) .setSortOrder(3) .setIcon(Items.WHEAT_SEEDS) .addBuildingRequirement(ModBuildings.MINER_ID, 3) - .addItemCost(Items.WHEAT_SEEDS, 64) + .addItemCost(Items.WHEAT_SEEDS, 64, provider) .addEffect(FARMING, 1) .addToList(r); final Research dung = new Research(new ResourceLocation(Constants.MOD_ID, "technology/dung"), TECH).setParentResearch(bonemeal) @@ -1333,14 +1336,14 @@ public Collection getTechnologyResearch(Collection r) .setTranslatedSubtitle("Fresh or not, here it comes!") .setIcon(Items.BONE_MEAL) .addBuildingRequirement(ModBuildings.MINER_ID, 4) - .addItemCost(Items.WHEAT_SEEDS, 128) + .addItemCost(Items.WHEAT_SEEDS, 128, provider) .addEffect(FARMING, 2) .addToList(r); final Research compost = new Research(new ResourceLocation(Constants.MOD_ID, "technology/compost"), TECH).setParentResearch(dung) .setTranslatedName("Compost") .setIcon(Items.BONE) .addBuildingRequirement(ModBuildings.MINER_ID, 5) - .addItemCost(Items.WHEAT_SEEDS, 256) + .addItemCost(Items.WHEAT_SEEDS, 256, provider) .addEffect(FARMING, 3) .addToList(r); final Research fertilizer = new Research(new ResourceLocation(Constants.MOD_ID, "technology/fertilizer"), TECH).setParentResearch(compost) @@ -1348,13 +1351,13 @@ public Collection getTechnologyResearch(Collection r) .setTranslatedSubtitle("Ah, that's the stuff!") .setIcon(Items.BONE_BLOCK) .addBuildingRequirement(ModBuildings.SMELTERY_ID, 3) - .addItemCost(Items.WHEAT_SEEDS, 512) + .addItemCost(Items.WHEAT_SEEDS, 512, provider) .addEffect(FARMING, 4) .addToList(r); new Research(new ResourceLocation(Constants.MOD_ID, "technology/magiccompost"), TECH).setParentResearch(fertilizer) .setTranslatedName("Magic Compost") .setIcon(ModBlocks.blockBarrel.asItem()) - .addItemCost(Items.WHEAT_SEEDS, 2048) + .addItemCost(Items.WHEAT_SEEDS, 2048, provider) .addEffect(FARMING, 5) .addToList(r); @@ -1363,8 +1366,8 @@ public Collection getTechnologyResearch(Collection r) .setTranslatedSubtitle("Tiptoe through the tulips.") .setSortOrder(2) .setIcon(Items.LEATHER_BOOTS) - .addItemCost(Items.WHITE_WOOL, 16) - .addItemCost(Items.FEATHER, 16) + .addItemCost(Items.WHITE_WOOL, 16, provider) + .addItemCost(Items.FEATHER, 16, provider) .addEffect(SOFT_SHOES, 1) .addToList(r); @@ -1373,9 +1376,9 @@ public Collection getTechnologyResearch(Collection r) .setSortOrder(3) .setIcon(ModItems.scrollHighLight) .addBuildingRequirement("enchanter", 3) - .addItemCost(Items.PAPER, 64) - .addItemCost(ModItems.ancientTome, 1) - .addItemCost(Items.LAPIS_LAZULI, 64) + .addItemCost(Items.PAPER, 64, provider) + .addItemCost(ModItems.ancientTome, 1, provider) + .addItemCost(Items.LAPIS_LAZULI, 64, provider) .addEffect(new ResourceLocation("minecolonies", "effects/morescrollsunlock"), 1) .addToList(r); @@ -1384,7 +1387,7 @@ public Collection getTechnologyResearch(Collection r) .setTranslatedSubtitle("It's a dangerous job, but it must be done!") .setSortOrder(1) .setIcon(ModBlocks.blockHutNetherWorker.asItem()) - .addItemCost(Items.GILDED_BLACKSTONE, 3) + .addItemCost(Items.GILDED_BLACKSTONE, 3, provider) .addEffect(ModBuildings.netherWorker.get().getBuildingBlock(), 1) .addToList(r); @@ -1392,7 +1395,7 @@ public Collection getTechnologyResearch(Collection r) .setTranslatedName("Magic Potions") .setTranslatedSubtitle("These Romans are crazy") .setIcon(ModBlocks.blockHutAlchemist.asItem()) - .addItemCost(Items.NETHER_WART, 16) + .addItemCost(Items.NETHER_WART, 16, provider) .addEffect(ModBuildings.alchemist.get().getBuildingBlock(), 1) .addToList(r); @@ -1401,8 +1404,8 @@ public Collection getTechnologyResearch(Collection r) .setTranslatedSubtitle("Always use proper lenses to avoid eye damage") .setSortOrder(4) .setIcon(Items.ENDER_EYE) - .addItemCost(Items.ENDER_EYE, 16) - .addItemCost(ModItems.ancientTome, 1) + .addItemCost(Items.ENDER_EYE, 16, provider) + .addItemCost(ModItems.ancientTome, 1, provider) .addBuildingRequirement(ModBuildings.NETHERWORKER_ID, 1) .addEffect(NETHER_LOG, 1) .addToList(r); @@ -1414,7 +1417,7 @@ public Collection getTechnologyResearch(Collection r) .setSortOrder(4) .setIcon(Items.FISHING_ROD) .addBuildingRequirement(ModBuildings.FISHERMAN_ID, 4) - .addItemCost(Items.HEART_OF_THE_SEA, 1) + .addItemCost(Items.HEART_OF_THE_SEA, 1, provider) .addEffect(FISH_TREASURE, 1) .addToList(r); @@ -1424,14 +1427,14 @@ public Collection getTechnologyResearch(Collection r) .setSortOrder(4) .setIcon(ModBlocks.blockHutStonemason.asItem()) .addBuildingRequirement(ModBuildings.MINER_ID, 3) - .addItemCost(Items.CHISELED_STONE_BRICKS, 64) + .addItemCost(Items.CHISELED_STONE_BRICKS, 64, provider) .addEffect(ModBuildings.stoneMason.get().getBuildingBlock(), 1) .addToList(r); final Research rockingRoll = new Research(new ResourceLocation(Constants.MOD_ID, "technology/rockingroll"), TECH).setParentResearch(stoneCake) .setTranslatedName("Rocking Roll") .setIcon(ModBlocks.blockHutCrusher.asItem()) .addBuildingRequirement("stonemason", 1) - .addItemCost(Items.STONE, 64) + .addItemCost(Items.STONE, 64, provider) .addEffect(ModBuildings.crusher.get().getBuildingBlock(), 1) .addToList(r); @@ -1440,7 +1443,7 @@ public Collection getTechnologyResearch(Collection r) .setTranslatedSubtitle("Yabba Dabba Doo!") .setIcon(ModBlocks.blockHutStoneSmeltery.asItem()) .addBuildingRequirement(ModBuildings.STONE_MASON_ID, 1) - .addItemCost(Items.BRICK, 64) + .addItemCost(Items.BRICK, 64, provider) .addEffect(ModBuildings.stoneSmelter.get().getBuildingBlock(), 1) .addToList(r); new Research(new ResourceLocation(Constants.MOD_ID, "technology/knowtheend"), TECH).setParentResearch(theFlintstones) @@ -1448,7 +1451,7 @@ public Collection getTechnologyResearch(Collection r) .setTranslatedSubtitle("Unlock the secrets of the most mysterious dimension.") .setIcon(ModItems.chorusBread) .addBuildingRequirement("baker", 3) - .addItemCost(Items.CHORUS_FRUIT, 64) + .addItemCost(Items.CHORUS_FRUIT, 64, provider) .addEffect(new ResourceLocation("minecolonies", "effects/knowledgeoftheendunlock"), 1) .addToList(r); @@ -1458,9 +1461,9 @@ public Collection getTechnologyResearch(Collection r) .setTranslatedSubtitle("When in doubt, cover in shiny stuff.") .setIcon(Items.GOLD_BLOCK) .addBuildingRequirement("crusher", 3) - .addItemCost(Items.GRAVEL, 64) - .addItemCost(Items.SAND, 64) - .addItemCost(Items.CLAY, 64) + .addItemCost(Items.GRAVEL, 64, provider) + .addItemCost(Items.SAND, 64, provider) + .addItemCost(Items.CLAY, 64, provider) .addEffect(CRUSHING_11, 1) .addToList(r); @@ -1469,7 +1472,7 @@ public Collection getTechnologyResearch(Collection r) .setTranslatedSubtitle("Gotta go deep for that one.") .setIcon(Items.COBBLED_DEEPSLATE) .addBuildingRequirement("crusher", 3) - .addItemCost(Items.DEEPSLATE, 64) + .addItemCost(Items.DEEPSLATE, 64, provider) .addEffect(THE_DEPTHS, 1) .addToList(r); @@ -1479,7 +1482,7 @@ public Collection getTechnologyResearch(Collection r) .setSortOrder(2) .setIcon(ModBlocks.blockHutConcreteMixer.asItem()) .addBuildingRequirement("crusher", 1) - .addItemCost(ModTags.concreteItems, 32) + .addItemCost(ModTags.concreteItems, 32, provider) .addEffect(ModBuildings.concreteMixer.get().getBuildingBlock(), 1) .addToList(r); @@ -1489,14 +1492,14 @@ public Collection getTechnologyResearch(Collection r) .setSortOrder(5) .setIcon(ModBlocks.blockHutSawmill.asItem()) .addBuildingRequirement("lumberjack", 3) - .addItemCost(ItemTags.PLANKS, 64) + .addItemCost(ItemTags.PLANKS, 64, provider) .addEffect(ModBuildings.sawmill.get().getBuildingBlock(), 1) .addToList(r); final Research stringWork = new Research(new ResourceLocation(Constants.MOD_ID, "technology/stringwork"), TECH).setParentResearch(woodwork) .setTranslatedName("Stringwork") .setIcon(ModBlocks.blockHutFletcher.asItem()) .addBuildingRequirement(ModBuildings.SAWMILL_ID, 1) - .addItemCost(Items.STRING, 16) + .addItemCost(Items.STRING, 16, provider) .addEffect(ModBuildings.fletcher.get().getBuildingBlock(), 1) .addToList(r); new Research(new ResourceLocation(Constants.MOD_ID, "technology/hotboots"), TECH).setParentResearch(stringWork) @@ -1504,8 +1507,8 @@ public Collection getTechnologyResearch(Collection r) .setTranslatedSubtitle("Warmer on the outside.") .setIcon(Items.CAMPFIRE) .addBuildingRequirement(ModBuildings.FLETCHER_ID, 1) - .addItemCost(Items.LEATHER, 32) - .addItemCost(Items.IRON_INGOT, 16) + .addItemCost(Items.LEATHER, 32, provider) + .addItemCost(Items.IRON_INGOT, 16, provider) .addEffect(FIRE_RES, 1) .addToList(r); @@ -1515,7 +1518,7 @@ public Collection getTechnologyResearch(Collection r) .setSortOrder(2) .setIcon(ModBlocks.blockHutSifter.asItem()) .addBuildingRequirement(ModBuildings.FISHERMAN_ID, 3) - .addItemCost(Items.STRING, 64) + .addItemCost(Items.STRING, 64, provider) .addEffect(ModBuildings.sifter.get().getBuildingBlock(), 1) .addToList(r); final Research space = new Research(new ResourceLocation(Constants.MOD_ID, "technology/space"), TECH).setParentResearch(sieving) @@ -1523,7 +1526,7 @@ public Collection getTechnologyResearch(Collection r) .setTranslatedSubtitle("Antidisinterdimensionalitarianism!") .setIcon(Items.CHEST) .addBuildingRequirement(ModBuildings.MINER_ID, 3) - .addItemCost(ModBlocks.blockRack.asItem(), 16) + .addItemCost(ModBlocks.blockRack.asItem(), 16, provider) .addEffect(MINIMUM_STOCK, 1) .addToList(r); final Research capacity = new Research(new ResourceLocation(Constants.MOD_ID, "technology/capacity"), TECH).setParentResearch(space) @@ -1531,7 +1534,7 @@ public Collection getTechnologyResearch(Collection r) .setTranslatedSubtitle("Don't ask how we fit it all.") .setIcon(Items.CHEST_MINECART) .addBuildingRequirement(ModBuildings.MINER_ID, 4) - .addItemCost(ModBlocks.blockRack.asItem(), 32) + .addItemCost(ModBlocks.blockRack.asItem(), 32, provider) .addEffect(MINIMUM_STOCK, 2) .addToList(r); new Research(new ResourceLocation(Constants.MOD_ID, "technology/fullstock"), TECH).setParentResearch(capacity) @@ -1539,7 +1542,7 @@ public Collection getTechnologyResearch(Collection r) .setTranslatedSubtitle("We might be able to squeeze in one more.") .setIcon(Items.ENDER_CHEST) .addBuildingRequirement(ModBuildings.MINER_ID, 5) - .addItemCost(ModBlocks.blockRack.asItem(), 64) + .addItemCost(ModBlocks.blockRack.asItem(), 64, provider) .addEffect(MINIMUM_STOCK, 3) .addToList(r); @@ -1549,7 +1552,7 @@ public Collection getTechnologyResearch(Collection r) .setSortOrder(3) .setIcon(Items.PAPER) .addBuildingRequirement(ModBuildings.SAWMILL_ID, 1) - .addItemCost(Items.PAPER, 32) + .addItemCost(Items.PAPER, 32, provider) .addEffect(RECIPES, 1) .addToList(r); @@ -1558,7 +1561,7 @@ public Collection getTechnologyResearch(Collection r) .setTranslatedSubtitle("So THAT's what I should be making!") .setIcon(Items.BOOK) .addBuildingRequirement(ModBuildings.SAWMILL_ID, 2) - .addItemCost(Items.PAPER, 64) + .addItemCost(Items.PAPER, 64, provider) .addEffect(RECIPES, 2) .setSortOrder(1) .addToList(r); @@ -1566,7 +1569,7 @@ public Collection getTechnologyResearch(Collection r) .setTranslatedName("Recipe Book") .setIcon(Items.ENCHANTED_BOOK) .addBuildingRequirement(ModBuildings.SAWMILL_ID, 3) - .addItemCost(Items.PAPER, 128) + .addItemCost(Items.PAPER, 128, provider) .addEffect(RECIPES, 3) .addToList(r); final Research rtm = new Research(new ResourceLocation(Constants.MOD_ID, "technology/rtm"), TECH).setParentResearch(recipeBook) @@ -1574,14 +1577,14 @@ public Collection getTechnologyResearch(Collection r) .setTranslatedSubtitle("I saw some information on this somewhere...") .setIcon(Items.BOOKSHELF) .addBuildingRequirement(ModBuildings.SAWMILL_ID, 4) - .addItemCost(Items.PAPER, 256) + .addItemCost(Items.PAPER, 256, provider) .addEffect(RECIPES, 4) .addToList(r); new Research(new ResourceLocation(Constants.MOD_ID, "technology/rainman"), TECH).setParentResearch(rtm) .setTranslatedName("Rainman") .setTranslatedSubtitle("Raindrops are falling on my head...") .setIcon(Items.SPLASH_POTION) - .addItemCost(Items.SALMON_BUCKET, 27) + .addItemCost(Items.SALMON_BUCKET, 27, provider) .addEffect(WORKING_IN_RAIN, 1) .addToList(r); @@ -1590,7 +1593,7 @@ public Collection getTechnologyResearch(Collection r) .setTranslatedSubtitle("So many items to choose from!") .setIcon(ModBlocks.blockRack.asItem()) .addBuildingRequirement(ModBuildings.SAWMILL_ID, 3) - .addItemCost(ModBlocks.blockRack.asItem(), 3) + .addItemCost(ModBlocks.blockRack.asItem(), 3, provider) .addEffect(RECIPE_MODE, 1) .setSortOrder(2) .addToList(r); @@ -1600,7 +1603,7 @@ public Collection getTechnologyResearch(Collection r) .setTranslatedSubtitle("Possibility Overload!") .setIcon(ModBlocks.blockHutBuilder.asItem()) .addBuildingRequirement(ModBuildings.BUILDER_ID, 3) - .addItemCost(Items.DIAMOND_AXE, 1) + .addItemCost(Items.DIAMOND_AXE, 1, provider) .addEffect(BUILDER_MODE, 1) .setSortOrder(3) .addToList(r); @@ -1610,21 +1613,21 @@ public Collection getTechnologyResearch(Collection r) .setSortOrder(2) .setIcon(Items.PINK_SHULKER_BOX) .addBuildingRequirement(ModBuildings.LIBRARY_ID, 4) - .addItemCost(Items.EMERALD, 64) + .addItemCost(Items.EMERALD, 64, provider) .addEffect(CITIZEN_INV_SLOTS, 1) .addToList(r); final Research loaded = new Research(new ResourceLocation(Constants.MOD_ID, "technology/loaded"), TECH).setParentResearch(deepPockets) .setTranslatedName("Loaded") .setIcon(Items.RED_SHULKER_BOX) .addBuildingRequirement(ModBuildings.LIBRARY_ID, 5) - .addItemCost(Items.EMERALD, 128) + .addItemCost(Items.EMERALD, 128, provider) .addEffect(CITIZEN_INV_SLOTS, 2) .addToList(r); new Research(new ResourceLocation(Constants.MOD_ID, "technology/heavilyloaded"), TECH).setParentResearch(loaded) .setTranslatedName("Heavily Loaded") .setIcon(Items.BLUE_SHULKER_BOX) .setNoReset() - .addItemCost(Items.EMERALD, 256) + .addItemCost(Items.EMERALD, 256, provider) .addEffect(CITIZEN_INV_SLOTS, 3) .addToList(r); @@ -1633,40 +1636,40 @@ public Collection getTechnologyResearch(Collection r) .setSortOrder(6) .setIcon(ModBlocks.blockHutSmeltery.asItem()) .addBuildingRequirement(ModBuildings.MINER_ID, 2) - .addItemCost(Items.LAVA_BUCKET, 4) + .addItemCost(Items.LAVA_BUCKET, 4, provider) .addEffect(ModBuildings.smeltery.get().getBuildingBlock(), 1) .addToList(r); final Research isThisRedstone = new Research(new ResourceLocation(Constants.MOD_ID, "technology/isthisredstone"), TECH).setParentResearch(hot) .setTranslatedName("Is This Redstone?") .setIcon(Items.REDSTONE) - .addItemCost(Items.REDSTONE, 128) + .addItemCost(Items.REDSTONE, 128, provider) .addEffect(BLOCK_BREAK_SPEED, 1) .addToList(r); final Research redstonePowered = new Research(new ResourceLocation(Constants.MOD_ID, "technology/redstonepowered"), TECH).setParentResearch(isThisRedstone) .setTranslatedName("Redstone Powered") .setTranslatedSubtitle("Like magic, but SCIENCE!") .setIcon(Items.REDSTONE_TORCH) - .addItemCost(Items.REDSTONE, 256) + .addItemCost(Items.REDSTONE, 256, provider) .addEffect(BLOCK_BREAK_SPEED, 2) .addToList(r); final Research heavyMachinery = new Research(new ResourceLocation(Constants.MOD_ID, "technology/heavymachinery"), TECH).setParentResearch(redstonePowered) .setTranslatedName("Heavy Machinery") .setIcon(Items.REDSTONE_BLOCK) - .addItemCost(Items.REDSTONE, 512) + .addItemCost(Items.REDSTONE, 512, provider) .addEffect(BLOCK_BREAK_SPEED, 3) .addToList(r); final Research whatIsThisSpeed = new Research(new ResourceLocation(Constants.MOD_ID, "technology/whatisthisspeed"), TECH).setParentResearch(heavyMachinery) .setTranslatedName("What Is This Speed?") .setTranslatedSubtitle("We stopped trying to calculate it after a while.") .setIcon(Items.COMPARATOR) - .addItemCost(Items.REDSTONE, 1024) + .addItemCost(Items.REDSTONE, 1024, provider) .addEffect(BLOCK_BREAK_SPEED, 4) .addToList(r); new Research(new ResourceLocation(Constants.MOD_ID, "technology/lightning"), TECH).setParentResearch(whatIsThisSpeed) .setTranslatedName("Lightning") .setTranslatedSubtitle("BAM! And the block is gone!") .setIcon(Items.REPEATER) - .addItemCost(Items.REDSTONE, 2048) + .addItemCost(Items.REDSTONE, 2048, provider) .addEffect(BLOCK_BREAK_SPEED, 5) .addToList(r); @@ -1675,7 +1678,7 @@ public Collection getTechnologyResearch(Collection r) .setTranslatedSubtitle("You'll definitely be needing those in some form.") .setIcon(ModBlocks.blockHutGlassblower.asItem()) .addBuildingRequirement(ModBuildings.SMELTERY_ID, 3) - .addItemCost(Items.GLASS, 64) + .addItemCost(Items.GLASS, 64, provider) .addEffect(ModBuildings.glassblower.get().getBuildingBlock(), 1) .addToList(r); @@ -1685,41 +1688,41 @@ public Collection getTechnologyResearch(Collection r) .setTranslatedSubtitle("We're still ironing out the details.") .setIcon(ModBlocks.blockHutBlacksmith.asItem()) .addBuildingRequirement(ModBuildings.MINER_ID, 3) - .addItemCost(Items.ANVIL, 1) + .addItemCost(Items.ANVIL, 1, provider) .addEffect(ModBuildings.blacksmith.get().getBuildingBlock(), 1) .addToList(r); final Research strong = new Research(new ResourceLocation(Constants.MOD_ID, "technology/strong"), TECH).setParentResearch(hittingIron) .setTranslatedName("Strong") .setIcon(Items.WOODEN_PICKAXE) .addBuildingRequirement(ModBuildings.BLACKSMITH_ID, 1) - .addItemCost(Items.DIAMOND, 8) + .addItemCost(Items.DIAMOND, 8, provider) .addEffect(TOOL_DURABILITY, 1) .addToList(r); final Research hardened = new Research(new ResourceLocation(Constants.MOD_ID, "technology/hardened"), TECH).setParentResearch(strong) .setTranslatedName("Hardened") .setIcon(Items.STONE_PICKAXE) .addBuildingRequirement(ModBuildings.BLACKSMITH_ID, 2) - .addItemCost(Items.DIAMOND, 16) + .addItemCost(Items.DIAMOND, 16, provider) .addEffect(TOOL_DURABILITY, 2) .addToList(r); final Research reinforced = new Research(new ResourceLocation(Constants.MOD_ID, "technology/reinforced"), TECH).setParentResearch(hardened) .setTranslatedName("Reinforced") .setIcon(Items.IRON_PICKAXE) .addBuildingRequirement(ModBuildings.BLACKSMITH_ID, 3) - .addItemCost(Items.DIAMOND, 32) + .addItemCost(Items.DIAMOND, 32, provider) .addEffect(TOOL_DURABILITY, 3) .addToList(r); final Research steelBracing = new Research(new ResourceLocation(Constants.MOD_ID, "technology/steelbracing"), TECH).setParentResearch(reinforced) .setTranslatedName("Steel Bracing") .setIcon(Items.GOLDEN_PICKAXE) .addBuildingRequirement(ModBuildings.BLACKSMITH_ID, 5) - .addItemCost(Items.DIAMOND, 64) + .addItemCost(Items.DIAMOND, 64, provider) .addEffect(TOOL_DURABILITY, 4) .addToList(r); new Research(new ResourceLocation(Constants.MOD_ID, "technology/diamondcoated"), TECH).setParentResearch(steelBracing) .setTranslatedName("Diamond Coated") .setIcon(Items.DIAMOND_PICKAXE) - .addItemCost(Items.DIAMOND, 128) + .addItemCost(Items.DIAMOND, 128, provider) .addEffect(TOOL_DURABILITY, 5) .addToList(r); @@ -1727,7 +1730,7 @@ public Collection getTechnologyResearch(Collection r) .setTranslatedName("Ability") .setIcon(Items.GLOWSTONE_DUST) .addBuildingRequirement(ModBuildings.MINER_ID, 1) - .addItemCost(Items.IRON_INGOT, 64) + .addItemCost(Items.IRON_INGOT, 64, provider) .addEffect(BLOCK_PLACE_SPEED, 1) .addToList(r); final Research skills = new Research(new ResourceLocation(Constants.MOD_ID, "technology/skills"), TECH).setParentResearch(ability) @@ -1735,7 +1738,7 @@ public Collection getTechnologyResearch(Collection r) .setTranslatedSubtitle("Everything in its place.") .setIcon(Items.GLOWSTONE) .addBuildingRequirement(ModBuildings.MINER_ID, 2) - .addItemCost(Items.IRON_INGOT, 128) + .addItemCost(Items.IRON_INGOT, 128, provider) .addEffect(BLOCK_PLACE_SPEED, 2) .addToList(r); final Research tools = new Research(new ResourceLocation(Constants.MOD_ID, "technology/tools"), TECH).setParentResearch(skills) @@ -1743,7 +1746,7 @@ public Collection getTechnologyResearch(Collection r) .setTranslatedSubtitle("Like breaking stuff, but in reverse!") .setIcon(Items.REDSTONE_LAMP) .addBuildingRequirement(ModBuildings.BLACKSMITH_ID, 4) - .addItemCost(Items.IRON_INGOT, 256) + .addItemCost(Items.IRON_INGOT, 256, provider) .addEffect(BLOCK_PLACE_SPEED, 3) .addToList(r); final Research seemsAutomatic = new Research(new ResourceLocation(Constants.MOD_ID, "technology/seemsautomatic"), TECH).setParentResearch(tools) @@ -1751,13 +1754,13 @@ public Collection getTechnologyResearch(Collection r) .setTranslatedSubtitle("It all happened so fast...") .setIcon(Items.BLAZE_POWDER) .addBuildingRequirement(ModBuildings.BLACKSMITH_ID, 5) - .addItemCost(Items.IRON_INGOT, 512) + .addItemCost(Items.IRON_INGOT, 512, provider) .addEffect(BLOCK_PLACE_SPEED, 4) .addToList(r); new Research(new ResourceLocation(Constants.MOD_ID, "technology/madness"), TECH).setParentResearch(seemsAutomatic) .setTranslatedName("Madness!") .setIcon(Items.SPECTRAL_ARROW) - .addItemCost(Items.IRON_INGOT, 1024) + .addItemCost(Items.IRON_INGOT, 1024, provider) .addEffect(BLOCK_PLACE_SPEED, 5) .addToList(r); @@ -1765,34 +1768,34 @@ public Collection getTechnologyResearch(Collection r) .setTranslatedName("Veinminer") .setIcon(Items.IRON_BLOCK) .addBuildingRequirement(ModBuildings.MINER_ID, 1) - .addItemCost(ItemTags.IRON_ORES, 32) + .addItemCost(ItemTags.IRON_ORES, 32, provider) .addEffect(MORE_ORES, 1) .addToList(r); final Research goodVeins = new Research(new ResourceLocation(Constants.MOD_ID, "technology/goodveins"), TECH).setParentResearch(veinminer) .setTranslatedName("Good Veins") .setIcon(Items.COAL_BLOCK) .addBuildingRequirement(ModBuildings.MINER_ID, 2) - .addItemCost(ItemTags.IRON_ORES, 64) + .addItemCost(ItemTags.IRON_ORES, 64, provider) .addEffect(MORE_ORES, 2) .addToList(r); final Research richVeins = new Research(new ResourceLocation(Constants.MOD_ID, "technology/richveins"), TECH).setParentResearch(goodVeins) .setTranslatedName("Rich Veins") .setIcon(Items.GOLD_BLOCK) .addBuildingRequirement(ModBuildings.BLACKSMITH_ID, 4) - .addItemCost(ItemTags.GOLD_ORES, 32) + .addItemCost(ItemTags.GOLD_ORES, 32, provider) .addEffect(MORE_ORES, 3) .addToList(r); final Research amazingVeins = new Research(new ResourceLocation(Constants.MOD_ID, "technology/amazingveins"), TECH).setParentResearch(richVeins) .setTranslatedName("Amazing Veins") .setIcon(Items.LAPIS_BLOCK) .addBuildingRequirement(ModBuildings.BLACKSMITH_ID, 5) - .addItemCost(ItemTags.GOLD_ORES, 64) + .addItemCost(ItemTags.GOLD_ORES, 64, provider) .addEffect(MORE_ORES, 4) .addToList(r); new Research(new ResourceLocation(Constants.MOD_ID, "technology/motherlode"), TECH).setParentResearch(amazingVeins) .setTranslatedName("Motherlode") .setIcon(Items.DIAMOND_BLOCK) - .addItemCost(ItemTags.DIAMOND_ORES, 64) + .addItemCost(ItemTags.DIAMOND_ORES, 64, provider) .addEffect(MORE_ORES, 5) .addToList(r); @@ -1801,23 +1804,23 @@ public Collection getTechnologyResearch(Collection r) .setTranslatedSubtitle("It's not a rhetorical question...") .setIcon(ModBlocks.blockHutMechanic.asItem()) .addBuildingRequirement(ModBuildings.BLACKSMITH_ID, 3) - .addItemCost(Items.REDSTONE, 64) + .addItemCost(Items.REDSTONE, 64, provider) .addEffect(ModBuildings.mechanic.get().getBuildingBlock(), 1) .addToList(r); final Research enhanced_gates1 = new Research(new ResourceLocation(Constants.MOD_ID, "technology/enhanced_gates1"), TECH).setParentResearch(whatYaNeed) .setTranslatedName("Enhanced Gates I") .setIcon(ModItems.woodgate) - .addItemCost(ModItems.woodgate, 64) - .addItemCost(ModItems.ancientTome, 2) - .addItemCost(Items.IRON_BLOCK, 5) + .addItemCost(ModItems.woodgate, 64, provider) + .addItemCost(ModItems.ancientTome, 2, provider) + .addItemCost(Items.IRON_BLOCK, 5, provider) .addEffect(MECHANIC_ENHANCED_GATES, 1) .addToList(r); new Research(new ResourceLocation(Constants.MOD_ID, "technology/enhanced_gates2"), TECH).setParentResearch(enhanced_gates1) .setTranslatedName("Enhanced Gates II") .setIcon(ModItems.irongate) - .addItemCost(ModItems.irongate, 64) - .addItemCost(ModItems.ancientTome, 2) - .addItemCost(Items.OBSIDIAN, 32) + .addItemCost(ModItems.irongate, 64, provider) + .addItemCost(ModItems.ancientTome, 2, provider) + .addItemCost(Items.OBSIDIAN, 32, provider) .addEffect(MECHANIC_ENHANCED_GATES, 2) .addToList(r); diff --git a/src/main/java/com/minecolonies/core/research/GlobalResearch.java b/src/main/java/com/minecolonies/core/research/GlobalResearch.java index a44cecc03eb..9e5ec2d077e 100644 --- a/src/main/java/com/minecolonies/core/research/GlobalResearch.java +++ b/src/main/java/com/minecolonies/core/research/GlobalResearch.java @@ -3,16 +3,15 @@ import com.google.common.collect.ImmutableList; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.minecolonies.api.IMinecoloniesAPI; import com.minecolonies.api.MinecoloniesAPIProxy; import com.minecolonies.api.research.*; -import com.minecolonies.api.research.costs.IResearchCost; import com.minecolonies.api.research.effects.IResearchEffect; import com.minecolonies.api.research.util.ResearchState; import com.minecolonies.api.util.InventoryUtils; import com.minecolonies.api.util.Log; -import com.minecolonies.core.MineColonies; +import com.minecolonies.api.util.Utils; import net.minecraft.client.Minecraft; +import net.minecraft.core.HolderLookup; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.contents.TranslatableContents; @@ -21,6 +20,7 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import net.neoforged.fml.loading.FMLEnvironment; +import net.neoforged.neoforge.common.crafting.SizedIngredient; import net.neoforged.neoforge.items.IItemHandler; import org.jetbrains.annotations.NotNull; @@ -28,7 +28,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; -import java.util.Optional; import static com.minecolonies.api.research.util.ResearchConstants.MAX_DEPTH; @@ -161,7 +160,7 @@ public class GlobalResearch implements IGlobalResearch /** * The costList of the research. */ - private final List costList = new ArrayList<>(); + private final List costList = new ArrayList<>(); /** * The id of the parent research which has to be completed first. @@ -386,15 +385,16 @@ public boolean hasEnoughResources(final IItemHandler inventory) return true; } - for (final IResearchCost ingredient : costList) + for (final SizedIngredient ingredient : costList) { - int totalCount = 0; - for (final Item cost : ingredient.getItems()) + if (ingredient.ingredient().hasNoItems()) { - final int count = InventoryUtils.getItemCountInItemHandler(inventory, stack -> stack.getItem().equals(cost)); - totalCount += count; + return false; } - if (totalCount < ingredient.getCount()) + + final int requiredCount = ingredient.count(); + final int totalCount = InventoryUtils.getItemCountInItemHandler(inventory, ingredient.ingredient()); + if (totalCount < requiredCount) { return false; } @@ -403,7 +403,7 @@ public boolean hasEnoughResources(final IItemHandler inventory) } @Override - public List getCostList() + public List getCostList() { return ImmutableList.copyOf(costList); } @@ -529,9 +529,9 @@ public void addChild(final ResourceLocation child) } @Override - public void addCost(final IResearchCost cost) + public void addCosts(final List cost) { - costList.add(cost); + costList.addAll(cost); } public void addEffect(final IResearchEffect effect) @@ -577,12 +577,13 @@ public List> getEffects() /** * Parse a Json object into a new GlobalResearch. * - * @param researchJson the json representing the recipe - * @param resourceLocation the json location. - * @param effectCategories a map of effect categories, by id. - * @param checkIcons if icons need to be validated. This can only be performed on the client, and should only need to be done once. + * @param researchJson the json representing the recipe + * @param resourceLocation the json location. + * @param effectCategories a map of effect categories, by id. + * @param checkIcons if icons need to be validated. This can only be performed on the client, and should only need to be done once. + * @param provider registry provider. */ - public GlobalResearch(@NotNull final JsonObject researchJson, final ResourceLocation resourceLocation, final Map effectCategories, final boolean checkIcons) + public GlobalResearch(@NotNull final JsonObject researchJson, final ResourceLocation resourceLocation, final Map effectCategories, final boolean checkIcons, final HolderLookup.Provider provider) { this.id = resourceLocation; final String autogenKey = "com." + this.id.getNamespace() + ".research." + this.id.getPath().replaceAll("[ /]","."); @@ -618,7 +619,7 @@ public GlobalResearch(@NotNull final JsonObject researchJson, final ResourceLoca this.itemIcon = parseIconItemStacks(iconString); } - parseRequirements(researchJson); + parseRequirements(researchJson, provider); parseEffects(researchJson, effectCategories); } @@ -806,8 +807,9 @@ private boolean getBooleanSafe(final JsonObject researchJson, final String prope * Gets the Research Building, Item, and Research requirements, and if present and valid, assigns them in the GlobalResearch. * * @param researchJson A json object to evaluate for requirements properties. + * @param provider Registry provider. */ - private void parseRequirements(final JsonObject researchJson) + private void parseRequirements(final JsonObject researchJson, final HolderLookup.Provider provider) { if (researchJson.has(RESEARCH_REQUIREMENTS_PROP) && researchJson.get(RESEARCH_REQUIREMENTS_PROP).isJsonArray()) { @@ -821,13 +823,15 @@ private void parseRequirements(final JsonObject researchJson) final JsonObject rootObject = reqArrayElement.getAsJsonObject(); // ItemRequirements. If no count, assumes 1x. - if (IMinecoloniesAPI.getInstance().getResearchCostRegistry().entrySet().stream().anyMatch(entry -> entry.getValue().hasCorrectJsonFields(rootObject))) + if (rootObject.has(RESEARCH_ITEM_LIST_PROP) && rootObject.get(RESEARCH_ITEM_LIST_PROP).isJsonArray()) + { + final List ingredients = Utils.deserializeCodecMessFromJson(SizedIngredient.FLAT_CODEC.listOf(), provider, rootObject.get(RESEARCH_ITEM_LIST_PROP)); + costList.addAll(ingredients); + } + else if (rootObject.has(RESEARCH_ITEM_LIST_PROP) && rootObject.get(RESEARCH_ITEM_LIST_PROP).isJsonObject()) { - final Optional cost = IMinecoloniesAPI.getInstance().getResearchCostRegistry().entrySet().stream() - .filter(entry -> entry.getValue().hasCorrectJsonFields(rootObject)) - .map(entry -> entry.getValue().parseFromJson(rootObject)) - .findFirst(); - cost.ifPresent(this.costList::add); + final SizedIngredient ingredient = Utils.deserializeCodecMessFromJson(SizedIngredient.FLAT_CODEC, provider, rootObject.get(RESEARCH_ITEM_LIST_PROP)); + costList.add(ingredient); } // Building Requirements. If no level, assume 1x. else if (rootObject.has(RESEARCH_REQUIRED_BUILDING_PROP) diff --git a/src/main/java/com/minecolonies/core/research/GlobalResearchFactory.java b/src/main/java/com/minecolonies/core/research/GlobalResearchFactory.java index 215c4a3f95f..2ba8e0dbc47 100755 --- a/src/main/java/com/minecolonies/core/research/GlobalResearchFactory.java +++ b/src/main/java/com/minecolonies/core/research/GlobalResearchFactory.java @@ -1,13 +1,10 @@ package com.minecolonies.core.research; import com.google.common.reflect.TypeToken; -import com.minecolonies.api.IMinecoloniesAPI; import com.minecolonies.api.colony.requestsystem.factory.FactoryVoidInput; import com.minecolonies.api.colony.requestsystem.factory.IFactoryController; import com.minecolonies.api.research.IGlobalResearch; import com.minecolonies.api.research.IResearchRequirement; -import com.minecolonies.api.research.ModResearchCostTypes.ResearchCostType; -import com.minecolonies.api.research.costs.IResearchCost; import com.minecolonies.api.research.effects.IResearchEffect; import com.minecolonies.api.research.effects.registry.IResearchEffectRegistry; import com.minecolonies.api.research.factories.IGlobalResearchFactory; @@ -22,15 +19,16 @@ import net.minecraft.nbt.ListTag; import net.minecraft.nbt.Tag; import net.minecraft.network.RegistryFriendlyByteBuf; -import net.minecraft.network.RegistryFriendlyByteBuf; import net.minecraft.network.chat.contents.TranslatableContents; +import net.minecraft.network.codec.ByteBufCodecs; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; +import net.neoforged.neoforge.common.crafting.SizedIngredient; import org.jetbrains.annotations.NotNull; +import java.util.List; import java.util.Objects; -import static com.minecolonies.api.research.ModResearchCostTypes.SIMPLE_ITEM_COST_ID; import static com.minecolonies.api.research.util.ResearchConstants.*; /** @@ -79,14 +77,7 @@ public CompoundTag serialize(@NotNull final HolderLookup.Provider provider, @Not compound.putBoolean(TAG_AUTOSTART, research.isAutostart()); compound.putBoolean(TAG_IMMUTABLE, research.isImmutable()); compound.putBoolean(TAG_HIDDEN, research.isHidden()); - @NotNull final ListTag costTagList = research.getCostList().stream().map(cost -> - { - final CompoundTag costCompound = new CompoundTag(); - costCompound.putString(TAG_COST_TYPE, cost.getType().getId().toString()); - cost.write(costCompound); - return compound; - }).collect(NBTUtils.toListNBT()); - compound.put(TAG_COSTS, costTagList); + compound.put(TAG_COSTS, Utils.serializeCodecMess(SizedIngredient.FLAT_CODEC.listOf(), provider, research.getCostList())); @NotNull final ListTag reqTagList = research.getResearchRequirement().stream().map(req -> { @@ -140,14 +131,8 @@ public IGlobalResearch deserialize(@NotNull final HolderLookup.Provider provider final IGlobalResearch research = getNewInstance(id, branch, parent, desc, depth, sortOrder, iconTexture, iconStack, subtitle, onlyChild, hidden, autostart, instant, immutable); - NBTUtils.streamCompound(nbt.getList(TAG_COSTS, Tag.TAG_COMPOUND)).forEach(compound -> - { - final ResourceLocation res = compound.contains(TAG_COST_TYPE) ? ResourceLocation.parse(compound.getString(TAG_COST_TYPE)) : SIMPLE_ITEM_COST_ID; - final ResearchCostType researchCostType = IMinecoloniesAPI.getInstance().getResearchCostRegistry().get(res); - final IResearchCost instance = researchCostType.createInstance(); - instance.read(compound); - research.addCost(instance); - }); + final List costs = Utils.deserializeCodecMess(SizedIngredient.FLAT_CODEC.listOf(), provider, nbt.get(TAG_COSTS)); + research.addCosts(costs); NBTUtils.streamCompound(nbt.getList(TAG_REQS, Tag.TAG_COMPOUND)). forEach(compound -> research.addRequirement(Objects.requireNonNull(IResearchRequirementRegistry.getInstance() @@ -178,12 +163,7 @@ public void serialize(@NotNull IFactoryController controller, IGlobalResearch in packetBuffer.writeBoolean(input.isAutostart()); packetBuffer.writeBoolean(input.isImmutable()); packetBuffer.writeBoolean(input.isHidden()); - packetBuffer.writeVarInt(input.getCostList().size()); - for (IResearchCost cost : input.getCostList()) - { - packetBuffer.writeById(IMinecoloniesAPI.getInstance().getResearchCostRegistry()::getIdOrThrow, cost.getType()); - cost.serialize(packetBuffer); - } + Utils.serializeCodecMess(SizedIngredient.STREAM_CODEC.apply(ByteBufCodecs.list()), packetBuffer, input.getCostList()); packetBuffer.writeVarInt(input.getResearchRequirement().size()); for (IResearchRequirement req : input.getResearchRequirement()) { @@ -224,14 +204,8 @@ public IGlobalResearch deserialize(@NotNull IFactoryController controller, Regis final IGlobalResearch research = getNewInstance(id, branch, parent, desc, depth, sortOrder,iconTexture, iconStack, subtitle, hasOnlyChild, hidden, autostart, instant, immutable); - final int costSize = buffer.readVarInt(); - for(int i = 0; i < costSize; i++) - { - final ResearchCostType researchCostType = buffer.readById(IMinecoloniesAPI.getInstance().getResearchCostRegistry()::byIdOrThrow); - final IResearchCost cost = researchCostType.createInstance(); - cost.deserialize(buffer); - research.addCost(cost); - } + final List costs = Utils.deserializeCodecMess(SizedIngredient.STREAM_CODEC.apply(ByteBufCodecs.list()), buffer); + research.addCosts(costs); final int reqCount = buffer.readVarInt(); for(int i = 0; i < reqCount; i++) diff --git a/src/main/java/com/minecolonies/core/research/LocalResearchTree.java b/src/main/java/com/minecolonies/core/research/LocalResearchTree.java index 00902af9b9d..7f8b033f2ff 100644 --- a/src/main/java/com/minecolonies/core/research/LocalResearchTree.java +++ b/src/main/java/com/minecolonies/core/research/LocalResearchTree.java @@ -6,7 +6,6 @@ import com.minecolonies.api.colony.requestsystem.StandardFactoryController; import com.minecolonies.api.crafting.ItemStorage; import com.minecolonies.api.research.*; -import com.minecolonies.api.research.costs.IResearchCost; import com.minecolonies.api.research.effects.IResearchEffect; import com.minecolonies.api.research.effects.IResearchEffectManager; import com.minecolonies.api.research.util.ResearchState; @@ -19,7 +18,7 @@ import net.minecraft.network.chat.MutableComponent; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Player; -import net.minecraft.world.item.Item; +import net.neoforged.neoforge.common.crafting.SizedIngredient; import net.neoforged.neoforge.items.wrapper.InvWrapper; import org.jetbrains.annotations.NotNull; @@ -180,20 +179,16 @@ public void attemptBeginResearch(final Player player, final IColony colony, fina } } // We know the player has the items, so now we can remove them safely. - for (IResearchCost cost : research.getCostList()) + for (final SizedIngredient cost : research.getCostList()) { - int toRemoveLeft = cost.getCount(); - - for (Item item : cost.getItems()) + int toRemoveLeft = cost.count(); + final List slotsWithMaterial = InventoryUtils.findAllSlotsInItemHandlerWith(playerInv, cost.ingredient()); + for (Integer slotNum : slotsWithMaterial) { - final List slotsWithMaterial = InventoryUtils.findAllSlotsInItemHandlerWith(playerInv, stack -> stack.getItem().equals(item)); - for (Integer slotNum : slotsWithMaterial) + toRemoveLeft = toRemoveLeft - playerInv.extractItem(slotNum, toRemoveLeft, false).getCount(); + if (toRemoveLeft <= 0) { - toRemoveLeft = toRemoveLeft - playerInv.extractItem(slotNum, toRemoveLeft, false).getCount(); - if (toRemoveLeft <= 0) - { - break; - } + break; } } } diff --git a/src/main/java/com/minecolonies/core/research/costs/ListItemCost.java b/src/main/java/com/minecolonies/core/research/costs/ListItemCost.java deleted file mode 100644 index cadfd107e35..00000000000 --- a/src/main/java/com/minecolonies/core/research/costs/ListItemCost.java +++ /dev/null @@ -1,162 +0,0 @@ -package com.minecolonies.core.research.costs; - -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.minecolonies.api.research.ModResearchCostTypes.ResearchCostType; -import com.minecolonies.api.research.costs.IResearchCost; -import com.minecolonies.api.util.NBTUtils; -import com.minecolonies.core.research.GlobalResearch; -import net.minecraft.core.registries.BuiltInRegistries; -import net.minecraft.nbt.CompoundTag; -import net.minecraft.nbt.ListTag; -import net.minecraft.nbt.Tag; -import net.minecraft.network.RegistryFriendlyByteBuf; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.item.Item; -import org.jetbrains.annotations.NotNull; - -import java.util.ArrayList; -import java.util.List; - -import static com.minecolonies.api.research.util.ResearchConstants.*; -import static com.minecolonies.core.research.GlobalResearch.RESEARCH_ITEM_LIST_PROP; -import static com.minecolonies.core.research.GlobalResearch.RESEARCH_ITEM_NAME_PROP; - -/** - * A plain item cost that takes a list of several items that have to be fulfilled. - */ -public class ListItemCost implements IResearchCost -{ - /** - * The cost type. - */ - private final ResearchCostType type; - - /** - * The count of items. - */ - private int count; - - /** - * The list of items. - */ - private List items; - - /** - * Default constructor. - */ - public ListItemCost(final ResearchCostType type) - { - this.type = type; - } - - @Override - public ResearchCostType getType() - { - return type; - } - - @Override - public int getCount() - { - return this.count; - } - - @Override - public List getItems() - { - return this.items; - } - - @Override - public void read(@NotNull final CompoundTag compound) - { - this.items = NBTUtils.streamCompound(compound.getList(TAG_COST_ITEMS, Tag.TAG_COMPOUND)) - .map(itemCompound -> BuiltInRegistries.ITEM.get(ResourceLocation.parse(itemCompound.getString(TAG_COST_ITEM)))) - .toList(); - this.count = compound.getInt(TAG_COST_COUNT); - } - - @Override - public void write(@NotNull final CompoundTag compound) - { - final ListTag itemList = this.items.stream().map(item -> { - final CompoundTag itemCompound = new CompoundTag(); - itemCompound.putString(TAG_COST_ITEM, BuiltInRegistries.ITEM.getKey(item).toString()); - return itemCompound; - }).collect(NBTUtils.toListNBT()); - compound.put(TAG_COST_ITEMS, itemList); - compound.putInt(TAG_COST_COUNT, this.count); - } - - @Override - public void serialize(final @NotNull RegistryFriendlyByteBuf buf) - { - buf.writeInt(this.count); - buf.writeInt(this.items.size()); - for (final Item item : this.items) - { - buf.writeById(BuiltInRegistries.ITEM::getIdOrThrow, item); - } - } - - @Override - public void deserialize(final @NotNull RegistryFriendlyByteBuf buf) - { - this.count = buf.readInt(); - this.items = new ArrayList<>(); - final int itemCount = buf.readInt(); - for (int i = 0; i < itemCount; i++) - { - this.items.add(buf.readById(BuiltInRegistries.ITEM::byIdOrThrow)); - } - } - - @Override - public boolean hasCorrectJsonFields(final JsonObject jsonObject) - { - return jsonObject.has(RESEARCH_ITEM_NAME_PROP) - && jsonObject.get(RESEARCH_ITEM_NAME_PROP).isJsonObject() - && jsonObject.getAsJsonObject(RESEARCH_ITEM_NAME_PROP).has(RESEARCH_ITEM_LIST_PROP); - } - - @Override - public void parseFromJson(final JsonObject jsonObject) - { - this.items = new ArrayList<>(); - for (JsonElement arrayItem : jsonObject.getAsJsonObject(RESEARCH_ITEM_NAME_PROP).getAsJsonArray(RESEARCH_ITEM_LIST_PROP)) - { - this.items.add(BuiltInRegistries.ITEM.get(ResourceLocation.parse(arrayItem.getAsJsonPrimitive().getAsString()))); - } - this.count = GlobalResearch.parseItemCount(jsonObject); - } - - @Override - public int hashCode() - { - int result = this.count; - result = 31 * result + this.items.hashCode(); - return result; - } - - @Override - public boolean equals(final Object o) - { - if (this == o) - { - return true; - } - if (o == null || getClass() != o.getClass()) - { - return false; - } - - final ListItemCost listItemCost = (ListItemCost) o; - - if (this.count != listItemCost.count) - { - return false; - } - return this.items.equals(listItemCost.items); - } -} diff --git a/src/main/java/com/minecolonies/core/research/costs/SimpleItemCost.java b/src/main/java/com/minecolonies/core/research/costs/SimpleItemCost.java deleted file mode 100644 index 3537c11210c..00000000000 --- a/src/main/java/com/minecolonies/core/research/costs/SimpleItemCost.java +++ /dev/null @@ -1,140 +0,0 @@ -package com.minecolonies.core.research.costs; - -import com.google.gson.JsonObject; -import com.minecolonies.api.research.ModResearchCostTypes.ResearchCostType; -import com.minecolonies.api.research.costs.IResearchCost; -import com.minecolonies.api.util.Utils; -import com.minecolonies.core.research.GlobalResearch; -import net.minecraft.core.HolderLookup; -import net.minecraft.core.component.DataComponentPatch; -import net.minecraft.core.registries.BuiltInRegistries; -import net.minecraft.nbt.CompoundTag; -import net.minecraft.network.RegistryFriendlyByteBuf; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.item.Item; -import net.minecraft.world.item.ItemStack; -import org.jetbrains.annotations.NotNull; - -import java.util.List; - -import static com.minecolonies.api.research.util.ResearchConstants.*; -import static com.minecolonies.core.research.GlobalResearch.RESEARCH_ITEM_NAME_PROP; - -/** - * A simple item cost which contains a singular item. - */ -public class SimpleItemCost implements IResearchCost -{ - /** - * The cost type. - */ - private final ResearchCostType type; - - /** - * The count of items. - */ - private int count; - - /** - * The item. - */ - private Item item; - - /** - * Default constructor. - */ - public SimpleItemCost(final ResearchCostType type) - { - this.type = type; - } - - @Override - public ResearchCostType getType() - { - return type; - } - - @Override - public int getCount() - { - return count; - } - - @Override - public List getItems() - { - return List.of(item); - } - - @Override - public void read(final @NotNull CompoundTag compound) - { - this.item = BuiltInRegistries.ITEM.get(ResourceLocation.parse(compound.getString(TAG_COST_ITEM))); - this.count = compound.getInt(TAG_COST_COUNT); - } - - @Override - public void write(final @NotNull CompoundTag compound) - { - compound.putString(TAG_COST_ITEM, BuiltInRegistries.ITEM.getKey(this.item).toString()); - compound.putInt(TAG_COST_COUNT, this.count); - } - - @Override - public void serialize(final @NotNull RegistryFriendlyByteBuf buf) - { - buf.writeInt(this.count); - buf.writeById(BuiltInRegistries.ITEM::getIdOrThrow, this.item); - } - - @Override - public void deserialize(final @NotNull RegistryFriendlyByteBuf buf) - { - this.count = buf.readInt(); - this.item = buf.readById(BuiltInRegistries.ITEM::byIdOrThrow); - } - - @Override - public boolean hasCorrectJsonFields(final JsonObject jsonObject) - { - return jsonObject.has(RESEARCH_ITEM_NAME_PROP) - && jsonObject.get(RESEARCH_ITEM_NAME_PROP).isJsonPrimitive() - && jsonObject.getAsJsonPrimitive(RESEARCH_ITEM_NAME_PROP).isString(); - } - - @Override - public void parseFromJson(final JsonObject jsonObject) - { - this.item = BuiltInRegistries.ITEM.get(ResourceLocation.parse(jsonObject.getAsJsonPrimitive(RESEARCH_ITEM_NAME_PROP).getAsString())); - this.count = GlobalResearch.parseItemCount(jsonObject); - } - - @Override - public int hashCode() - { - int result = this.count; - result = 31 * result + this.item.hashCode(); - return result; - } - - @Override - public boolean equals(final Object o) - { - if (this == o) - { - return true; - } - if (o == null || getClass() != o.getClass()) - { - return false; - } - - final SimpleItemCost that = (SimpleItemCost) o; - - if (this.count != that.count) - { - return false; - } - return this.item.equals(that.item); - } -} diff --git a/src/main/java/com/minecolonies/core/research/costs/TagItemCost.java b/src/main/java/com/minecolonies/core/research/costs/TagItemCost.java deleted file mode 100644 index 005cbb16cb0..00000000000 --- a/src/main/java/com/minecolonies/core/research/costs/TagItemCost.java +++ /dev/null @@ -1,150 +0,0 @@ -package com.minecolonies.core.research.costs; - -import com.google.gson.JsonObject; -import com.minecolonies.api.research.ModResearchCostTypes.ResearchCostType; -import com.minecolonies.api.research.costs.IResearchCost; -import com.minecolonies.core.research.GlobalResearch; -import net.minecraft.core.Holder; -import net.minecraft.core.registries.BuiltInRegistries; -import net.minecraft.core.registries.Registries; -import net.minecraft.nbt.CompoundTag; -import net.minecraft.network.RegistryFriendlyByteBuf; -import net.minecraft.network.chat.Component; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.tags.TagKey; -import net.minecraft.world.item.Item; -import org.jetbrains.annotations.NotNull; - -import java.util.Collections; -import java.util.List; - -import static com.minecolonies.api.research.util.ResearchConstants.TAG_COST_COUNT; -import static com.minecolonies.api.research.util.ResearchConstants.TAG_COST_TAG; -import static com.minecolonies.core.research.GlobalResearch.RESEARCH_ITEM_NAME_PROP; -import static com.minecolonies.core.research.GlobalResearch.RESEARCH_ITEM_TAG_PROP; - -/** - * A plain item cost that takes a list of several items that have to be fulfilled. - */ -public class TagItemCost implements IResearchCost -{ - /** - * The cost type. - */ - private final ResearchCostType type; - - /** - * The count of items. - */ - private int count; - - /** - * The tag which contains all possible items. - */ - private TagKey tag; - - /** - * Default constructor. - */ - public TagItemCost(final ResearchCostType type) - { - this.type = type; - } - - @Override - public ResearchCostType getType() - { - return type; - } - - @Override - public int getCount() - { - return this.count; - } - - @Override - public List getItems() - { - return BuiltInRegistries.ITEM.getTag(this.tag).map(holders -> holders.stream().map(Holder::value).toList()).orElseGet(Collections::emptyList); - } - - @Override - public Component getTranslatedName() - { - return Component.translatableEscape(String.format("com.minecolonies.coremod.research.tags.%s", this.tag.location())); - } - - @Override - public void read(final @NotNull CompoundTag compound) - { - this.count = compound.getInt(TAG_COST_COUNT); - this.tag = TagKey.create(Registries.ITEM, ResourceLocation.parse(compound.getString(TAG_COST_TAG))); - } - - @Override - public void write(final @NotNull CompoundTag compound) - { - compound.putInt(TAG_COST_COUNT, this.count); - compound.putString(TAG_COST_TAG, this.tag.location().toString()); - } - - @Override - public void serialize(final @NotNull RegistryFriendlyByteBuf buf) - { - buf.writeInt(this.count); - buf.writeResourceLocation(this.tag.location()); - } - - @Override - public void deserialize(final @NotNull RegistryFriendlyByteBuf buf) - { - this.count = buf.readInt(); - this.tag = TagKey.create(Registries.ITEM, buf.readResourceLocation()); - } - - @Override - public boolean hasCorrectJsonFields(final JsonObject jsonObject) - { - return jsonObject.getAsJsonObject().has(RESEARCH_ITEM_NAME_PROP) - && jsonObject.getAsJsonObject().get(RESEARCH_ITEM_NAME_PROP).isJsonObject() - && jsonObject.getAsJsonObject().getAsJsonObject(RESEARCH_ITEM_NAME_PROP).has(RESEARCH_ITEM_TAG_PROP); - } - - @Override - public void parseFromJson(final JsonObject jsonObject) - { - final String tagKey = jsonObject.getAsJsonObject(RESEARCH_ITEM_NAME_PROP).getAsJsonPrimitive(RESEARCH_ITEM_TAG_PROP).getAsString(); - this.tag = TagKey.create(Registries.ITEM, ResourceLocation.parse(tagKey)); - this.count = GlobalResearch.parseItemCount(jsonObject); - } - - @Override - public int hashCode() - { - int result = this.count; - result = 31 * result + this.tag.hashCode(); - return result; - } - - @Override - public boolean equals(final Object o) - { - if (this == o) - { - return true; - } - if (o == null || getClass() != o.getClass()) - { - return false; - } - - final TagItemCost that = (TagItemCost) o; - - if (this.count != that.count) - { - return false; - } - return this.tag.equals(that.tag); - } -} diff --git a/src/main/resources/assets/minecolonies/lang/manual_en_us.json b/src/main/resources/assets/minecolonies/lang/manual_en_us.json index 3efc484fb08..1938aed1da1 100644 --- a/src/main/resources/assets/minecolonies/lang/manual_en_us.json +++ b/src/main/resources/assets/minecolonies/lang/manual_en_us.json @@ -1411,7 +1411,7 @@ "com.minecolonies.coremod.research.requirement.university.level": "Requires University Level %d", "com.minecolonies.coremod.research.limit.onemaxperbranch": "Only one max-level research can be unlocked per branch.", "com.minecolonies.coremod.research.limit.immutable": "This research cannot be undone.", - "com.minecolonies.coremod.research.limit.requirement": "Requirement : %s %s", + "com.minecolonies.coremod.research.limit.cost": "Cost : %s", "com.minecolonies.coremod.research.effect.modifier.multiplication": "%s by %d percent", "com.minecolonies.coremod.research.effect.modifier.addition": "%s + %d", "com.minecolonies.coremod.research.effect.unlock": "Unlocks %s", @@ -1438,6 +1438,7 @@ "com.minecolonies.coremod.research.tags.minecraft:iron_ores": "Any Iron Ore", "com.minecolonies.coremod.research.tags.minecraft:gold_ores": "Any Gold Ore", "com.minecolonies.coremod.research.tags.minecraft:diamond_ores": "Any Diamond Ore", + "com.minecolonies.coremod.research.tags.other": "Any %s", "com.minecolonies.coremod.info.builder.0.name": "Introduction", "com.minecolonies.coremod.info.builder.0": "The Builder is the heart of your colony. Without them, you wouldn't be able to get anything done!\n Every hut worker has to have their building built to at least level 1 before they can do anything, except the Builder. If the Builder has a hut at level 0 (no hut), they can only build one thing, their own hut.\n\n For your Builder to build, upgrade, reposition, or repair a hut that isn't their own, their hut must be at least the same level as the other hut. For example, the Builder's Hut must be level 3 or above to build a level 3 hut.", "com.minecolonies.coremod.info.builder.1.name": "Restrictions",