TradeRebalanceVillagerTrades .java

net.minecraft.world.item.trading.TradeRebalanceVillagerTrades (class, 864 lines): extends VillagerTrades. members: doubleTradePrice, villagerTypes, items.

net.minecraft.world.item.tradingclass864 linescommonextends VillagerTrades46.2 KB

API Surface (1)

void bootstrap(final BootstrapContext<VillagerTrade> context)

Fields & Constants (84)

LIBRARIAN_1_EMERALD_AND_BOOK_DESERT_ENCHANTED_BOOK
LIBRARIAN_1_EMERALD_AND_BOOK_JUNGLE_ENCHANTED_BOOK
LIBRARIAN_1_EMERALD_AND_BOOK_PLAINS_ENCHANTED_BOOK
LIBRARIAN_1_EMERALD_AND_BOOK_SAVANNA_ENCHANTED_BOOK
LIBRARIAN_1_EMERALD_AND_BOOK_SNOW_ENCHANTED_BOOK
LIBRARIAN_1_EMERALD_AND_BOOK_SWAMP_ENCHANTED_BOOK
LIBRARIAN_1_EMERALD_AND_BOOK_TAIGA_ENCHANTED_BOOK
LIBRARIAN_2_EMERALD_AND_BOOK_DESERT_ENCHANTED_BOOK
LIBRARIAN_2_EMERALD_AND_BOOK_JUNGLE_ENCHANTED_BOOK
LIBRARIAN_2_EMERALD_AND_BOOK_PLAINS_ENCHANTED_BOOK
LIBRARIAN_2_EMERALD_AND_BOOK_SAVANNA_ENCHANTED_BOOK
LIBRARIAN_2_EMERALD_AND_BOOK_SNOW_ENCHANTED_BOOK
LIBRARIAN_2_EMERALD_AND_BOOK_SWAMP_ENCHANTED_BOOK
LIBRARIAN_2_EMERALD_AND_BOOK_TAIGA_ENCHANTED_BOOK
LIBRARIAN_3_EMERALD_AND_BOOK_DESERT_ENCHANTED_BOOK
LIBRARIAN_3_EMERALD_AND_BOOK_JUNGLE_ENCHANTED_BOOK
LIBRARIAN_3_EMERALD_AND_BOOK_PLAINS_ENCHANTED_BOOK
LIBRARIAN_3_EMERALD_AND_BOOK_SAVANNA_ENCHANTED_BOOK
LIBRARIAN_3_EMERALD_AND_BOOK_SNOW_ENCHANTED_BOOK
LIBRARIAN_3_EMERALD_AND_BOOK_SWAMP_ENCHANTED_BOOK
LIBRARIAN_3_EMERALD_AND_BOOK_TAIGA_ENCHANTED_BOOK
LIBRARIAN_5_EMERALD_AND_BOOK_DESERT_ENCHANTED_BOOK
LIBRARIAN_5_EMERALD_AND_BOOK_JUNGLE_ENCHANTED_BOOK
LIBRARIAN_5_EMERALD_AND_BOOK_PLAINS_ENCHANTED_BOOK
LIBRARIAN_5_EMERALD_AND_BOOK_SAVANNA_ENCHANTED_BOOK
LIBRARIAN_5_EMERALD_AND_BOOK_SNOW_ENCHANTED_BOOK
LIBRARIAN_5_EMERALD_AND_BOOK_SWAMP_ENCHANTED_BOOK
LIBRARIAN_5_EMERALD_AND_BOOK_TAIGA_ENCHANTED_BOOK
ARMORER_1_IRON_INGOT_EMERALD
ARMORER_2_EMERALD_IRON_BOOTS_GROUP_1
ARMORER_2_EMERALD_IRON_HELMET_GROUP_1
ARMORER_2_EMERALD_IRON_LEGGINGS_GROUP_1
ARMORER_2_EMERALD_IRON_CHESTPLATE_GROUP_1
ARMORER_2_EMERALD_CHAINMAIL_BOOTS_GROUP_2
ARMORER_2_EMERALD_CHAINMAIL_HELMET_GROUP_2
ARMORER_2_EMERALD_CHAINMAIL_LEGGINGS_GROUP_2
ARMORER_2_EMERALD_CHAINMAIL_CHESTPLATE_GROUP_2
ARMORER_3_EMERALD_BELL
ARMORER_4_EMERALD_ENCHANTED_IRON_BOOTS_DESERT
ARMORER_4_EMERALD_ENCHANTED_IRON_HELMET_DESERT
ARMORER_4_EMERALD_ENCHANTED_IRON_LEGGINGS_DESERT
ARMORER_4_EMERALD_ENCHANTED_IRON_CHESTPLATE_DESERT
ARMORER_4_EMERALD_ENCHANTED_IRON_BOOTS_PLAINS
ARMORER_4_EMERALD_ENCHANTED_IRON_HELMET_PLAINS
ARMORER_4_EMERALD_ENCHANTED_IRON_LEGGINGS_PLAINS
ARMORER_4_EMERALD_ENCHANTED_IRON_CHESTPLATE_PLAINS
ARMORER_4_EMERALD_ENCHANTED_IRON_BOOTS_SAVANNA
ARMORER_4_EMERALD_ENCHANTED_IRON_HELMET_SAVANNA
ARMORER_4_EMERALD_ENCHANTED_IRON_LEGGINGS_SAVANNA
ARMORER_4_EMERALD_ENCHANTED_IRON_CHESTPLATE_SAVANNA
ARMORER_4_EMERALD_ENCHANTED_IRON_BOOTS_SNOW
ARMORER_4_EMERALD_ENCHANTED_IRON_HELMET_SNOW
ARMORER_4_EMERALD_ENCHANTED_CHAINMAIL_BOOTS_JUNGLE
ARMORER_4_EMERALD_ENCHANTED_CHAINMAIL_HELMET_JUNGLE
ARMORER_4_EMERALD_ENCHANTED_CHAINMAIL_LEGGINGS_JUNGLE
ARMORER_4_EMERALD_ENCHANTED_CHAINMAIL_CHESTPLATE_JUNGLE
ARMORER_4_EMERALD_ENCHANTED_CHAINMAIL_BOOTS_SWAMP
ARMORER_4_EMERALD_ENCHANTED_CHAINMAIL_HELMET_SWAMP
ARMORER_4_EMERALD_ENCHANTED_CHAINMAIL_LEGGINGS_SWAMP
ARMORER_4_EMERALD_ENCHANTED_CHAINMAIL_CHESTPLATE_SWAMP
ARMORER_4_EMERALD_AND_DIAMOND_BOOTS_DIAMOND_LEGGINGS_TAIGA
ARMORER_4_EMERALD_AND_DIAMOND_LEGGINGS_DIAMOND_CHESTPLATE_TAIGA
ARMORER_4_EMERALD_AND_DIAMOND_HELMET_DIAMOND_BOOTS_TAIGA
ARMORER_4_EMERALD_AND_DIAMOND_CHESTPLATE_DIAMOND_HELMET_TAIGA
ARMORER_5_EMERALD_AND_DIAMOND_DIAMOND_CHESTPLATE_DESERT
ARMORER_5_EMERALD_AND_DIAMOND_DIAMOND_LEGGINGS_DESERT
ARMORER_5_EMERALD_AND_DIAMOND_DIAMOND_LEGGINGS_PLAINS
ARMORER_5_EMERALD_AND_DIAMOND_DIAMOND_BOOTS_PLAINS
ARMORER_5_EMERALD_AND_DIAMOND_DIAMOND_HELMET_SAVANNA
ARMORER_5_EMERALD_AND_DIAMOND_DIAMOND_CHESTPLATE_SAVANNA
ARMORER_5_EMERALD_AND_DIAMOND_DIAMOND_BOOTS_SNOW
ARMORER_5_EMERALD_AND_DIAMOND_DIAMOND_HELMET_SNOW
ARMORER_5_EMERALD_CHAINMAIL_HELMET_JUNGLE
ARMORER_5_EMERALD_CHAINMAIL_BOOTS_JUNGLE
ARMORER_5_EMERALD_CHAINMAIL_HELMET_SWAMP
ARMORER_5_EMERALD_CHAINMAIL_BOOTS_SWAMP
ARMORER_5_EMERALD_AND_DIAMOND_DIAMOND_CHESTPLATE_TAIGA
ARMORER_5_EMERALD_AND_DIAMOND_DIAMOND_LEGGINGS_TAIGA
ARMORER_5_DIAMOND_BLOCK_EMERALD_TAIGA
ARMORER_5_IRON_BLOCK_EMERALD_NON_TAIGA
items
doubleTradePrice
villagerTypes
enchantment

String literals (31)

