File size: 14,260 Bytes
d46f4a3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
package net.minecraft.data.worldgen;

import com.google.common.collect.ImmutableList;
import com.mojang.datafixers.util.Pair;
import net.minecraft.core.Holder;
import net.minecraft.core.HolderGetter;
import net.minecraft.core.registries.Registries;
import net.minecraft.world.level.levelgen.structure.pools.StructurePoolElement;
import net.minecraft.world.level.levelgen.structure.pools.StructureTemplatePool;
import net.minecraft.world.level.levelgen.structure.templatesystem.StructureProcessorList;

public class BastionTreasureRoomPools {
    public static void bootstrap(BootstrapContext<StructureTemplatePool> p_332381_) {
        HolderGetter<StructureProcessorList> holdergetter = p_332381_.lookup(Registries.PROCESSOR_LIST);
        Holder<StructureProcessorList> holder = holdergetter.getOrThrow(ProcessorLists.TREASURE_ROOMS);
        Holder<StructureProcessorList> holder1 = holdergetter.getOrThrow(ProcessorLists.HIGH_WALL);
        Holder<StructureProcessorList> holder2 = holdergetter.getOrThrow(ProcessorLists.BOTTOM_RAMPART);
        Holder<StructureProcessorList> holder3 = holdergetter.getOrThrow(ProcessorLists.HIGH_RAMPART);
        Holder<StructureProcessorList> holder4 = holdergetter.getOrThrow(ProcessorLists.ROOF);
        HolderGetter<StructureTemplatePool> holdergetter1 = p_332381_.lookup(Registries.TEMPLATE_POOL);
        Holder<StructureTemplatePool> holder5 = holdergetter1.getOrThrow(Pools.EMPTY);
        Pools.register(
            p_332381_,
            "bastion/treasure/bases",
            new StructureTemplatePool(
                holder5,
                ImmutableList.of(Pair.of(StructurePoolElement.single("bastion/treasure/bases/lava_basin", holder), 1)),
                StructureTemplatePool.Projection.RIGID
            )
        );
        Pools.register(
            p_332381_,
            "bastion/treasure/stairs",
            new StructureTemplatePool(
                holder5,
                ImmutableList.of(Pair.of(StructurePoolElement.single("bastion/treasure/stairs/lower_stairs", holder), 1)),
                StructureTemplatePool.Projection.RIGID
            )
        );
        Pools.register(
            p_332381_,
            "bastion/treasure/bases/centers",
            new StructureTemplatePool(
                holder5,
                ImmutableList.of(
                    Pair.of(StructurePoolElement.single("bastion/treasure/bases/centers/center_0", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/bases/centers/center_1", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/bases/centers/center_2", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/bases/centers/center_3", holder), 1)
                ),
                StructureTemplatePool.Projection.RIGID
            )
        );
        Pools.register(
            p_332381_,
            "bastion/treasure/brains",
            new StructureTemplatePool(
                holder5,
                ImmutableList.of(Pair.of(StructurePoolElement.single("bastion/treasure/brains/center_brain", holder), 1)),
                StructureTemplatePool.Projection.RIGID
            )
        );
        Pools.register(
            p_332381_,
            "bastion/treasure/walls",
            new StructureTemplatePool(
                holder5,
                ImmutableList.of(
                    Pair.of(StructurePoolElement.single("bastion/treasure/walls/lava_wall", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/walls/entrance_wall", holder1), 1)
                ),
                StructureTemplatePool.Projection.RIGID
            )
        );
        Pools.register(
            p_332381_,
            "bastion/treasure/walls/outer",
            new StructureTemplatePool(
                holder5,
                ImmutableList.of(
                    Pair.of(StructurePoolElement.single("bastion/treasure/walls/outer/top_corner", holder1), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/walls/outer/mid_corner", holder1), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/walls/outer/bottom_corner", holder1), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/walls/outer/outer_wall", holder1), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/walls/outer/medium_outer_wall", holder1), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/walls/outer/tall_outer_wall", holder1), 1)
                ),
                StructureTemplatePool.Projection.RIGID
            )
        );
        Pools.register(
            p_332381_,
            "bastion/treasure/walls/bottom",
            new StructureTemplatePool(
                holder5,
                ImmutableList.of(
                    Pair.of(StructurePoolElement.single("bastion/treasure/walls/bottom/wall_0", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/walls/bottom/wall_1", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/walls/bottom/wall_2", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/walls/bottom/wall_3", holder), 1)
                ),
                StructureTemplatePool.Projection.RIGID
            )
        );
        Pools.register(
            p_332381_,
            "bastion/treasure/walls/mid",
            new StructureTemplatePool(
                holder5,
                ImmutableList.of(
                    Pair.of(StructurePoolElement.single("bastion/treasure/walls/mid/wall_0", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/walls/mid/wall_1", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/walls/mid/wall_2", holder), 1)
                ),
                StructureTemplatePool.Projection.RIGID
            )
        );
        Pools.register(
            p_332381_,
            "bastion/treasure/walls/top",
            new StructureTemplatePool(
                holder5,
                ImmutableList.of(
                    Pair.of(StructurePoolElement.single("bastion/treasure/walls/top/main_entrance", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/walls/top/wall_0", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/walls/top/wall_1", holder), 1)
                ),
                StructureTemplatePool.Projection.RIGID
            )
        );
        Pools.register(
            p_332381_,
            "bastion/treasure/connectors",
            new StructureTemplatePool(
                holder5,
                ImmutableList.of(
                    Pair.of(StructurePoolElement.single("bastion/treasure/connectors/center_to_wall_middle", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/connectors/center_to_wall_top", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/connectors/center_to_wall_top_entrance", holder), 1)
                ),
                StructureTemplatePool.Projection.RIGID
            )
        );
        Pools.register(
            p_332381_,
            "bastion/treasure/entrances",
            new StructureTemplatePool(
                holder5,
                ImmutableList.of(Pair.of(StructurePoolElement.single("bastion/treasure/entrances/entrance_0", holder), 1)),
                StructureTemplatePool.Projection.RIGID
            )
        );
        Pools.register(
            p_332381_,
            "bastion/treasure/ramparts",
            new StructureTemplatePool(
                holder5,
                ImmutableList.of(
                    Pair.of(StructurePoolElement.single("bastion/treasure/ramparts/mid_wall_main", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/ramparts/mid_wall_side", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/ramparts/bottom_wall_0", holder2), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/ramparts/top_wall", holder3), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/ramparts/lava_basin_side", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/ramparts/lava_basin_main", holder), 1)
                ),
                StructureTemplatePool.Projection.RIGID
            )
        );
        Pools.register(
            p_332381_,
            "bastion/treasure/corners/bottom",
            new StructureTemplatePool(
                holder5,
                ImmutableList.of(
                    Pair.of(StructurePoolElement.single("bastion/treasure/corners/bottom/corner_0", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/corners/bottom/corner_1", holder), 1)
                ),
                StructureTemplatePool.Projection.RIGID
            )
        );
        Pools.register(
            p_332381_,
            "bastion/treasure/corners/edges",
            new StructureTemplatePool(
                holder5,
                ImmutableList.of(
                    Pair.of(StructurePoolElement.single("bastion/treasure/corners/edges/bottom", holder1), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/corners/edges/middle", holder1), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/corners/edges/top", holder1), 1)
                ),
                StructureTemplatePool.Projection.RIGID
            )
        );
        Pools.register(
            p_332381_,
            "bastion/treasure/corners/middle",
            new StructureTemplatePool(
                holder5,
                ImmutableList.of(
                    Pair.of(StructurePoolElement.single("bastion/treasure/corners/middle/corner_0", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/corners/middle/corner_1", holder), 1)
                ),
                StructureTemplatePool.Projection.RIGID
            )
        );
        Pools.register(
            p_332381_,
            "bastion/treasure/corners/top",
            new StructureTemplatePool(
                holder5,
                ImmutableList.of(
                    Pair.of(StructurePoolElement.single("bastion/treasure/corners/top/corner_0", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/corners/top/corner_1", holder), 1)
                ),
                StructureTemplatePool.Projection.RIGID
            )
        );
        Pools.register(
            p_332381_,
            "bastion/treasure/extensions/large_pool",
            new StructureTemplatePool(
                holder5,
                ImmutableList.of(
                    Pair.of(StructurePoolElement.single("bastion/treasure/extensions/empty", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/extensions/empty", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/extensions/fire_room", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/extensions/large_bridge_0", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/extensions/large_bridge_1", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/extensions/large_bridge_2", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/extensions/large_bridge_3", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/extensions/roofed_bridge", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/extensions/empty", holder), 1)
                ),
                StructureTemplatePool.Projection.RIGID
            )
        );
        Pools.register(
            p_332381_,
            "bastion/treasure/extensions/small_pool",
            new StructureTemplatePool(
                holder5,
                ImmutableList.of(
                    Pair.of(StructurePoolElement.single("bastion/treasure/extensions/empty", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/extensions/fire_room", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/extensions/empty", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/extensions/small_bridge_0", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/extensions/small_bridge_1", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/extensions/small_bridge_2", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/extensions/small_bridge_3", holder), 1)
                ),
                StructureTemplatePool.Projection.RIGID
            )
        );
        Pools.register(
            p_332381_,
            "bastion/treasure/extensions/houses",
            new StructureTemplatePool(
                holder5,
                ImmutableList.of(
                    Pair.of(StructurePoolElement.single("bastion/treasure/extensions/house_0", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/extensions/house_1", holder), 1)
                ),
                StructureTemplatePool.Projection.RIGID
            )
        );
        Pools.register(
            p_332381_,
            "bastion/treasure/roofs",
            new StructureTemplatePool(
                holder5,
                ImmutableList.of(
                    Pair.of(StructurePoolElement.single("bastion/treasure/roofs/wall_roof", holder4), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/roofs/corner_roof", holder4), 1),
                    Pair.of(StructurePoolElement.single("bastion/treasure/roofs/center_roof", holder4), 1)
                ),
                StructureTemplatePool.Projection.RIGID
            )
        );
    }
}