BastionTreasureRoomPools .java

net.minecraft.data.worldgen.BastionTreasureRoomPools (class, 281 lines): members: bootstrap. strings: "bastion/treasure/connectors/center_to_wall_top".

net.minecraft.data.worldgenclass281 linescommon11.4 KB

API Surface (1)

void bootstrap(final BootstrapContext<StructureTemplatePool> context)

String literals (78)

"bastion/treasure/bases"
"bastion/treasure/bases/lava_basin"
"bastion/treasure/stairs"
"bastion/treasure/stairs/lower_stairs"
"bastion/treasure/bases/centers"
"bastion/treasure/bases/centers/center_0"
"bastion/treasure/bases/centers/center_1"
"bastion/treasure/bases/centers/center_2"
"bastion/treasure/bases/centers/center_3"
"bastion/treasure/brains"
"bastion/treasure/brains/center_brain"
"bastion/treasure/walls"
"bastion/treasure/walls/lava_wall"
"bastion/treasure/walls/entrance_wall"
"bastion/treasure/walls/outer"
"bastion/treasure/walls/outer/top_corner"
"bastion/treasure/walls/outer/mid_corner"
"bastion/treasure/walls/outer/bottom_corner"
"bastion/treasure/walls/outer/outer_wall"
"bastion/treasure/walls/outer/medium_outer_wall"
"bastion/treasure/walls/outer/tall_outer_wall"
"bastion/treasure/walls/bottom"
"bastion/treasure/walls/bottom/wall_0"
"bastion/treasure/walls/bottom/wall_1"

Code Graph: Dependencies (8)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