"librarian/1/emerald_and_book_snow_enchanted_book"
"librarian/2/emerald_and_book_snow_enchanted_book"
"librarian/3/emerald_and_book_snow_enchanted_book"
"librarian/5/emerald_and_book_snow_enchanted_book"
"armorer/1/iron_ingot_emerald"
"armorer/2/emerald_iron_boots_group_1"
"armorer/2/emerald_iron_helmet_group_1"
"armorer/2/emerald_iron_leggings_group_1"
"armorer/2/emerald_iron_chestplate_group_1"
"armorer/2/emerald_chainmail_boots_group_2"
"armorer/2/emerald_chainmail_helmet_group_2"
"armorer/2/emerald_chainmail_leggings_group_2"
"armorer/2/emerald_chainmail_chainmail_group_2"
"armorer/3/emerald_bell"
"armorer/4/emerald_enchanted_iron_boots_desert"
"armorer/4/emerald_enchanted_iron_helmet_desert"
"armorer/4/emerald_enchanted_iron_leggings_desert"
"armorer/4/emerald_enchanted_iron_boots_plains"
"armorer/4/emerald_enchanted_iron_helmet_plains"
"armorer/4/emerald_enchanted_iron_leggings_plains"
"armorer/4/emerald_enchanted_iron_boots_savanna"
"armorer/4/emerald_enchanted_iron_helmet_savanna"
"armorer/4/emerald_enchanted_iron_boots_snow"
"armorer/4/emerald_enchanted_iron_helmet_snow"

Full Source

