| 1 | package net.minecraft.world.item.trading;
|
| 2 |
|
| 3 | import java.util.ArrayList;
|
| 4 | import java.util.List;
|
| 5 | import java.util.Optional;
|
| 6 | import net.minecraft.advancements.predicates.DataComponentMatchers;
|
| 7 | import net.minecraft.advancements.predicates.EnchantmentPredicate;
|
| 8 | import net.minecraft.advancements.predicates.ItemPredicate;
|
| 9 | import net.minecraft.advancements.predicates.MinMaxBounds;
|
| 10 | import net.minecraft.advancements.predicates.entity.EntityPredicate;
|
| 11 | import net.minecraft.core.Holder;
|
| 12 | import net.minecraft.core.HolderGetter;
|
| 13 | import net.minecraft.core.HolderSet;
|
| 14 | import net.minecraft.core.component.DataComponentExactPredicate;
|
| 15 | import net.minecraft.core.component.DataComponents;
|
| 16 | import net.minecraft.core.component.predicates.DataComponentPredicates;
|
| 17 | import net.minecraft.core.component.predicates.EnchantmentsPredicate;
|
| 18 | import net.minecraft.core.component.predicates.VillagerTypePredicate;
|
| 19 | import net.minecraft.core.registries.Registries;
|
| 20 | import net.minecraft.data.worldgen.BootstrapContext;
|
| 21 | import net.minecraft.resources.Identifier;
|
| 22 | import net.minecraft.resources.ResourceKey;
|
| 23 | import net.minecraft.tags.EnchantmentTags;
|
| 24 | import net.minecraft.tags.PotionTags;
|
| 25 | import net.minecraft.tags.StructureTags;
|
| 26 | import net.minecraft.tags.TagKey;
|
| 27 | import net.minecraft.world.effect.MobEffects;
|
| 28 | import net.minecraft.world.entity.npc.villager.VillagerType;
|
| 29 | import net.minecraft.world.item.Item;
|
| 30 | import net.minecraft.world.item.ItemStackTemplate;
|
| 31 | import net.minecraft.world.item.Items;
|
| 32 | import net.minecraft.world.item.alchemy.Potion;
|
| 33 | import net.minecraft.world.item.alchemy.PotionContents;
|
| 34 | import net.minecraft.world.item.alchemy.Potions;
|
| 35 | import net.minecraft.world.item.enchantment.Enchantment;
|
| 36 | import net.minecraft.world.level.block.ColorCollection;
|
| 37 | import net.minecraft.world.level.levelgen.structure.Structure;
|
| 38 | import net.minecraft.world.level.saveddata.maps.MapDecorationType;
|
| 39 | import net.minecraft.world.level.saveddata.maps.MapDecorationTypes;
|
| 40 | import net.minecraft.world.level.storage.loot.LootContext;
|
| 41 | import net.minecraft.world.level.storage.loot.functions.DiscardItem;
|
| 42 | import net.minecraft.world.level.storage.loot.functions.EnchantRandomlyFunction;
|
| 43 | import net.minecraft.world.level.storage.loot.functions.EnchantWithLevelsFunction;
|
| 44 | import net.minecraft.world.level.storage.loot.functions.ExplorationMapFunction;
|
| 45 | import net.minecraft.world.level.storage.loot.functions.FilteredFunction;
|
| 46 | import net.minecraft.world.level.storage.loot.functions.LootItemFunction;
|
| 47 | import net.minecraft.world.level.storage.loot.functions.SetEnchantmentsFunction;
|
| 48 | import net.minecraft.world.level.storage.loot.functions.SetPotionFunction;
|
| 49 | import net.minecraft.world.level.storage.loot.functions.SetRandomDyesFunction;
|
| 50 | import net.minecraft.world.level.storage.loot.functions.SetRandomPotionFunction;
|
| 51 | import net.minecraft.world.level.storage.loot.functions.SetStewEffectFunction;
|
| 52 | import net.minecraft.world.level.storage.loot.predicates.LootItemCondition;
|
| 53 | import net.minecraft.world.level.storage.loot.predicates.LootItemEntityPropertyCondition;
|
| 54 | import net.minecraft.world.level.storage.loot.providers.number.ints.ContextIntProviders;
|
| 55 |
|
| 56 | public class VillagerTrades {
|
| 57 | public static final ResourceKey<VillagerTrade> FARMER_1_WHEAT_EMERALD = resourceKey("farmer/1/wheat_emerald");
|
| 58 | public static final ResourceKey<VillagerTrade> FARMER_1_POTATO_EMERALD = resourceKey("farmer/1/potato_emerald");
|
| 59 | public static final ResourceKey<VillagerTrade> FARMER_1_CARROT_EMERALD = resourceKey("farmer/1/carrot_emerald");
|
| 60 | public static final ResourceKey<VillagerTrade> FARMER_1_BEETROOT_EMERALD = resourceKey("farmer/1/beetroot_emerald");
|
| 61 | public static final ResourceKey<VillagerTrade> FARMER_1_EMERALD_BREAD = resourceKey("farmer/1/emerald_bread");
|
| 62 | public static final ResourceKey<VillagerTrade> FARMER_2_PUMPKIN_EMERALD = resourceKey("farmer/2/pumpkin_emerald");
|
| 63 | public static final ResourceKey<VillagerTrade> FARMER_2_EMERALD_PUMPKIN_PIE = resourceKey("farmer/2/emerald_pumpkin_pie");
|
| 64 | public static final ResourceKey<VillagerTrade> FARMER_2_EMERALD_APPLE = resourceKey("farmer/2/emerald_apple");
|
| 65 | public static final ResourceKey<VillagerTrade> FARMER_3_EMERALD_COOKIE = resourceKey("farmer/3/emerald_cookie");
|
| 66 | public static final ResourceKey<VillagerTrade> FARMER_3_MELON_EMERALD = resourceKey("farmer/3/melon_emerald");
|
| 67 | public static final ResourceKey<VillagerTrade> FARMER_4_EMERALD_CAKE = resourceKey("farmer/4/emerald_cake");
|
| 68 | public static final ResourceKey<VillagerTrade> FARMER_4_EMERALD_SUSPICIOUS_STEW = resourceKey("farmer/4/emerald_suspicious_stew");
|
| 69 | public static final ResourceKey<VillagerTrade> FARMER_5_EMERALD_GOLDEN_CARROT = resourceKey("farmer/5/emerald_golden_carrot");
|
| 70 | public static final ResourceKey<VillagerTrade> FARMER_5_EMERALD_GLISTENING_MELON_SLICE = resourceKey("farmer/5/emerald_glistening_melon_slice");
|
| 71 | public static final ResourceKey<VillagerTrade> FISHERMAN_1_STRING_EMERALD = resourceKey("fisherman/1/string_emerald");
|
| 72 | public static final ResourceKey<VillagerTrade> FISHERMAN_1_COAL_EMERALD = resourceKey("fisherman/1/coal_emerald");
|
| 73 | public static final ResourceKey<VillagerTrade> FISHERMAN_1_RAW_COD_AND_EMERALD_COOKED_COD = resourceKey("fisherman/1/raw_cod_and_emerald_cooked_cod");
|
| 74 | public static final ResourceKey<VillagerTrade> FISHERMAN_1_EMERALD_COD_BUCKET = resourceKey("fisherman/1/emerald_cod_bucket");
|
| 75 | public static final ResourceKey<VillagerTrade> FISHERMAN_2_COD_EMERALD = resourceKey("fisherman/2/cod_emerald");
|
| 76 | public static final ResourceKey<VillagerTrade> FISHERMAN_2_SALMON_AND_EMERALD_COOKED_SALMON = resourceKey("fisherman/2/salmon_and_emerald_cooked_salmon");
|
| 77 | public static final ResourceKey<VillagerTrade> FISHERMAN_2_EMERALD_CAMPFIRE = resourceKey("fisherman/2/emerald_campfire");
|
| 78 | public static final ResourceKey<VillagerTrade> FISHERMAN_3_SALMON_EMERALD = resourceKey("fisherman/3/salmon_emerald");
|
| 79 | public static final ResourceKey<VillagerTrade> FISHERMAN_3_EMERALD_ENCHANTED_FISHING_ROD = resourceKey("fisherman/3/emerald_enchanted_fishing_rod");
|
| 80 | public static final ResourceKey<VillagerTrade> FISHERMAN_4_TROPICAL_FISH_EMERALD = resourceKey("fisherman/4/tropical_fish_emerald");
|
| 81 | public static final ResourceKey<VillagerTrade> FISHERMAN_5_PUFFERFISH_EMERALD = resourceKey("fisherman/5/pufferfish_emerald");
|
| 82 | public static final ResourceKey<VillagerTrade> FISHERMAN_5_OAK_BOAT_EMERALD = resourceKey("fisherman/5/oak_boat_emerald");
|
| 83 | public static final ResourceKey<VillagerTrade> FISHERMAN_5_SPRUCE_BOAT_EMERALD = resourceKey("fisherman/5/spruce_boat_emerald");
|
| 84 | public static final ResourceKey<VillagerTrade> FISHERMAN_5_JUNGLE_BOAT_EMERALD = resourceKey("fisherman/5/jungle_boat_emerald");
|
| 85 | public static final ResourceKey<VillagerTrade> FISHERMAN_5_ACACIA_BOAT_EMERALD = resourceKey("fisherman/5/acacia_boat_emerald");
|
| 86 | public static final ResourceKey<VillagerTrade> FISHERMAN_5_DARK_OAK_BOAT_EMERALD = resourceKey("fisherman/5/dark_oak_boat_emerald");
|
| 87 | public static final ResourceKey<VillagerTrade> SHEPHERD_1_WHITE_WOOL_EMERALD = resourceKey("shepherd/1/white_wool_emerald");
|
| 88 | public static final ResourceKey<VillagerTrade> SHEPHERD_1_BROWN_WOOL_EMERALD = resourceKey("shepherd/1/brown_wool_emerald");
|
| 89 | public static final ResourceKey<VillagerTrade> SHEPHERD_1_GRAY_WOOL_EMERALD = resourceKey("shepherd/1/gray_wool_emerald");
|
| 90 | public static final ResourceKey<VillagerTrade> SHEPHERD_1_BLACK_WOOL_EMERALD = resourceKey("shepherd/1/black_wool_emerald");
|
| 91 | public static final ResourceKey<VillagerTrade> SHEPHERD_1_EMERALD_SHEARS = resourceKey("shepherd/1/emerald_shears");
|
| 92 | public static final ResourceKey<VillagerTrade> SHEPHERD_2_WHITE_DYE_EMERALD = resourceKey("shepherd/2/white_dye_emerald");
|
| 93 | public static final ResourceKey<VillagerTrade> SHEPHERD_2_GRAY_DYE_EMERALD = resourceKey("shepherd/2/gray_dye_emerald");
|
| 94 | public static final ResourceKey<VillagerTrade> SHEPHERD_2_BLACK_DYE_EMERALD = resourceKey("shepherd/2/black_dye_emerald");
|
| 95 | public static final ResourceKey<VillagerTrade> SHEPHERD_2_LIGHT_BLUE_DYE_EMERALD = resourceKey("shepherd/2/light_blue_dye_emerald");
|
| 96 | public static final ResourceKey<VillagerTrade> SHEPHERD_2_LIME_DYE_EMERALD = resourceKey("shepherd/2/lime_dye_emerald");
|
| 97 | public static final ColorCollection<ResourceKey<VillagerTrade>> SHEPHERD_2_EMERALD_WOOL = ColorCollection.NAMES
|
| 98 | .map(color -> resourceKey("shepherd/2/emerald_" + color + "_wool"));
|
| 99 | public static final ColorCollection<ResourceKey<VillagerTrade>> SHEPHERD_2_EMERALD_CARPETS = ColorCollection.NAMES
|
| 100 | .map(color -> resourceKey("shepherd/2/emerald_" + color + "_carpet"));
|
| 101 | public static final ResourceKey<VillagerTrade> SHEPHERD_3_YELLOW_DYE_EMERALD = resourceKey("shepherd/3/yellow_dye_emerald");
|
| 102 | public static final ResourceKey<VillagerTrade> SHEPHERD_3_LIGHT_GRAY_DYE_EMERALD = resourceKey("shepherd/3/light_gray_dye_emerald");
|
| 103 | public static final ResourceKey<VillagerTrade> SHEPHERD_3_ORANGE_DYE_EMERALD = resourceKey("shepherd/3/orange_dye_emerald");
|
| 104 | public static final ResourceKey<VillagerTrade> SHEPHERD_3_RED_DYE_EMERALD = resourceKey("shepherd/3/red_dye_emerald");
|
| 105 | public static final ResourceKey<VillagerTrade> SHEPHERD_3_PINK_DYE_EMERALD = resourceKey("shepherd/3/pink_dye_emerald");
|
| 106 | public static final ColorCollection<ResourceKey<VillagerTrade>> SHEPHERD_3_EMERALD_BED = ColorCollection.NAMES
|
| 107 | .map(color -> resourceKey("shepherd/3/emerald_" + color + "_bed"));
|
| 108 | public static final ResourceKey<VillagerTrade> SHEPHERD_4_BROWN_DYE_EMERALD = resourceKey("shepherd/4/brown_dye_emerald");
|
| 109 | public static final ResourceKey<VillagerTrade> SHEPHERD_4_PURPLE_DYE_EMERALD = resourceKey("shepherd/4/purple_dye_emerald");
|
| 110 | public static final ResourceKey<VillagerTrade> SHEPHERD_4_BLUE_DYE_EMERALD = resourceKey("shepherd/4/blue_dye_emerald");
|
| 111 | public static final ResourceKey<VillagerTrade> SHEPHERD_4_GREEN_DYE_EMERALD = resourceKey("shepherd/4/green_dye_emerald");
|
| 112 | public static final ResourceKey<VillagerTrade> SHEPHERD_4_MAGENTA_DYE_EMERALD = resourceKey("shepherd/4/magenta_dye_emerald");
|
| 113 | public static final ResourceKey<VillagerTrade> SHEPHERD_4_CYAN_DYE_EMERALD = resourceKey("shepherd/4/cyan_dye_emerald");
|
| 114 | public static final ColorCollection<ResourceKey<VillagerTrade>> SHEPHERD_4_EMERALD_BANNER = ColorCollection.NAMES
|
| 115 | .map(color -> resourceKey("shepherd/4/emerald_" + color + "_banner"));
|
| 116 | public static final ResourceKey<VillagerTrade> SHEPHERD_5_EMERALD_PAINTING = resourceKey("shepherd/5/emerald_painting");
|
| 117 | public static final ResourceKey<VillagerTrade> FLETCHER_1_STICK_EMERALD = resourceKey("fletcher/1/stick_emerald");
|
| 118 | public static final ResourceKey<VillagerTrade> FLETCHER_1_EMERALD_ARROW = resourceKey("fletcher/1/emerald_arrow");
|
| 119 | public static final ResourceKey<VillagerTrade> FLETCHER_1_GRAVEL_AND_EMERALD_FLINT = resourceKey("fletcher/1/gravel_and_emerald_flint");
|
| 120 | public static final ResourceKey<VillagerTrade> FLETCHER_2_FLINT_EMERALD = resourceKey("fletcher/2/flint_emerald");
|
| 121 | public static final ResourceKey<VillagerTrade> FLETCHER_2_EMERALD_BOW = resourceKey("fletcher/2/emerald_bow");
|
| 122 | public static final ResourceKey<VillagerTrade> FLETCHER_3_STRING_EMERALD = resourceKey("fletcher/3/string_emerald");
|
| 123 | public static final ResourceKey<VillagerTrade> FLETCHER_3_EMERALD_CROSSBOW = resourceKey("fletcher/3/emerald_crossbow");
|
| 124 | public static final ResourceKey<VillagerTrade> FLETCHER_4_FEATHER_EMERALD = resourceKey("fletcher/4/feather_emerald");
|
| 125 | public static final ResourceKey<VillagerTrade> FLETCHER_4_EMERALD_ENCHANTED_BOW = resourceKey("fletcher/4/emerald_enchanted_bow");
|
| 126 | public static final ResourceKey<VillagerTrade> FLETCHER_5_TRIPWIRE_HOOK_EMERALD = resourceKey("fletcher/5/tripwire_hook_emerald");
|
| 127 | public static final ResourceKey<VillagerTrade> FLETCHER_5_EMERALD_ENCHANTED_CROSSBOW = resourceKey("fletcher/5/emerald_enchanted_crossbow");
|
| 128 | public static final ResourceKey<VillagerTrade> FLETCHER_5_ARROW_AND_EMERALD_TIPPED_ARROW = resourceKey("fletcher/5/arrow_and_emerald_tipped_arrow");
|
| 129 | public static final ResourceKey<VillagerTrade> LIBRARIAN_1_PAPER_EMERALD = resourceKey("librarian/1/paper_emerald");
|
| 130 | public static final ResourceKey<VillagerTrade> LIBRARIAN_1_EMERALD_AND_BOOK_ENCHANTED_BOOK = resourceKey("librarian/1/emerald_and_book_enchanted_book");
|
| 131 | public static final ResourceKey<VillagerTrade> LIBRARIAN_1_EMERALD_BOOKSHELF = resourceKey("librarian/1/emerald_bookshelf");
|
| 132 | public static final ResourceKey<VillagerTrade> LIBRARIAN_2_BOOK_EMERALD = resourceKey("librarian/2/book_emerald");
|
| 133 | public static final ResourceKey<VillagerTrade> LIBRARIAN_2_EMERALD_AND_BOOK_ENCHANTED_BOOK = resourceKey("librarian/2/emerald_and_book_enchanted_book");
|
| 134 | public static final ResourceKey<VillagerTrade> LIBRARIAN_2_EMERALD_LANTERN = resourceKey("librarian/2/emerald_lantern");
|
| 135 | public static final ResourceKey<VillagerTrade> LIBRARIAN_3_INK_SAC_EMERALD = resourceKey("librarian/3/ink_sac_emerald");
|
| 136 | public static final ResourceKey<VillagerTrade> LIBRARIAN_3_EMERALD_AND_BOOK_ENCHANTED_BOOK = resourceKey("librarian/3/emerald_and_book_enchanted_book");
|
| 137 | public static final ResourceKey<VillagerTrade> LIBRARIAN_3_EMERALD_GLASS = resourceKey("librarian/3/emerald_glass");
|
| 138 | public static final ResourceKey<VillagerTrade> LIBRARIAN_4_WRITABLE_BOOK_EMERALD = resourceKey("librarian/4/writable_book_emerald");
|
| 139 | public static final ResourceKey<VillagerTrade> LIBRARIAN_4_EMERALD_AND_BOOK_ENCHANTED_BOOK = resourceKey("librarian/4/emerald_book_and_enchanted_book");
|
| 140 | public static final ResourceKey<VillagerTrade> LIBRARIAN_4_EMERALD_CLOCK = resourceKey("librarian/4/emerald_clock");
|
| 141 | public static final ResourceKey<VillagerTrade> LIBRARIAN_4_EMERALD_COMPASS = resourceKey("librarian/4/emerald_compass");
|
| 142 | public static final ResourceKey<VillagerTrade> LIBRARIAN_5_EMERALD_YELLOW_CANDLE = resourceKey("librarian/5/emerald_yellow_candle");
|
| 143 | public static final ResourceKey<VillagerTrade> LIBRARIAN_5_EMERALD_RED_CANDLE = resourceKey("librarian/5/emerald_red_candle");
|
| 144 | public static final ResourceKey<VillagerTrade> CARTOGRAPHER_1_PAPER_EMERALD = resourceKey("cartographer/1/paper_emerald");
|
| 145 | public static final ResourceKey<VillagerTrade> CARTOGRAPHER_1_EMERALD_MAP = resourceKey("cartographer/1/emerald_map");
|
| 146 | public static final ResourceKey<VillagerTrade> CARTOGRAPHER_2_GLASS_PANE_EMERALD = resourceKey("cartographer/2/glass_pane_emerald");
|
| 147 | public static final ResourceKey<VillagerTrade> CARTOGRAPHER_2_EMERALD_AND_COMPASS_VILLAGE_TAIGA_MAP = resourceKey(
|
| 148 | "cartographer/2/emerald_and_compass_village_taiga_map"
|
| 149 | );
|
| 150 | public static final ResourceKey<VillagerTrade> CARTOGRAPHER_2_EMERALD_AND_COMPASS_EXPLORER_SWAMP_MAP = resourceKey(
|
| 151 | "cartographer/2/emerald_and_compass_explorer_swamp_map"
|
| 152 | );
|
| 153 | public static final ResourceKey<VillagerTrade> CARTOGRAPHER_2_EMERALD_AND_COMPASS_VILLAGE_SNOWY_MAP = resourceKey(
|
| 154 | "cartographer/2/emerald_and_compass_village_snowy_map"
|
| 155 | );
|
| 156 | public static final ResourceKey<VillagerTrade> CARTOGRAPHER_2_EMERALD_AND_COMPASS_VILLAGE_SAVANNA_MAP = resourceKey(
|
| 157 | "cartographer/2/emerald_and_compass_village_savanna_map"
|
| 158 | );
|
| 159 | public static final ResourceKey<VillagerTrade> CARTOGRAPHER_2_EMERALD_AND_COMPASS_VILLAGE_PLAINS_MAP = resourceKey(
|
| 160 | "cartographer/2/emerald_and_compass_village_plains_map"
|
| 161 | );
|
| 162 | public static final ResourceKey<VillagerTrade> CARTOGRAPHER_2_EMERALD_AND_COMPASS_EXPLORER_JUNGLE_MAP = resourceKey(
|
| 163 | "cartographer/2/emerald_and_compass_explorer_jungle_map"
|
| 164 | );
|
| 165 | public static final ResourceKey<VillagerTrade> CARTOGRAPHER_2_EMERALD_AND_COMPASS_VILLAGE_DESERT_MAP = resourceKey(
|
| 166 | "cartographer/2/emerald_and_compass_village_desert_map"
|
| 167 | );
|
| 168 | public static final ResourceKey<VillagerTrade> CARTOGRAPHER_3_COMPASS_EMERALD = resourceKey("cartographer/3/compass_emerald");
|
| 169 | public static final ResourceKey<VillagerTrade> CARTOGRAPHER_3_EMERALD_AND_COMPASS_OCEAN_MONUMENT_MAP = resourceKey(
|
| 170 | "cartographer/3/emerald_and_compass_ocean_monument_map"
|
| 171 | );
|
| 172 | public static final ResourceKey<VillagerTrade> CARTOGRAPHER_3_EMERALD_AND_COMPASS_BURIED_TRIAL_CHAMBERS_MAP = resourceKey(
|
| 173 | "cartographer/3/emerald_and_compass_buried_trial_chambers_map"
|
| 174 | );
|
| 175 | public static final ResourceKey<VillagerTrade> CARTOGRAPHER_4_EMERALD_ITEM_FRAME = resourceKey("cartographer/4/emerald_item_frame");
|
| 176 | public static final ResourceKey<VillagerTrade> CARTOGRAPHER_4_EMERALD_WHITE_BANNER = resourceKey("cartographer/4/emerald_white_banner");
|
| 177 | public static final ResourceKey<VillagerTrade> CARTOGRAPHER_4_EMERALD_ORANGE_BANNER = resourceKey("cartographer/4/emerald_orange_banner");
|
| 178 | public static final ResourceKey<VillagerTrade> CARTOGRAPHER_4_EMERALD_MAGENTA_BANNER = resourceKey("cartographer/4/emerald_magenta_banner");
|
| 179 | public static final ResourceKey<VillagerTrade> CARTOGRAPHER_4_EMERALD_BLUE_BANNER = resourceKey("cartographer/4/emerald_blue_banner");
|
| 180 | public static final ResourceKey<VillagerTrade> CARTOGRAPHER_4_EMERALD_LIGHT_BLUE_BANNER = resourceKey("cartographer/4/emerald_light_blue_banner");
|
| 181 | public static final ResourceKey<VillagerTrade> CARTOGRAPHER_4_EMERALD_YELLOW_BANNER = resourceKey("cartographer/4/emerald_yellow_banner");
|
| 182 | public static final ResourceKey<VillagerTrade> CARTOGRAPHER_4_EMERALD_LIME_BANNER = resourceKey("cartographer/4/emerald_lime_banner");
|
| 183 | public static final ResourceKey<VillagerTrade> CARTOGRAPHER_4_EMERALD_PINK_BANNER = resourceKey("cartographer/4/emerald_pink_banner");
|
| 184 | public static final ResourceKey<VillagerTrade> CARTOGRAPHER_4_EMERALD_GRAY_BANNER = resourceKey("cartographer/4/emerald_gray_banner");
|
| 185 | public static final ResourceKey<VillagerTrade> CARTOGRAPHER_4_EMERALD_CYAN_BANNER = resourceKey("cartographer/4/emerald_cyan_banner");
|
| 186 | public static final ResourceKey<VillagerTrade> CARTOGRAPHER_4_EMERALD_PURPLE_BANNER = resourceKey("cartographer/4/emerald_purple_banner");
|
| 187 | public static final ResourceKey<VillagerTrade> CARTOGRAPHER_4_EMERALD_BROWN_BANNER = resourceKey("cartographer/4/emerald_brown_banner");
|
| 188 | public static final ResourceKey<VillagerTrade> CARTOGRAPHER_4_EMERALD_GREEN_BANNER = resourceKey("cartographer/4/emerald_green_banner");
|
| 189 | public static final ResourceKey<VillagerTrade> CARTOGRAPHER_4_EMERALD_RED_BANNER = resourceKey("cartographer/4/emerald_red_banner");
|
| 190 | public static final ResourceKey<VillagerTrade> CARTOGRAPHER_4_EMERALD_BLACK_BANNER = resourceKey("cartographer/4/emerald_black_banner");
|
| 191 | public static final ResourceKey<VillagerTrade> CARTOGRAPHER_5_EMERALD_GLOBE_BANNER_PATTERN = resourceKey("cartographer/5/emerald_globe_banner_pattern");
|
| 192 | public static final ResourceKey<VillagerTrade> CARTOGRAPHER_5_EMERALD_AND_COMPASS_WOODLAND_MANSION_MAP = resourceKey(
|
| 193 | "cartographer/5/emerald_and_compass_woodland_mansion_map"
|
| 194 | );
|
| 195 | public static final ResourceKey<VillagerTrade> CLERIC_1_ROTTEN_FLESH_EMERALD = resourceKey("cleric/1/rotten_flesh_emerald");
|
| 196 | public static final ResourceKey<VillagerTrade> CLERIC_1_EMERALD_REDSTONE = resourceKey("cleric/1/emerald_redstone");
|
| 197 | public static final ResourceKey<VillagerTrade> CLERIC_2_GOLD_INGOT_EMERALD = resourceKey("cleric/2/gold_ingot_emerald");
|
| 198 | public static final ResourceKey<VillagerTrade> CLERIC_2_EMERALD_LAPIS_LAZULI = resourceKey("cleric/2/emerald_lapis_lazuli");
|
| 199 | public static final ResourceKey<VillagerTrade> CLERIC_3_RABBIT_FOOT_EMERALD = resourceKey("cleric/3/rabbit_foot_emerald");
|
| 200 | public static final ResourceKey<VillagerTrade> CLERIC_3_EMERALD_GLOWSTONE = resourceKey("cleric/3/emerald_glowstone");
|
| 201 | public static final ResourceKey<VillagerTrade> CLERIC_4_TURTLE_SCUTE_EMERALD = resourceKey("cleric/4/turtle_scute_emerald");
|
| 202 | public static final ResourceKey<VillagerTrade> CLERIC_4_GLASS_BOTTLE_EMERALD = resourceKey("cleric/4/glass_bottle_emerald");
|
| 203 | public static final ResourceKey<VillagerTrade> CLERIC_4_EMERALD_ENDER_PEARL = resourceKey("cleric/4/emerald_ender_pearl");
|
| 204 | public static final ResourceKey<VillagerTrade> CLERIC_5_NETHER_WART_EMERALD = resourceKey("cleric/5/nether_wart_emerald");
|
| 205 | public static final ResourceKey<VillagerTrade> CLERIC_5_EMERALD_EXPERIENCE_BOTTLE = resourceKey("cleric/5/emerald_experience_bottle");
|
| 206 | public static final ResourceKey<VillagerTrade> COMMON_SMITH_1_COAL_EMERALD = resourceKey("smith/1/coal_emerald");
|
| 207 | public static final ResourceKey<VillagerTrade> COMMON_SMITH_2_IRON_INGOT_EMERALD = resourceKey("smith/2/iron_ingot_emerald");
|
| 208 | public static final ResourceKey<VillagerTrade> COMMON_SMITH_2_EMERALD_BELL = resourceKey("smith/2/emerald_bell");
|
| 209 | public static final ResourceKey<VillagerTrade> ARMORER_1_EMERALD_IRON_LEGGINGS = resourceKey("armorer/1/emerald_iron_leggings");
|
| 210 | public static final ResourceKey<VillagerTrade> ARMORER_1_EMERALD_IRON_BOOTS = resourceKey("armorer/1/emerald_iron_boots");
|
| 211 | public static final ResourceKey<VillagerTrade> ARMORER_1_EMERALD_IRON_HELMET = resourceKey("armorer/1/emerald_iron_helmet");
|
| 212 | public static final ResourceKey<VillagerTrade> ARMORER_1_EMERALD_IRON_CHESTPLATE = resourceKey("armorer/1/emerald_iron_chestplate");
|
| 213 | public static final ResourceKey<VillagerTrade> ARMORER_2_EMERALD_CHAINMAIL_BOOTS = resourceKey("armorer/2/emerald_chainmail_boots");
|
| 214 | public static final ResourceKey<VillagerTrade> ARMORER_2_EMERALD_CHAINMAIL_LEGGINGS = resourceKey("armorer/2/emerald_chainmail_leggings");
|
| 215 | public static final ResourceKey<VillagerTrade> ARMORER_3_LAVA_BUCKET_EMERALD = resourceKey("armorer/3/lava_bucket_emerald");
|
| 216 | public static final ResourceKey<VillagerTrade> ARMORER_3_EMERALD_CHAINMAIL_HELMET = resourceKey("armorer/3/emerald_chainmail_helmet");
|
| 217 | public static final ResourceKey<VillagerTrade> ARMORER_3_EMERALD_CHAINMAIL_CHESTPLATE = resourceKey("armorer/3/emerald_chainmail_chestplate");
|
| 218 | public static final ResourceKey<VillagerTrade> ARMORER_3_EMERALD_SHIELD = resourceKey("armorer/3/emerald_shield");
|
| 219 | public static final ResourceKey<VillagerTrade> ARMORER_3_DIAMOND_EMERALD = resourceKey("armorer/3/diamond_emerald");
|
| 220 | public static final ResourceKey<VillagerTrade> ARMORER_4_EMERALD_ENCHANTED_DIAMOND_LEGGINGS = resourceKey("armorer/4/emerald_enchanted_diamond_leggings");
|
| 221 | public static final ResourceKey<VillagerTrade> ARMORER_4_EMERALD_ENCHANTED_DIAMOND_BOOTS = resourceKey("armorer/4/emerald_enchanted_diamond_boots");
|
| 222 | public static final ResourceKey<VillagerTrade> ARMORER_5_EMERALD_ENCHANTED_DIAMOND_HELMET = resourceKey("armorer/5/emerald_enchanted_diamond_helmet");
|
| 223 | public static final ResourceKey<VillagerTrade> ARMORER_5_EMERALD_ENCHANTED_DIAMOND_CHESTPLATE = resourceKey("armorer/5/emerald_enchanted_diamond_chestplate");
|
| 224 | public static final ResourceKey<VillagerTrade> WEAPONSMITH_1_EMERALD_IRON_AXE = resourceKey("weaponsmith/1/emerald_iron_axe");
|
| 225 | public static final ResourceKey<VillagerTrade> WEAPONSMITH_1_EMERALD_ENCHANTED_IRON_SWORD = resourceKey("weaponsmith/1/emerald_enchanted_iron_sword");
|
| 226 | public static final ResourceKey<VillagerTrade> WEAPONSMITH_3_FLINT_EMERALD = resourceKey("weaponsmith/3/flint_emerald");
|
| 227 | public static final ResourceKey<VillagerTrade> WEAPONSMITH_4_DIAMOND_EMERALD = resourceKey("weaponsmith/4/diamond_emerald");
|
| 228 | public static final ResourceKey<VillagerTrade> WEAPONSMITH_4_EMERALD_ENCHANTED_DIAMOND_AXE = resourceKey("weaponsmith/4/emerald_enchanted_diamond_axe");
|
| 229 | public static final ResourceKey<VillagerTrade> WEAPONSMITH_5_EMERALD_ENCHANTED_DIAMOND_SWORD = resourceKey("weaponsmith/5/emerald_enchanted_diamond_sword");
|
| 230 | public static final ResourceKey<VillagerTrade> TOOLSMITH_1_EMERALD_STONE_AXE = resourceKey("toolsmith/1/emerald_stone_axe");
|
| 231 | public static final ResourceKey<VillagerTrade> TOOLSMITH_1_EMERALD_STONE_SHOVEL = resourceKey("toolsmith/1/emerald_stone_shovel");
|
| 232 | public static final ResourceKey<VillagerTrade> TOOLSMITH_1_EMERALD_STONE_PICKAXE = resourceKey("toolsmith/1/emerald_stone_pickaxe");
|
| 233 | public static final ResourceKey<VillagerTrade> TOOLSMITH_1_EMERALD_STONE_HOE = resourceKey("toolsmith/1/emerald_stone_hoe");
|
| 234 | public static final ResourceKey<VillagerTrade> TOOLSMITH_3_FLINT_EMERALD = resourceKey("toolsmith/3/flint_emerald");
|
| 235 | public static final ResourceKey<VillagerTrade> TOOLSMITH_3_EMERALD_IRON_AXE = resourceKey("toolsmith/3/emerald_enchanted_iron_axe");
|
| 236 | public static final ResourceKey<VillagerTrade> TOOLSMITH_3_EMERALD_IRON_SHOVEL = resourceKey("toolsmith/3/emerald_enchanted_iron_shovel");
|
| 237 | public static final ResourceKey<VillagerTrade> TOOLSMITH_3_EMERALD_IRON_PICKAXE = resourceKey("toolsmith/3/emerald_enchanted_iron_pickaxe");
|
| 238 | public static final ResourceKey<VillagerTrade> TOOLSMITH_3_EMERALD_DIAMOND_HOE = resourceKey("toolsmith/3/emerald_diamond_hoe");
|
| 239 | public static final ResourceKey<VillagerTrade> TOOLSMITH_4_DIAMOND_EMERALD = resourceKey("toolsmith/4/diamond_emerald");
|
| 240 | public static final ResourceKey<VillagerTrade> TOOLSMITH_4_EMERALD_DIAMOND_AXE = resourceKey("toolsmith/4/emerald_enchanted_diamond_axe");
|
| 241 | public static final ResourceKey<VillagerTrade> TOOLSMITH_4_EMERALD_DIAMOND_SHOVEL = resourceKey("toolsmith/4/emerald_enchanted_diamond_shovel");
|
| 242 | public static final ResourceKey<VillagerTrade> TOOLSMITH_5_EMERALD_DIAMOND_PICKAXE = resourceKey("toolsmith/5/emerald_enchanted_diamond_pickaxe");
|
| 243 | public static final ResourceKey<VillagerTrade> BUTCHER_1_CHICKEN_EMERALD = resourceKey("butcher/1/chicken_emerald");
|
| 244 | public static final ResourceKey<VillagerTrade> BUTCHER_1_PORKCHOP_EMERALD = resourceKey("butcher/1/porkchop_emerald");
|
| 245 | public static final ResourceKey<VillagerTrade> BUTCHER_1_RABBIT_EMERALD = resourceKey("butcher/1/rabbit_emerald");
|
| 246 | public static final ResourceKey<VillagerTrade> BUTCHER_1_EMERALD_RABBIT_STEW = resourceKey("butcher/1/emerald_rabbit_stew");
|
| 247 | public static final ResourceKey<VillagerTrade> BUTCHER_2_COAL_EMERALD = resourceKey("butcher/2/coal_emerald");
|
| 248 | public static final ResourceKey<VillagerTrade> BUTCHER_2_EMERALD_COOKED_PORKCHOP = resourceKey("butcher/2/emerald_cooked_porkchop");
|
| 249 | public static final ResourceKey<VillagerTrade> BUTCHER_2_EMERALD_COOKED_CHICKEN = resourceKey("butcher/2/emerald_cooked_chicken");
|
| 250 | public static final ResourceKey<VillagerTrade> BUTCHER_3_MUTTON_EMERALD = resourceKey("butcher/3/mutton_emerald");
|
| 251 | public static final ResourceKey<VillagerTrade> BUTCHER_3_BEEF_EMERALD = resourceKey("butcher/3/beef_emerald");
|
| 252 | public static final ResourceKey<VillagerTrade> BUTCHER_4_DRIED_KELP_BLOCK_EMERALD = resourceKey("butcher/4/dried_kelp_block_emerald");
|
| 253 | public static final ResourceKey<VillagerTrade> BUTCHER_5_SWEET_BERRIES_EMERALD = resourceKey("butcher/5/sweet_berries_emerald");
|
| 254 | public static final ResourceKey<VillagerTrade> LEATHERWORKER_1_LEATHER_EMERALD = resourceKey("leatherworker/1/leather_emerald");
|
| 255 | public static final ResourceKey<VillagerTrade> LEATHERWORKER_1_EMERALD_DYED_LEATHER_LEGGINGS = resourceKey("leatherworker/1/emerald_dyed_leather_leggings");
|
| 256 | public static final ResourceKey<VillagerTrade> LEATHERWORKER_1_EMERALD_DYED_LEATHER_CHESTPLATE = resourceKey("leatherworker/1/emerald_dyed_leather_chestplate");
|
| 257 | public static final ResourceKey<VillagerTrade> LEATHERWORKER_2_FLINT_EMERALD = resourceKey("leatherworker/2/flint_emerald");
|
| 258 | public static final ResourceKey<VillagerTrade> LEATHERWORKER_2_EMERALD_DYED_LEATHER_HELMET = resourceKey("leatherworker/2/emerald_dyed_leather_helmet");
|
| 259 | public static final ResourceKey<VillagerTrade> LEATHERWORKER_2_EMERALD_DYED_LEATHER_BOOTS = resourceKey("leatherworker/2/emerald_dyed_leather_boots");
|
| 260 | public static final ResourceKey<VillagerTrade> LEATHERWORKER_3_RABBIT_HIDE_EMERALD = resourceKey("leatherworker/3/rabbit_hide_emerald");
|
| 261 | public static final ResourceKey<VillagerTrade> LEATHERWORKER_3_EMERALD_DYED_LEATHER_CHESTPLATE = resourceKey("leatherworker/3/emerald_dyed_leather_chestplate");
|
| 262 | public static final ResourceKey<VillagerTrade> LEATHERWORKER_4_TURTLE_SCUTE_EMERALD = resourceKey("leatherworker/4/turtle_scute_emerald");
|
| 263 | public static final ResourceKey<VillagerTrade> LEATHERWORKER_4_EMERALD_DYED_LEATHER_HORSE_ARMOR = resourceKey(
|
| 264 | "leatherworker/4/emerald_dyed_leather_horse_armor"
|
| 265 | );
|
| 266 | public static final ResourceKey<VillagerTrade> LEATHERWORKER_5_EMERALD_SADDLE = resourceKey("leatherworker/5/emerald_saddle");
|
| 267 | public static final ResourceKey<VillagerTrade> LEATHERWORKER_5_EMERALD_DYED_LEATHER_HELMET = resourceKey("leatherworker/5/emerald_dyed_leather_helmet");
|
| 268 | public static final ResourceKey<VillagerTrade> MASON_1_CLAY_BALL_EMERALD = resourceKey("mason/1/clay_ball_emerald");
|
| 269 | public static final ResourceKey<VillagerTrade> MASON_1_EMERALD_BRICK = resourceKey("mason/1/emerald_brick");
|
| 270 | public static final ResourceKey<VillagerTrade> MASON_2_STONE_EMERALD = resourceKey("mason/2/stone_emerald");
|
| 271 | public static final ResourceKey<VillagerTrade> MASON_2_EMERALD_CHISELED_STONE_BRICKS = resourceKey("mason/2/emerald_chiseled_stone_bricks");
|
| 272 | public static final ResourceKey<VillagerTrade> MASON_3_GRANITE_EMERALD = resourceKey("mason/3/granite_emerald");
|
| 273 | public static final ResourceKey<VillagerTrade> MASON_3_ANDESITE_EMERALD = resourceKey("mason/3/andesite_emerald");
|
| 274 | public static final ResourceKey<VillagerTrade> MASON_3_DIORITE_EMERALD = resourceKey("mason/3/diorite_emerald");
|
| 275 | public static final ResourceKey<VillagerTrade> MASON_3_EMERALD_DRIPSTONE_BLOCK = resourceKey("mason/3/emerald_dripstone_block");
|
| 276 | public static final ResourceKey<VillagerTrade> MASON_3_EMERALD_POLISHED_ANDESITE = resourceKey("mason/3/emerald_polished_andesite");
|
| 277 | public static final ResourceKey<VillagerTrade> MASON_3_EMERALD_POLISHED_DIORITE = resourceKey("mason/3/emerald_polished_diorite");
|
| 278 | public static final ResourceKey<VillagerTrade> MASON_3_EMERALD_POLISHED_GRANTITE = resourceKey("mason/3/emerald_polished_granite");
|
| 279 | public static final ResourceKey<VillagerTrade> MASON_4_QUARTZ_EMERALD = resourceKey("mason/4/quartz_emerald");
|
| 280 | public static final ColorCollection<ResourceKey<VillagerTrade>> MASON_4_EMERALD_TERRACOTTA = ColorCollection.NAMES
|
| 281 | .map(color -> resourceKey("mason/4/emerald_" + color + "_terracotta"));
|
| 282 | public static final ColorCollection<ResourceKey<VillagerTrade>> MASON_4_EMERALD_GLAZED_TERRACOTTA = ColorCollection.NAMES
|
| 283 | .map(color -> resourceKey("mason/4/emerald_" + color + "_glazed_terracotta"));
|
| 284 | public static final ResourceKey<VillagerTrade> MASON_5_EMERALD_QUARTZ_PILLAR = resourceKey("mason/5/emerald_quartz_pillar");
|
| 285 | public static final ResourceKey<VillagerTrade> MASON_5_EMERALD_QUARTZ_BLOCK = resourceKey("mason/5/emerald_quartz_block");
|
| 286 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_WATER_BOTTLE_EMERALD = resourceKey("wandering_trader/water_bottle_emerald");
|
| 287 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_WATER_BUCKET_EMERALD = resourceKey("wandering_trader/water_bucket_emerald");
|
| 288 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_MILK_BUCKET_EMERALD = resourceKey("wandering_trader/milk_bucket_emerald");
|
| 289 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_FERMENTED_SPIDER_EYE_EMERALD = resourceKey("wandering_trader/fermented_spider_eye_emerald");
|
| 290 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_BAKED_POTATO_EMERALD = resourceKey("wandering_trader/baked_potato_emerald");
|
| 291 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_HAY_BLOCK_EMERALD = resourceKey("wandering_trader/hay_block_emerald");
|
| 292 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_PACKED_ICE = resourceKey("wandering_trader/emerald_packed_ice");
|
| 293 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_BLUE_ICE = resourceKey("wandering_trader/emerald_blue_ice");
|
| 294 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_GUNPOWDER = resourceKey("wandering_trader/emerald_gunpowder");
|
| 295 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_PODZOL = resourceKey("wandering_trader/emerald_podzol");
|
| 296 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_ACACIA_LOG = resourceKey("wandering_trader/emerald_acacia_log");
|
| 297 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_BIRCH_LOG = resourceKey("wandering_trader/emerald_birch_log");
|
| 298 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_DARK_OAK_LOG = resourceKey("wandering_trader/emerald_dark_oak_log");
|
| 299 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_JUNGLE_LOG = resourceKey("wandering_trader/emerald_jungle_log");
|
| 300 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_OAK_LOG = resourceKey("wandering_trader/emerald_oak_log");
|
| 301 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_SPRUCE_LOG = resourceKey("wandering_trader/emerald_spruce_log");
|
| 302 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_CHERRY_LOG = resourceKey("wandering_trader/emerald_cherry_log");
|
| 303 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_MANGROVE_LOG = resourceKey("wandering_trader/emerald_mangrove_log");
|
| 304 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_PALE_OAK_LOG = resourceKey("wandering_trader/emerald_pale_oak_log");
|
| 305 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_POPLAR_LOG = resourceKey("wandering_trader/emerald_poplar_log");
|
| 306 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_ENCHANTED_IRON_PICKAXE = resourceKey("wandering_trader/emerald_enchanted_iron_pickaxe");
|
| 307 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_LONG_INVISIBILITY_POTION = resourceKey(
|
| 308 | "wandering_trader/emerald_long_invisibility_potion"
|
| 309 | );
|
| 310 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_TROPICAL_FISH_BUCKET = resourceKey("wandering_trader/emerald_fish_bucket");
|
| 311 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_PUFFERFISH_BUCKET = resourceKey("wandering_trader/emerald_pufferfish_bucket");
|
| 312 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_SEA_PICKLE = resourceKey("wandering_trader/emerald_sea_pickle");
|
| 313 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_SLIME_BALL = resourceKey("wandering_trader/emerald_slime_ball");
|
| 314 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_GLOWSTONE = resourceKey("wandering_trader/emerald_glowstone");
|
| 315 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_NAUTILUS_SHELL = resourceKey("wandering_trader/emerald_nautilus_shell");
|
| 316 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_FERN = resourceKey("wandering_trader/emerald_fern");
|
| 317 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_SUGAR_CANE = resourceKey("wandering_trader/emerald_sugar_cane");
|
| 318 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_PUMPKIN = resourceKey("wandering_trader/emerald_pumpkin");
|
| 319 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_KELP = resourceKey("wandering_trader/emerald_kelp");
|
| 320 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_CACTUS = resourceKey("wandering_trader/emerald_cactus");
|
| 321 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_DANDELION = resourceKey("wandering_trader/emerald_dandelion");
|
| 322 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_GOLDEN_DANDELION = resourceKey("wandering_trader/emerald_golden_dandelion");
|
| 323 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_POPPY = resourceKey("wandering_trader/emerald_poppy");
|
| 324 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_BLUE_ORCHID = resourceKey("wandering_trader/emerald_blue_orchid");
|
| 325 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_ALLIUM = resourceKey("wandering_trader/emerald_allium");
|
| 326 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_AZURE_BLUET = resourceKey("wandering_trader/emerald_azure_bluet");
|
| 327 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_RED_TULIP = resourceKey("wandering_trader/emerald_red_tulip");
|
| 328 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_ORANGE_TULIP = resourceKey("wandering_trader/emerald_orange_tulip");
|
| 329 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_WHITE_TULIP = resourceKey("wandering_trader/emerald_white_tulip");
|
| 330 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_PINK_TULIP = resourceKey("wandering_trader/emerald_pink_tulip");
|
| 331 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_OXEYE_DAISY = resourceKey("wandering_trader/emerald_oxeye_daisy");
|
| 332 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_CORNFLOWER = resourceKey("wandering_trader/emerald_cornflower");
|
| 333 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_LILY_OF_THE_VALLEY = resourceKey("wandering_trader/emerald_lily_of_the_valley");
|
| 334 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_OPEN_EYEBLOSSOM = resourceKey("wandering_trader/emerald_open_eyeblossom");
|
| 335 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_WHEAT_SEEDS = resourceKey("wandering_trader/emerald_wheat_seeds");
|
| 336 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_BEETROOT_SEEDS = resourceKey("wandering_trader/emerald_beetroot_seeds");
|
| 337 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_PUMPKIN_SEEDS = resourceKey("wandering_trader/emerald_pumpkin_seeds");
|
| 338 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_MELON_SEEDS = resourceKey("wandering_trader/emerald_melon_seeds");
|
| 339 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_ACACIA_SAPLING = resourceKey("wandering_trader/emerald_acacia_sapling");
|
| 340 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_BIRCH_SAPLING = resourceKey("wandering_trader/emerald_birch_sapling");
|
| 341 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_DARK_OAK_SAPLING = resourceKey("wandering_trader/emerald_dark_oak_sapling");
|
| 342 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_JUNGLE_SAPLING = resourceKey("wandering_trader/emerald_jungle_sapling");
|
| 343 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_OAK_SAPLING = resourceKey("wandering_trader/emerald_oak_sapling");
|
| 344 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_SPRUCE_SAPLING = resourceKey("wandering_trader/emerald_spruce_sapling");
|
| 345 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_CHERRY_SAPLING = resourceKey("wandering_trader/emerald_cherry_sapling");
|
| 346 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_PALE_OAK_SAPLING = resourceKey("wandering_trader/emerald_pale_oak_sapling");
|
| 347 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_POPLAR_SAPLING = resourceKey("wandering_trader/emerald_poplar_sapling");
|
| 348 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_MANGROVE_PROPAGULE = resourceKey("wandering_trader/emerald_mangrove_propagule");
|
| 349 | public static final ColorCollection<ResourceKey<VillagerTrade>> WANDERING_TRADER_EMERALD_DYE = ColorCollection.NAMES
|
| 350 | .map(color -> resourceKey("wandering_trader/emerald_" + color + "_dye"));
|
| 351 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_BRAIN_CORAL_BLOCK = resourceKey("wandering_trader/emerald_brain_coral_block");
|
| 352 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_BUBBLE_CORAL_BLOCK = resourceKey("wandering_trader/emerald_bubble_coral_block");
|
| 353 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_FIRE_CORAL_BLOCK = resourceKey("wandering_trader/emerald_fire_coral_block");
|
| 354 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_HORN_CORAL_BLOCK = resourceKey("wandering_trader/emerald_horn_coral_block");
|
| 355 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_TUBE_CORAL_BLOCK = resourceKey("wandering_trader/emerald_tube_coral_block");
|
| 356 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_VINE = resourceKey("wandering_trader/emerald_vine");
|
| 357 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_PALE_HANGING_MOSS = resourceKey("wandering_trader/emerald_pale_hanging_moss");
|
| 358 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_BROWN_MUSHROOM = resourceKey("wandering_trader/emerald_brown_mushroom");
|
| 359 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_RED_MUSHROOM = resourceKey("wandering_trader/emerald_red_mushroom");
|
| 360 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_LILY_PAD = resourceKey("wandering_trader/emerald_lily_pad");
|
| 361 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_SMALL_DRIPLEAF = resourceKey("wandering_trader/emerald_small_dripleaf");
|
| 362 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_SAND = resourceKey("wandering_trader/emerald_sand");
|
| 363 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_RED_SAND = resourceKey("wandering_trader/emerald_red_sand");
|
| 364 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_POINTED_DRIPSTONE = resourceKey("wandering_trader/emerald_pointed_dripstone");
|
| 365 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_SULFUR_SPIKE = resourceKey("wandering_trader/emerald_sulfur_spike");
|
| 366 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_ROOTED_DIRT = resourceKey("wandering_trader/emerald_rooted_dirt");
|
| 367 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_MOSS_BLOCK = resourceKey("wandering_trader/emerald_moss_block");
|
| 368 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_PALE_MOSS_BLOCK = resourceKey("wandering_trader/emerald_pale_moss_block");
|
| 369 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_WILDFLOWERS = resourceKey("wandering_trader/emerald_wildflowers");
|
| 370 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_DRY_TALL_GRASS = resourceKey("wandering_trader/emerald_dry_tall_grass");
|
| 371 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_FIREFLY_BUSH = resourceKey("wandering_trader/emerald_firefly_bush");
|
| 372 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_NAME_TAG = resourceKey("wandering_trader/emerald_name_tag");
|
| 373 | public static final ResourceKey<VillagerTrade> WANDERING_TRADER_EMERALD_SHELF_MUSHROOM = resourceKey("wandering_trader/emerald_shelf_mushroom");
|
| 374 |
|
| 375 | public static void bootstrap(final BootstrapContext<VillagerTrade> context) {
|
| 376 | HolderGetter<Item> items = context.lookup(Registries.ITEM);
|
| 377 | HolderGetter<Enchantment> enchantments = context.lookup(Registries.ENCHANTMENT);
|
| 378 | HolderGetter<Structure> structures = context.lookup(Registries.STRUCTURE);
|
| 379 | HolderSet<Enchantment> enchantmentsForTradedEquipment = enchantments.getOrThrow(EnchantmentTags.ON_TRADED_EQUIPMENT);
|
| 380 | HolderSet<Enchantment> enchantmentsForBooks = enchantments.getOrThrow(EnchantmentTags.TRADEABLE);
|
| 381 | HolderSet<Enchantment> doubleTradePrice = enchantments.getOrThrow(EnchantmentTags.DOUBLE_TRADE_PRICE);
|
| 382 | HolderGetter<Potion> potions = context.lookup(Registries.POTION);
|
| 383 | HolderSet<Potion> potionsForTippedArrows = potions.getOrThrow(PotionTags.TRADEABLE);
|
| 384 | HolderGetter<VillagerType> villagerVariants = context.lookup(Registries.VILLAGER_TYPE);
|
| 385 | register(context, FARMER_1_WHEAT_EMERALD, VillagerTrade.builder(new TradeCost(Items.WHEAT, 20), new ItemStackTemplate(Items.EMERALD), 16, 2, 0.05F).build());
|
| 386 | register(context, FARMER_1_POTATO_EMERALD, VillagerTrade.builder(new TradeCost(Items.POTATO, 26), new ItemStackTemplate(Items.EMERALD), 16, 2, 0.05F).build());
|
| 387 | register(context, FARMER_1_CARROT_EMERALD, VillagerTrade.builder(new TradeCost(Items.CARROT, 22), new ItemStackTemplate(Items.EMERALD), 16, 2, 0.05F).build());
|
| 388 | register(
|
| 389 | context, FARMER_1_BEETROOT_EMERALD, VillagerTrade.builder(new TradeCost(Items.BEETROOT, 15), new ItemStackTemplate(Items.EMERALD), 16, 2, 0.05F).build()
|
| 390 | );
|
| 391 | register(context, FARMER_1_EMERALD_BREAD, VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.BREAD, 6), 16, 1, 0.05F).build());
|
| 392 | register(
|
| 393 | context, FARMER_2_PUMPKIN_EMERALD, VillagerTrade.builder(new TradeCost(Items.PUMPKIN, 6), new ItemStackTemplate(Items.EMERALD), 12, 10, 0.05F).build()
|
| 394 | );
|
| 395 | register(
|
| 396 | context,
|
| 397 | FARMER_2_EMERALD_PUMPKIN_PIE,
|
| 398 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.PUMPKIN_PIE, 4), 12, 5, 0.05F).build()
|
| 399 | );
|
| 400 | register(context, FARMER_2_EMERALD_APPLE, VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.APPLE, 4), 16, 5, 0.05F).build());
|
| 401 | register(
|
| 402 | context, FARMER_3_EMERALD_COOKIE, VillagerTrade.builder(new TradeCost(Items.EMERALD, 3), new ItemStackTemplate(Items.COOKIE, 18), 12, 10, 0.05F).build()
|
| 403 | );
|
| 404 | register(context, FARMER_3_MELON_EMERALD, VillagerTrade.builder(new TradeCost(Items.MELON, 4), new ItemStackTemplate(Items.EMERALD), 12, 20, 0.05F).build());
|
| 405 | register(context, FARMER_4_EMERALD_CAKE, VillagerTrade.builder(new TradeCost(Items.EMERALD, 3), new ItemStackTemplate(Items.CAKE), 12, 15, 0.05F).build());
|
| 406 | register(
|
| 407 | context,
|
| 408 | FARMER_4_EMERALD_SUSPICIOUS_STEW,
|
| 409 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.SUSPICIOUS_STEW), 12, 15, 0.05F)
|
| 410 | .addModifier(
|
| 411 | new SetStewEffectFunction.Builder()
|
| 412 | .withEffect(MobEffects.NIGHT_VISION, 5)
|
| 413 | .withEffect(MobEffects.JUMP_BOOST, 8)
|
| 414 | .withEffect(MobEffects.WEAKNESS, 7)
|
| 415 | .withEffect(MobEffects.BLINDNESS, 6)
|
| 416 | .withEffect(MobEffects.POISON, 14)
|
| 417 | .withEffect(MobEffects.SATURATION, 7)
|
| 418 | )
|
| 419 | .build()
|
| 420 | );
|
| 421 | register(
|
| 422 | context,
|
| 423 | FARMER_5_EMERALD_GOLDEN_CARROT,
|
| 424 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 3), new ItemStackTemplate(Items.GOLDEN_CARROT, 3), 12, 30, 0.05F).build()
|
| 425 | );
|
| 426 | register(
|
| 427 | context,
|
| 428 | FARMER_5_EMERALD_GLISTENING_MELON_SLICE,
|
| 429 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 4), new ItemStackTemplate(Items.GLISTERING_MELON_SLICE, 3), 12, 30, 0.05F).build()
|
| 430 | );
|
| 431 | register(
|
| 432 | context, FISHERMAN_1_STRING_EMERALD, VillagerTrade.builder(new TradeCost(Items.STRING, 20), new ItemStackTemplate(Items.EMERALD), 16, 2, 0.05F).build()
|
| 433 | );
|
| 434 | register(context, FISHERMAN_1_COAL_EMERALD, VillagerTrade.builder(new TradeCost(Items.COAL, 10), new ItemStackTemplate(Items.EMERALD), 16, 2, 0.05F).build());
|
| 435 | register(
|
| 436 | context,
|
| 437 | FISHERMAN_1_RAW_COD_AND_EMERALD_COOKED_COD,
|
| 438 | VillagerTrade.builder(new TradeCost(Items.COD, 6), new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.COOKED_COD, 6), 16, 1, 0.05F).build()
|
| 439 | );
|
| 440 | register(
|
| 441 | context,
|
| 442 | FISHERMAN_1_EMERALD_COD_BUCKET,
|
| 443 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 3), new ItemStackTemplate(Items.COD_BUCKET), 16, 1, 0.05F).build()
|
| 444 | );
|
| 445 | register(context, FISHERMAN_2_COD_EMERALD, VillagerTrade.builder(new TradeCost(Items.COD, 15), new ItemStackTemplate(Items.EMERALD), 16, 10, 0.05F).build());
|
| 446 | register(
|
| 447 | context,
|
| 448 | FISHERMAN_2_SALMON_AND_EMERALD_COOKED_SALMON,
|
| 449 | VillagerTrade.builder(new TradeCost(Items.SALMON, 6), new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.COOKED_SALMON, 6), 16, 5, 0.05F).build()
|
| 450 | );
|
| 451 | register(
|
| 452 | context, FISHERMAN_2_EMERALD_CAMPFIRE, VillagerTrade.builder(new TradeCost(Items.EMERALD, 2), new ItemStackTemplate(Items.CAMPFIRE), 12, 5, 0.05F).build()
|
| 453 | );
|
| 454 | register(
|
| 455 | context, FISHERMAN_3_SALMON_EMERALD, VillagerTrade.builder(new TradeCost(Items.SALMON, 13), new ItemStackTemplate(Items.EMERALD), 16, 20, 0.05F).build()
|
| 456 | );
|
| 457 | register(
|
| 458 | context,
|
| 459 | FISHERMAN_3_EMERALD_ENCHANTED_FISHING_ROD,
|
| 460 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 3), new ItemStackTemplate(Items.FISHING_ROD), 3, 10, 0.2F)
|
| 461 | .addModifiers(enchantedItem(items, enchantmentsForTradedEquipment, Items.FISHING_ROD))
|
| 462 | .build()
|
| 463 | );
|
| 464 | register(
|
| 465 | context,
|
| 466 | FISHERMAN_4_TROPICAL_FISH_EMERALD,
|
| 467 | VillagerTrade.builder(new TradeCost(Items.TROPICAL_FISH, 6), new ItemStackTemplate(Items.EMERALD), 12, 30, 0.05F).build()
|
| 468 | );
|
| 469 | register(
|
| 470 | context,
|
| 471 | FISHERMAN_5_PUFFERFISH_EMERALD,
|
| 472 | VillagerTrade.builder(new TradeCost(Items.PUFFERFISH, 4), new ItemStackTemplate(Items.EMERALD), 12, 30, 0.05F).build()
|
| 473 | );
|
| 474 | registerBoatTrades(context, villagerVariants);
|
| 475 | registerShepherdWoolSales(context);
|
| 476 | register(
|
| 477 | context, SHEPHERD_1_EMERALD_SHEARS, VillagerTrade.builder(new TradeCost(Items.EMERALD, 2), new ItemStackTemplate(Items.SHEARS), 12, 1, 0.05F).build()
|
| 478 | );
|
| 479 | registerShepherdLevelTwoDyeTrades(context);
|
| 480 | registerWoolPurchases(context);
|
| 481 | registerCarpetPurchases(context);
|
| 482 | registerShepherdLevelThreeDyeTrades(context);
|
| 483 | registerBedTrades(context);
|
| 484 | registerLevelFourDyeTrades(context);
|
| 485 | registerShepherdBannerTrades(context);
|
| 486 | register(
|
| 487 | context,
|
| 488 | SHEPHERD_5_EMERALD_PAINTING,
|
| 489 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 2), new ItemStackTemplate(Items.PAINTING, 3), 12, 30, 0.05F).build()
|
| 490 | );
|
| 491 | register(context, FLETCHER_1_STICK_EMERALD, VillagerTrade.builder(new TradeCost(Items.STICK, 32), new ItemStackTemplate(Items.EMERALD), 16, 2, 0.05F).build());
|
| 492 | register(
|
| 493 | context, FLETCHER_1_EMERALD_ARROW, VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.ARROW, 16), 12, 1, 0.05F).build()
|
| 494 | );
|
| 495 | register(
|
| 496 | context,
|
| 497 | FLETCHER_1_GRAVEL_AND_EMERALD_FLINT,
|
| 498 | VillagerTrade.builder(new TradeCost(Items.GRAVEL, 10), new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.FLINT, 10), 12, 1, 0.05F).build()
|
| 499 | );
|
| 500 | register(
|
| 501 | context, FLETCHER_2_FLINT_EMERALD, VillagerTrade.builder(new TradeCost(Items.FLINT, 26), new ItemStackTemplate(Items.EMERALD), 12, 10, 0.05F).build()
|
| 502 | );
|
| 503 | register(context, FLETCHER_2_EMERALD_BOW, VillagerTrade.builder(new TradeCost(Items.EMERALD, 2), new ItemStackTemplate(Items.BOW), 12, 5, 0.05F).build());
|
| 504 | register(
|
| 505 | context, FLETCHER_3_STRING_EMERALD, VillagerTrade.builder(new TradeCost(Items.STRING, 14), new ItemStackTemplate(Items.EMERALD), 16, 20, 0.05F).build()
|
| 506 | );
|
| 507 | register(
|
| 508 | context, FLETCHER_3_EMERALD_CROSSBOW, VillagerTrade.builder(new TradeCost(Items.EMERALD, 3), new ItemStackTemplate(Items.CROSSBOW), 12, 10, 0.05F).build()
|
| 509 | );
|
| 510 | register(
|
| 511 | context, FLETCHER_4_FEATHER_EMERALD, VillagerTrade.builder(new TradeCost(Items.FEATHER, 24), new ItemStackTemplate(Items.EMERALD), 16, 30, 0.05F).build()
|
| 512 | );
|
| 513 | register(
|
| 514 | context,
|
| 515 | FLETCHER_4_EMERALD_ENCHANTED_BOW,
|
| 516 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 2), new ItemStackTemplate(Items.BOW), 3, 15, 0.05F)
|
| 517 | .addModifiers(enchantedItem(items, enchantmentsForTradedEquipment, Items.BOW))
|
| 518 | .build()
|
| 519 | );
|
| 520 | register(
|
| 521 | context,
|
| 522 | FLETCHER_5_TRIPWIRE_HOOK_EMERALD,
|
| 523 | VillagerTrade.builder(new TradeCost(Items.TRIPWIRE_HOOK, 8), new ItemStackTemplate(Items.EMERALD), 12, 30, 0.05F).build()
|
| 524 | );
|
| 525 | register(
|
| 526 | context,
|
| 527 | FLETCHER_5_EMERALD_ENCHANTED_CROSSBOW,
|
| 528 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 3), new ItemStackTemplate(Items.CROSSBOW), 3, 15, 0.05F)
|
| 529 | .addModifiers(enchantedItem(items, enchantmentsForTradedEquipment, Items.CROSSBOW))
|
| 530 | .build()
|
| 531 | );
|
| 532 | register(
|
| 533 | context,
|
| 534 | FLETCHER_5_ARROW_AND_EMERALD_TIPPED_ARROW,
|
| 535 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 2), new TradeCost(Items.ARROW, 5), new ItemStackTemplate(Items.TIPPED_ARROW, 5), 12, 30, 0.05F)
|
| 536 | .addModifier(SetRandomPotionFunction.fromTagKey(potionsForTippedArrows))
|
| 537 | .build()
|
| 538 | );
|
| 539 | register(
|
| 540 | context, LIBRARIAN_1_PAPER_EMERALD, VillagerTrade.builder(new TradeCost(Items.PAPER, 24), new ItemStackTemplate(Items.EMERALD), 16, 2, 0.05F).build()
|
| 541 | );
|
| 542 | register(
|
| 543 | context,
|
| 544 | LIBRARIAN_1_EMERALD_AND_BOOK_ENCHANTED_BOOK,
|
| 545 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 0), new TradeCost(Items.BOOK, 1), new ItemStackTemplate(Items.ENCHANTED_BOOK), 12, 1, 0.2F)
|
| 546 | .addModifiers(enchantedBook(items, enchantmentsForBooks))
|
| 547 | .doubleTradePriceEnchantments(doubleTradePrice)
|
| 548 | .build()
|
| 549 | );
|
| 550 | register(
|
| 551 | context, LIBRARIAN_1_EMERALD_BOOKSHELF, VillagerTrade.builder(new TradeCost(Items.EMERALD, 9), new ItemStackTemplate(Items.BOOKSHELF), 12, 1, 0.05F).build()
|
| 552 | );
|
| 553 | register(context, LIBRARIAN_2_BOOK_EMERALD, VillagerTrade.builder(new TradeCost(Items.BOOK, 4), new ItemStackTemplate(Items.EMERALD), 12, 10, 0.05F).build());
|
| 554 | register(
|
| 555 | context,
|
| 556 | LIBRARIAN_2_EMERALD_AND_BOOK_ENCHANTED_BOOK,
|
| 557 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 0), new TradeCost(Items.BOOK, 1), new ItemStackTemplate(Items.ENCHANTED_BOOK), 12, 5, 0.2F)
|
| 558 | .addModifiers(enchantedBook(items, enchantmentsForBooks))
|
| 559 | .doubleTradePriceEnchantments(doubleTradePrice)
|
| 560 | .build()
|
| 561 | );
|
| 562 | register(
|
| 563 | context, LIBRARIAN_2_EMERALD_LANTERN, VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.LANTERN), 12, 5, 0.05F).build()
|
| 564 | );
|
| 565 | register(
|
| 566 | context, LIBRARIAN_3_INK_SAC_EMERALD, VillagerTrade.builder(new TradeCost(Items.INK_SAC, 5), new ItemStackTemplate(Items.EMERALD), 12, 20, 0.05F).build()
|
| 567 | );
|
| 568 | register(
|
| 569 | context,
|
| 570 | LIBRARIAN_3_EMERALD_AND_BOOK_ENCHANTED_BOOK,
|
| 571 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 0), new TradeCost(Items.BOOK, 1), new ItemStackTemplate(Items.ENCHANTED_BOOK), 12, 10, 0.2F)
|
| 572 | .addModifiers(enchantedBook(items, enchantmentsForBooks))
|
| 573 | .doubleTradePriceEnchantments(doubleTradePrice)
|
| 574 | .build()
|
| 575 | );
|
| 576 | register(
|
| 577 | context, LIBRARIAN_3_EMERALD_GLASS, VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.GLASS, 4), 12, 10, 0.05F).build()
|
| 578 | );
|
| 579 | register(
|
| 580 | context,
|
| 581 | LIBRARIAN_4_WRITABLE_BOOK_EMERALD,
|
| 582 | VillagerTrade.builder(new TradeCost(Items.WRITABLE_BOOK, 2), new ItemStackTemplate(Items.EMERALD), 12, 30, 0.05F).build()
|
| 583 | );
|
| 584 | register(
|
| 585 | context,
|
| 586 | LIBRARIAN_4_EMERALD_AND_BOOK_ENCHANTED_BOOK,
|
| 587 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 0), new TradeCost(Items.BOOK, 1), new ItemStackTemplate(Items.ENCHANTED_BOOK), 12, 15, 0.2F)
|
| 588 | .addModifiers(enchantedBook(items, enchantmentsForBooks))
|
| 589 | .doubleTradePriceEnchantments(doubleTradePrice)
|
| 590 | .build()
|
| 591 | );
|
| 592 | register(
|
| 593 | context, LIBRARIAN_4_EMERALD_CLOCK, VillagerTrade.builder(new TradeCost(Items.EMERALD, 5), new ItemStackTemplate(Items.CLOCK), 12, 15, 0.05F).build()
|
| 594 | );
|
| 595 | register(
|
| 596 | context, LIBRARIAN_4_EMERALD_COMPASS, VillagerTrade.builder(new TradeCost(Items.EMERALD, 4), new ItemStackTemplate(Items.COMPASS), 12, 15, 0.05F).build()
|
| 597 | );
|
| 598 | register(
|
| 599 | context,
|
| 600 | LIBRARIAN_5_EMERALD_YELLOW_CANDLE,
|
| 601 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 3), new ItemStackTemplate(Items.DYED_CANDLE.yellow()), 12, 30, 0.05F).build()
|
| 602 | );
|
| 603 | register(
|
| 604 | context,
|
| 605 | LIBRARIAN_5_EMERALD_RED_CANDLE,
|
| 606 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 3), new ItemStackTemplate(Items.DYED_CANDLE.red()), 12, 30, 0.05F).build()
|
| 607 | );
|
| 608 | register(
|
| 609 | context, CARTOGRAPHER_1_PAPER_EMERALD, VillagerTrade.builder(new TradeCost(Items.PAPER, 24), new ItemStackTemplate(Items.EMERALD), 12, 2, 0.05F).build()
|
| 610 | );
|
| 611 | register(context, CARTOGRAPHER_1_EMERALD_MAP, VillagerTrade.builder(new TradeCost(Items.EMERALD, 7), new ItemStackTemplate(Items.MAP), 12, 1, 0.05F).build());
|
| 612 | register(
|
| 613 | context,
|
| 614 | CARTOGRAPHER_2_GLASS_PANE_EMERALD,
|
| 615 | VillagerTrade.builder(new TradeCost(Items.GLASS_PANE, 11), new ItemStackTemplate(Items.EMERALD), 12, 10, 0.05F).build()
|
| 616 | );
|
| 617 | registerBasicExplorerMapTrades(context, villagerVariants, structures);
|
| 618 | register(
|
| 619 | context, CARTOGRAPHER_3_COMPASS_EMERALD, VillagerTrade.builder(new TradeCost(Items.COMPASS, 1), new ItemStackTemplate(Items.EMERALD), 12, 20, 0.05F).build()
|
| 620 | );
|
| 621 | register(
|
| 622 | context,
|
| 623 | CARTOGRAPHER_3_EMERALD_AND_COMPASS_OCEAN_MONUMENT_MAP,
|
| 624 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 13), new TradeCost(Items.COMPASS, 1), new ItemStackTemplate(Items.OCEAN_MONUMENT_MAP), 12, 10, 0.2F)
|
| 625 | .addModifiers(
|
| 626 | Holder.direct(
|
| 627 | ExplorationMapFunction.makeExplorationMap(structures.getOrThrow(StructureTags.ON_OCEAN_MONUMENT_MAPS))
|
| 628 | .setMapDecoration(MapDecorationTypes.OCEAN_MONUMENT)
|
| 629 | .setSearchRadius(100)
|
| 630 | .setSkipKnownStructures(true)
|
| 631 | .build()
|
| 632 | ),
|
| 633 | discardItemIfItsNot(anyValidMap())
|
| 634 | )
|
| 635 | .build()
|
| 636 | );
|
| 637 | register(
|
| 638 | context,
|
| 639 | CARTOGRAPHER_3_EMERALD_AND_COMPASS_BURIED_TRIAL_CHAMBERS_MAP,
|
| 640 | VillagerTrade.builder(
|
| 641 | new TradeCost(Items.EMERALD, 12), new TradeCost(Items.COMPASS, 1), new ItemStackTemplate(Items.BURIED_TRIAL_CHAMBERS_MAP), 12, 10, 0.2F
|
| 642 | )
|
| 643 | .addModifiers(
|
| 644 | Holder.direct(
|
| 645 | ExplorationMapFunction.makeExplorationMap(structures.getOrThrow(StructureTags.ON_BURIED_TRIAL_CHAMBERS_MAPS))
|
| 646 | .setMapDecoration(MapDecorationTypes.TRIAL_CHAMBERS)
|
| 647 | .setSearchRadius(100)
|
| 648 | .setSkipKnownStructures(true)
|
| 649 | .build()
|
| 650 | ),
|
| 651 | discardItemIfItsNot(anyValidMap())
|
| 652 | )
|
| 653 | .build()
|
| 654 | );
|
| 655 | register(
|
| 656 | context,
|
| 657 | CARTOGRAPHER_4_EMERALD_ITEM_FRAME,
|
| 658 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 7), new ItemStackTemplate(Items.ITEM_FRAME), 12, 15, 0.05F).build()
|
| 659 | );
|
| 660 | registerCartographerBannerTrades(context, villagerVariants);
|
| 661 | register(
|
| 662 | context,
|
| 663 | CARTOGRAPHER_5_EMERALD_GLOBE_BANNER_PATTERN,
|
| 664 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 8), new ItemStackTemplate(Items.GLOBE_BANNER_PATTERN), 12, 30, 0.05F).build()
|
| 665 | );
|
| 666 | register(
|
| 667 | context,
|
| 668 | CARTOGRAPHER_5_EMERALD_AND_COMPASS_WOODLAND_MANSION_MAP,
|
| 669 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 14), new TradeCost(Items.COMPASS, 1), new ItemStackTemplate(Items.WOODLAND_MANSION_MAP), 12, 30, 0.2F)
|
| 670 | .addModifiers(
|
| 671 | Holder.direct(
|
| 672 | ExplorationMapFunction.makeExplorationMap(structures.getOrThrow(StructureTags.ON_WOODLAND_MANSION_MAPS))
|
| 673 | .setMapDecoration(MapDecorationTypes.WOODLAND_MANSION)
|
| 674 | .setSearchRadius(100)
|
| 675 | .setSkipKnownStructures(true)
|
| 676 | .build()
|
| 677 | ),
|
| 678 | discardItemIfItsNot(anyValidMap())
|
| 679 | )
|
| 680 | .build()
|
| 681 | );
|
| 682 | register(
|
| 683 | context,
|
| 684 | CLERIC_1_ROTTEN_FLESH_EMERALD,
|
| 685 | VillagerTrade.builder(new TradeCost(Items.ROTTEN_FLESH, 32), new ItemStackTemplate(Items.EMERALD), 16, 2, 0.05F).build()
|
| 686 | );
|
| 687 | register(
|
| 688 | context, CLERIC_1_EMERALD_REDSTONE, VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.REDSTONE, 2), 12, 1, 0.05F).build()
|
| 689 | );
|
| 690 | register(
|
| 691 | context, CLERIC_2_GOLD_INGOT_EMERALD, VillagerTrade.builder(new TradeCost(Items.GOLD_INGOT, 3), new ItemStackTemplate(Items.EMERALD), 12, 10, 0.05F).build()
|
| 692 | );
|
| 693 | register(
|
| 694 | context,
|
| 695 | CLERIC_2_EMERALD_LAPIS_LAZULI,
|
| 696 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.LAPIS_LAZULI), 12, 5, 0.05F).build()
|
| 697 | );
|
| 698 | register(
|
| 699 | context,
|
| 700 | CLERIC_3_RABBIT_FOOT_EMERALD,
|
| 701 | VillagerTrade.builder(new TradeCost(Items.RABBIT_FOOT, 2), new ItemStackTemplate(Items.EMERALD), 12, 20, 0.05F).build()
|
| 702 | );
|
| 703 | register(
|
| 704 | context, CLERIC_3_EMERALD_GLOWSTONE, VillagerTrade.builder(new TradeCost(Items.EMERALD, 4), new ItemStackTemplate(Items.GLOWSTONE), 12, 10, 0.05F).build()
|
| 705 | );
|
| 706 | register(
|
| 707 | context,
|
| 708 | CLERIC_4_TURTLE_SCUTE_EMERALD,
|
| 709 | VillagerTrade.builder(new TradeCost(Items.TURTLE_SCUTE, 4), new ItemStackTemplate(Items.EMERALD), 12, 30, 0.05F).build()
|
| 710 | );
|
| 711 | register(
|
| 712 | context,
|
| 713 | CLERIC_4_GLASS_BOTTLE_EMERALD,
|
| 714 | VillagerTrade.builder(new TradeCost(Items.GLASS_BOTTLE, 9), new ItemStackTemplate(Items.EMERALD), 12, 30, 0.05F).build()
|
| 715 | );
|
| 716 | register(
|
| 717 | context,
|
| 718 | CLERIC_4_EMERALD_ENDER_PEARL,
|
| 719 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 5), new ItemStackTemplate(Items.ENDER_PEARL), 12, 15, 0.05F).build()
|
| 720 | );
|
| 721 | register(
|
| 722 | context,
|
| 723 | CLERIC_5_NETHER_WART_EMERALD,
|
| 724 | VillagerTrade.builder(new TradeCost(Items.NETHER_WART, 22), new ItemStackTemplate(Items.EMERALD), 12, 30, 0.05F).build()
|
| 725 | );
|
| 726 | register(
|
| 727 | context,
|
| 728 | CLERIC_5_EMERALD_EXPERIENCE_BOTTLE,
|
| 729 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 3), new ItemStackTemplate(Items.EXPERIENCE_BOTTLE), 12, 30, 0.05F).build()
|
| 730 | );
|
| 731 | register(
|
| 732 | context, COMMON_SMITH_1_COAL_EMERALD, VillagerTrade.builder(new TradeCost(Items.COAL, 15), new ItemStackTemplate(Items.EMERALD), 16, 2, 0.05F).build()
|
| 733 | );
|
| 734 | register(
|
| 735 | context,
|
| 736 | COMMON_SMITH_2_IRON_INGOT_EMERALD,
|
| 737 | VillagerTrade.builder(new TradeCost(Items.IRON_INGOT, 4), new ItemStackTemplate(Items.EMERALD), 12, 10, 0.05F).build()
|
| 738 | );
|
| 739 | register(
|
| 740 | context, COMMON_SMITH_2_EMERALD_BELL, VillagerTrade.builder(new TradeCost(Items.EMERALD, 36), new ItemStackTemplate(Items.BELL), 12, 5, 0.2F).build()
|
| 741 | );
|
| 742 | register(
|
| 743 | context,
|
| 744 | ARMORER_1_EMERALD_IRON_LEGGINGS,
|
| 745 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 7), new ItemStackTemplate(Items.IRON_LEGGINGS), 12, 1, 0.2F).build()
|
| 746 | );
|
| 747 | register(
|
| 748 | context, ARMORER_1_EMERALD_IRON_BOOTS, VillagerTrade.builder(new TradeCost(Items.EMERALD, 4), new ItemStackTemplate(Items.IRON_BOOTS), 12, 1, 0.2F).build()
|
| 749 | );
|
| 750 | register(
|
| 751 | context,
|
| 752 | ARMORER_1_EMERALD_IRON_HELMET,
|
| 753 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 5), new ItemStackTemplate(Items.IRON_HELMET), 12, 1, 0.2F).build()
|
| 754 | );
|
| 755 | register(
|
| 756 | context,
|
| 757 | ARMORER_1_EMERALD_IRON_CHESTPLATE,
|
| 758 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 9), new ItemStackTemplate(Items.IRON_CHESTPLATE), 12, 1, 0.2F).build()
|
| 759 | );
|
| 760 | register(
|
| 761 | context,
|
| 762 | ARMORER_2_EMERALD_CHAINMAIL_BOOTS,
|
| 763 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.CHAINMAIL_BOOTS), 12, 5, 0.2F).build()
|
| 764 | );
|
| 765 | register(
|
| 766 | context,
|
| 767 | ARMORER_2_EMERALD_CHAINMAIL_LEGGINGS,
|
| 768 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 3), new ItemStackTemplate(Items.CHAINMAIL_LEGGINGS), 12, 5, 0.2F).build()
|
| 769 | );
|
| 770 | register(
|
| 771 | context,
|
| 772 | ARMORER_3_LAVA_BUCKET_EMERALD,
|
| 773 | VillagerTrade.builder(new TradeCost(Items.LAVA_BUCKET, 1), new ItemStackTemplate(Items.EMERALD), 12, 20, 0.05F).build()
|
| 774 | );
|
| 775 | register(
|
| 776 | context,
|
| 777 | ARMORER_3_EMERALD_CHAINMAIL_HELMET,
|
| 778 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.CHAINMAIL_HELMET), 12, 10, 0.2F).build()
|
| 779 | );
|
| 780 | register(
|
| 781 | context,
|
| 782 | ARMORER_3_EMERALD_CHAINMAIL_CHESTPLATE,
|
| 783 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 4), new ItemStackTemplate(Items.CHAINMAIL_CHESTPLATE), 12, 10, 0.2F).build()
|
| 784 | );
|
| 785 | register(context, ARMORER_3_EMERALD_SHIELD, VillagerTrade.builder(new TradeCost(Items.EMERALD, 5), new ItemStackTemplate(Items.SHIELD), 12, 10, 0.2F).build());
|
| 786 | register(
|
| 787 | context, ARMORER_3_DIAMOND_EMERALD, VillagerTrade.builder(new TradeCost(Items.DIAMOND, 1), new ItemStackTemplate(Items.EMERALD), 12, 20, 0.05F).build()
|
| 788 | );
|
| 789 | register(
|
| 790 | context,
|
| 791 | ARMORER_4_EMERALD_ENCHANTED_DIAMOND_LEGGINGS,
|
| 792 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 14), new ItemStackTemplate(Items.DIAMOND_LEGGINGS), 3, 15, 0.2F)
|
| 793 | .addModifiers(enchantedItem(items, enchantmentsForTradedEquipment, Items.DIAMOND_LEGGINGS))
|
| 794 | .build()
|
| 795 | );
|
| 796 | register(
|
| 797 | context,
|
| 798 | ARMORER_4_EMERALD_ENCHANTED_DIAMOND_BOOTS,
|
| 799 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 8), new ItemStackTemplate(Items.DIAMOND_BOOTS), 3, 15, 0.2F)
|
| 800 | .addModifiers(enchantedItem(items, enchantmentsForTradedEquipment, Items.DIAMOND_BOOTS))
|
| 801 | .build()
|
| 802 | );
|
| 803 | register(
|
| 804 | context,
|
| 805 | ARMORER_5_EMERALD_ENCHANTED_DIAMOND_HELMET,
|
| 806 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 8), new ItemStackTemplate(Items.DIAMOND_HELMET), 3, 30, 0.2F)
|
| 807 | .addModifiers(enchantedItem(items, enchantmentsForTradedEquipment, Items.DIAMOND_HELMET))
|
| 808 | .build()
|
| 809 | );
|
| 810 | register(
|
| 811 | context,
|
| 812 | ARMORER_5_EMERALD_ENCHANTED_DIAMOND_CHESTPLATE,
|
| 813 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 16), new ItemStackTemplate(Items.DIAMOND_CHESTPLATE), 3, 30, 0.2F)
|
| 814 | .addModifiers(enchantedItem(items, enchantmentsForTradedEquipment, Items.DIAMOND_CHESTPLATE))
|
| 815 | .build()
|
| 816 | );
|
| 817 | register(
|
| 818 | context, WEAPONSMITH_1_EMERALD_IRON_AXE, VillagerTrade.builder(new TradeCost(Items.EMERALD, 3), new ItemStackTemplate(Items.IRON_AXE), 12, 1, 0.2F).build()
|
| 819 | );
|
| 820 | register(
|
| 821 | context,
|
| 822 | WEAPONSMITH_1_EMERALD_ENCHANTED_IRON_SWORD,
|
| 823 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 2), new ItemStackTemplate(Items.IRON_SWORD), 12, 1, 0.2F)
|
| 824 | .addModifiers(enchantedItem(items, enchantmentsForTradedEquipment, Items.IRON_SWORD))
|
| 825 | .build()
|
| 826 | );
|
| 827 | register(
|
| 828 | context, WEAPONSMITH_3_FLINT_EMERALD, VillagerTrade.builder(new TradeCost(Items.FLINT, 24), new ItemStackTemplate(Items.EMERALD), 12, 20, 0.05F).build()
|
| 829 | );
|
| 830 | register(
|
| 831 | context,
|
| 832 | WEAPONSMITH_4_EMERALD_ENCHANTED_DIAMOND_AXE,
|
| 833 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 12), new ItemStackTemplate(Items.DIAMOND_AXE), 3, 15, 0.2F)
|
| 834 | .addModifiers(enchantedItem(items, enchantmentsForTradedEquipment, Items.DIAMOND_AXE))
|
| 835 | .build()
|
| 836 | );
|
| 837 | register(
|
| 838 | context, WEAPONSMITH_4_DIAMOND_EMERALD, VillagerTrade.builder(new TradeCost(Items.DIAMOND, 1), new ItemStackTemplate(Items.EMERALD), 12, 30, 0.05F).build()
|
| 839 | );
|
| 840 | register(
|
| 841 | context,
|
| 842 | WEAPONSMITH_5_EMERALD_ENCHANTED_DIAMOND_SWORD,
|
| 843 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 8), new ItemStackTemplate(Items.DIAMOND_SWORD), 3, 30, 0.2F)
|
| 844 | .addModifiers(enchantedItem(items, enchantmentsForTradedEquipment, Items.DIAMOND_SWORD))
|
| 845 | .build()
|
| 846 | );
|
| 847 | register(
|
| 848 | context, TOOLSMITH_1_EMERALD_STONE_AXE, VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.STONE_AXE), 12, 1, 0.2F).build()
|
| 849 | );
|
| 850 | register(
|
| 851 | context,
|
| 852 | TOOLSMITH_1_EMERALD_STONE_SHOVEL,
|
| 853 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.STONE_SHOVEL), 12, 1, 0.2F).build()
|
| 854 | );
|
| 855 | register(
|
| 856 | context,
|
| 857 | TOOLSMITH_1_EMERALD_STONE_PICKAXE,
|
| 858 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.STONE_PICKAXE), 12, 1, 0.2F).build()
|
| 859 | );
|
| 860 | register(
|
| 861 | context, TOOLSMITH_1_EMERALD_STONE_HOE, VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.STONE_HOE), 12, 1, 0.2F).build()
|
| 862 | );
|
| 863 | register(
|
| 864 | context, TOOLSMITH_3_FLINT_EMERALD, VillagerTrade.builder(new TradeCost(Items.FLINT, 30), new ItemStackTemplate(Items.EMERALD), 12, 20, 0.05F).build()
|
| 865 | );
|
| 866 | register(
|
| 867 | context,
|
| 868 | TOOLSMITH_3_EMERALD_IRON_AXE,
|
| 869 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.IRON_AXE), 3, 10, 0.2F)
|
| 870 | .addModifiers(enchantedItem(items, enchantmentsForTradedEquipment, Items.IRON_AXE))
|
| 871 | .build()
|
| 872 | );
|
| 873 | register(
|
| 874 | context,
|
| 875 | TOOLSMITH_3_EMERALD_IRON_SHOVEL,
|
| 876 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 2), new ItemStackTemplate(Items.IRON_SHOVEL), 3, 10, 0.2F)
|
| 877 | .addModifiers(enchantedItem(items, enchantmentsForTradedEquipment, Items.IRON_SHOVEL))
|
| 878 | .build()
|
| 879 | );
|
| 880 | register(
|
| 881 | context,
|
| 882 | TOOLSMITH_3_EMERALD_IRON_PICKAXE,
|
| 883 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 3), new ItemStackTemplate(Items.IRON_PICKAXE), 3, 10, 0.2F)
|
| 884 | .addModifiers(enchantedItem(items, enchantmentsForTradedEquipment, Items.IRON_PICKAXE))
|
| 885 | .build()
|
| 886 | );
|
| 887 | register(
|
| 888 | context,
|
| 889 | TOOLSMITH_3_EMERALD_DIAMOND_HOE,
|
| 890 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 4), new ItemStackTemplate(Items.DIAMOND_HOE), 3, 10, 0.2F).build()
|
| 891 | );
|
| 892 | register(
|
| 893 | context,
|
| 894 | TOOLSMITH_4_EMERALD_DIAMOND_AXE,
|
| 895 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 12), new ItemStackTemplate(Items.DIAMOND_AXE), 3, 15, 0.2F)
|
| 896 | .addModifiers(enchantedItem(items, enchantmentsForTradedEquipment, Items.DIAMOND_AXE))
|
| 897 | .build()
|
| 898 | );
|
| 899 | register(
|
| 900 | context,
|
| 901 | TOOLSMITH_4_EMERALD_DIAMOND_SHOVEL,
|
| 902 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 5), new ItemStackTemplate(Items.DIAMOND_SHOVEL), 3, 15, 0.2F)
|
| 903 | .addModifiers(enchantedItem(items, enchantmentsForTradedEquipment, Items.DIAMOND_SHOVEL))
|
| 904 | .build()
|
| 905 | );
|
| 906 | register(
|
| 907 | context, TOOLSMITH_4_DIAMOND_EMERALD, VillagerTrade.builder(new TradeCost(Items.DIAMOND, 1), new ItemStackTemplate(Items.EMERALD), 12, 30, 0.05F).build()
|
| 908 | );
|
| 909 | register(
|
| 910 | context,
|
| 911 | TOOLSMITH_5_EMERALD_DIAMOND_PICKAXE,
|
| 912 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 13), new ItemStackTemplate(Items.DIAMOND_PICKAXE), 3, 30, 0.2F)
|
| 913 | .addModifiers(enchantedItem(items, enchantmentsForTradedEquipment, Items.DIAMOND_PICKAXE))
|
| 914 | .build()
|
| 915 | );
|
| 916 | register(
|
| 917 | context, BUTCHER_1_CHICKEN_EMERALD, VillagerTrade.builder(new TradeCost(Items.CHICKEN, 14), new ItemStackTemplate(Items.EMERALD), 16, 2, 0.05F).build()
|
| 918 | );
|
| 919 | register(
|
| 920 | context, BUTCHER_1_PORKCHOP_EMERALD, VillagerTrade.builder(new TradeCost(Items.PORKCHOP, 7), new ItemStackTemplate(Items.EMERALD), 16, 2, 0.05F).build()
|
| 921 | );
|
| 922 | register(context, BUTCHER_1_RABBIT_EMERALD, VillagerTrade.builder(new TradeCost(Items.RABBIT, 4), new ItemStackTemplate(Items.EMERALD), 16, 2, 0.05F).build());
|
| 923 | register(
|
| 924 | context,
|
| 925 | BUTCHER_1_EMERALD_RABBIT_STEW,
|
| 926 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.RABBIT_STEW), 12, 1, 0.05F).build()
|
| 927 | );
|
| 928 | register(context, BUTCHER_2_COAL_EMERALD, VillagerTrade.builder(new TradeCost(Items.COAL, 15), new ItemStackTemplate(Items.EMERALD), 16, 2, 0.05F).build());
|
| 929 | register(
|
| 930 | context,
|
| 931 | BUTCHER_2_EMERALD_COOKED_PORKCHOP,
|
| 932 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.COOKED_PORKCHOP, 5), 16, 5, 0.05F).build()
|
| 933 | );
|
| 934 | register(
|
| 935 | context,
|
| 936 | BUTCHER_2_EMERALD_COOKED_CHICKEN,
|
| 937 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.COOKED_CHICKEN, 8), 16, 5, 0.05F).build()
|
| 938 | );
|
| 939 | register(
|
| 940 | context, BUTCHER_3_MUTTON_EMERALD, VillagerTrade.builder(new TradeCost(Items.MUTTON, 7), new ItemStackTemplate(Items.EMERALD), 16, 20, 0.05F).build()
|
| 941 | );
|
| 942 | register(context, BUTCHER_3_BEEF_EMERALD, VillagerTrade.builder(new TradeCost(Items.BEEF, 10), new ItemStackTemplate(Items.EMERALD), 16, 20, 0.05F).build());
|
| 943 | register(
|
| 944 | context,
|
| 945 | BUTCHER_4_DRIED_KELP_BLOCK_EMERALD,
|
| 946 | VillagerTrade.builder(new TradeCost(Items.DRIED_KELP_BLOCK, 10), new ItemStackTemplate(Items.EMERALD), 12, 30, 0.05F).build()
|
| 947 | );
|
| 948 | register(
|
| 949 | context,
|
| 950 | BUTCHER_5_SWEET_BERRIES_EMERALD,
|
| 951 | VillagerTrade.builder(new TradeCost(Items.SWEET_BERRIES, 10), new ItemStackTemplate(Items.EMERALD), 12, 30, 0.05F).build()
|
| 952 | );
|
| 953 | register(
|
| 954 | context, LEATHERWORKER_1_LEATHER_EMERALD, VillagerTrade.builder(new TradeCost(Items.LEATHER, 6), new ItemStackTemplate(Items.EMERALD), 16, 2, 0.05F).build()
|
| 955 | );
|
| 956 | register(
|
| 957 | context,
|
| 958 | LEATHERWORKER_1_EMERALD_DYED_LEATHER_LEGGINGS,
|
| 959 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 3), new ItemStackTemplate(Items.LEATHER_LEGGINGS), 12, 1, 0.2F)
|
| 960 | .addModifiers(dyedItem(items, Items.LEATHER_LEGGINGS))
|
| 961 | .build()
|
| 962 | );
|
| 963 | register(
|
| 964 | context,
|
| 965 | LEATHERWORKER_1_EMERALD_DYED_LEATHER_CHESTPLATE,
|
| 966 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 7), new ItemStackTemplate(Items.LEATHER_CHESTPLATE), 12, 1, 0.2F)
|
| 967 | .addModifiers(dyedItem(items, Items.LEATHER_CHESTPLATE))
|
| 968 | .build()
|
| 969 | );
|
| 970 | register(
|
| 971 | context, LEATHERWORKER_2_FLINT_EMERALD, VillagerTrade.builder(new TradeCost(Items.FLINT, 26), new ItemStackTemplate(Items.EMERALD), 12, 10, 0.05F).build()
|
| 972 | );
|
| 973 | register(
|
| 974 | context,
|
| 975 | LEATHERWORKER_2_EMERALD_DYED_LEATHER_HELMET,
|
| 976 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 5), new ItemStackTemplate(Items.LEATHER_HELMET), 12, 5, 0.2F)
|
| 977 | .addModifiers(dyedItem(items, Items.LEATHER_HELMET))
|
| 978 | .build()
|
| 979 | );
|
| 980 | register(
|
| 981 | context,
|
| 982 | LEATHERWORKER_2_EMERALD_DYED_LEATHER_BOOTS,
|
| 983 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 4), new ItemStackTemplate(Items.LEATHER_BOOTS), 12, 5, 0.2F)
|
| 984 | .addModifiers(dyedItem(items, Items.LEATHER_BOOTS))
|
| 985 | .build()
|
| 986 | );
|
| 987 | register(
|
| 988 | context,
|
| 989 | LEATHERWORKER_3_RABBIT_HIDE_EMERALD,
|
| 990 | VillagerTrade.builder(new TradeCost(Items.RABBIT_HIDE, 9), new ItemStackTemplate(Items.EMERALD), 12, 20, 0.05F).build()
|
| 991 | );
|
| 992 | register(
|
| 993 | context,
|
| 994 | LEATHERWORKER_3_EMERALD_DYED_LEATHER_CHESTPLATE,
|
| 995 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 7), new ItemStackTemplate(Items.LEATHER_CHESTPLATE), 12, 1, 0.2F)
|
| 996 | .addModifiers(dyedItem(items, Items.LEATHER_CHESTPLATE))
|
| 997 | .build()
|
| 998 | );
|
| 999 | register(
|
| 1000 | context,
|
| 1001 | LEATHERWORKER_4_TURTLE_SCUTE_EMERALD,
|
| 1002 | VillagerTrade.builder(new TradeCost(Items.TURTLE_SCUTE, 4), new ItemStackTemplate(Items.EMERALD), 12, 30, 0.05F).build()
|
| 1003 | );
|
| 1004 | register(
|
| 1005 | context,
|
| 1006 | LEATHERWORKER_4_EMERALD_DYED_LEATHER_HORSE_ARMOR,
|
| 1007 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 6), new ItemStackTemplate(Items.LEATHER_HORSE_ARMOR), 12, 15, 0.2F)
|
| 1008 | .addModifiers(dyedItem(items, Items.LEATHER_HORSE_ARMOR))
|
| 1009 | .build()
|
| 1010 | );
|
| 1011 | register(
|
| 1012 | context, LEATHERWORKER_5_EMERALD_SADDLE, VillagerTrade.builder(new TradeCost(Items.EMERALD, 6), new ItemStackTemplate(Items.SADDLE), 12, 30, 0.2F).build()
|
| 1013 | );
|
| 1014 | register(
|
| 1015 | context,
|
| 1016 | LEATHERWORKER_5_EMERALD_DYED_LEATHER_HELMET,
|
| 1017 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 5), new ItemStackTemplate(Items.LEATHER_HELMET), 12, 5, 0.2F)
|
| 1018 | .addModifiers(dyedItem(items, Items.LEATHER_HELMET))
|
| 1019 | .build()
|
| 1020 | );
|
| 1021 | register(
|
| 1022 | context, MASON_1_CLAY_BALL_EMERALD, VillagerTrade.builder(new TradeCost(Items.CLAY_BALL, 10), new ItemStackTemplate(Items.EMERALD), 16, 2, 0.05F).build()
|
| 1023 | );
|
| 1024 | register(context, MASON_1_EMERALD_BRICK, VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.BRICK, 10), 16, 1, 0.05F).build());
|
| 1025 | register(context, MASON_2_STONE_EMERALD, VillagerTrade.builder(new TradeCost(Items.STONE, 20), new ItemStackTemplate(Items.EMERALD), 16, 10, 0.05F).build());
|
| 1026 | register(
|
| 1027 | context,
|
| 1028 | MASON_2_EMERALD_CHISELED_STONE_BRICKS,
|
| 1029 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.CHISELED_STONE_BRICKS, 4), 16, 5, 0.05F).build()
|
| 1030 | );
|
| 1031 | registerMasonLevelThreeStones(context);
|
| 1032 | registerMasonLevelThreeBlocks(context);
|
| 1033 | register(context, MASON_4_QUARTZ_EMERALD, VillagerTrade.builder(new TradeCost(Items.QUARTZ, 12), new ItemStackTemplate(Items.EMERALD), 12, 30, 0.05F).build());
|
| 1034 | registerMasonLevelFourTerracotta(context);
|
| 1035 | register(
|
| 1036 | context,
|
| 1037 | MASON_5_EMERALD_QUARTZ_PILLAR,
|
| 1038 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.QUARTZ_PILLAR), 12, 30, 0.05F).build()
|
| 1039 | );
|
| 1040 | register(
|
| 1041 | context,
|
| 1042 | MASON_5_EMERALD_QUARTZ_BLOCK,
|
| 1043 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.QUARTZ_BLOCK), 12, 30, 0.05F).build()
|
| 1044 | );
|
| 1045 | context.register(
|
| 1046 | WANDERING_TRADER_WATER_BOTTLE_EMERALD,
|
| 1047 | VillagerTrade.builder(
|
| 1048 | new TradeCost(
|
| 1049 | Items.POTION.builtInRegistryHolder(),
|
| 1050 | ContextIntProviders.exactly(1),
|
| 1051 | DataComponentExactPredicate.expect(DataComponents.POTION_CONTENTS, new PotionContents(Potions.WATER))
|
| 1052 | ),
|
| 1053 | new ItemStackTemplate(Items.EMERALD),
|
| 1054 | 2,
|
| 1055 | 1,
|
| 1056 | 0.05F
|
| 1057 | )
|
| 1058 | .build()
|
| 1059 | );
|
| 1060 | context.register(
|
| 1061 | WANDERING_TRADER_WATER_BUCKET_EMERALD,
|
| 1062 | VillagerTrade.builder(new TradeCost(Items.WATER_BUCKET, 1), new ItemStackTemplate(Items.EMERALD, 2), 2, 1, 0.05F).build()
|
| 1063 | );
|
| 1064 | context.register(
|
| 1065 | WANDERING_TRADER_MILK_BUCKET_EMERALD,
|
| 1066 | VillagerTrade.builder(new TradeCost(Items.MILK_BUCKET, 1), new ItemStackTemplate(Items.EMERALD, 2), 2, 1, 0.05F).build()
|
| 1067 | );
|
| 1068 | context.register(
|
| 1069 | WANDERING_TRADER_FERMENTED_SPIDER_EYE_EMERALD,
|
| 1070 | VillagerTrade.builder(new TradeCost(Items.FERMENTED_SPIDER_EYE, 1), new ItemStackTemplate(Items.EMERALD, 3), 2, 1, 0.05F).build()
|
| 1071 | );
|
| 1072 | context.register(
|
| 1073 | WANDERING_TRADER_BAKED_POTATO_EMERALD,
|
| 1074 | VillagerTrade.builder(new TradeCost(Items.BAKED_POTATO, 4), new ItemStackTemplate(Items.EMERALD, 1), 2, 1, 0.05F).build()
|
| 1075 | );
|
| 1076 | context.register(
|
| 1077 | WANDERING_TRADER_HAY_BLOCK_EMERALD, VillagerTrade.builder(new TradeCost(Items.HAY_BLOCK, 1), new ItemStackTemplate(Items.EMERALD), 2, 1, 0.05F).build()
|
| 1078 | );
|
| 1079 | context.register(
|
| 1080 | WANDERING_TRADER_EMERALD_PACKED_ICE, VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.PACKED_ICE), 6, 1, 0.05F).build()
|
| 1081 | );
|
| 1082 | context.register(
|
| 1083 | WANDERING_TRADER_EMERALD_BLUE_ICE, VillagerTrade.builder(new TradeCost(Items.EMERALD, 6), new ItemStackTemplate(Items.BLUE_ICE), 6, 1, 0.05F).build()
|
| 1084 | );
|
| 1085 | context.register(
|
| 1086 | WANDERING_TRADER_EMERALD_GUNPOWDER, VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.GUNPOWDER, 4), 2, 1, 0.05F).build()
|
| 1087 | );
|
| 1088 | context.register(
|
| 1089 | WANDERING_TRADER_EMERALD_PODZOL, VillagerTrade.builder(new TradeCost(Items.EMERALD, 3), new ItemStackTemplate(Items.PODZOL, 3), 6, 1, 0.05F).build()
|
| 1090 | );
|
| 1091 | context.register(WANDERING_TRADER_EMERALD_ACACIA_LOG, createWanderingTraderLogSell(Items.ACACIA_LOG));
|
| 1092 | context.register(WANDERING_TRADER_EMERALD_BIRCH_LOG, createWanderingTraderLogSell(Items.BIRCH_LOG));
|
| 1093 | context.register(WANDERING_TRADER_EMERALD_DARK_OAK_LOG, createWanderingTraderLogSell(Items.DARK_OAK_LOG));
|
| 1094 | context.register(WANDERING_TRADER_EMERALD_JUNGLE_LOG, createWanderingTraderLogSell(Items.JUNGLE_LOG));
|
| 1095 | context.register(WANDERING_TRADER_EMERALD_OAK_LOG, createWanderingTraderLogSell(Items.OAK_LOG));
|
| 1096 | context.register(WANDERING_TRADER_EMERALD_SPRUCE_LOG, createWanderingTraderLogSell(Items.SPRUCE_LOG));
|
| 1097 | context.register(WANDERING_TRADER_EMERALD_CHERRY_LOG, createWanderingTraderLogSell(Items.CHERRY_LOG));
|
| 1098 | context.register(WANDERING_TRADER_EMERALD_MANGROVE_LOG, createWanderingTraderLogSell(Items.MANGROVE_LOG));
|
| 1099 | context.register(WANDERING_TRADER_EMERALD_PALE_OAK_LOG, createWanderingTraderLogSell(Items.PALE_OAK_LOG));
|
| 1100 | context.register(WANDERING_TRADER_EMERALD_POPLAR_LOG, createWanderingTraderLogSell(Items.POPLAR_LOG));
|
| 1101 | context.register(
|
| 1102 | WANDERING_TRADER_EMERALD_ENCHANTED_IRON_PICKAXE,
|
| 1103 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.IRON_PICKAXE), 1, 1, 0.2F)
|
| 1104 | .addModifiers(enchantedItem(items, enchantmentsForTradedEquipment, Items.IRON_PICKAXE))
|
| 1105 | .build()
|
| 1106 | );
|
| 1107 | context.register(
|
| 1108 | WANDERING_TRADER_EMERALD_LONG_INVISIBILITY_POTION,
|
| 1109 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 5), new ItemStackTemplate(Items.POTION), 1, 1, 0.05F)
|
| 1110 | .addModifier(SetPotionFunction.setPotion(Potions.LONG_INVISIBILITY))
|
| 1111 | .build()
|
| 1112 | );
|
| 1113 | context.register(
|
| 1114 | WANDERING_TRADER_EMERALD_TROPICAL_FISH_BUCKET,
|
| 1115 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 3), new ItemStackTemplate(Items.TROPICAL_FISH_BUCKET), 4, 1, 0.05F).build()
|
| 1116 | );
|
| 1117 | context.register(
|
| 1118 | WANDERING_TRADER_EMERALD_PUFFERFISH_BUCKET,
|
| 1119 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 3), new ItemStackTemplate(Items.PUFFERFISH_BUCKET), 4, 1, 0.05F).build()
|
| 1120 | );
|
| 1121 | context.register(
|
| 1122 | WANDERING_TRADER_EMERALD_SEA_PICKLE, VillagerTrade.builder(new TradeCost(Items.EMERALD, 2), new ItemStackTemplate(Items.SEA_PICKLE), 5, 1, 0.05F).build()
|
| 1123 | );
|
| 1124 | context.register(
|
| 1125 | WANDERING_TRADER_EMERALD_SLIME_BALL, VillagerTrade.builder(new TradeCost(Items.EMERALD, 4), new ItemStackTemplate(Items.SLIME_BALL), 5, 1, 0.05F).build()
|
| 1126 | );
|
| 1127 | context.register(
|
| 1128 | WANDERING_TRADER_EMERALD_GLOWSTONE, VillagerTrade.builder(new TradeCost(Items.EMERALD, 2), new ItemStackTemplate(Items.GLOWSTONE), 5, 1, 0.05F).build()
|
| 1129 | );
|
| 1130 | context.register(
|
| 1131 | WANDERING_TRADER_EMERALD_NAUTILUS_SHELL,
|
| 1132 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 5), new ItemStackTemplate(Items.NAUTILUS_SHELL), 5, 1, 0.05F).build()
|
| 1133 | );
|
| 1134 | context.register(
|
| 1135 | WANDERING_TRADER_EMERALD_FERN, VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.FERN), 12, 1, 0.05F).build()
|
| 1136 | );
|
| 1137 | context.register(
|
| 1138 | WANDERING_TRADER_EMERALD_SUGAR_CANE, VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.SUGAR_CANE), 8, 1, 0.05F).build()
|
| 1139 | );
|
| 1140 | context.register(
|
| 1141 | WANDERING_TRADER_EMERALD_PUMPKIN, VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.PUMPKIN), 4, 1, 0.05F).build()
|
| 1142 | );
|
| 1143 | context.register(
|
| 1144 | WANDERING_TRADER_EMERALD_KELP, VillagerTrade.builder(new TradeCost(Items.EMERALD, 3), new ItemStackTemplate(Items.KELP), 12, 1, 0.05F).build()
|
| 1145 | );
|
| 1146 | context.register(
|
| 1147 | WANDERING_TRADER_EMERALD_CACTUS, VillagerTrade.builder(new TradeCost(Items.EMERALD, 3), new ItemStackTemplate(Items.CACTUS), 8, 1, 0.05F).build()
|
| 1148 | );
|
| 1149 | registerWanderingTraderFlowers(context);
|
| 1150 | registerWanderingTraderSeeds(context);
|
| 1151 | registerWanderingTraderSaplings(context);
|
| 1152 | registerWanderingTraderDyes(context);
|
| 1153 | context.register(WANDERING_TRADER_EMERALD_BRAIN_CORAL_BLOCK, createWanderingTraderCoralBlockSell(Items.BRAIN_CORAL_BLOCK));
|
| 1154 | context.register(WANDERING_TRADER_EMERALD_BUBBLE_CORAL_BLOCK, createWanderingTraderCoralBlockSell(Items.BUBBLE_CORAL_BLOCK));
|
| 1155 | context.register(WANDERING_TRADER_EMERALD_FIRE_CORAL_BLOCK, createWanderingTraderCoralBlockSell(Items.FIRE_CORAL_BLOCK));
|
| 1156 | context.register(WANDERING_TRADER_EMERALD_HORN_CORAL_BLOCK, createWanderingTraderCoralBlockSell(Items.HORN_CORAL_BLOCK));
|
| 1157 | context.register(WANDERING_TRADER_EMERALD_TUBE_CORAL_BLOCK, createWanderingTraderCoralBlockSell(Items.TUBE_CORAL_BLOCK));
|
| 1158 | context.register(
|
| 1159 | WANDERING_TRADER_EMERALD_VINE, VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.VINE, 3), 4, 1, 0.05F).build()
|
| 1160 | );
|
| 1161 | context.register(
|
| 1162 | WANDERING_TRADER_EMERALD_PALE_HANGING_MOSS,
|
| 1163 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.PALE_HANGING_MOSS, 3), 4, 1, 0.05F).build()
|
| 1164 | );
|
| 1165 | context.register(
|
| 1166 | WANDERING_TRADER_EMERALD_BROWN_MUSHROOM,
|
| 1167 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.BROWN_MUSHROOM, 3), 4, 1, 0.05F).build()
|
| 1168 | );
|
| 1169 | context.register(
|
| 1170 | WANDERING_TRADER_EMERALD_RED_MUSHROOM,
|
| 1171 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.RED_MUSHROOM, 3), 4, 1, 0.05F).build()
|
| 1172 | );
|
| 1173 | context.register(
|
| 1174 | WANDERING_TRADER_EMERALD_LILY_PAD, VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.LILY_PAD, 5), 2, 1, 0.05F).build()
|
| 1175 | );
|
| 1176 | context.register(
|
| 1177 | WANDERING_TRADER_EMERALD_SMALL_DRIPLEAF,
|
| 1178 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.SMALL_DRIPLEAF, 2), 5, 1, 0.05F).build()
|
| 1179 | );
|
| 1180 | context.register(
|
| 1181 | WANDERING_TRADER_EMERALD_SAND, VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.SAND, 8), 8, 1, 0.05F).build()
|
| 1182 | );
|
| 1183 | context.register(
|
| 1184 | WANDERING_TRADER_EMERALD_RED_SAND, VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.RED_SAND, 4), 6, 1, 0.05F).build()
|
| 1185 | );
|
| 1186 | context.register(
|
| 1187 | WANDERING_TRADER_EMERALD_POINTED_DRIPSTONE,
|
| 1188 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.POINTED_DRIPSTONE, 2), 5, 1, 0.05F).build()
|
| 1189 | );
|
| 1190 | context.register(
|
| 1191 | WANDERING_TRADER_EMERALD_SULFUR_SPIKE,
|
| 1192 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.SULFUR_SPIKE, 2), 5, 1, 0.05F).build()
|
| 1193 | );
|
| 1194 | context.register(
|
| 1195 | WANDERING_TRADER_EMERALD_ROOTED_DIRT,
|
| 1196 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.ROOTED_DIRT, 2), 5, 1, 0.05F).build()
|
| 1197 | );
|
| 1198 | context.register(
|
| 1199 | WANDERING_TRADER_EMERALD_MOSS_BLOCK, VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.MOSS_BLOCK, 2), 5, 1, 0.05F).build()
|
| 1200 | );
|
| 1201 | context.register(
|
| 1202 | WANDERING_TRADER_EMERALD_PALE_MOSS_BLOCK,
|
| 1203 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.PALE_MOSS_BLOCK, 2), 5, 1, 0.05F).build()
|
| 1204 | );
|
| 1205 | context.register(
|
| 1206 | WANDERING_TRADER_EMERALD_FIREFLY_BUSH,
|
| 1207 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 3), new ItemStackTemplate(Items.FIREFLY_BUSH), 12, 1, 0.05F).build()
|
| 1208 | );
|
| 1209 | context.register(
|
| 1210 | WANDERING_TRADER_EMERALD_NAME_TAG, VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.NAME_TAG), 5, 1, 0.05F).build()
|
| 1211 | );
|
| 1212 | context.register(
|
| 1213 | WANDERING_TRADER_EMERALD_SHELF_MUSHROOM,
|
| 1214 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(Items.SHELF_MUSHROOM, 3), 12, 1, 0.05F).build()
|
| 1215 | );
|
| 1216 | }
|
| 1217 |
|
| 1218 | private static VillagerTrade createWanderingTraderCoralBlockSell(final Item item) {
|
| 1219 | return VillagerTrade.builder(new TradeCost(Items.EMERALD, 3), new ItemStackTemplate(item), 8, 1, 0.05F).build();
|
| 1220 | }
|
| 1221 |
|
| 1222 | private static VillagerTrade createWanderingTraderLogSell(final Item item) {
|
| 1223 | return VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(item, 8), 4, 1, 0.05F).build();
|
| 1224 | }
|
| 1225 |
|
| 1226 | private static void registerWanderingTraderFlowers(final BootstrapContext<VillagerTrade> context) {
|
| 1227 | context.register(WANDERING_TRADER_EMERALD_BLUE_ORCHID, createWanderingTraderFlowerSell(Items.BLUE_ORCHID, 8));
|
| 1228 | context.register(WANDERING_TRADER_EMERALD_DANDELION, createWanderingTraderFlowerSell(Items.DANDELION, 12));
|
| 1229 | context.register(WANDERING_TRADER_EMERALD_POPPY, createWanderingTraderFlowerSell(Items.POPPY, 12));
|
| 1230 | context.register(WANDERING_TRADER_EMERALD_ALLIUM, createWanderingTraderFlowerSell(Items.ALLIUM, 12));
|
| 1231 | context.register(WANDERING_TRADER_EMERALD_AZURE_BLUET, createWanderingTraderFlowerSell(Items.AZURE_BLUET, 12));
|
| 1232 | context.register(WANDERING_TRADER_EMERALD_RED_TULIP, createWanderingTraderFlowerSell(Items.RED_TULIP, 12));
|
| 1233 | context.register(WANDERING_TRADER_EMERALD_ORANGE_TULIP, createWanderingTraderFlowerSell(Items.ORANGE_TULIP, 12));
|
| 1234 | context.register(WANDERING_TRADER_EMERALD_WHITE_TULIP, createWanderingTraderFlowerSell(Items.WHITE_TULIP, 12));
|
| 1235 | context.register(WANDERING_TRADER_EMERALD_PINK_TULIP, createWanderingTraderFlowerSell(Items.PINK_TULIP, 12));
|
| 1236 | context.register(WANDERING_TRADER_EMERALD_OXEYE_DAISY, createWanderingTraderFlowerSell(Items.OXEYE_DAISY, 12));
|
| 1237 | context.register(WANDERING_TRADER_EMERALD_CORNFLOWER, createWanderingTraderFlowerSell(Items.CORNFLOWER, 12));
|
| 1238 | context.register(WANDERING_TRADER_EMERALD_WILDFLOWERS, createWanderingTraderFlowerSell(Items.WILDFLOWERS, 12));
|
| 1239 | context.register(WANDERING_TRADER_EMERALD_DRY_TALL_GRASS, createWanderingTraderFlowerSell(Items.DRY_TALL_GRASS, 12));
|
| 1240 | context.register(WANDERING_TRADER_EMERALD_LILY_OF_THE_VALLEY, createWanderingTraderFlowerSell(Items.LILY_OF_THE_VALLEY, 7));
|
| 1241 | context.register(WANDERING_TRADER_EMERALD_OPEN_EYEBLOSSOM, createWanderingTraderFlowerSell(Items.OPEN_EYEBLOSSOM, 7));
|
| 1242 | context.register(
|
| 1243 | WANDERING_TRADER_EMERALD_GOLDEN_DANDELION,
|
| 1244 | VillagerTrade.builder(new TradeCost(Items.EMERALD, 2), new ItemStackTemplate(Items.GOLDEN_DANDELION), 12, 1, 0.05F).build()
|
| 1245 | );
|
| 1246 | }
|
| 1247 |
|
| 1248 | private static VillagerTrade createWanderingTraderFlowerSell(final Item item, final int maxUses) {
|
| 1249 | return VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(item), maxUses, 1, 0.05F).build();
|
| 1250 | }
|
| 1251 |
|
| 1252 | private static void registerWanderingTraderSeeds(final BootstrapContext<VillagerTrade> context) {
|
| 1253 | context.register(WANDERING_TRADER_EMERALD_WHEAT_SEEDS, createWanderingTraderSeedSell(Items.WHEAT_SEEDS));
|
| 1254 | context.register(WANDERING_TRADER_EMERALD_BEETROOT_SEEDS, createWanderingTraderSeedSell(Items.BEETROOT_SEEDS));
|
| 1255 | context.register(WANDERING_TRADER_EMERALD_PUMPKIN_SEEDS, createWanderingTraderSeedSell(Items.PUMPKIN_SEEDS));
|
| 1256 | context.register(WANDERING_TRADER_EMERALD_MELON_SEEDS, createWanderingTraderSeedSell(Items.MELON_SEEDS));
|
| 1257 | }
|
| 1258 |
|
| 1259 | private static VillagerTrade createWanderingTraderSeedSell(final Item item) {
|
| 1260 | return VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(item), 12, 1, 0.05F).build();
|
| 1261 | }
|
| 1262 |
|
| 1263 | private static void registerWanderingTraderSaplings(final BootstrapContext<VillagerTrade> context) {
|
| 1264 | context.register(WANDERING_TRADER_EMERALD_ACACIA_SAPLING, createWanderingTraderSaplingSell(Items.ACACIA_SAPLING));
|
| 1265 | context.register(WANDERING_TRADER_EMERALD_BIRCH_SAPLING, createWanderingTraderSaplingSell(Items.BIRCH_SAPLING));
|
| 1266 | context.register(WANDERING_TRADER_EMERALD_DARK_OAK_SAPLING, createWanderingTraderSaplingSell(Items.DARK_OAK_SAPLING));
|
| 1267 | context.register(WANDERING_TRADER_EMERALD_JUNGLE_SAPLING, createWanderingTraderSaplingSell(Items.JUNGLE_SAPLING));
|
| 1268 | context.register(WANDERING_TRADER_EMERALD_OAK_SAPLING, createWanderingTraderSaplingSell(Items.OAK_SAPLING));
|
| 1269 | context.register(WANDERING_TRADER_EMERALD_SPRUCE_SAPLING, createWanderingTraderSaplingSell(Items.SPRUCE_SAPLING));
|
| 1270 | context.register(WANDERING_TRADER_EMERALD_CHERRY_SAPLING, createWanderingTraderSaplingSell(Items.CHERRY_SAPLING));
|
| 1271 | context.register(WANDERING_TRADER_EMERALD_PALE_OAK_SAPLING, createWanderingTraderSaplingSell(Items.PALE_OAK_SAPLING));
|
| 1272 | context.register(WANDERING_TRADER_EMERALD_POPLAR_SAPLING, createWanderingTraderSaplingSell(Items.POPLAR_SAPLING));
|
| 1273 | context.register(WANDERING_TRADER_EMERALD_MANGROVE_PROPAGULE, createWanderingTraderSaplingSell(Items.MANGROVE_PROPAGULE));
|
| 1274 | }
|
| 1275 |
|
| 1276 | private static VillagerTrade createWanderingTraderSaplingSell(final Item item) {
|
| 1277 | return VillagerTrade.builder(new TradeCost(Items.EMERALD, 5), new ItemStackTemplate(item), 8, 1, 0.05F).build();
|
| 1278 | }
|
| 1279 |
|
| 1280 | private static void registerWanderingTraderDyes(final BootstrapContext<VillagerTrade> context) {
|
| 1281 | ColorCollection.zipApply(
|
| 1282 | WANDERING_TRADER_EMERALD_DYE,
|
| 1283 | Items.DYE,
|
| 1284 | (name, dye) -> context.register(name, VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(dye, 3), 12, 1, 0.05F).build())
|
| 1285 | );
|
| 1286 | }
|
| 1287 |
|
| 1288 | private static void registerMasonLevelFourTerracotta(final BootstrapContext<VillagerTrade> context) {
|
| 1289 | registerWanderingTraderTerracottaSellTrades(context, MASON_4_EMERALD_TERRACOTTA, Items.DYED_TERRACOTTA);
|
| 1290 | registerWanderingTraderTerracottaSellTrades(context, MASON_4_EMERALD_GLAZED_TERRACOTTA, Items.GLAZED_TERRACOTTA);
|
| 1291 | }
|
| 1292 |
|
| 1293 | private static void registerWanderingTraderTerracottaSellTrades(
|
| 1294 | final BootstrapContext<VillagerTrade> context, final ColorCollection<ResourceKey<VillagerTrade>> trades, final ColorCollection<Item> items
|
| 1295 | ) {
|
| 1296 | ColorCollection.zipApply(
|
| 1297 | trades,
|
| 1298 | items,
|
| 1299 | (trade, item) -> register(context, trade, VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(item), 12, 15, 0.05F).build())
|
| 1300 | );
|
| 1301 | }
|
| 1302 |
|
| 1303 | private static void registerMasonLevelThreeBlocks(final BootstrapContext<VillagerTrade> context) {
|
| 1304 | register(context, MASON_3_EMERALD_DRIPSTONE_BLOCK, createMasonStoneSell(Items.DRIPSTONE_BLOCK));
|
| 1305 | register(context, MASON_3_EMERALD_POLISHED_ANDESITE, createMasonStoneSell(Items.POLISHED_ANDESITE));
|
| 1306 | register(context, MASON_3_EMERALD_POLISHED_DIORITE, createMasonStoneSell(Items.POLISHED_DIORITE));
|
| 1307 | register(context, MASON_3_EMERALD_POLISHED_GRANTITE, createMasonStoneSell(Items.POLISHED_GRANITE));
|
| 1308 | }
|
| 1309 |
|
| 1310 | private static VillagerTrade createMasonStoneSell(final Item item) {
|
| 1311 | return VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(item, 4), 16, 10, 0.05F).build();
|
| 1312 | }
|
| 1313 |
|
| 1314 | private static void registerMasonLevelThreeStones(final BootstrapContext<VillagerTrade> context) {
|
| 1315 | register(context, MASON_3_GRANITE_EMERALD, createMasonStoneBuy(Items.GRANITE));
|
| 1316 | register(context, MASON_3_ANDESITE_EMERALD, createMasonStoneBuy(Items.ANDESITE));
|
| 1317 | register(context, MASON_3_DIORITE_EMERALD, createMasonStoneBuy(Items.DIORITE));
|
| 1318 | }
|
| 1319 |
|
| 1320 | private static VillagerTrade createMasonStoneBuy(final Item item) {
|
| 1321 | return VillagerTrade.builder(new TradeCost(item, 16), new ItemStackTemplate(Items.EMERALD), 16, 20, 0.05F).build();
|
| 1322 | }
|
| 1323 |
|
| 1324 | private static void registerBoatTrades(final BootstrapContext<VillagerTrade> context, final HolderGetter<VillagerType> villagerVariants) {
|
| 1325 | register(context, FISHERMAN_5_OAK_BOAT_EMERALD, createMasonBoatBuyTrade(villagerVariants, Items.OAK_BOAT, List.of(VillagerType.PLAINS)));
|
| 1326 | register(
|
| 1327 | context, FISHERMAN_5_SPRUCE_BOAT_EMERALD, createMasonBoatBuyTrade(villagerVariants, Items.SPRUCE_BOAT, List.of(VillagerType.TAIGA, VillagerType.SNOW))
|
| 1328 | );
|
| 1329 | register(
|
| 1330 | context, FISHERMAN_5_JUNGLE_BOAT_EMERALD, createMasonBoatBuyTrade(villagerVariants, Items.JUNGLE_BOAT, List.of(VillagerType.DESERT, VillagerType.JUNGLE))
|
| 1331 | );
|
| 1332 | register(context, FISHERMAN_5_ACACIA_BOAT_EMERALD, createMasonBoatBuyTrade(villagerVariants, Items.ACACIA_BOAT, List.of(VillagerType.SAVANNA)));
|
| 1333 | register(context, FISHERMAN_5_DARK_OAK_BOAT_EMERALD, createMasonBoatBuyTrade(villagerVariants, Items.DARK_OAK_BOAT, List.of(VillagerType.SWAMP)));
|
| 1334 | }
|
| 1335 |
|
| 1336 | private static VillagerTrade createMasonBoatBuyTrade(
|
| 1337 | final HolderGetter<VillagerType> villagerVariants, final Item item, final List<ResourceKey<VillagerType>> villagerTypes
|
| 1338 | ) {
|
| 1339 | return VillagerTrade.builder(new TradeCost(item, 1), new ItemStackTemplate(Items.EMERALD), 12, 30, 0.05F)
|
| 1340 | .merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, villagerTypes)))
|
| 1341 | .build();
|
| 1342 | }
|
| 1343 |
|
| 1344 | private static void registerShepherdWoolSales(final BootstrapContext<VillagerTrade> context) {
|
| 1345 | register(context, SHEPHERD_1_WHITE_WOOL_EMERALD, createShepherdWoolBuy(Items.WOOL.white()));
|
| 1346 | register(context, SHEPHERD_1_BROWN_WOOL_EMERALD, createShepherdWoolBuy(Items.WOOL.brown()));
|
| 1347 | register(context, SHEPHERD_1_GRAY_WOOL_EMERALD, createShepherdWoolBuy(Items.WOOL.gray()));
|
| 1348 | register(context, SHEPHERD_1_BLACK_WOOL_EMERALD, createShepherdWoolBuy(Items.WOOL.black()));
|
| 1349 | }
|
| 1350 |
|
| 1351 | private static VillagerTrade createShepherdWoolBuy(final Item item) {
|
| 1352 | return VillagerTrade.builder(new TradeCost(item, 18), new ItemStackTemplate(Items.EMERALD), 16, 2, 0.05F).build();
|
| 1353 | }
|
| 1354 |
|
| 1355 | private static void registerShepherdLevelTwoDyeTrades(final BootstrapContext<VillagerTrade> context) {
|
| 1356 | register(context, SHEPHERD_2_WHITE_DYE_EMERALD, createShepherdDyeBuy(Items.DYE.white(), 10));
|
| 1357 | register(context, SHEPHERD_2_GRAY_DYE_EMERALD, createShepherdDyeBuy(Items.DYE.gray(), 10));
|
| 1358 | register(context, SHEPHERD_2_BLACK_DYE_EMERALD, createShepherdDyeBuy(Items.DYE.black(), 10));
|
| 1359 | register(context, SHEPHERD_2_LIGHT_BLUE_DYE_EMERALD, createShepherdDyeBuy(Items.DYE.lightBlue(), 10));
|
| 1360 | register(context, SHEPHERD_2_LIME_DYE_EMERALD, createShepherdDyeBuy(Items.DYE.lime(), 10));
|
| 1361 | }
|
| 1362 |
|
| 1363 | private static void registerShepherdLevelThreeDyeTrades(final BootstrapContext<VillagerTrade> context) {
|
| 1364 | register(context, SHEPHERD_3_YELLOW_DYE_EMERALD, createShepherdDyeBuy(Items.DYE.yellow(), 20));
|
| 1365 | register(context, SHEPHERD_3_LIGHT_GRAY_DYE_EMERALD, createShepherdDyeBuy(Items.DYE.lightGray(), 20));
|
| 1366 | register(context, SHEPHERD_3_ORANGE_DYE_EMERALD, createShepherdDyeBuy(Items.DYE.orange(), 20));
|
| 1367 | register(context, SHEPHERD_3_RED_DYE_EMERALD, createShepherdDyeBuy(Items.DYE.red(), 20));
|
| 1368 | register(context, SHEPHERD_3_PINK_DYE_EMERALD, createShepherdDyeBuy(Items.DYE.pink(), 20));
|
| 1369 | }
|
| 1370 |
|
| 1371 | private static void registerLevelFourDyeTrades(final BootstrapContext<VillagerTrade> context) {
|
| 1372 | register(context, SHEPHERD_4_BROWN_DYE_EMERALD, createShepherdDyeBuy(Items.DYE.brown(), 30));
|
| 1373 | register(context, SHEPHERD_4_PURPLE_DYE_EMERALD, createShepherdDyeBuy(Items.DYE.purple(), 30));
|
| 1374 | register(context, SHEPHERD_4_BLUE_DYE_EMERALD, createShepherdDyeBuy(Items.DYE.blue(), 30));
|
| 1375 | register(context, SHEPHERD_4_GREEN_DYE_EMERALD, createShepherdDyeBuy(Items.DYE.green(), 30));
|
| 1376 | register(context, SHEPHERD_4_MAGENTA_DYE_EMERALD, createShepherdDyeBuy(Items.DYE.magenta(), 30));
|
| 1377 | register(context, SHEPHERD_4_CYAN_DYE_EMERALD, createShepherdDyeBuy(Items.DYE.cyan(), 30));
|
| 1378 | }
|
| 1379 |
|
| 1380 | private static VillagerTrade createShepherdDyeBuy(final Item item, final int xp) {
|
| 1381 | return VillagerTrade.builder(new TradeCost(item, 12), new ItemStackTemplate(Items.EMERALD), 16, xp, 0.05F).build();
|
| 1382 | }
|
| 1383 |
|
| 1384 | private static void registerWoolPurchases(final BootstrapContext<VillagerTrade> context) {
|
| 1385 | ColorCollection.zipApply(
|
| 1386 | SHEPHERD_2_EMERALD_WOOL,
|
| 1387 | Items.WOOL,
|
| 1388 | (name, wool) -> register(context, name, VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(wool), 16, 5, 0.05F).build())
|
| 1389 | );
|
| 1390 | }
|
| 1391 |
|
| 1392 | private static void registerCarpetPurchases(final BootstrapContext<VillagerTrade> context) {
|
| 1393 | ColorCollection.zipApply(
|
| 1394 | SHEPHERD_2_EMERALD_CARPETS,
|
| 1395 | Items.CARPET,
|
| 1396 | (name, carpet) -> register(context, name, VillagerTrade.builder(new TradeCost(Items.EMERALD, 1), new ItemStackTemplate(carpet, 4), 16, 5, 0.05F).build())
|
| 1397 | );
|
| 1398 | }
|
| 1399 |
|
| 1400 | private static void registerBedTrades(final BootstrapContext<VillagerTrade> context) {
|
| 1401 | ColorCollection.zipApply(
|
| 1402 | SHEPHERD_3_EMERALD_BED,
|
| 1403 | Items.BED,
|
| 1404 | (name, bed) -> register(context, name, VillagerTrade.builder(new TradeCost(Items.EMERALD, 3), new ItemStackTemplate(bed), 12, 10, 0.05F).build())
|
| 1405 | );
|
| 1406 | }
|
| 1407 |
|
| 1408 | private static void registerShepherdBannerTrades(final BootstrapContext<VillagerTrade> context) {
|
| 1409 | ColorCollection.zipApply(
|
| 1410 | SHEPHERD_4_EMERALD_BANNER,
|
| 1411 | Items.BANNER,
|
| 1412 | (name, banner) -> register(context, name, VillagerTrade.builder(new TradeCost(Items.EMERALD, 3), new ItemStackTemplate(banner), 12, 15, 0.05F).build())
|
| 1413 | );
|
| 1414 | }
|
| 1415 |
|
| 1416 | private static void registerCartographerBannerTrades(final BootstrapContext<VillagerTrade> context, final HolderGetter<VillagerType> villagerVariants) {
|
| 1417 | register(
|
| 1418 | context,
|
| 1419 | CARTOGRAPHER_4_EMERALD_WHITE_BANNER,
|
| 1420 | createCartographerBannerSell(villagerVariants, Items.BANNER.white(), List.of(VillagerType.SNOW, VillagerType.PLAINS))
|
| 1421 | );
|
| 1422 | register(
|
| 1423 | context,
|
| 1424 | CARTOGRAPHER_4_EMERALD_ORANGE_BANNER,
|
| 1425 | createCartographerBannerSell(villagerVariants, Items.BANNER.orange(), List.of(VillagerType.SAVANNA, VillagerType.DESERT))
|
| 1426 | );
|
| 1427 | register(
|
| 1428 | context, CARTOGRAPHER_4_EMERALD_MAGENTA_BANNER, createCartographerBannerSell(villagerVariants, Items.BANNER.magenta(), List.of(VillagerType.SAVANNA))
|
| 1429 | );
|
| 1430 | register(
|
| 1431 | context,
|
| 1432 | CARTOGRAPHER_4_EMERALD_BLUE_BANNER,
|
| 1433 | createCartographerBannerSell(villagerVariants, Items.BANNER.blue(), List.of(VillagerType.SNOW, VillagerType.TAIGA))
|
| 1434 | );
|
| 1435 | register(
|
| 1436 | context,
|
| 1437 | CARTOGRAPHER_4_EMERALD_LIGHT_BLUE_BANNER,
|
| 1438 | createCartographerBannerSell(villagerVariants, Items.BANNER.lightBlue(), List.of(VillagerType.SNOW, VillagerType.SWAMP))
|
| 1439 | );
|
| 1440 | register(
|
| 1441 | context,
|
| 1442 | CARTOGRAPHER_4_EMERALD_YELLOW_BANNER,
|
| 1443 | createCartographerBannerSell(villagerVariants, Items.BANNER.yellow(), List.of(VillagerType.PLAINS, VillagerType.JUNGLE))
|
| 1444 | );
|
| 1445 | register(
|
| 1446 | context,
|
| 1447 | CARTOGRAPHER_4_EMERALD_LIME_BANNER,
|
| 1448 | createCartographerBannerSell(villagerVariants, Items.BANNER.lime(), List.of(VillagerType.DESERT, VillagerType.TAIGA))
|
| 1449 | );
|
| 1450 | register(
|
| 1451 | context,
|
| 1452 | CARTOGRAPHER_4_EMERALD_PINK_BANNER,
|
| 1453 | createCartographerBannerSell(villagerVariants, Items.BANNER.pink(), List.of(VillagerType.TAIGA, VillagerType.PLAINS))
|
| 1454 | );
|
| 1455 | register(context, CARTOGRAPHER_4_EMERALD_GRAY_BANNER, createCartographerBannerSell(villagerVariants, Items.BANNER.gray(), List.of(VillagerType.DESERT)));
|
| 1456 | register(
|
| 1457 | context,
|
| 1458 | CARTOGRAPHER_4_EMERALD_CYAN_BANNER,
|
| 1459 | createCartographerBannerSell(villagerVariants, Items.BANNER.cyan(), List.of(VillagerType.DESERT, VillagerType.SNOW))
|
| 1460 | );
|
| 1461 | register(
|
| 1462 | context,
|
| 1463 | CARTOGRAPHER_4_EMERALD_PURPLE_BANNER,
|
| 1464 | createCartographerBannerSell(villagerVariants, Items.BANNER.purple(), List.of(VillagerType.TAIGA, VillagerType.SWAMP))
|
| 1465 | );
|
| 1466 | register(
|
| 1467 | context,
|
| 1468 | CARTOGRAPHER_4_EMERALD_BROWN_BANNER,
|
| 1469 | createCartographerBannerSell(villagerVariants, Items.BANNER.brown(), List.of(VillagerType.PLAINS, VillagerType.JUNGLE))
|
| 1470 | );
|
| 1471 | register(
|
| 1472 | context,
|
| 1473 | CARTOGRAPHER_4_EMERALD_GREEN_BANNER,
|
| 1474 | createCartographerBannerSell(villagerVariants, Items.BANNER.green(), List.of(VillagerType.DESERT, VillagerType.SAVANNA, VillagerType.JUNGLE))
|
| 1475 | );
|
| 1476 | register(
|
| 1477 | context,
|
| 1478 | CARTOGRAPHER_4_EMERALD_RED_BANNER,
|
| 1479 | createCartographerBannerSell(villagerVariants, Items.BANNER.red(), List.of(VillagerType.SNOW, VillagerType.SAVANNA))
|
| 1480 | );
|
| 1481 | register(context, CARTOGRAPHER_4_EMERALD_BLACK_BANNER, createCartographerBannerSell(villagerVariants, Items.BANNER.black(), List.of(VillagerType.SWAMP)));
|
| 1482 | }
|
| 1483 |
|
| 1484 | private static VillagerTrade createCartographerBannerSell(
|
| 1485 | final HolderGetter<VillagerType> villagerVariants, final Item item, final List<ResourceKey<VillagerType>> villagerTypes
|
| 1486 | ) {
|
| 1487 | return VillagerTrade.builder(new TradeCost(Items.EMERALD, 2), new ItemStackTemplate(item), 12, 15, 0.05F)
|
| 1488 | .merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, villagerTypes)))
|
| 1489 | .build();
|
| 1490 | }
|
| 1491 |
|
| 1492 | private static void registerBasicExplorerMapTrades(
|
| 1493 | final BootstrapContext<VillagerTrade> context, final HolderGetter<VillagerType> villagerVariants, final HolderGetter<Structure> structures
|
| 1494 | ) {
|
| 1495 | register(
|
| 1496 | context,
|
| 1497 | CARTOGRAPHER_2_EMERALD_AND_COMPASS_VILLAGE_TAIGA_MAP,
|
| 1498 | createBasicExplorerMapTrades(
|
| 1499 | villagerVariants,
|
| 1500 | structures,
|
| 1501 | StructureTags.ON_TAIGA_VILLAGE_MAPS,
|
| 1502 | MapDecorationTypes.TAIGA_VILLAGE,
|
| 1503 | Items.TAIGA_VILLAGE_MAP,
|
| 1504 | List.of(VillagerType.SWAMP, VillagerType.SNOW, VillagerType.PLAINS)
|
| 1505 | )
|
| 1506 | );
|
| 1507 | register(
|
| 1508 | context,
|
| 1509 | CARTOGRAPHER_2_EMERALD_AND_COMPASS_EXPLORER_SWAMP_MAP,
|
| 1510 | createBasicExplorerMapTrades(
|
| 1511 | villagerVariants,
|
| 1512 | structures,
|
| 1513 | StructureTags.ON_SWAMP_HUT_MAPS,
|
| 1514 | MapDecorationTypes.SWAMP_HUT,
|
| 1515 | Items.SWAMP_HUT_MAP,
|
| 1516 | List.of(VillagerType.TAIGA, VillagerType.SNOW, VillagerType.JUNGLE)
|
| 1517 | )
|
| 1518 | );
|
| 1519 | register(
|
| 1520 | context,
|
| 1521 | CARTOGRAPHER_2_EMERALD_AND_COMPASS_VILLAGE_SNOWY_MAP,
|
| 1522 | createBasicExplorerMapTrades(
|
| 1523 | villagerVariants,
|
| 1524 | structures,
|
| 1525 | StructureTags.ON_SNOWY_VILLAGE_MAPS,
|
| 1526 | MapDecorationTypes.SNOWY_VILLAGE,
|
| 1527 | Items.SNOWY_VILLAGE_MAP,
|
| 1528 | List.of(VillagerType.TAIGA, VillagerType.SWAMP)
|
| 1529 | )
|
| 1530 | );
|
| 1531 | register(
|
| 1532 | context,
|
| 1533 | CARTOGRAPHER_2_EMERALD_AND_COMPASS_VILLAGE_SAVANNA_MAP,
|
| 1534 | createBasicExplorerMapTrades(
|
| 1535 | villagerVariants,
|
| 1536 | structures,
|
| 1537 | StructureTags.ON_SAVANNA_VILLAGE_MAPS,
|
| 1538 | MapDecorationTypes.SAVANNA_VILLAGE,
|
| 1539 | Items.SAVANNA_VILLAGE_MAP,
|
| 1540 | List.of(VillagerType.PLAINS, VillagerType.JUNGLE, VillagerType.DESERT)
|
| 1541 | )
|
| 1542 | );
|
| 1543 | register(
|
| 1544 | context,
|
| 1545 | CARTOGRAPHER_2_EMERALD_AND_COMPASS_VILLAGE_PLAINS_MAP,
|
| 1546 | createBasicExplorerMapTrades(
|
| 1547 | villagerVariants,
|
| 1548 | structures,
|
| 1549 | StructureTags.ON_PLAINS_VILLAGE_MAPS,
|
| 1550 | MapDecorationTypes.PLAINS_VILLAGE,
|
| 1551 | Items.PLAINS_VILLAGE_MAP,
|
| 1552 | List.of(VillagerType.TAIGA, VillagerType.SNOW, VillagerType.SAVANNA, VillagerType.DESERT)
|
| 1553 | )
|
| 1554 | );
|
| 1555 | register(
|
| 1556 | context,
|
| 1557 | CARTOGRAPHER_2_EMERALD_AND_COMPASS_EXPLORER_JUNGLE_MAP,
|
| 1558 | createBasicExplorerMapTrades(
|
| 1559 | villagerVariants,
|
| 1560 | structures,
|
| 1561 | StructureTags.ON_JUNGLE_PYRAMID_MAPS,
|
| 1562 | MapDecorationTypes.JUNGLE_TEMPLE,
|
| 1563 | Items.JUNGLE_PYRAMID_MAP,
|
| 1564 | List.of(VillagerType.SWAMP, VillagerType.SAVANNA, VillagerType.DESERT)
|
| 1565 | )
|
| 1566 | );
|
| 1567 | register(
|
| 1568 | context,
|
| 1569 | CARTOGRAPHER_2_EMERALD_AND_COMPASS_VILLAGE_DESERT_MAP,
|
| 1570 | createBasicExplorerMapTrades(
|
| 1571 | villagerVariants,
|
| 1572 | structures,
|
| 1573 | StructureTags.ON_DESERT_VILLAGE_MAPS,
|
| 1574 | MapDecorationTypes.DESERT_VILLAGE,
|
| 1575 | Items.DESERT_VILLAGE_MAP,
|
| 1576 | List.of(VillagerType.SAVANNA, VillagerType.JUNGLE)
|
| 1577 | )
|
| 1578 | );
|
| 1579 | }
|
| 1580 |
|
| 1581 | private static VillagerTrade createBasicExplorerMapTrades(
|
| 1582 | final HolderGetter<VillagerType> villagerVariants,
|
| 1583 | final HolderGetter<Structure> structures,
|
| 1584 | final TagKey<Structure> structureTagKey,
|
| 1585 | final Holder<MapDecorationType> mapDecorationType,
|
| 1586 | final Item mapItem,
|
| 1587 | final List<ResourceKey<VillagerType>> villagerTypes
|
| 1588 | ) {
|
| 1589 | return VillagerTrade.builder(new TradeCost(Items.EMERALD, 8), new TradeCost(Items.COMPASS, 1), new ItemStackTemplate(mapItem), 12, 5, 0.2F)
|
| 1590 | .merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, villagerTypes)))
|
| 1591 | .addModifiers(
|
| 1592 | Holder.direct(
|
| 1593 | ExplorationMapFunction.makeExplorationMap(structures.getOrThrow(structureTagKey))
|
| 1594 | .setMapDecoration(mapDecorationType)
|
| 1595 | .setSearchRadius(100)
|
| 1596 | .setSkipKnownStructures(true)
|
| 1597 | .build()
|
| 1598 | ),
|
| 1599 | discardItemIfItsNot(anyValidMap())
|
| 1600 | )
|
| 1601 | .build();
|
| 1602 | }
|
| 1603 |
|
| 1604 | public static Holder.Reference<VillagerTrade> register(
|
| 1605 | final BootstrapContext<VillagerTrade> context, final ResourceKey<VillagerTrade> resourceKey, final VillagerTrade villagerTrade
|
| 1606 | ) {
|
| 1607 | return context.register(resourceKey, villagerTrade);
|
| 1608 | }
|
| 1609 |
|
| 1610 | public static ResourceKey<VillagerTrade> resourceKey(final String path) {
|
| 1611 | return ResourceKey.create(Registries.VILLAGER_TRADE, Identifier.withDefaultNamespace(path));
|
| 1612 | }
|
| 1613 |
|
| 1614 | public static HolderSet<VillagerType> villagerTypeHolderSet(final HolderGetter<VillagerType> villagerVariants, final ResourceKey<VillagerType> resourceKey) {
|
| 1615 | return HolderSet.direct(villagerVariants.getOrThrow(resourceKey));
|
| 1616 | }
|
| 1617 |
|
| 1618 | public static HolderSet<VillagerType> villagerTypeHolderSet(
|
| 1619 | final HolderGetter<VillagerType> villagerVariants, final List<ResourceKey<VillagerType>> resourceKeys
|
| 1620 | ) {
|
| 1621 | List<Holder<VillagerType>> villagerTypes = new ArrayList<>();
|
| 1622 |
|
| 1623 | for (ResourceKey<VillagerType> resourceKey : resourceKeys) {
|
| 1624 | villagerTypes.add(villagerVariants.getOrThrow(resourceKey));
|
| 1625 | }
|
| 1626 |
|
| 1627 | return HolderSet.direct(villagerTypes);
|
| 1628 | }
|
| 1629 |
|
| 1630 | public static Holder<LootItemCondition> villagerTypeRestriction(final HolderSet<VillagerType> villagerTypes) {
|
| 1631 | return Holder.direct(
|
| 1632 | new LootItemEntityPropertyCondition(
|
| 1633 | Optional.of(
|
| 1634 | EntityPredicate.Builder.entity()
|
| 1635 | .components(
|
| 1636 | DataComponentMatchers.Builder.components().partial(DataComponentPredicates.VILLAGER_VARIANT, VillagerTypePredicate.villagerTypes(villagerTypes)).build()
|
| 1637 | )
|
| 1638 | .build()
|
| 1639 | ),
|
| 1640 | LootContext.EntityTarget.THIS
|
| 1641 | )
|
| 1642 | );
|
| 1643 | }
|
| 1644 |
|
| 1645 | private static List<Holder<LootItemFunction>> dyedItem(final HolderGetter<Item> items, final Item expectedItem) {
|
| 1646 | ItemPredicate.Builder anyDyedItem = new ItemPredicate.Builder()
|
| 1647 | .of(items, expectedItem)
|
| 1648 | .withComponents(DataComponentMatchers.Builder.components().any(DataComponents.DYED_COLOR).build());
|
| 1649 | return discardItemIfItsNot(addRandomDye(), anyDyedItem);
|
| 1650 | }
|
| 1651 |
|
| 1652 | private static LootItemFunction.Builder addRandomDye() {
|
| 1653 | return SetRandomDyesFunction.withCount(ContextIntProviders.add(ContextIntProviders.exactly(1), ContextIntProviders.binomial(2, 0.75F)));
|
| 1654 | }
|
| 1655 |
|
| 1656 | public static List<Holder<LootItemFunction>> enchantedBook(final HolderGetter<Item> items, final HolderSet<Enchantment> options) {
|
| 1657 | ItemPredicate.Builder bookWithAnyEnchants = new ItemPredicate.Builder()
|
| 1658 | .of(items, Items.ENCHANTED_BOOK)
|
| 1659 | .withComponents(
|
| 1660 | DataComponentMatchers.Builder.components()
|
| 1661 | .partial(
|
| 1662 | DataComponentPredicates.STORED_ENCHANTMENTS,
|
| 1663 | EnchantmentsPredicate.storedEnchantments(List.of(new EnchantmentPredicate(Optional.empty(), MinMaxBounds.Ints.ANY)))
|
| 1664 | )
|
| 1665 | .build()
|
| 1666 | );
|
| 1667 | return discardItemIfItsNot(
|
| 1668 | new EnchantRandomlyFunction.Builder().withOptions(options).allowingIncompatibleEnchantments().includeAdditionalCostComponent(), bookWithAnyEnchants
|
| 1669 | );
|
| 1670 | }
|
| 1671 |
|
| 1672 | public static List<Holder<LootItemFunction>> enchantedBook(final HolderGetter<Item> items, final Holder<Enchantment> enchantment, final int level) {
|
| 1673 | ItemPredicate.Builder bookWithExactLevelEnchants = new ItemPredicate.Builder()
|
| 1674 | .of(items, Items.ENCHANTED_BOOK)
|
| 1675 | .withComponents(
|
| 1676 | DataComponentMatchers.Builder.components()
|
| 1677 | .partial(
|
| 1678 | DataComponentPredicates.STORED_ENCHANTMENTS,
|
| 1679 | EnchantmentsPredicate.storedEnchantments(List.of(new EnchantmentPredicate(Optional.empty(), MinMaxBounds.Ints.exactly(level))))
|
| 1680 | )
|
| 1681 | .build()
|
| 1682 | );
|
| 1683 | return discardItemIfItsNot(new SetEnchantmentsFunction.Builder().withEnchantment(enchantment, ContextIntProviders.exactly(level)), bookWithExactLevelEnchants);
|
| 1684 | }
|
| 1685 |
|
| 1686 | public static List<Holder<LootItemFunction>> enchantedItem(final HolderGetter<Item> items, final HolderSet<Enchantment> options, final Item expectedItem) {
|
| 1687 | ItemPredicate.Builder itemWithAnyEnchants = new ItemPredicate.Builder()
|
| 1688 | .of(items, expectedItem)
|
| 1689 | .withComponents(
|
| 1690 | DataComponentMatchers.Builder.components()
|
| 1691 | .partial(
|
| 1692 | DataComponentPredicates.ENCHANTMENTS, EnchantmentsPredicate.enchantments(List.of(new EnchantmentPredicate(Optional.empty(), MinMaxBounds.Ints.ANY)))
|
| 1693 | )
|
| 1694 | .build()
|
| 1695 | );
|
| 1696 | return discardItemIfItsNot(
|
| 1697 | new EnchantWithLevelsFunction.Builder(ContextIntProviders.between(5, 19)).withOptions(options).includeAdditionalCostComponent(), itemWithAnyEnchants
|
| 1698 | );
|
| 1699 | }
|
| 1700 |
|
| 1701 | public static List<Holder<LootItemFunction>> enchantedItem(
|
| 1702 | final HolderGetter<Item> items, final Holder<Enchantment> enchantment, final int level, final Item expectedItem
|
| 1703 | ) {
|
| 1704 | ItemPredicate.Builder itemWithExactLevelEnchants = new ItemPredicate.Builder()
|
| 1705 | .of(items, expectedItem)
|
| 1706 | .withComponents(
|
| 1707 | DataComponentMatchers.Builder.components()
|
| 1708 | .partial(
|
| 1709 | DataComponentPredicates.ENCHANTMENTS,
|
| 1710 | EnchantmentsPredicate.enchantments(List.of(new EnchantmentPredicate(Optional.empty(), MinMaxBounds.Ints.exactly(level))))
|
| 1711 | )
|
| 1712 | .build()
|
| 1713 | );
|
| 1714 | return discardItemIfItsNot(new SetEnchantmentsFunction.Builder().withEnchantment(enchantment, ContextIntProviders.exactly(level)), itemWithExactLevelEnchants);
|
| 1715 | }
|
| 1716 |
|
| 1717 | public static ItemPredicate.Builder anyValidMap() {
|
| 1718 | return new ItemPredicate.Builder().withComponents(DataComponentMatchers.Builder.components().any(DataComponents.MAP_ID).build());
|
| 1719 | }
|
| 1720 |
|
| 1721 | public static Holder<LootItemFunction> discardItemIfItsNot(final ItemPredicate.Builder test) {
|
| 1722 | return Holder.direct(FilteredFunction.filtered(test.build()).onFail(DiscardItem.discardItem().build()).build());
|
| 1723 | }
|
| 1724 |
|
| 1725 | public static List<Holder<LootItemFunction>> discardItemIfItsNot(final LootItemFunction.Builder function, final ItemPredicate.Builder preserveCondition) {
|
| 1726 | return List.of(Holder.direct(function.build()), discardItemIfItsNot(preserveCondition));
|
| 1727 | }
|
| 1728 | }
|
| 1729 |
|