TaigaVillagePools .java

net.minecraft.data.worldgen.TaigaVillagePools (class, 257 lines): members: TERMINATORS_KEY, START, bootstrap. imports: VillagePlacements, PlacedFeature.

net.minecraft.data.worldgenclass257 linescommon16.1 KB

API Surface (1)

void bootstrap(final BootstrapContext<StructureTemplatePool> context)

Fields & Constants (2)

START
TERMINATORS_KEY

String literals (101)

"village/taiga/town_centers"
"village/taiga/terminators"
"village/taiga/town_centers/taiga_meeting_point_1"
"village/taiga/town_centers/taiga_meeting_point_2"
"village/taiga/streets"
"village/taiga/streets/corner_01"
"village/taiga/streets/corner_02"
"village/taiga/streets/corner_03"
"village/taiga/streets/straight_01"
"village/taiga/streets/straight_02"
"village/taiga/streets/straight_03"
"village/taiga/streets/straight_04"
"village/taiga/streets/straight_05"
"village/taiga/streets/straight_06"
"village/taiga/streets/crossroad_01"
"village/taiga/streets/crossroad_02"
"village/taiga/streets/crossroad_03"
"village/taiga/streets/crossroad_04"
"village/taiga/streets/crossroad_05"
"village/taiga/streets/crossroad_06"
"village/taiga/streets/turn_01"
"village/taiga/zombie/streets"
"village/taiga/zombie/streets/corner_01"
"village/taiga/zombie/streets/corner_02"

Full Source