TradeRebalanceVillagerTrades.java864 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.item.trading;
2
3
import java.util.List;
4
import net.minecraft.core.Holder;
5
import net.minecraft.core.HolderGetter;
6
import net.minecraft.core.HolderSet;
7
import net.minecraft.core.registries.Registries;
8
import net.minecraft.data.worldgen.BootstrapContext;
9
import net.minecraft.resources.ResourceKey;
10
import net.minecraft.tags.EnchantmentTags;
11
import net.minecraft.world.entity.npc.villager.VillagerType;
12
import net.minecraft.world.item.Item;
13
import net.minecraft.world.item.ItemStackTemplate;
14
import net.minecraft.world.item.Items;
15
import net.minecraft.world.item.enchantment.Enchantment;
16
import net.minecraft.world.item.enchantment.Enchantments;
17
import net.minecraft.world.level.storage.loot.providers.number.ints.ContextIntProviders;
18
19
public class TradeRebalanceVillagerTrades extends VillagerTrades {
20
	public static final ResourceKey<VillagerTrade> LIBRARIAN_1_EMERALD_AND_BOOK_DESERT_ENCHANTED_BOOK = resourceKey(
21
		"librarian/1/emerald_and_book_desert_enchanted_book"
22
	);
23
	public static final ResourceKey<VillagerTrade> LIBRARIAN_1_EMERALD_AND_BOOK_JUNGLE_ENCHANTED_BOOK = resourceKey(
24
		"librarian/1/emerald_and_book_jungle_enchanted_book"
25
	);
26
	public static final ResourceKey<VillagerTrade> LIBRARIAN_1_EMERALD_AND_BOOK_PLAINS_ENCHANTED_BOOK = resourceKey(
27
		"librarian/1/emerald_and_book_plains_enchanted_book"
28
	);
29
	public static final ResourceKey<VillagerTrade> LIBRARIAN_1_EMERALD_AND_BOOK_SAVANNA_ENCHANTED_BOOK = resourceKey(
30
		"librarian/1/emerald_and_book_savanna_enchanted_book"
31
	);
32
	public static final ResourceKey<VillagerTrade> LIBRARIAN_1_EMERALD_AND_BOOK_SNOW_ENCHANTED_BOOK = resourceKey(
33
		"librarian/1/emerald_and_book_snow_enchanted_book"
34
	);
35
	public static final ResourceKey<VillagerTrade> LIBRARIAN_1_EMERALD_AND_BOOK_SWAMP_ENCHANTED_BOOK = resourceKey(
36
		"librarian/1/emerald_and_book_swamp_enchanted_book"
37
	);
38
	public static final ResourceKey<VillagerTrade> LIBRARIAN_1_EMERALD_AND_BOOK_TAIGA_ENCHANTED_BOOK = resourceKey(
39
		"librarian/1/emerald_and_book_taiga_enchanted_book"
40
	);
41
	public static final ResourceKey<VillagerTrade> LIBRARIAN_2_EMERALD_AND_BOOK_DESERT_ENCHANTED_BOOK = resourceKey(
42
		"librarian/2/emerald_and_book_desert_enchanted_book"
43
	);
44
	public static final ResourceKey<VillagerTrade> LIBRARIAN_2_EMERALD_AND_BOOK_JUNGLE_ENCHANTED_BOOK = resourceKey(
45
		"librarian/2/emerald_and_book_jungle_enchanted_book"
46
	);
47
	public static final ResourceKey<VillagerTrade> LIBRARIAN_2_EMERALD_AND_BOOK_PLAINS_ENCHANTED_BOOK = resourceKey(
48
		"librarian/2/emerald_and_book_plains_enchanted_book"
49
	);
50
	public static final ResourceKey<VillagerTrade> LIBRARIAN_2_EMERALD_AND_BOOK_SAVANNA_ENCHANTED_BOOK = resourceKey(
51
		"librarian/2/emerald_and_book_savanna_enchanted_book"
52
	);
53
	public static final ResourceKey<VillagerTrade> LIBRARIAN_2_EMERALD_AND_BOOK_SNOW_ENCHANTED_BOOK = resourceKey(
54
		"librarian/2/emerald_and_book_snow_enchanted_book"
55
	);
56
	public static final ResourceKey<VillagerTrade> LIBRARIAN_2_EMERALD_AND_BOOK_SWAMP_ENCHANTED_BOOK = resourceKey(
57
		"librarian/2/emerald_and_book_swamp_enchanted_book"
58
	);
59
	public static final ResourceKey<VillagerTrade> LIBRARIAN_2_EMERALD_AND_BOOK_TAIGA_ENCHANTED_BOOK = resourceKey(
60
		"librarian/2/emerald_and_book_taiga_enchanted_book"
61
	);
62
	public static final ResourceKey<VillagerTrade> LIBRARIAN_3_EMERALD_AND_BOOK_DESERT_ENCHANTED_BOOK = resourceKey(
63
		"librarian/3/emerald_and_book_desert_enchanted_book"
64
	);
65
	public static final ResourceKey<VillagerTrade> LIBRARIAN_3_EMERALD_AND_BOOK_JUNGLE_ENCHANTED_BOOK = resourceKey(
66
		"librarian/3/emerald_and_book_jungle_enchanted_book"
67
	);
68
	public static final ResourceKey<VillagerTrade> LIBRARIAN_3_EMERALD_AND_BOOK_PLAINS_ENCHANTED_BOOK = resourceKey(
69
		"librarian/3/emerald_and_book_plains_enchanted_book"
70
	);
71
	public static final ResourceKey<VillagerTrade> LIBRARIAN_3_EMERALD_AND_BOOK_SAVANNA_ENCHANTED_BOOK = resourceKey(
72
		"librarian/3/emerald_and_book_savanna_enchanted_book"
73
	);
74
	public static final ResourceKey<VillagerTrade> LIBRARIAN_3_EMERALD_AND_BOOK_SNOW_ENCHANTED_BOOK = resourceKey(
75
		"librarian/3/emerald_and_book_snow_enchanted_book"
76
	);
77
	public static final ResourceKey<VillagerTrade> LIBRARIAN_3_EMERALD_AND_BOOK_SWAMP_ENCHANTED_BOOK = resourceKey(
78
		"librarian/3/emerald_and_book_swamp_enchanted_book"
79
	);
80
	public static final ResourceKey<VillagerTrade> LIBRARIAN_3_EMERALD_AND_BOOK_TAIGA_ENCHANTED_BOOK = resourceKey(
81
		"librarian/3/emerald_and_book_taiga_enchanted_book"
82
	);
83
	public static final ResourceKey<VillagerTrade> LIBRARIAN_5_EMERALD_AND_BOOK_DESERT_ENCHANTED_BOOK = resourceKey(
84
		"librarian/5/emerald_and_book_desert_enchanted_book"
85
	);
86
	public static final ResourceKey<VillagerTrade> LIBRARIAN_5_EMERALD_AND_BOOK_JUNGLE_ENCHANTED_BOOK = resourceKey(
87
		"librarian/5/emerald_and_book_jungle_enchanted_book"
88
	);
89
	public static final ResourceKey<VillagerTrade> LIBRARIAN_5_EMERALD_AND_BOOK_PLAINS_ENCHANTED_BOOK = resourceKey(
90
		"librarian/5/emerald_and_book_plains_enchanted_book"
91
	);
92
	public static final ResourceKey<VillagerTrade> LIBRARIAN_5_EMERALD_AND_BOOK_SAVANNA_ENCHANTED_BOOK = resourceKey(
93
		"librarian/5/emerald_and_book_savanna_enchanted_book"
94
	);
95
	public static final ResourceKey<VillagerTrade> LIBRARIAN_5_EMERALD_AND_BOOK_SNOW_ENCHANTED_BOOK = resourceKey(
96
		"librarian/5/emerald_and_book_snow_enchanted_book"
97
	);
98
	public static final ResourceKey<VillagerTrade> LIBRARIAN_5_EMERALD_AND_BOOK_SWAMP_ENCHANTED_BOOK = resourceKey(
99
		"librarian/5/emerald_and_book_swamp_enchanted_book"
100
	);
101
	public static final ResourceKey<VillagerTrade> LIBRARIAN_5_EMERALD_AND_BOOK_TAIGA_ENCHANTED_BOOK = resourceKey(
102
		"librarian/5/emerald_and_book_taiga_enchanted_book"
103
	);
104
	public static final ResourceKey<VillagerTrade> ARMORER_1_IRON_INGOT_EMERALD = resourceKey("armorer/1/iron_ingot_emerald");
105
	public static final ResourceKey<VillagerTrade> ARMORER_2_EMERALD_IRON_BOOTS_GROUP_1 = resourceKey("armorer/2/emerald_iron_boots_group_1");
106
	public static final ResourceKey<VillagerTrade> ARMORER_2_EMERALD_IRON_HELMET_GROUP_1 = resourceKey("armorer/2/emerald_iron_helmet_group_1");
107
	public static final ResourceKey<VillagerTrade> ARMORER_2_EMERALD_IRON_LEGGINGS_GROUP_1 = resourceKey("armorer/2/emerald_iron_leggings_group_1");
108
	public static final ResourceKey<VillagerTrade> ARMORER_2_EMERALD_IRON_CHESTPLATE_GROUP_1 = resourceKey("armorer/2/emerald_iron_chestplate_group_1");
109
	public static final ResourceKey<VillagerTrade> ARMORER_2_EMERALD_CHAINMAIL_BOOTS_GROUP_2 = resourceKey("armorer/2/emerald_chainmail_boots_group_2");
110
	public static final ResourceKey<VillagerTrade> ARMORER_2_EMERALD_CHAINMAIL_HELMET_GROUP_2 = resourceKey("armorer/2/emerald_chainmail_helmet_group_2");
111
	public static final ResourceKey<VillagerTrade> ARMORER_2_EMERALD_CHAINMAIL_LEGGINGS_GROUP_2 = resourceKey("armorer/2/emerald_chainmail_leggings_group_2");
112
	public static final ResourceKey<VillagerTrade> ARMORER_2_EMERALD_CHAINMAIL_CHESTPLATE_GROUP_2 = resourceKey("armorer/2/emerald_chainmail_chainmail_group_2");
113
	public static final ResourceKey<VillagerTrade> ARMORER_3_EMERALD_BELL = resourceKey("armorer/3/emerald_bell");
114
	public static final ResourceKey<VillagerTrade> ARMORER_4_EMERALD_ENCHANTED_IRON_BOOTS_DESERT = resourceKey("armorer/4/emerald_enchanted_iron_boots_desert");
115
	public static final ResourceKey<VillagerTrade> ARMORER_4_EMERALD_ENCHANTED_IRON_HELMET_DESERT = resourceKey("armorer/4/emerald_enchanted_iron_helmet_desert");
116
	public static final ResourceKey<VillagerTrade> ARMORER_4_EMERALD_ENCHANTED_IRON_LEGGINGS_DESERT = resourceKey(
117
		"armorer/4/emerald_enchanted_iron_leggings_desert"
118
	);
119
	public static final ResourceKey<VillagerTrade> ARMORER_4_EMERALD_ENCHANTED_IRON_CHESTPLATE_DESERT = resourceKey(
120
		"armorer/4/emerald_enchanted_iron_chestplate_desert"
121
	);
122
	public static final ResourceKey<VillagerTrade> ARMORER_4_EMERALD_ENCHANTED_IRON_BOOTS_PLAINS = resourceKey("armorer/4/emerald_enchanted_iron_boots_plains");
123
	public static final ResourceKey<VillagerTrade> ARMORER_4_EMERALD_ENCHANTED_IRON_HELMET_PLAINS = resourceKey("armorer/4/emerald_enchanted_iron_helmet_plains");
124
	public static final ResourceKey<VillagerTrade> ARMORER_4_EMERALD_ENCHANTED_IRON_LEGGINGS_PLAINS = resourceKey(
125
		"armorer/4/emerald_enchanted_iron_leggings_plains"
126
	);
127
	public static final ResourceKey<VillagerTrade> ARMORER_4_EMERALD_ENCHANTED_IRON_CHESTPLATE_PLAINS = resourceKey(
128
		"armorer/4/emerald_enchanted_iron_chestplate_plains"
129
	);
130
	public static final ResourceKey<VillagerTrade> ARMORER_4_EMERALD_ENCHANTED_IRON_BOOTS_SAVANNA = resourceKey("armorer/4/emerald_enchanted_iron_boots_savanna");
131
	public static final ResourceKey<VillagerTrade> ARMORER_4_EMERALD_ENCHANTED_IRON_HELMET_SAVANNA = resourceKey("armorer/4/emerald_enchanted_iron_helmet_savanna");
132
	public static final ResourceKey<VillagerTrade> ARMORER_4_EMERALD_ENCHANTED_IRON_LEGGINGS_SAVANNA = resourceKey(
133
		"armorer/4/emerald_enchanted_iron_leggings_savanna"
134
	);
135
	public static final ResourceKey<VillagerTrade> ARMORER_4_EMERALD_ENCHANTED_IRON_CHESTPLATE_SAVANNA = resourceKey(
136
		"armorer/4/emerald_enchanted_iron_chestplate_savanna"
137
	);
138
	public static final ResourceKey<VillagerTrade> ARMORER_4_EMERALD_ENCHANTED_IRON_BOOTS_SNOW = resourceKey("armorer/4/emerald_enchanted_iron_boots_snow");
139
	public static final ResourceKey<VillagerTrade> ARMORER_4_EMERALD_ENCHANTED_IRON_HELMET_SNOW = resourceKey("armorer/4/emerald_enchanted_iron_helmet_snow");
140
	public static final ResourceKey<VillagerTrade> ARMORER_4_EMERALD_ENCHANTED_CHAINMAIL_BOOTS_JUNGLE = resourceKey(
141
		"armorer/4/emerald_enchanted_chainmail_boots_jungle"
142
	);
143
	public static final ResourceKey<VillagerTrade> ARMORER_4_EMERALD_ENCHANTED_CHAINMAIL_HELMET_JUNGLE = resourceKey(
144
		"armorer/4/emerald_enchanted_chainmail_helmet_jungle"
145
	);
146
	public static final ResourceKey<VillagerTrade> ARMORER_4_EMERALD_ENCHANTED_CHAINMAIL_LEGGINGS_JUNGLE = resourceKey(
147
		"armorer/4/emerald_enchanted_chainmail_leggings_jungle"
148
	);
149
	public static final ResourceKey<VillagerTrade> ARMORER_4_EMERALD_ENCHANTED_CHAINMAIL_CHESTPLATE_JUNGLE = resourceKey(
150
		"armorer/4/emerald_enchanted_chainmail_chestplate_jungle"
151
	);
152
	public static final ResourceKey<VillagerTrade> ARMORER_4_EMERALD_ENCHANTED_CHAINMAIL_BOOTS_SWAMP = resourceKey(
153
		"armorer/4/emerald_enchanted_chainmail_boots_swamp"
154
	);
155
	public static final ResourceKey<VillagerTrade> ARMORER_4_EMERALD_ENCHANTED_CHAINMAIL_HELMET_SWAMP = resourceKey(
156
		"armorer/4/emerald_enchanted_chainmail_helmet_swamp"
157
	);
158
	public static final ResourceKey<VillagerTrade> ARMORER_4_EMERALD_ENCHANTED_CHAINMAIL_LEGGINGS_SWAMP = resourceKey(
159
		"armorer/4/emerald_enchanted_chainmail_leggings_swamp"
160
	);
161
	public static final ResourceKey<VillagerTrade> ARMORER_4_EMERALD_ENCHANTED_CHAINMAIL_CHESTPLATE_SWAMP = resourceKey(
162
		"armorer/4/emerald_enchanted_chainmail_chestplate_swamp"
163
	);
164
	public static final ResourceKey<VillagerTrade> ARMORER_4_EMERALD_AND_DIAMOND_BOOTS_DIAMOND_LEGGINGS_TAIGA = resourceKey(
165
		"armorer/4/emerald_and_diamond_boots_diamond_leggings_taiga"
166
	);
167
	public static final ResourceKey<VillagerTrade> ARMORER_4_EMERALD_AND_DIAMOND_LEGGINGS_DIAMOND_CHESTPLATE_TAIGA = resourceKey(
168
		"armorer/4/emerald_and_diamond_leggings_diamond_chestplate_taiga"
169
	);
170
	public static final ResourceKey<VillagerTrade> ARMORER_4_EMERALD_AND_DIAMOND_HELMET_DIAMOND_BOOTS_TAIGA = resourceKey(
171
		"armorer/4/emerald_and_diamond_helmet_diamond_boots_taiga"
172
	);
173
	public static final ResourceKey<VillagerTrade> ARMORER_4_EMERALD_AND_DIAMOND_CHESTPLATE_DIAMOND_HELMET_TAIGA = resourceKey(
174
		"armorer/4/emerald_and_diamond_chestplate_diamond_helmet_taiga"
175
	);
176
	public static final ResourceKey<VillagerTrade> ARMORER_5_EMERALD_AND_DIAMOND_DIAMOND_CHESTPLATE_DESERT = resourceKey(
177
		"armorer/5/emerald_and_diamond_diamond_chestplate_desert"
178
	);
179
	public static final ResourceKey<VillagerTrade> ARMORER_5_EMERALD_AND_DIAMOND_DIAMOND_LEGGINGS_DESERT = resourceKey(
180
		"armorer/5/emerald_and_diamond_diamond_leggings_desert"
181
	);
182
	public static final ResourceKey<VillagerTrade> ARMORER_5_EMERALD_AND_DIAMOND_DIAMOND_LEGGINGS_PLAINS = resourceKey(
183
		"armorer/5/emerald_and_diamond_diamond_leggings_plains"
184
	);
185
	public static final ResourceKey<VillagerTrade> ARMORER_5_EMERALD_AND_DIAMOND_DIAMOND_BOOTS_PLAINS = resourceKey(
186
		"armorer/5/emerald_and_diamond_diamond_boots_plains"
187
	);
188
	public static final ResourceKey<VillagerTrade> ARMORER_5_EMERALD_AND_DIAMOND_DIAMOND_HELMET_SAVANNA = resourceKey(
189
		"armorer/5/emerald_and_diamond_diamond_helmet_savanna"
190
	);
191
	public static final ResourceKey<VillagerTrade> ARMORER_5_EMERALD_AND_DIAMOND_DIAMOND_CHESTPLATE_SAVANNA = resourceKey(
192
		"armorer/5/emerald_and_diamond_diamond_chestplate_savanna"
193
	);
194
	public static final ResourceKey<VillagerTrade> ARMORER_5_EMERALD_AND_DIAMOND_DIAMOND_BOOTS_SNOW = resourceKey(
195
		"armorer/5/emerald_and_diamond_diamond_boots_snow"
196
	);
197
	public static final ResourceKey<VillagerTrade> ARMORER_5_EMERALD_AND_DIAMOND_DIAMOND_HELMET_SNOW = resourceKey(
198
		"armorer/5/emerald_and_diamond_diamond_helmet_snow"
199
	);
200
	public static final ResourceKey<VillagerTrade> ARMORER_5_EMERALD_CHAINMAIL_HELMET_JUNGLE = resourceKey("armorer/5/emerald_chainmail_helmet_jungle");
201
	public static final ResourceKey<VillagerTrade> ARMORER_5_EMERALD_CHAINMAIL_BOOTS_JUNGLE = resourceKey("armorer/5/emerald_chainmail_boots_jungle");
202
	public static final ResourceKey<VillagerTrade> ARMORER_5_EMERALD_CHAINMAIL_HELMET_SWAMP = resourceKey("armorer/5/emerald_chainmail_helmet_swamp");
203
	public static final ResourceKey<VillagerTrade> ARMORER_5_EMERALD_CHAINMAIL_BOOTS_SWAMP = resourceKey("armorer/5/emerald_chainmail_boots_swamp");
204
	public static final ResourceKey<VillagerTrade> ARMORER_5_EMERALD_AND_DIAMOND_DIAMOND_CHESTPLATE_TAIGA = resourceKey(
205
		"armorer/5/emerald_and_diamond_diamond_chestplate_taiga"
206
	);
207
	public static final ResourceKey<VillagerTrade> ARMORER_5_EMERALD_AND_DIAMOND_DIAMOND_LEGGINGS_TAIGA = resourceKey(
208
		"armorer/5/emerald_and_diamond_diamond_leggings_taiga"
209
	);
210
	public static final ResourceKey<VillagerTrade> ARMORER_5_DIAMOND_BLOCK_EMERALD_TAIGA = resourceKey("armorer/5/diamond_block_emerald_taiga");
211
	public static final ResourceKey<VillagerTrade> ARMORER_5_IRON_BLOCK_EMERALD_NON_TAIGA = resourceKey("armorer/5/iron_block_emerald_non_taiga");
212
213
	public static void bootstrap(final BootstrapContext<VillagerTrade> context) {
214
		HolderGetter<Item> items = context.lookup(Registries.ITEM);
215
		HolderGetter<VillagerType> villagerVariants = context.lookup(Registries.VILLAGER_TYPE);
216
		HolderGetter<Enchantment> enchantments = context.lookup(Registries.ENCHANTMENT);
217
		HolderSet<Enchantment> doubleTradePrice = enchantments.getOrThrow(EnchantmentTags.DOUBLE_TRADE_PRICE);
218
		HolderSet<VillagerType> desertType = villagerTypeHolderSet(villagerVariants, VillagerType.DESERT);
219
		HolderSet<Enchantment> enchantmentsDesertCommon = enchantments.getOrThrow(EnchantmentTags.TRADES_DESERT_COMMON);
220
		HolderSet<VillagerType> jungleType = villagerTypeHolderSet(villagerVariants, VillagerType.JUNGLE);
221
		HolderSet<Enchantment> enchantmentsJungleCommon = enchantments.getOrThrow(EnchantmentTags.TRADES_JUNGLE_COMMON);
222
		HolderSet<VillagerType> plainsType = villagerTypeHolderSet(villagerVariants, VillagerType.PLAINS);
223
		HolderSet<Enchantment> enchantmentsPlainsCommon = enchantments.getOrThrow(EnchantmentTags.TRADES_PLAINS_COMMON);
224
		HolderSet<VillagerType> savannaType = villagerTypeHolderSet(villagerVariants, VillagerType.SAVANNA);
225
		HolderSet<Enchantment> enchantmentsSavannaCommon = enchantments.getOrThrow(EnchantmentTags.TRADES_SAVANNA_COMMON);
226
		HolderSet<VillagerType> snowType = villagerTypeHolderSet(villagerVariants, VillagerType.SNOW);
227
		HolderSet<Enchantment> enchantmentsSnowCommon = enchantments.getOrThrow(EnchantmentTags.TRADES_SNOW_COMMON);
228
		HolderSet<VillagerType> swampType = villagerTypeHolderSet(villagerVariants, VillagerType.SWAMP);
229
		HolderSet<Enchantment> enchantmentsSwampCommon = enchantments.getOrThrow(EnchantmentTags.TRADES_SWAMP_COMMON);
230
		HolderSet<VillagerType> taigaType = villagerTypeHolderSet(villagerVariants, VillagerType.TAIGA);
231
		HolderSet<Enchantment> enchantmentsTaigaCommon = enchantments.getOrThrow(EnchantmentTags.TRADES_TAIGA_COMMON);
232
		register(
233
			context,
234
			LIBRARIAN_1_EMERALD_AND_BOOK_DESERT_ENCHANTED_BOOK,
235
			createLibrarianLevel1EnchantmentTrade(items, doubleTradePrice, desertType, enchantmentsDesertCommon)
236
		);
237
		register(
238
			context,
239
			LIBRARIAN_1_EMERALD_AND_BOOK_JUNGLE_ENCHANTED_BOOK,
240
			createLibrarianLevel1EnchantmentTrade(items, doubleTradePrice, jungleType, enchantmentsJungleCommon)
241
		);
242
		register(
243
			context,
244
			LIBRARIAN_1_EMERALD_AND_BOOK_PLAINS_ENCHANTED_BOOK,
245
			createLibrarianLevel1EnchantmentTrade(items, doubleTradePrice, plainsType, enchantmentsPlainsCommon)
246
		);
247
		register(
248
			context,
249
			LIBRARIAN_1_EMERALD_AND_BOOK_SAVANNA_ENCHANTED_BOOK,
250
			createLibrarianLevel1EnchantmentTrade(items, doubleTradePrice, savannaType, enchantmentsSavannaCommon)
251
		);
252
		register(
253
			context, LIBRARIAN_1_EMERALD_AND_BOOK_SNOW_ENCHANTED_BOOK, createLibrarianLevel1EnchantmentTrade(items, doubleTradePrice, snowType, enchantmentsSnowCommon)
254
		);
255
		register(
256
			context,
257
			LIBRARIAN_1_EMERALD_AND_BOOK_SWAMP_ENCHANTED_BOOK,
258
			createLibrarianLevel1EnchantmentTrade(items, doubleTradePrice, swampType, enchantmentsSwampCommon)
259
		);
260
		register(
261
			context,
262
			LIBRARIAN_1_EMERALD_AND_BOOK_TAIGA_ENCHANTED_BOOK,
263
			createLibrarianLevel1EnchantmentTrade(items, doubleTradePrice, taigaType, enchantmentsTaigaCommon)
264
		);
265
		register(context, LIBRARIAN_2_BOOK_EMERALD, VillagerTrade.builder(new TradeCost(Items.BOOK, 4), new ItemStackTemplate(Items.EMERALD), 12, 10, 0.05F).build());
266
		register(
267
			context,
268
			LIBRARIAN_2_EMERALD_AND_BOOK_DESERT_ENCHANTED_BOOK,
269
			createLibrarianLevel2EnchantmentTrade(items, doubleTradePrice, desertType, enchantmentsDesertCommon)
270
		);
271
		register(
272
			context,
273
			LIBRARIAN_2_EMERALD_AND_BOOK_JUNGLE_ENCHANTED_BOOK,
274
			createLibrarianLevel2EnchantmentTrade(items, doubleTradePrice, jungleType, enchantmentsJungleCommon)
275
		);
276
		register(
277
			context,
278
			LIBRARIAN_2_EMERALD_AND_BOOK_PLAINS_ENCHANTED_BOOK,
279
			createLibrarianLevel2EnchantmentTrade(items, doubleTradePrice, plainsType, enchantmentsPlainsCommon)
280
		);
281
		register(
282
			context,
283
			LIBRARIAN_2_EMERALD_AND_BOOK_SAVANNA_ENCHANTED_BOOK,
284
			createLibrarianLevel2EnchantmentTrade(items, doubleTradePrice, savannaType, enchantmentsSavannaCommon)
285
		);
286
		register(
287
			context, LIBRARIAN_2_EMERALD_AND_BOOK_SNOW_ENCHANTED_BOOK, createLibrarianLevel2EnchantmentTrade(items, doubleTradePrice, snowType, enchantmentsSnowCommon)
288
		);
289
		register(
290
			context,
291
			LIBRARIAN_2_EMERALD_AND_BOOK_SWAMP_ENCHANTED_BOOK,
292
			createLibrarianLevel2EnchantmentTrade(items, doubleTradePrice, swampType, enchantmentsSwampCommon)
293
		);
294
		register(
295
			context,
296
			LIBRARIAN_2_EMERALD_AND_BOOK_TAIGA_ENCHANTED_BOOK,
297
			createLibrarianLevel2EnchantmentTrade(items, doubleTradePrice, taigaType, enchantmentsTaigaCommon)
298
		);
299
		register(
300
			context,
301
			LIBRARIAN_3_EMERALD_AND_BOOK_DESERT_ENCHANTED_BOOK,
302
			createLibrarianLevel3EnchantmentTrade(items, doubleTradePrice, desertType, enchantmentsDesertCommon)
303
		);
304
		register(
305
			context,
306
			LIBRARIAN_3_EMERALD_AND_BOOK_JUNGLE_ENCHANTED_BOOK,
307
			createLibrarianLevel3EnchantmentTrade(items, doubleTradePrice, jungleType, enchantmentsJungleCommon)
308
		);
309
		register(
310
			context,
311
			LIBRARIAN_3_EMERALD_AND_BOOK_PLAINS_ENCHANTED_BOOK,
312
			createLibrarianLevel3EnchantmentTrade(items, doubleTradePrice, plainsType, enchantmentsPlainsCommon)
313
		);
314
		register(
315
			context,
316
			LIBRARIAN_3_EMERALD_AND_BOOK_SAVANNA_ENCHANTED_BOOK,
317
			createLibrarianLevel3EnchantmentTrade(items, doubleTradePrice, savannaType, enchantmentsSavannaCommon)
318
		);
319
		register(
320
			context, LIBRARIAN_3_EMERALD_AND_BOOK_SNOW_ENCHANTED_BOOK, createLibrarianLevel3EnchantmentTrade(items, doubleTradePrice, snowType, enchantmentsSnowCommon)
321
		);
322
		register(
323
			context,
324
			LIBRARIAN_3_EMERALD_AND_BOOK_SWAMP_ENCHANTED_BOOK,
325
			createLibrarianLevel3EnchantmentTrade(items, doubleTradePrice, swampType, enchantmentsSwampCommon)
326
		);
327
		register(
328
			context,
329
			LIBRARIAN_3_EMERALD_AND_BOOK_TAIGA_ENCHANTED_BOOK,
330
			createLibrarianLevel3EnchantmentTrade(items, doubleTradePrice, taigaType, enchantmentsTaigaCommon)
331
		);
332
		register(
333
			context,
334
			LIBRARIAN_5_EMERALD_AND_BOOK_DESERT_ENCHANTED_BOOK,
335
			createLibrarianLevel5EnchantmentTrade(items, doubleTradePrice, desertType, enchantments.getOrThrow(Enchantments.EFFICIENCY), 3)
336
		);
337
		register(
338
			context,
339
			LIBRARIAN_5_EMERALD_AND_BOOK_JUNGLE_ENCHANTED_BOOK,
340
			createLibrarianLevel5EnchantmentTrade(items, doubleTradePrice, jungleType, enchantments.getOrThrow(Enchantments.UNBREAKING), 2)
341
		);
342
		register(
343
			context,
344
			LIBRARIAN_5_EMERALD_AND_BOOK_PLAINS_ENCHANTED_BOOK,
345
			createLibrarianLevel5EnchantmentTrade(items, doubleTradePrice, plainsType, enchantments.getOrThrow(Enchantments.PROTECTION), 3)
346
		);
347
		register(
348
			context,
349
			LIBRARIAN_5_EMERALD_AND_BOOK_SAVANNA_ENCHANTED_BOOK,
350
			createLibrarianLevel5EnchantmentTrade(items, doubleTradePrice, savannaType, enchantments.getOrThrow(Enchantments.SHARPNESS), 3)
351
		);
352
		register(
353
			context,
354
			LIBRARIAN_5_EMERALD_AND_BOOK_TAIGA_ENCHANTED_BOOK,
355
			createLibrarianLevel5EnchantmentTrade(items, doubleTradePrice, taigaType, enchantments.getOrThrow(Enchantments.FORTUNE), 2)
356
		);
357
		register(
358
			context,
359
			LIBRARIAN_5_EMERALD_AND_BOOK_SNOW_ENCHANTED_BOOK,
360
			createLibrarianLevel5SpecialEnchantmentTrade(items, doubleTradePrice, snowType, enchantments.getOrThrow(Enchantments.SILK_TOUCH))
361
		);
362
		register(
363
			context,
364
			LIBRARIAN_5_EMERALD_AND_BOOK_SWAMP_ENCHANTED_BOOK,
365
			createLibrarianLevel5SpecialEnchantmentTrade(items, doubleTradePrice, swampType, enchantments.getOrThrow(Enchantments.MENDING))
366
		);
367
		register(
368
			context,
369
			ARMORER_1_IRON_INGOT_EMERALD,
370
			VillagerTrade.builder(new TradeCost(Items.IRON_INGOT, 5), new ItemStackTemplate(Items.EMERALD), 12, 5, 0.05F)
371
				.merchantPredicate(
372
					villagerTypeRestriction(
373
						villagerTypeHolderSet(villagerVariants, List.of(VillagerType.DESERT, VillagerType.PLAINS, VillagerType.SAVANNA, VillagerType.SNOW, VillagerType.TAIGA))
374
					)
375
				)
376
				.build()
377
		);
378
		register(
379
			context,
380
			ARMORER_2_EMERALD_IRON_BOOTS_GROUP_1,
381
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 4), new ItemStackTemplate(Items.IRON_BOOTS), 12, 5, 0.05F)
382
				.merchantPredicate(
383
					villagerTypeRestriction(
384
						villagerTypeHolderSet(villagerVariants, List.of(VillagerType.DESERT, VillagerType.PLAINS, VillagerType.SAVANNA, VillagerType.SNOW, VillagerType.TAIGA))
385
					)
386
				)
387
				.build()
388
		);