BastionTreasureRoomPools.java281 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.world.level.levelgen.structure.pools.StructurePoolElement;
9
import net.minecraft.world.level.levelgen.structure.pools.StructureTemplatePool;
10
import net.minecraft.world.level.levelgen.structure.templatesystem.StructureProcessorList;
11
12
public class BastionTreasureRoomPools {
13
	public static void bootstrap(final BootstrapContext<StructureTemplatePool> context) {
14
		HolderGetter<StructureProcessorList> processorLists = context.lookup(Registries.PROCESSOR_LIST);
15
		Holder<StructureProcessorList> treasureRooms = processorLists.getOrThrow(ProcessorLists.TREASURE_ROOMS);
16
		Holder<StructureProcessorList> highWall = processorLists.getOrThrow(ProcessorLists.HIGH_WALL);
17
		Holder<StructureProcessorList> bottomRampart = processorLists.getOrThrow(ProcessorLists.BOTTOM_RAMPART);
18
		Holder<StructureProcessorList> highRampart = processorLists.getOrThrow(ProcessorLists.HIGH_RAMPART);
19
		Holder<StructureProcessorList> roof = processorLists.getOrThrow(ProcessorLists.ROOF);
20
		HolderGetter<StructureTemplatePool> pools = context.lookup(Registries.TEMPLATE_POOL);
21
		Holder<StructureTemplatePool> empty = pools.getOrThrow(Pools.EMPTY);
22
		Pools.register(
23
			context,
24
			"bastion/treasure/bases",
25
			new StructureTemplatePool(
26
				empty,
27
				ImmutableList.of(Pair.of(StructurePoolElement.single("bastion/treasure/bases/lava_basin", treasureRooms), 1)),
28
				StructureTemplatePool.Projection.RIGID
29
			)
30
		);
31
		Pools.register(
32
			context,
33
			"bastion/treasure/stairs",
34
			new StructureTemplatePool(
35
				empty,
36
				ImmutableList.of(Pair.of(StructurePoolElement.single("bastion/treasure/stairs/lower_stairs", treasureRooms), 1)),
37
				StructureTemplatePool.Projection.RIGID
38
			)
39
		);
40
		Pools.register(
41
			context,
42
			"bastion/treasure/bases/centers",
43
			new StructureTemplatePool(
44
				empty,
45
				ImmutableList.of(
46
					Pair.of(StructurePoolElement.single("bastion/treasure/bases/centers/center_0", treasureRooms), 1),
47
					Pair.of(StructurePoolElement.single("bastion/treasure/bases/centers/center_1", treasureRooms), 1),
48
					Pair.of(StructurePoolElement.single("bastion/treasure/bases/centers/center_2", treasureRooms), 1),
49
					Pair.of(StructurePoolElement.single("bastion/treasure/bases/centers/center_3", treasureRooms), 1)
50
				),
51
				StructureTemplatePool.Projection.RIGID
52
			)
53
		);
54
		Pools.register(
55
			context,
56
			"bastion/treasure/brains",
57
			new StructureTemplatePool(
58
				empty,
59
				ImmutableList.of(Pair.of(StructurePoolElement.single("bastion/treasure/brains/center_brain", treasureRooms), 1)),
60
				StructureTemplatePool.Projection.RIGID
61
			)
62
		);
63
		Pools.register(
64
			context,
65
			"bastion/treasure/walls",
66
			new StructureTemplatePool(
67
				empty,
68
				ImmutableList.of(
69
					Pair.of(StructurePoolElement.single("bastion/treasure/walls/lava_wall", treasureRooms), 1),
70
					Pair.of(StructurePoolElement.single("bastion/treasure/walls/entrance_wall", highWall), 1)
71
				),
72
				StructureTemplatePool.Projection.RIGID
73
			)
74
		);
75
		Pools.register(
76
			context,
77
			"bastion/treasure/walls/outer",
78
			new StructureTemplatePool(
79
				empty,
80
				ImmutableList.of(
81
					Pair.of(StructurePoolElement.single("bastion/treasure/walls/outer/top_corner", highWall), 1),
82
					Pair.of(StructurePoolElement.single("bastion/treasure/walls/outer/mid_corner", highWall), 1),
83
					Pair.of(StructurePoolElement.single("bastion/treasure/walls/outer/bottom_corner", highWall), 1),
84
					Pair.of(StructurePoolElement.single("bastion/treasure/walls/outer/outer_wall", highWall), 1),
85
					Pair.of(StructurePoolElement.single("bastion/treasure/walls/outer/medium_outer_wall", highWall), 1),
86
					Pair.of(StructurePoolElement.single("bastion/treasure/walls/outer/tall_outer_wall", highWall), 1)
87
				),
88
				StructureTemplatePool.Projection.RIGID
89
			)
90
		);
91
		Pools.register(
92
			context,
93
			"bastion/treasure/walls/bottom",
94
			new StructureTemplatePool(
95
				empty,
96
				ImmutableList.of(
97
					Pair.of(StructurePoolElement.single("bastion/treasure/walls/bottom/wall_0", treasureRooms), 1),
98
					Pair.of(StructurePoolElement.single("bastion/treasure/walls/bottom/wall_1", treasureRooms), 1),
99
					Pair.of(StructurePoolElement.single("bastion/treasure/walls/bottom/wall_2", treasureRooms), 1),
100
					Pair.of(StructurePoolElement.single("bastion/treasure/walls/bottom/wall_3", treasureRooms), 1)
101
				),
102
				StructureTemplatePool.Projection.RIGID
103
			)
104
		);
105
		Pools.register(
106
			context,
107
			"bastion/treasure/walls/mid",
108
			new StructureTemplatePool(
109
				empty,
110
				ImmutableList.of(
111
					Pair.of(StructurePoolElement.single("bastion/treasure/walls/mid/wall_0", treasureRooms), 1),
112
					Pair.of(StructurePoolElement.single("bastion/treasure/walls/mid/wall_1", treasureRooms), 1),
113
					Pair.of(StructurePoolElement.single("bastion/treasure/walls/mid/wall_2", treasureRooms), 1)
114
				),
115
				StructureTemplatePool.Projection.RIGID
116
			)
117
		);
118
		Pools.register(
119
			context,
120
			"bastion/treasure/walls/top",
121
			new StructureTemplatePool(
122
				empty,
123
				ImmutableList.of(
124
					Pair.of(StructurePoolElement.single("bastion/treasure/walls/top/main_entrance", treasureRooms), 1),
125
					Pair.of(StructurePoolElement.single("bastion/treasure/walls/top/wall_0", treasureRooms), 1),
126
					Pair.of(StructurePoolElement.single("bastion/treasure/walls/top/wall_1", treasureRooms), 1)
127
				),
128
				StructureTemplatePool.Projection.RIGID
129
			)
130
		);
131
		Pools.register(
132
			context,
133
			"bastion/treasure/connectors",
134
			new StructureTemplatePool(
135
				empty,
136
				ImmutableList.of(
137
					Pair.of(StructurePoolElement.single("bastion/treasure/connectors/center_to_wall_middle", treasureRooms), 1),
138
					Pair.of(StructurePoolElement.single("bastion/treasure/connectors/center_to_wall_top", treasureRooms), 1),
139
					Pair.of(StructurePoolElement.single("bastion/treasure/connectors/center_to_wall_top_entrance", treasureRooms), 1)
140
				),
141
				StructureTemplatePool.Projection.RIGID
142
			)
143
		);
144
		Pools.register(
145
			context,
146
			"bastion/treasure/entrances",
147
			new StructureTemplatePool(
148
				empty,
149
				ImmutableList.of(Pair.of(StructurePoolElement.single("bastion/treasure/entrances/entrance_0", treasureRooms), 1)),
150
				StructureTemplatePool.Projection.RIGID
151
			)
152
		);
153
		Pools.register(
154
			context,
155
			"bastion/treasure/ramparts",
156
			new StructureTemplatePool(
157
				empty,
158
				ImmutableList.of(
159
					Pair.of(StructurePoolElement.single("bastion/treasure/ramparts/mid_wall_main", treasureRooms), 1),
160
					Pair.of(StructurePoolElement.single("bastion/treasure/ramparts/mid_wall_side", treasureRooms), 1),
161
					Pair.of(StructurePoolElement.single("bastion/treasure/ramparts/bottom_wall_0", bottomRampart), 1),
162
					Pair.of(StructurePoolElement.single("bastion/treasure/ramparts/top_wall", highRampart), 1),
163
					Pair.of(StructurePoolElement.single("bastion/treasure/ramparts/lava_basin_side", treasureRooms), 1),
164
					Pair.of(StructurePoolElement.single("bastion/treasure/ramparts/lava_basin_main", treasureRooms), 1)
165
				),
166
				StructureTemplatePool.Projection.RIGID
167
			)
168
		);
169
		Pools.register(
170
			context,
171
			"bastion/treasure/corners/bottom",
172
			new StructureTemplatePool(
173
				empty,
174
				ImmutableList.of(
175
					Pair.of(StructurePoolElement.single("bastion/treasure/corners/bottom/corner_0", treasureRooms), 1),
176
					Pair.of(StructurePoolElement.single("bastion/treasure/corners/bottom/corner_1", treasureRooms), 1)
177
				),
178
				StructureTemplatePool.Projection.RIGID
179
			)
180
		);
181
		Pools.register(
182
			context,
183
			"bastion/treasure/corners/edges",
184
			new StructureTemplatePool(
185
				empty,
186
				ImmutableList.of(
187
					Pair.of(StructurePoolElement.single("bastion/treasure/corners/edges/bottom", highWall), 1),
188
					Pair.of(StructurePoolElement.single("bastion/treasure/corners/edges/middle", highWall), 1),
189
					Pair.of(StructurePoolElement.single("bastion/treasure/corners/edges/top", highWall), 1)
190
				),
191
				StructureTemplatePool.Projection.RIGID
192
			)
193
		);
194
		Pools.register(
195
			context,
196
			"bastion/treasure/corners/middle",
197
			new StructureTemplatePool(
198
				empty,
199
				ImmutableList.of(
200
					Pair.of(StructurePoolElement.single("bastion/treasure/corners/middle/corner_0", treasureRooms), 1),
201
					Pair.of(StructurePoolElement.single("bastion/treasure/corners/middle/corner_1", treasureRooms), 1)
202
				),
203
				StructureTemplatePool.Projection.RIGID
204
			)
205
		);
206
		Pools.register(
207
			context,
208
			"bastion/treasure/corners/top",
209
			new StructureTemplatePool(
210
				empty,
211
				ImmutableList.of(
212
					Pair.of(StructurePoolElement.single("bastion/treasure/corners/top/corner_0", treasureRooms), 1),
213
					Pair.of(StructurePoolElement.single("bastion/treasure/corners/top/corner_1", treasureRooms), 1)
214
				),
215
				StructureTemplatePool.Projection.RIGID
216
			)
217
		);
218
		Pools.register(
219
			context,
220
			"bastion/treasure/extensions/large_pool",
221
			new StructureTemplatePool(
222
				empty,
223
				ImmutableList.of(
224
					Pair.of(StructurePoolElement.single("bastion/treasure/extensions/empty", treasureRooms), 1),
225
					Pair.of(StructurePoolElement.single("bastion/treasure/extensions/empty", treasureRooms), 1),
226
					Pair.of(StructurePoolElement.single("bastion/treasure/extensions/fire_room", treasureRooms), 1),
227
					Pair.of(StructurePoolElement.single("bastion/treasure/extensions/large_bridge_0", treasureRooms), 1),
228
					Pair.of(StructurePoolElement.single("bastion/treasure/extensions/large_bridge_1", treasureRooms), 1),
229
					Pair.of(StructurePoolElement.single("bastion/treasure/extensions/large_bridge_2", treasureRooms), 1),
230
					Pair.of(StructurePoolElement.single("bastion/treasure/extensions/large_bridge_3", treasureRooms), 1),
231
					Pair.of(StructurePoolElement.single("bastion/treasure/extensions/roofed_bridge", treasureRooms), 1),
232
					Pair.of(StructurePoolElement.single("bastion/treasure/extensions/empty", treasureRooms), 1)
233
				),
234
				StructureTemplatePool.Projection.RIGID
235
			)
236
		);
237
		Pools.register(
238
			context,
239
			"bastion/treasure/extensions/small_pool",
240
			new StructureTemplatePool(
241
				empty,
242
				ImmutableList.of(
243
					Pair.of(StructurePoolElement.single("bastion/treasure/extensions/empty", treasureRooms), 1),
244
					Pair.of(StructurePoolElement.single("bastion/treasure/extensions/fire_room", treasureRooms), 1),
245
					Pair.of(StructurePoolElement.single("bastion/treasure/extensions/empty", treasureRooms), 1),
246
					Pair.of(StructurePoolElement.single("bastion/treasure/extensions/small_bridge_0", treasureRooms), 1),
247
					Pair.of(StructurePoolElement.single("bastion/treasure/extensions/small_bridge_1", treasureRooms), 1),
248
					Pair.of(StructurePoolElement.single("bastion/treasure/extensions/small_bridge_2", treasureRooms), 1),
249
					Pair.of(StructurePoolElement.single("bastion/treasure/extensions/small_bridge_3", treasureRooms), 1)
250
				),
251
				StructureTemplatePool.Projection.RIGID
252
			)
253
		);
254
		Pools.register(
255
			context,
256
			"bastion/treasure/extensions/houses",
257
			new StructureTemplatePool(
258
				empty,
259
				ImmutableList.of(
260
					Pair.of(StructurePoolElement.single("bastion/treasure/extensions/house_0", treasureRooms), 1),
261
					Pair.of(StructurePoolElement.single("bastion/treasure/extensions/house_1", treasureRooms), 1)
262
				),
263
				StructureTemplatePool.Projection.RIGID
264
			)
265
		);
266
		Pools.register(
267
			context,
268
			"bastion/treasure/roofs",
269
			new StructureTemplatePool(
270
				empty,
271
				ImmutableList.of(
272
					Pair.of(StructurePoolElement.single("bastion/treasure/roofs/wall_roof", roof), 1),
273
					Pair.of(StructurePoolElement.single("bastion/treasure/roofs/corner_roof", roof), 1),
274
					Pair.of(StructurePoolElement.single("bastion/treasure/roofs/center_roof", roof), 1)
275
				),
276
				StructureTemplatePool.Projection.RIGID
277
			)
278
		);
279
	}
280
}
281

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