TaigaVillagePools.java257 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.data.worldgen;
2
3
import com.google.common.collect.ImmutableList;
4
import com.mojang.datafixers.util.Pair;
5
import net.minecraft.core.Holder;
6
import net.minecraft.core.HolderGetter;
7
import net.minecraft.core.registries.Registries;
8
import net.minecraft.data.worldgen.placement.VillagePlacements;
9
import net.minecraft.resources.ResourceKey;
10
import net.minecraft.world.level.levelgen.placement.PlacedFeature;
11
import net.minecraft.world.level.levelgen.structure.pools.StructurePoolElement;
12
import net.minecraft.world.level.levelgen.structure.pools.StructureTemplatePool;
13
import net.minecraft.world.level.levelgen.structure.templatesystem.StructureProcessorList;
14
15
public class TaigaVillagePools {
16
	public static final ResourceKey<StructureTemplatePool> START = Pools.createKey("village/taiga/town_centers");
17
	private static final ResourceKey<StructureTemplatePool> TERMINATORS_KEY = Pools.createKey("village/taiga/terminators");
18
19
	public static void bootstrap(final BootstrapContext<StructureTemplatePool> context) {
20
		HolderGetter<PlacedFeature> placedFeatures = context.lookup(Registries.PLACED_FEATURE);
21
		Holder<PlacedFeature> spruceVillage = placedFeatures.getOrThrow(VillagePlacements.SPRUCE_VILLAGE);
22
		Holder<PlacedFeature> pineVillage = placedFeatures.getOrThrow(VillagePlacements.PINE_VILLAGE);
23
		Holder<PlacedFeature> pilePumpkinVillage = placedFeatures.getOrThrow(VillagePlacements.PILE_PUMPKIN_VILLAGE);
24
		Holder<PlacedFeature> patchTaigaGrassVillage = placedFeatures.getOrThrow(VillagePlacements.PATCH_TAIGA_GRASS_VILLAGE);
25
		Holder<PlacedFeature> patchBerryBushVillage = placedFeatures.getOrThrow(VillagePlacements.PATCH_BERRY_BUSH_VILLAGE);
26
		HolderGetter<StructureProcessorList> processorLists = context.lookup(Registries.PROCESSOR_LIST);
27
		Holder<StructureProcessorList> mossify10Percent = processorLists.getOrThrow(ProcessorLists.MOSSIFY_10_PERCENT);
28
		Holder<StructureProcessorList> zombieTaiga = processorLists.getOrThrow(ProcessorLists.ZOMBIE_TAIGA);
29
		Holder<StructureProcessorList> streetSnowyOrTaiga = processorLists.getOrThrow(ProcessorLists.STREET_SNOWY_OR_TAIGA);
30
		Holder<StructureProcessorList> farmTaiga = processorLists.getOrThrow(ProcessorLists.FARM_TAIGA);
31
		HolderGetter<StructureTemplatePool> pools = context.lookup(Registries.TEMPLATE_POOL);
32
		Holder<StructureTemplatePool> empty = pools.getOrThrow(Pools.EMPTY);
33
		Holder<StructureTemplatePool> terminators = pools.getOrThrow(TERMINATORS_KEY);
34
		context.register(
35
			START,
36
			new StructureTemplatePool(
37
				empty,
38
				ImmutableList.of(
39
					Pair.of(StructurePoolElement.legacy("village/taiga/town_centers/taiga_meeting_point_1", mossify10Percent), 49),
40
					Pair.of(StructurePoolElement.legacy("village/taiga/town_centers/taiga_meeting_point_2", mossify10Percent), 49),
41
					Pair.of(StructurePoolElement.legacy("village/taiga/zombie/town_centers/taiga_meeting_point_1", zombieTaiga), 1),
42
					Pair.of(StructurePoolElement.legacy("village/taiga/zombie/town_centers/taiga_meeting_point_2", zombieTaiga), 1)
43
				),
44
				StructureTemplatePool.Projection.RIGID
45
			)
46
		);
47
		Pools.register(
48
			context,
49
			"village/taiga/streets",
50
			new StructureTemplatePool(
51
				terminators,
52
				ImmutableList.of(
53
					Pair.of(StructurePoolElement.legacy("village/taiga/streets/corner_01", streetSnowyOrTaiga), 2),
54
					Pair.of(StructurePoolElement.legacy("village/taiga/streets/corner_02", streetSnowyOrTaiga), 2),
55
					Pair.of(StructurePoolElement.legacy("village/taiga/streets/corner_03", streetSnowyOrTaiga), 2),
56
					Pair.of(StructurePoolElement.legacy("village/taiga/streets/straight_01", streetSnowyOrTaiga), 4),
57
					Pair.of(StructurePoolElement.legacy("village/taiga/streets/straight_02", streetSnowyOrTaiga), 4),
58
					Pair.of(StructurePoolElement.legacy("village/taiga/streets/straight_03", streetSnowyOrTaiga), 4),
59
					Pair.of(StructurePoolElement.legacy("village/taiga/streets/straight_04", streetSnowyOrTaiga), 7),
60
					Pair.of(StructurePoolElement.legacy("village/taiga/streets/straight_05", streetSnowyOrTaiga), 7),
61
					Pair.of(StructurePoolElement.legacy("village/taiga/streets/straight_06", streetSnowyOrTaiga), 4),
62
					Pair.of(StructurePoolElement.legacy("village/taiga/streets/crossroad_01", streetSnowyOrTaiga), 1),
63
					Pair.of(StructurePoolElement.legacy("village/taiga/streets/crossroad_02", streetSnowyOrTaiga), 1),
64
					Pair.of(StructurePoolElement.legacy("village/taiga/streets/crossroad_03", streetSnowyOrTaiga), 2),
65
					Pair.of(StructurePoolElement.legacy("village/taiga/streets/crossroad_04", streetSnowyOrTaiga), 2),
66
					Pair.of(StructurePoolElement.legacy("village/taiga/streets/crossroad_05", streetSnowyOrTaiga), 2),
67
					Pair.of(StructurePoolElement.legacy("village/taiga/streets/crossroad_06", streetSnowyOrTaiga), 2),
68
					Pair.of(StructurePoolElement.legacy("village/taiga/streets/turn_01", streetSnowyOrTaiga), 3)
69
				),
70
				StructureTemplatePool.Projection.TERRAIN_MATCHING
71
			)
72
		);
73
		Pools.register(
74
			context,
75
			"village/taiga/zombie/streets",
76
			new StructureTemplatePool(
77
				terminators,
78
				ImmutableList.of(
79
					Pair.of(StructurePoolElement.legacy("village/taiga/zombie/streets/corner_01", streetSnowyOrTaiga), 2),
80
					Pair.of(StructurePoolElement.legacy("village/taiga/zombie/streets/corner_02", streetSnowyOrTaiga), 2),
81
					Pair.of(StructurePoolElement.legacy("village/taiga/zombie/streets/corner_03", streetSnowyOrTaiga), 2),
82
					Pair.of(StructurePoolElement.legacy("village/taiga/zombie/streets/straight_01", streetSnowyOrTaiga), 4),
83
					Pair.of(StructurePoolElement.legacy("village/taiga/zombie/streets/straight_02", streetSnowyOrTaiga), 4),
84
					Pair.of(StructurePoolElement.legacy("village/taiga/zombie/streets/straight_03", streetSnowyOrTaiga), 4),
85
					Pair.of(StructurePoolElement.legacy("village/taiga/zombie/streets/straight_04", streetSnowyOrTaiga), 7),
86
					Pair.of(StructurePoolElement.legacy("village/taiga/zombie/streets/straight_05", streetSnowyOrTaiga), 7),
87
					Pair.of(StructurePoolElement.legacy("village/taiga/zombie/streets/straight_06", streetSnowyOrTaiga), 4),
88
					Pair.of(StructurePoolElement.legacy("village/taiga/zombie/streets/crossroad_01", streetSnowyOrTaiga), 1),
89
					Pair.of(StructurePoolElement.legacy("village/taiga/zombie/streets/crossroad_02", streetSnowyOrTaiga), 1),
90
					Pair.of(StructurePoolElement.legacy("village/taiga/zombie/streets/crossroad_03", streetSnowyOrTaiga), 2),
91
					Pair.of(StructurePoolElement.legacy("village/taiga/zombie/streets/crossroad_04", streetSnowyOrTaiga), 2),
92
					Pair.of(StructurePoolElement.legacy("village/taiga/zombie/streets/crossroad_05", streetSnowyOrTaiga), 2),
93
					Pair.of(StructurePoolElement.legacy("village/taiga/zombie/streets/crossroad_06", streetSnowyOrTaiga), 2),
94
					Pair.of(StructurePoolElement.legacy("village/taiga/zombie/streets/turn_01", streetSnowyOrTaiga), 3)
95
				),
96
				StructureTemplatePool.Projection.TERRAIN_MATCHING
97
			)
98
		);
99
		Pools.register(
100
			context,
101
			"village/taiga/houses",
102
			new StructureTemplatePool(
103
				terminators,
104
				ImmutableList.of(
105
					Pair.of(StructurePoolElement.legacy("village/taiga/houses/taiga_small_house_1", mossify10Percent), 4),
106
					Pair.of(StructurePoolElement.legacy("village/taiga/houses/taiga_small_house_2", mossify10Percent), 4),
107
					Pair.of(StructurePoolElement.legacy("village/taiga/houses/taiga_small_house_3", mossify10Percent), 4),
108
					Pair.of(StructurePoolElement.legacy("village/taiga/houses/taiga_small_house_4", mossify10Percent), 4),
109
					Pair.of(StructurePoolElement.legacy("village/taiga/houses/taiga_small_house_5", mossify10Percent), 4),
110
					Pair.of(StructurePoolElement.legacy("village/taiga/houses/taiga_medium_house_1", mossify10Percent), 2),
111
					Pair.of(StructurePoolElement.legacy("village/taiga/houses/taiga_medium_house_2", mossify10Percent), 2),
112
					Pair.of(StructurePoolElement.legacy("village/taiga/houses/taiga_medium_house_3", mossify10Percent), 2),
113
					Pair.of(StructurePoolElement.legacy("village/taiga/houses/taiga_medium_house_4", mossify10Percent), 2),
114
					Pair.of(StructurePoolElement.legacy("village/taiga/houses/taiga_butcher_shop_1", mossify10Percent), 2),
115
					Pair.of(StructurePoolElement.legacy("village/taiga/houses/taiga_tool_smith_1", mossify10Percent), 2),
116
					Pair.of(StructurePoolElement.legacy("village/taiga/houses/taiga_fletcher_house_1", mossify10Percent), 2),
117
					Pair.of(StructurePoolElement.legacy("village/taiga/houses/taiga_shepherds_house_1", mossify10Percent), 2),
118
					Pair.of(StructurePoolElement.legacy("village/taiga/houses/taiga_armorer_house_1", mossify10Percent), 1),
119
					Pair.of(StructurePoolElement.legacy("village/taiga/houses/taiga_armorer_2", mossify10Percent), 1),
120
					Pair.of(StructurePoolElement.legacy("village/taiga/houses/taiga_fisher_cottage_1", mossify10Percent), 3),
121
					Pair.of(StructurePoolElement.legacy("village/taiga/houses/taiga_tannery_1", mossify10Percent), 2),
122
					Pair.of(StructurePoolElement.legacy("village/taiga/houses/taiga_cartographer_house_1", mossify10Percent), 2),
123
					Pair.of(StructurePoolElement.legacy("village/taiga/houses/taiga_library_1", mossify10Percent), 2),
124
					Pair.of(StructurePoolElement.legacy("village/taiga/houses/taiga_masons_house_1", mossify10Percent), 2),
125
					Pair.of(StructurePoolElement.legacy("village/taiga/houses/taiga_weaponsmith_1", mossify10Percent), 2),
126
					Pair.of(StructurePoolElement.legacy("village/taiga/houses/taiga_weaponsmith_2", mossify10Percent), 2),
127
					Pair.of(StructurePoolElement.legacy("village/taiga/houses/taiga_temple_1", mossify10Percent), 2),
128
					Pair.of(StructurePoolElement.legacy("village/taiga/houses/taiga_large_farm_1", farmTaiga), 6),
129
					Pair.of(StructurePoolElement.legacy("village/taiga/houses/taiga_large_farm_2", farmTaiga), 6),
130
					Pair.of(StructurePoolElement.legacy("village/taiga/houses/taiga_small_farm_1", mossify10Percent), 1),
131
					Pair.of(StructurePoolElement.legacy("village/taiga/houses/taiga_animal_pen_1", mossify10Percent), 2),
132
					Pair.of(StructurePoolElement.empty(), 6)
133
				),
134
				StructureTemplatePool.Projection.RIGID
135
			)
136
		);
137
		Pools.register(
138
			context,
139
			"village/taiga/zombie/houses",
140
			new StructureTemplatePool(
141
				terminators,
142
				ImmutableList.of(
143
					Pair.of(StructurePoolElement.legacy("village/taiga/zombie/houses/taiga_small_house_1", zombieTaiga), 4),
144
					Pair.of(StructurePoolElement.legacy("village/taiga/zombie/houses/taiga_small_house_2", zombieTaiga), 4),
145
					Pair.of(StructurePoolElement.legacy("village/taiga/zombie/houses/taiga_small_house_3", zombieTaiga), 4),
146
					Pair.of(StructurePoolElement.legacy("village/taiga/zombie/houses/taiga_small_house_4", zombieTaiga), 4),
147
					Pair.of(StructurePoolElement.legacy("village/taiga/zombie/houses/taiga_small_house_5", zombieTaiga), 4),
148
					Pair.of(StructurePoolElement.legacy("village/taiga/zombie/houses/taiga_medium_house_1", zombieTaiga), 2),
149
					Pair.of(StructurePoolElement.legacy("village/taiga/zombie/houses/taiga_medium_house_2", zombieTaiga), 2),
150
					Pair.of(StructurePoolElement.legacy("village/taiga/zombie/houses/taiga_medium_house_3", zombieTaiga), 2),
151
					Pair.of(StructurePoolElement.legacy("village/taiga/zombie/houses/taiga_medium_house_4", zombieTaiga), 2),
152
					Pair.of(StructurePoolElement.legacy("village/taiga/houses/taiga_butcher_shop_1", zombieTaiga), 2),
153
					Pair.of(StructurePoolElement.legacy("village/taiga/zombie/houses/taiga_tool_smith_1", zombieTaiga), 2),
154
					Pair.of(StructurePoolElement.legacy("village/taiga/houses/taiga_fletcher_house_1", zombieTaiga), 2),
155
					Pair.of(StructurePoolElement.legacy("village/taiga/zombie/houses/taiga_shepherds_house_1", zombieTaiga), 2),
156
					Pair.of(StructurePoolElement.legacy("village/taiga/houses/taiga_armorer_house_1", zombieTaiga), 1),
157
					Pair.of(StructurePoolElement.legacy("village/taiga/zombie/houses/taiga_fisher_cottage_1", zombieTaiga), 2),
158
					Pair.of(StructurePoolElement.legacy("village/taiga/houses/taiga_tannery_1", zombieTaiga), 2),
159
					Pair.of(StructurePoolElement.legacy("village/taiga/zombie/houses/taiga_cartographer_house_1", zombieTaiga), 2),
160
					Pair.of(StructurePoolElement.legacy("village/taiga/zombie/houses/taiga_library_1", zombieTaiga), 2),
161
					Pair.of(StructurePoolElement.legacy("village/taiga/houses/taiga_masons_house_1", zombieTaiga), 2),
162
					Pair.of(StructurePoolElement.legacy("village/taiga/houses/taiga_weaponsmith_1", zombieTaiga), 2),
163
					Pair.of(StructurePoolElement.legacy("village/taiga/zombie/houses/taiga_weaponsmith_2", zombieTaiga), 2),
164
					Pair.of(StructurePoolElement.legacy("village/taiga/zombie/houses/taiga_temple_1", zombieTaiga), 2),
165
					Pair.of(StructurePoolElement.legacy("village/taiga/houses/taiga_large_farm_1", zombieTaiga), 6),
166
					Pair.of(StructurePoolElement.legacy("village/taiga/zombie/houses/taiga_large_farm_2", zombieTaiga), 6),
167
					Pair.of(StructurePoolElement.legacy("village/taiga/houses/taiga_small_farm_1", zombieTaiga), 1),
168
					Pair.of(StructurePoolElement.legacy("village/taiga/houses/taiga_animal_pen_1", zombieTaiga), 2),
169
					Pair.of(StructurePoolElement.empty(), 6)
170
				),
171
				StructureTemplatePool.Projection.RIGID
172
			)
173
		);
174
		context.register(
175
			TERMINATORS_KEY,
176
			new StructureTemplatePool(
177
				empty,
178
				ImmutableList.of(
179
					Pair.of(StructurePoolElement.legacy("village/plains/terminators/terminator_01", streetSnowyOrTaiga), 1),
180
					Pair.of(StructurePoolElement.legacy("village/plains/terminators/terminator_02", streetSnowyOrTaiga), 1),
181
					Pair.of(StructurePoolElement.legacy("village/plains/terminators/terminator_03", streetSnowyOrTaiga), 1),
182
					Pair.of(StructurePoolElement.legacy("village/plains/terminators/terminator_04", streetSnowyOrTaiga), 1)
183
				),
184
				StructureTemplatePool.Projection.TERRAIN_MATCHING
185
			)
186
		);
187
		Pools.register(
188
			context,
189
			"village/taiga/decor",
190
			new StructureTemplatePool(
191
				empty,
192
				ImmutableList.of(
193
					Pair.of(StructurePoolElement.legacy("village/taiga/taiga_lamp_post_1"), 10),
194
					Pair.of(StructurePoolElement.legacy("village/taiga/taiga_decoration_1"), 4),
195
					Pair.of(StructurePoolElement.legacy("village/taiga/taiga_decoration_2"), 1),
196
					Pair.of(StructurePoolElement.legacy("village/taiga/taiga_decoration_3"), 1),
197
					Pair.of(StructurePoolElement.legacy("village/taiga/taiga_decoration_4"), 1),
198
					Pair.of(StructurePoolElement.legacy("village/taiga/taiga_decoration_5"), 2),
199
					Pair.of(StructurePoolElement.legacy("village/taiga/taiga_decoration_6"), 1),
200
					Pair.of(StructurePoolElement.feature(spruceVillage), 4),
201
					Pair.of(StructurePoolElement.feature(pineVillage), 4),
202
					Pair.of(StructurePoolElement.feature(pilePumpkinVillage), 2),
203
					Pair.of(StructurePoolElement.feature(patchTaigaGrassVillage), 4),
204
					Pair.of(StructurePoolElement.feature(patchBerryBushVillage), 1),
205
					Pair.of(StructurePoolElement.empty(), 4)
206
				),
207
				StructureTemplatePool.Projection.RIGID
208
			)
209
		);
210
		Pools.register(
211
			context,
212
			"village/taiga/zombie/decor",
213
			new StructureTemplatePool(
214
				empty,
215
				ImmutableList.of(
216
					Pair.of(StructurePoolElement.legacy("village/taiga/taiga_decoration_1"), 4),
217
					Pair.of(StructurePoolElement.legacy("village/taiga/taiga_decoration_2"), 1),
218
					Pair.of(StructurePoolElement.legacy("village/taiga/taiga_decoration_3"), 1),
219
					Pair.of(StructurePoolElement.legacy("village/taiga/taiga_decoration_4"), 1),
220
					Pair.of(StructurePoolElement.feature(spruceVillage), 4),
221
					Pair.of(StructurePoolElement.feature(pineVillage), 4),
222
					Pair.of(StructurePoolElement.feature(pilePumpkinVillage), 2),
223
					Pair.of(StructurePoolElement.feature(patchTaigaGrassVillage), 4),
224
					Pair.of(StructurePoolElement.feature(patchBerryBushVillage), 1),
225
					Pair.of(StructurePoolElement.empty(), 4)
226
				),
227
				StructureTemplatePool.Projection.RIGID
228
			)
229
		);
230
		Pools.register(
231
			context,
232
			"village/taiga/villagers",
233
			new StructureTemplatePool(
234
				empty,
235
				ImmutableList.of(
236
					Pair.of(StructurePoolElement.legacy("village/taiga/villagers/nitwit"), 1),
237
					Pair.of(StructurePoolElement.legacy("village/taiga/villagers/baby"), 1),
238
					Pair.of(StructurePoolElement.legacy("village/taiga/villagers/unemployed"), 10)
239
				),
240
				StructureTemplatePool.Projection.RIGID
241
			)
242
		);
243
		Pools.register(
244
			context,
245
			"village/taiga/zombie/villagers",
246
			new StructureTemplatePool(
247
				empty,
248
				ImmutableList.of(
249
					Pair.of(StructurePoolElement.legacy("village/taiga/zombie/villagers/nitwit"), 1),
250
					Pair.of(StructurePoolElement.legacy("village/taiga/zombie/villagers/unemployed"), 10)
251
				),
252
				StructureTemplatePool.Projection.RIGID
253
			)
254
		);
255
	}
256
}
257

Decompiled Minecraft 26.3 source of TaigaVillagePools (net/minecraft/data/worldgen/TaigaVillagePools.java) with Mojang official mappings, stored verbatim on the site.