389
		register(
390
			context,
391
			ARMORER_2_EMERALD_IRON_HELMET_GROUP_1,
392
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 5), new ItemStackTemplate(Items.IRON_HELMET), 12, 5, 0.05F)
393
				.merchantPredicate(
394
					villagerTypeRestriction(
395
						villagerTypeHolderSet(villagerVariants, List.of(VillagerType.DESERT, VillagerType.PLAINS, VillagerType.SAVANNA, VillagerType.SNOW, VillagerType.TAIGA))
396
					)
397
				)
398
				.build()
399
		);
400
		register(
401
			context,
402
			ARMORER_2_EMERALD_IRON_LEGGINGS_GROUP_1,
403
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 7), new ItemStackTemplate(Items.IRON_LEGGINGS), 12, 5, 0.05F)
404
				.merchantPredicate(
405
					villagerTypeRestriction(
406
						villagerTypeHolderSet(villagerVariants, List.of(VillagerType.DESERT, VillagerType.PLAINS, VillagerType.SAVANNA, VillagerType.SNOW, VillagerType.TAIGA))
407
					)
408
				)
409
				.build()
410
		);
411
		register(
412
			context,
413
			ARMORER_2_EMERALD_IRON_CHESTPLATE_GROUP_1,
414
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 9), new ItemStackTemplate(Items.IRON_CHESTPLATE), 12, 5, 0.05F)
415
				.merchantPredicate(
416
					villagerTypeRestriction(
417
						villagerTypeHolderSet(villagerVariants, List.of(VillagerType.DESERT, VillagerType.PLAINS, VillagerType.SAVANNA, VillagerType.SNOW, VillagerType.TAIGA))
418
					)
419
				)
