File size: 8,297 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
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 BastionHousingUnitsPools {
    public static void bootstrap(BootstrapContext<StructureTemplatePool> p_333890_) {
        HolderGetter<StructureProcessorList> holdergetter = p_333890_.lookup(Registries.PROCESSOR_LIST);
        Holder<StructureProcessorList> holder = holdergetter.getOrThrow(ProcessorLists.HOUSING);
        HolderGetter<StructureTemplatePool> holdergetter1 = p_333890_.lookup(Registries.TEMPLATE_POOL);
        Holder<StructureTemplatePool> holder1 = holdergetter1.getOrThrow(Pools.EMPTY);
        Pools.register(
            p_333890_,
            "bastion/units/center_pieces",
            new StructureTemplatePool(
                holder1,
                ImmutableList.of(
                    Pair.of(StructurePoolElement.single("bastion/units/center_pieces/center_0", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/units/center_pieces/center_1", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/units/center_pieces/center_2", holder), 1)
                ),
                StructureTemplatePool.Projection.RIGID
            )
        );
        Pools.register(
            p_333890_,
            "bastion/units/pathways",
            new StructureTemplatePool(
                holder1,
                ImmutableList.of(
                    Pair.of(StructurePoolElement.single("bastion/units/pathways/pathway_0", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/units/pathways/pathway_wall_0", holder), 1)
                ),
                StructureTemplatePool.Projection.RIGID
            )
        );
        Pools.register(
            p_333890_,
            "bastion/units/walls/wall_bases",
            new StructureTemplatePool(
                holder1,
                ImmutableList.of(
                    Pair.of(StructurePoolElement.single("bastion/units/walls/wall_base", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/units/walls/connected_wall", holder), 1)
                ),
                StructureTemplatePool.Projection.RIGID
            )
        );
        Pools.register(
            p_333890_,
            "bastion/units/stages/stage_0",
            new StructureTemplatePool(
                holder1,
                ImmutableList.of(
                    Pair.of(StructurePoolElement.single("bastion/units/stages/stage_0_0", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/units/stages/stage_0_1", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/units/stages/stage_0_2", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/units/stages/stage_0_3", holder), 1)
                ),
                StructureTemplatePool.Projection.RIGID
            )
        );
        Pools.register(
            p_333890_,
            "bastion/units/stages/stage_1",
            new StructureTemplatePool(
                holder1,
                ImmutableList.of(
                    Pair.of(StructurePoolElement.single("bastion/units/stages/stage_1_0", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/units/stages/stage_1_1", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/units/stages/stage_1_2", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/units/stages/stage_1_3", holder), 1)
                ),
                StructureTemplatePool.Projection.RIGID
            )
        );
        Pools.register(
            p_333890_,
            "bastion/units/stages/rot/stage_1",
            new StructureTemplatePool(
                holder1,
                ImmutableList.of(Pair.of(StructurePoolElement.single("bastion/units/stages/rot/stage_1_0", holder), 1)),
                StructureTemplatePool.Projection.RIGID
            )
        );
        Pools.register(
            p_333890_,
            "bastion/units/stages/stage_2",
            new StructureTemplatePool(
                holder1,
                ImmutableList.of(
                    Pair.of(StructurePoolElement.single("bastion/units/stages/stage_2_0", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/units/stages/stage_2_1", holder), 1)
                ),
                StructureTemplatePool.Projection.RIGID
            )
        );
        Pools.register(
            p_333890_,
            "bastion/units/stages/stage_3",
            new StructureTemplatePool(
                holder1,
                ImmutableList.of(
                    Pair.of(StructurePoolElement.single("bastion/units/stages/stage_3_0", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/units/stages/stage_3_1", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/units/stages/stage_3_2", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/units/stages/stage_3_3", holder), 1)
                ),
                StructureTemplatePool.Projection.RIGID
            )
        );
        Pools.register(
            p_333890_,
            "bastion/units/fillers/stage_0",
            new StructureTemplatePool(
                holder1,
                ImmutableList.of(Pair.of(StructurePoolElement.single("bastion/units/fillers/stage_0", holder), 1)),
                StructureTemplatePool.Projection.RIGID
            )
        );
        Pools.register(
            p_333890_,
            "bastion/units/edges",
            new StructureTemplatePool(
                holder1,
                ImmutableList.of(Pair.of(StructurePoolElement.single("bastion/units/edges/edge_0", holder), 1)),
                StructureTemplatePool.Projection.RIGID
            )
        );
        Pools.register(
            p_333890_,
            "bastion/units/wall_units",
            new StructureTemplatePool(
                holder1,
                ImmutableList.of(Pair.of(StructurePoolElement.single("bastion/units/wall_units/unit_0", holder), 1)),
                StructureTemplatePool.Projection.RIGID
            )
        );
        Pools.register(
            p_333890_,
            "bastion/units/edge_wall_units",
            new StructureTemplatePool(
                holder1,
                ImmutableList.of(Pair.of(StructurePoolElement.single("bastion/units/wall_units/edge_0_large", holder), 1)),
                StructureTemplatePool.Projection.RIGID
            )
        );
        Pools.register(
            p_333890_,
            "bastion/units/ramparts",
            new StructureTemplatePool(
                holder1,
                ImmutableList.of(
                    Pair.of(StructurePoolElement.single("bastion/units/ramparts/ramparts_0", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/units/ramparts/ramparts_1", holder), 1),
                    Pair.of(StructurePoolElement.single("bastion/units/ramparts/ramparts_2", holder), 1)
                ),
                StructureTemplatePool.Projection.RIGID
            )
        );
        Pools.register(
            p_333890_,
            "bastion/units/large_ramparts",
            new StructureTemplatePool(
                holder1,
                ImmutableList.of(Pair.of(StructurePoolElement.single("bastion/units/ramparts/ramparts_0", holder), 1)),
                StructureTemplatePool.Projection.RIGID
            )
        );
        Pools.register(
            p_333890_,
            "bastion/units/rampart_plates",
            new StructureTemplatePool(
                holder1,
                ImmutableList.of(Pair.of(StructurePoolElement.single("bastion/units/rampart_plates/plate_0", holder), 1)),
                StructureTemplatePool.Projection.RIGID
            )
        );
    }
}