420
				.build()
421
		);
422
		register(
423
			context,
424
			ARMORER_2_EMERALD_CHAINMAIL_BOOTS_GROUP_2,
425
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 4), new ItemStackTemplate(Items.CHAINMAIL_BOOTS), 12, 5, 0.05F)
426
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.JUNGLE, VillagerType.SWAMP))))
427
				.build()
428
		);
429
		register(
430
			context,
431
			ARMORER_2_EMERALD_CHAINMAIL_HELMET_GROUP_2,
432
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 5), new ItemStackTemplate(Items.CHAINMAIL_HELMET), 12, 5, 0.05F)
433
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.JUNGLE, VillagerType.SWAMP))))
434
				.build()
435
		);
436
		register(
437
			context,
438
			ARMORER_2_EMERALD_CHAINMAIL_LEGGINGS_GROUP_2,
439
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 7), new ItemStackTemplate(Items.CHAINMAIL_LEGGINGS), 12, 5, 0.05F)
440
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.JUNGLE, VillagerType.SWAMP))))
441
				.build()
442
		);
443
		register(
444
			context,
445
			ARMORER_2_EMERALD_CHAINMAIL_CHESTPLATE_GROUP_2,
446
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 9), new ItemStackTemplate(Items.CHAINMAIL_CHESTPLATE), 12, 5, 0.05F)
447
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.JUNGLE, VillagerType.SWAMP))))
448
				.build()
449
		);
450
		register(context, ARMORER_3_EMERALD_BELL, VillagerTrade.builder(new TradeCost(Items.EMERALD, 36), new ItemStackTemplate(Items.BELL), 12, 10, 0.2F).build());
451
		register(
452
			context,
453
			ARMORER_4_EMERALD_ENCHANTED_IRON_BOOTS_DESERT,
454
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 8), new ItemStackTemplate(Items.IRON_BOOTS), 3, 15, 0.05F)
455
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.DESERT))))
456
				.addModifiers(enchantedItem(items, enchantments.getOrThrow(Enchantments.THORNS), 1, Items.IRON_BOOTS))
457
				.build()
458
		);
459
		register(
460
			context,
461
			ARMORER_4_EMERALD_ENCHANTED_IRON_HELMET_DESERT,
462
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 9), new ItemStackTemplate(Items.IRON_HELMET), 3, 15, 0.05F)
463
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.DESERT))))
464
				.addModifiers(enchantedItem(items, enchantments.getOrThrow(Enchantments.THORNS), 1, Items.IRON_HELMET))
465
				.build()
466
		);
467
		register(
468
			context,
469
			ARMORER_4_EMERALD_ENCHANTED_IRON_LEGGINGS_DESERT,
470
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 11), new ItemStackTemplate(Items.IRON_LEGGINGS), 3, 15, 0.05F)
471
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.DESERT))))
472
				.addModifiers(enchantedItem(items, enchantments.getOrThrow(Enchantments.THORNS), 1, Items.IRON_LEGGINGS))
473
				.build()
474
		);
475
		register(
476
			context,
477
			ARMORER_4_EMERALD_ENCHANTED_IRON_CHESTPLATE_DESERT,
478
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 13), new ItemStackTemplate(Items.IRON_CHESTPLATE), 3, 15, 0.05F)
479
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.DESERT))))
480
				.addModifiers(enchantedItem(items, enchantments.getOrThrow(Enchantments.THORNS), 1, Items.IRON_CHESTPLATE))
481
				.build()
482
		);
483
		register(
484
			context,
485
			ARMORER_4_EMERALD_ENCHANTED_IRON_BOOTS_PLAINS,
486
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 8), new ItemStackTemplate(Items.IRON_BOOTS), 3, 15, 0.05F)
487
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.PLAINS))))
488
				.addModifiers(enchantedItem(items, enchantments.getOrThrow(Enchantments.PROTECTION), 1, Items.IRON_BOOTS))
489
				.build()
490
		);
491
		register(
492
			context,
493
			ARMORER_4_EMERALD_ENCHANTED_IRON_HELMET_PLAINS,
494
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 9), new ItemStackTemplate(Items.IRON_HELMET), 3, 15, 0.05F)
495
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.PLAINS))))
496
				.addModifiers(enchantedItem(items, enchantments.getOrThrow(Enchantments.PROTECTION), 1, Items.IRON_HELMET))
497
				.build()
498
		);
499
		register(
500
			context,
501
			ARMORER_4_EMERALD_ENCHANTED_IRON_LEGGINGS_PLAINS,
502
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 11), new ItemStackTemplate(Items.IRON_LEGGINGS), 3, 15, 0.05F)
503
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.PLAINS))))
504
				.addModifiers(enchantedItem(items, enchantments.getOrThrow(Enchantments.PROTECTION), 1, Items.IRON_LEGGINGS))
505
				.build()
506
		);
507
		register(
508
			context,
509
			ARMORER_4_EMERALD_ENCHANTED_IRON_CHESTPLATE_PLAINS,
510
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 13), new ItemStackTemplate(Items.IRON_CHESTPLATE), 3, 15, 0.05F)
511
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.PLAINS))))
512
				.addModifiers(enchantedItem(items, enchantments.getOrThrow(Enchantments.PROTECTION), 1, Items.IRON_CHESTPLATE))
513
				.build()
514
		);
515
		register(
516
			context,
517
			ARMORER_4_EMERALD_ENCHANTED_IRON_BOOTS_SAVANNA,
518
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 2), new ItemStackTemplate(Items.IRON_BOOTS), 3, 15, 0.05F)
519
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.SAVANNA))))
520
				.addModifiers(enchantedItem(items, enchantments.getOrThrow(Enchantments.BINDING_CURSE), 1, Items.IRON_BOOTS))
521
				.build()
522
		);
523
		register(
524
			context,
525
			ARMORER_4_EMERALD_ENCHANTED_IRON_HELMET_SAVANNA,
526
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 3), new ItemStackTemplate(Items.IRON_HELMET), 3, 15, 0.05F)
527
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.SAVANNA))))
528
				.addModifiers(enchantedItem(items, enchantments.getOrThrow(Enchantments.BINDING_CURSE), 1, Items.IRON_HELMET))
529
				.build()
530
		);
531
		register(
532
			context,
533
			ARMORER_4_EMERALD_ENCHANTED_IRON_LEGGINGS_SAVANNA,
534
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 5), new ItemStackTemplate(Items.IRON_LEGGINGS), 3, 15, 0.05F)
535
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.SAVANNA))))
536
				.addModifiers(enchantedItem(items, enchantments.getOrThrow(Enchantments.BINDING_CURSE), 1, Items.IRON_LEGGINGS))
537
				.build()
538
		);
539
		register(
540
			context,
541
			ARMORER_4_EMERALD_ENCHANTED_IRON_CHESTPLATE_SAVANNA,
542
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 7), new ItemStackTemplate(Items.IRON_CHESTPLATE), 3, 15, 0.05F)
543
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.SAVANNA))))
544
				.addModifiers(enchantedItem(items, enchantments.getOrThrow(Enchantments.BINDING_CURSE), 1, Items.IRON_CHESTPLATE))
545
				.build()
546
		);
547
		register(
548
			context,
549
			ARMORER_4_EMERALD_ENCHANTED_IRON_BOOTS_SNOW,
550
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 8), new ItemStackTemplate(Items.IRON_BOOTS), 3, 15, 0.05F)
551
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.SNOW))))
552
				.addModifiers(enchantedItem(items, enchantments.getOrThrow(Enchantments.FROST_WALKER), 1, Items.IRON_BOOTS))
553
				.build()
554
		);
555
		register(
556
			context,
557
			ARMORER_4_EMERALD_ENCHANTED_IRON_HELMET_SNOW,
558
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 9), new ItemStackTemplate(Items.IRON_HELMET), 3, 15, 0.05F)
559
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.SNOW))))
560
				.addModifiers(enchantedItem(items, enchantments.getOrThrow(Enchantments.AQUA_AFFINITY), 1, Items.IRON_HELMET))
561
				.build()
562
		);
563
		register(
564
			context,
565
			ARMORER_4_EMERALD_ENCHANTED_CHAINMAIL_BOOTS_JUNGLE,
566
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 8), new ItemStackTemplate(Items.CHAINMAIL_BOOTS), 3, 15, 0.05F)
567
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.JUNGLE))))
568
				.addModifiers(enchantedItem(items, enchantments.getOrThrow(Enchantments.UNBREAKING), 1, Items.CHAINMAIL_BOOTS))
569
				.build()
570
		);
571
		register(
572
			context,
573
			ARMORER_4_EMERALD_ENCHANTED_CHAINMAIL_HELMET_JUNGLE,
574
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 9), new ItemStackTemplate(Items.CHAINMAIL_HELMET), 3, 15, 0.05F)
575
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.JUNGLE))))
576
				.addModifiers(enchantedItem(items, enchantments.getOrThrow(Enchantments.UNBREAKING), 1, Items.CHAINMAIL_HELMET))
577
				.build()
578
		);
579
		register(
580
			context,
581
			ARMORER_4_EMERALD_ENCHANTED_CHAINMAIL_LEGGINGS_JUNGLE,
582
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 11), new ItemStackTemplate(Items.CHAINMAIL_LEGGINGS), 3, 15, 0.05F)
583
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.JUNGLE))))
584
				.addModifiers(enchantedItem(items, enchantments.getOrThrow(Enchantments.UNBREAKING), 1, Items.CHAINMAIL_LEGGINGS))
585
				.build()
586
		);
587
		register(
588
			context,
589
			ARMORER_4_EMERALD_ENCHANTED_CHAINMAIL_CHESTPLATE_JUNGLE,
590
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 13), new ItemStackTemplate(Items.CHAINMAIL_CHESTPLATE), 3, 15, 0.05F)
591
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.JUNGLE))))
592
				.addModifiers(enchantedItem(items, enchantments.getOrThrow(Enchantments.UNBREAKING), 1, Items.CHAINMAIL_CHESTPLATE))
593
				.build()
594
		);
595
		register(
596
			context,
597
			ARMORER_4_EMERALD_ENCHANTED_CHAINMAIL_BOOTS_SWAMP,
598
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 8), new ItemStackTemplate(Items.CHAINMAIL_BOOTS), 3, 15, 0.05F)
599
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.SWAMP))))
600
				.addModifiers(enchantedItem(items, enchantments.getOrThrow(Enchantments.MENDING), 1, Items.CHAINMAIL_BOOTS))
601
				.build()
602
		);
603
		register(
604
			context,
605
			ARMORER_4_EMERALD_ENCHANTED_CHAINMAIL_HELMET_SWAMP,
606
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 9), new ItemStackTemplate(Items.CHAINMAIL_HELMET), 3, 15, 0.05F)
607
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.SWAMP))))
608
				.addModifiers(enchantedItem(items, enchantments.getOrThrow(Enchantments.MENDING), 1, Items.CHAINMAIL_HELMET))
609
				.build()
610
		);
611
		register(
612
			context,
613
			ARMORER_4_EMERALD_ENCHANTED_CHAINMAIL_LEGGINGS_SWAMP,
614
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 11), new ItemStackTemplate(Items.CHAINMAIL_LEGGINGS), 3, 15, 0.05F)
615
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.SWAMP))))
616
				.addModifiers(enchantedItem(items, enchantments.getOrThrow(Enchantments.MENDING), 1, Items.CHAINMAIL_LEGGINGS))
617
				.build()
618
		);
619
		register(
620
			context,
621
			ARMORER_4_EMERALD_ENCHANTED_CHAINMAIL_CHESTPLATE_SWAMP,
622
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 13), new ItemStackTemplate(Items.CHAINMAIL_CHESTPLATE), 3, 15, 0.05F)
623
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.SWAMP))))
624
				.addModifiers(enchantedItem(items, enchantments.getOrThrow(Enchantments.MENDING), 1, Items.CHAINMAIL_CHESTPLATE))
625
				.build()
626
		);
627
		register(
628
			context,
629
			ARMORER_4_EMERALD_AND_DIAMOND_BOOTS_DIAMOND_LEGGINGS_TAIGA,
630
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 4), new TradeCost(Items.DIAMOND_BOOTS, 1), new ItemStackTemplate(Items.DIAMOND_LEGGINGS), 3, 15, 0.05F)
631
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.TAIGA))))
632
				.build()
633
		);
634
		register(
635
			context,
636
			ARMORER_4_EMERALD_AND_DIAMOND_LEGGINGS_DIAMOND_CHESTPLATE_TAIGA,
637
			VillagerTrade.builder(
638
					new TradeCost(Items.EMERALD, 4), new TradeCost(Items.DIAMOND_LEGGINGS, 1), new ItemStackTemplate(Items.DIAMOND_CHESTPLATE), 3, 15, 0.05F
639
				)
640
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.TAIGA))))
641
				.build()
642
		);
643
		register(
644
			context,
645
			ARMORER_4_EMERALD_AND_DIAMOND_HELMET_DIAMOND_BOOTS_TAIGA,
646
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 4), new TradeCost(Items.DIAMOND_HELMET, 1), new ItemStackTemplate(Items.DIAMOND_BOOTS), 3, 15, 0.05F)
647
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.TAIGA))))
648
				.build()
649
		);
650
		register(
651
			context,
652
			ARMORER_4_EMERALD_AND_DIAMOND_CHESTPLATE_DIAMOND_HELMET_TAIGA,
653
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 2), new TradeCost(Items.DIAMOND_CHESTPLATE, 1), new ItemStackTemplate(Items.DIAMOND_HELMET), 3, 15, 0.05F)
654
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.TAIGA))))
655
				.build()
656
		);
657
		register(
658
			context,
659
			ARMORER_5_EMERALD_AND_DIAMOND_DIAMOND_CHESTPLATE_DESERT,
660
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 16), new TradeCost(Items.DIAMOND, 4), new ItemStackTemplate(Items.DIAMOND_CHESTPLATE), 3, 30, 0.05F)
661
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.DESERT))))
662
				.addModifiers(enchantedItem(items, enchantments.getOrThrow(Enchantments.THORNS), 1, Items.DIAMOND_CHESTPLATE))
663
				.build()
664
		);
665
		register(
666
			context,
667
			ARMORER_5_EMERALD_AND_DIAMOND_DIAMOND_LEGGINGS_DESERT,
668
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 16), new TradeCost(Items.DIAMOND, 3), new ItemStackTemplate(Items.DIAMOND_LEGGINGS), 3, 30, 0.05F)
669
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.DESERT))))
670
				.addModifiers(enchantedItem(items, enchantments.getOrThrow(Enchantments.THORNS), 1, Items.DIAMOND_LEGGINGS))
671
				.build()
672
		);
673
		register(
674
			context,
675
			ARMORER_5_EMERALD_AND_DIAMOND_DIAMOND_LEGGINGS_PLAINS,
676
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 16), new TradeCost(Items.DIAMOND, 3), new ItemStackTemplate(Items.DIAMOND_LEGGINGS), 3, 30, 0.05F)
677
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.PLAINS))))
678
				.addModifiers(enchantedItem(items, enchantments.getOrThrow(Enchantments.PROTECTION), 1, Items.DIAMOND_LEGGINGS))
679
				.build()
680
		);
681
		register(
682
			context,
683
			ARMORER_5_EMERALD_AND_DIAMOND_DIAMOND_BOOTS_PLAINS,
684
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 12), new TradeCost(Items.DIAMOND, 2), new ItemStackTemplate(Items.DIAMOND_BOOTS), 3, 30, 0.05F)
685
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.PLAINS))))
686
				.addModifiers(enchantedItem(items, enchantments.getOrThrow(Enchantments.PROTECTION), 1, Items.DIAMOND_BOOTS))
687
				.build()
688
		);
689
		register(
690
			context,
691
			ARMORER_5_EMERALD_AND_DIAMOND_DIAMOND_HELMET_SAVANNA,
692
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 6), new TradeCost(Items.DIAMOND, 2), new ItemStackTemplate(Items.DIAMOND_HELMET), 3, 30, 0.05F)
693
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.SAVANNA))))
694
				.addModifiers(enchantedItem(items, enchantments.getOrThrow(Enchantments.BINDING_CURSE), 1, Items.DIAMOND_HELMET))
695
				.build()
696
		);
697
		register(
698
			context,
699
			ARMORER_5_EMERALD_AND_DIAMOND_DIAMOND_CHESTPLATE_SAVANNA,
700
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 8), new TradeCost(Items.DIAMOND, 3), new ItemStackTemplate(Items.DIAMOND_CHESTPLATE), 3, 30, 0.05F)
701
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.SAVANNA))))
702
				.addModifiers(enchantedItem(items, enchantments.getOrThrow(Enchantments.BINDING_CURSE), 1, Items.DIAMOND_CHESTPLATE))
703
				.build()
704
		);
705
		register(
706
			context,
707
			ARMORER_5_EMERALD_AND_DIAMOND_DIAMOND_BOOTS_SNOW,
708
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 12), new TradeCost(Items.DIAMOND, 2), new ItemStackTemplate(Items.DIAMOND_BOOTS), 3, 30, 0.05F)
709
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.SNOW))))
710
				.addModifiers(enchantedItem(items, enchantments.getOrThrow(Enchantments.FROST_WALKER), 1, Items.DIAMOND_BOOTS))
711
				.build()
712
		);
713
		register(
714
			context,
715
			ARMORER_5_EMERALD_AND_DIAMOND_DIAMOND_HELMET_SNOW,
716
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 12), new TradeCost(Items.DIAMOND, 3), new ItemStackTemplate(Items.DIAMOND_HELMET), 3, 30, 0.05F)
717
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.SNOW))))
718
				.addModifiers(enchantedItem(items, enchantments.getOrThrow(Enchantments.AQUA_AFFINITY), 1, Items.DIAMOND_HELMET))
719
				.build()
720
		);
721
		register(
722
			context,
723
			ARMORER_5_EMERALD_CHAINMAIL_HELMET_JUNGLE,
724
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 9), new ItemStackTemplate(Items.CHAINMAIL_HELMET), 3, 30, 0.05F)
725
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.JUNGLE))))
726
				.addModifiers(enchantedItem(items, enchantments.getOrThrow(Enchantments.PROJECTILE_PROTECTION), 1, Items.CHAINMAIL_HELMET))
727
				.build()
728
		);
729
		register(
730
			context,
731
			ARMORER_5_EMERALD_CHAINMAIL_BOOTS_JUNGLE,
732
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 8), new ItemStackTemplate(Items.CHAINMAIL_BOOTS), 3, 30, 0.05F)
733
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.JUNGLE))))
734
				.addModifiers(enchantedItem(items, enchantments.getOrThrow(Enchantments.FEATHER_FALLING), 1, Items.CHAINMAIL_BOOTS))
735
				.build()
736
		);
737
		register(
738
			context,
739
			ARMORER_5_EMERALD_CHAINMAIL_HELMET_SWAMP,
740
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 9), new ItemStackTemplate(Items.CHAINMAIL_HELMET), 3, 30, 0.05F)
741
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.SWAMP))))
742
				.addModifiers(enchantedItem(items, enchantments.getOrThrow(Enchantments.RESPIRATION), 1, Items.CHAINMAIL_HELMET))
743
				.build()
744
		);
745
		register(
746
			context,
747
			ARMORER_5_EMERALD_CHAINMAIL_BOOTS_SWAMP,
748
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 8), new ItemStackTemplate(Items.CHAINMAIL_BOOTS), 3, 30, 0.05F)
749
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.SWAMP))))
750
				.addModifiers(enchantedItem(items, enchantments.getOrThrow(Enchantments.DEPTH_STRIDER), 1, Items.CHAINMAIL_BOOTS))
751
				.build()
752
		);
753
		register(
754
			context,
755
			ARMORER_5_EMERALD_AND_DIAMOND_DIAMOND_CHESTPLATE_TAIGA,
756
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 18), new TradeCost(Items.DIAMOND, 4), new ItemStackTemplate(Items.DIAMOND_CHESTPLATE), 3, 30, 0.05F)
757
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.TAIGA))))
758
				.addModifiers(enchantedItem(items, enchantments.getOrThrow(Enchantments.BLAST_PROTECTION), 1, Items.DIAMOND_CHESTPLATE))
759
				.build()
760
		);
761
		register(
762
			context,
763
			ARMORER_5_EMERALD_AND_DIAMOND_DIAMOND_LEGGINGS_TAIGA,
764
			VillagerTrade.builder(new TradeCost(Items.EMERALD, 18), new TradeCost(Items.DIAMOND, 3), new ItemStackTemplate(Items.DIAMOND_LEGGINGS), 3, 30, 0.05F)
765
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.TAIGA))))
766
				.addModifiers(enchantedItem(items, enchantments.getOrThrow(Enchantments.BLAST_PROTECTION), 1, Items.DIAMOND_LEGGINGS))
767
				.build()
768
		);
769
		register(
770
			context,
771
			ARMORER_5_DIAMOND_BLOCK_EMERALD_TAIGA,
772
			VillagerTrade.builder(new TradeCost(Items.DIAMOND_BLOCK, 1), new ItemStackTemplate(Items.EMERALD, 42), 12, 30, 0.05F)
773
				.merchantPredicate(villagerTypeRestriction(villagerTypeHolderSet(villagerVariants, List.of(VillagerType.TAIGA))))
774
				.build()
775
		);
776
		register(
777
			context,
778
			ARMORER_5_IRON_BLOCK_EMERALD_NON_TAIGA,
779
			VillagerTrade.builder(new TradeCost(Items.IRON_BLOCK, 1), new ItemStackTemplate(Items.EMERALD, 4), 12, 30, 0.05F)
780
				.merchantPredicate(
781
					villagerTypeRestriction(
782
						villagerTypeHolderSet(
783
							villagerVariants, List.of(VillagerType.DESERT, VillagerType.JUNGLE, VillagerType.PLAINS, VillagerType.SAVANNA, VillagerType.SNOW, VillagerType.SWAMP)
784
						)
785
					)
786
				)
787
				.build()
788
		);
789
	}
790
791
	private static VillagerTrade createLibrarianLevel1EnchantmentTrade(
792
		final HolderGetter<Item> items,
793
		final HolderSet<Enchantment> doubleTradePrice,
794
		final HolderSet<VillagerType> villagerTypes,
795
		final HolderSet<Enchantment> enchantments
796
	) {
797
		return VillagerTrade.builder(new TradeCost(Items.EMERALD, 0), new TradeCost(Items.BOOK, 1), new ItemStackTemplate(Items.ENCHANTED_BOOK), 12, 1, 0.2F)
798
			.merchantPredicate(villagerTypeRestriction(villagerTypes))
799
			.addModifiers(enchantedBook(items, enchantments))
800
			.doubleTradePriceEnchantments(doubleTradePrice)
801
			.build();
802
	}
803
804
	private static VillagerTrade createLibrarianLevel2EnchantmentTrade(
805
		final HolderGetter<Item> items,
806
		final HolderSet<Enchantment> doubleTradePrice,
807
		final HolderSet<VillagerType> villagerTypes,
808
		final HolderSet<Enchantment> enchantments
809
	) {
810
		return VillagerTrade.builder(new TradeCost(Items.EMERALD, 0), new TradeCost(Items.BOOK, 1), new ItemStackTemplate(Items.ENCHANTED_BOOK), 12, 5, 0.2F)
811
			.merchantPredicate(villagerTypeRestriction(villagerTypes))
812
			.addModifiers(enchantedBook(items, enchantments))
813
			.doubleTradePriceEnchantments(doubleTradePrice)
814
			.build();
815
	}
816
817
	private static VillagerTrade createLibrarianLevel3EnchantmentTrade(
818
		final HolderGetter<Item> items,
819
		final HolderSet<Enchantment> doubleTradePrice,
820
		final HolderSet<VillagerType> villagerTypes,
821
		final HolderSet<Enchantment> enchantments
822
	) {
823
		return VillagerTrade.builder(new TradeCost(Items.EMERALD, 0), new TradeCost(Items.BOOK, 1), new ItemStackTemplate(Items.ENCHANTED_BOOK), 12, 10, 0.2F)
824
			.merchantPredicate(villagerTypeRestriction(villagerTypes))
825
			.addModifiers(enchantedBook(items, enchantments))
826
			.doubleTradePriceEnchantments(doubleTradePrice)
827
			.build();
828
	}
829
830
	private static VillagerTrade createLibrarianLevel5EnchantmentTrade(
831
		final HolderGetter<Item> items,
832
		final HolderSet<Enchantment> doubleTradePrice,
833
		final HolderSet<VillagerType> villagerTypes,
834
		final Holder<Enchantment> enchantment,
835
		final int level
836
	) {
837
		return VillagerTrade.builder(
838
				new TradeCost(Items.EMERALD, ContextIntProviders.add(ContextIntProviders.exactly(3 * level + 2), ContextIntProviders.between(0, 5 + level * 10))),
839
				new TradeCost(Items.BOOK, 1),
840
				new ItemStackTemplate(Items.ENCHANTED_BOOK),
841
				12,
842
				30,
843
				0.2F
844
			)
845
			.merchantPredicate(villagerTypeRestriction(villagerTypes))
846
			.addModifiers(enchantedBook(items, enchantment, level))
847
			.doubleTradePriceEnchantments(doubleTradePrice)
848
			.build();
849
	}
850
851
	private static VillagerTrade createLibrarianLevel5SpecialEnchantmentTrade(
852
		final HolderGetter<Item> items,
853
		final HolderSet<Enchantment> doubleTradePrice,
854
		final HolderSet<VillagerType> villagerTypes,
855
		final Holder<Enchantment> enchantment
856
	) {
857
		return VillagerTrade.builder(new TradeCost(Items.EMERALD, 0), new TradeCost(Items.BOOK, 1), new ItemStackTemplate(Items.ENCHANTED_BOOK), 12, 30, 0.2F)
858
			.merchantPredicate(villagerTypeRestriction(villagerTypes))
859
			.addModifiers(enchantedBook(items, HolderSet.direct(enchantment)))
860
			.doubleTradePriceEnchantments(doubleTradePrice)
861
			.build();
862
	}
863
}
864

Decompiled Minecraft 26.3 source of TradeRebalanceVillagerTrades (net/minecraft/world/item/trading/TradeRebalanceVillagerTrades.java) with Mojang official mappings, stored verbatim on the site.