BastionHousingUnitsPools .java

net.minecraft.data.worldgen.BastionHousingUnitsPools (class): members: bootstrap. strings: "bastion/units/pathways/pathway_wall_0". imports: HolderGetter.

net.minecraft.data.worldgenclass173 linescommon6.3 KB

API Surface (1)

void bootstrap(final BootstrapContext<StructureTemplatePool> context)

String literals (44)

"bastion/units/center_pieces"
"bastion/units/center_pieces/center_0"
"bastion/units/center_pieces/center_1"
"bastion/units/center_pieces/center_2"
"bastion/units/pathways"
"bastion/units/pathways/pathway_0"
"bastion/units/pathways/pathway_wall_0"
"bastion/units/walls/wall_bases"
"bastion/units/walls/wall_base"
"bastion/units/walls/connected_wall"
"bastion/units/stages/stage_0"
"bastion/units/stages/stage_0_0"
"bastion/units/stages/stage_0_1"
"bastion/units/stages/stage_0_2"
"bastion/units/stages/stage_0_3"
"bastion/units/stages/stage_1"
"bastion/units/stages/stage_1_0"
"bastion/units/stages/stage_1_1"
"bastion/units/stages/stage_1_2"
"bastion/units/stages/stage_1_3"
"bastion/units/stages/rot/stage_1"
"bastion/units/stages/rot/stage_1_0"
"bastion/units/stages/stage_2"
"bastion/units/stages/stage_2_0"

Code Graph: Dependencies (8)

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

Full Source

BastionHousingUnitsPools.java173 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 BastionHousingUnitsPools {
13
	public static void bootstrap(final BootstrapContext<StructureTemplatePool> context) {
14
		HolderGetter<StructureProcessorList> processorLists = context.lookup(Registries.PROCESSOR_LIST);
15
		Holder<StructureProcessorList> housing = processorLists.getOrThrow(ProcessorLists.HOUSING);
16
		HolderGetter<StructureTemplatePool> pools = context.lookup(Registries.TEMPLATE_POOL);
17
		Holder<StructureTemplatePool> empty = pools.getOrThrow(Pools.EMPTY);
18
		Pools.register(
19
			context,
20
			"bastion/units/center_pieces",
21
			new StructureTemplatePool(
22
				empty,
23
				ImmutableList.of(
24
					Pair.of(StructurePoolElement.single("bastion/units/center_pieces/center_0", housing), 1),
25
					Pair.of(StructurePoolElement.single("bastion/units/center_pieces/center_1", housing), 1),
26
					Pair.of(StructurePoolElement.single("bastion/units/center_pieces/center_2", housing), 1)
27
				),
28
				StructureTemplatePool.Projection.RIGID
29
			)
30
		);
31
		Pools.register(
32
			context,
33
			"bastion/units/pathways",
34
			new StructureTemplatePool(
35
				empty,
36
				ImmutableList.of(
37
					Pair.of(StructurePoolElement.single("bastion/units/pathways/pathway_0", housing), 1),
38
					Pair.of(StructurePoolElement.single("bastion/units/pathways/pathway_wall_0", housing), 1)
39
				),
40
				StructureTemplatePool.Projection.RIGID
41
			)
42
		);
43
		Pools.register(
44
			context,
45
			"bastion/units/walls/wall_bases",
46
			new StructureTemplatePool(
47
				empty,
48
				ImmutableList.of(
49
					Pair.of(StructurePoolElement.single("bastion/units/walls/wall_base", housing), 1),
50
					Pair.of(StructurePoolElement.single("bastion/units/walls/connected_wall", housing), 1)
51
				),
52
				StructureTemplatePool.Projection.RIGID
53
			)
54
		);
55
		Pools.register(
56
			context,
57
			"bastion/units/stages/stage_0",
58
			new StructureTemplatePool(
59
				empty,
60
				ImmutableList.of(
61
					Pair.of(StructurePoolElement.single("bastion/units/stages/stage_0_0", housing), 1),
62
					Pair.of(StructurePoolElement.single("bastion/units/stages/stage_0_1", housing), 1),
63
					Pair.of(StructurePoolElement.single("bastion/units/stages/stage_0_2", housing), 1),
64
					Pair.of(StructurePoolElement.single("bastion/units/stages/stage_0_3", housing), 1)
65
				),
66
				StructureTemplatePool.Projection.RIGID
67
			)
68
		);
69
		Pools.register(
70
			context,
71
			"bastion/units/stages/stage_1",
72
			new StructureTemplatePool(
73
				empty,
74
				ImmutableList.of(
75
					Pair.of(StructurePoolElement.single("bastion/units/stages/stage_1_0", housing), 1),
76
					Pair.of(StructurePoolElement.single("bastion/units/stages/stage_1_1", housing), 1),
77
					Pair.of(StructurePoolElement.single("bastion/units/stages/stage_1_2", housing), 1),
78
					Pair.of(StructurePoolElement.single("bastion/units/stages/stage_1_3", housing), 1)
79
				),
80
				StructureTemplatePool.Projection.RIGID
81
			)
82
		);
83
		Pools.register(
84
			context,
85
			"bastion/units/stages/rot/stage_1",
86
			new StructureTemplatePool(
87
				empty, ImmutableList.of(Pair.of(StructurePoolElement.single("bastion/units/stages/rot/stage_1_0", housing), 1)), StructureTemplatePool.Projection.RIGID
88
			)
89
		);
90
		Pools.register(
91
			context,
92
			"bastion/units/stages/stage_2",
93
			new StructureTemplatePool(
94
				empty,
95
				ImmutableList.of(
96
					Pair.of(StructurePoolElement.single("bastion/units/stages/stage_2_0", housing), 1),
97
					Pair.of(StructurePoolElement.single("bastion/units/stages/stage_2_1", housing), 1)
98
				),
99
				StructureTemplatePool.Projection.RIGID
100
			)
101
		);
102
		Pools.register(
103
			context,
104
			"bastion/units/stages/stage_3",
105
			new StructureTemplatePool(
106
				empty,
107
				ImmutableList.of(
108
					Pair.of(StructurePoolElement.single("bastion/units/stages/stage_3_0", housing), 1),
109
					Pair.of(StructurePoolElement.single("bastion/units/stages/stage_3_1", housing), 1),
110
					Pair.of(StructurePoolElement.single("bastion/units/stages/stage_3_2", housing), 1),
111
					Pair.of(StructurePoolElement.single("bastion/units/stages/stage_3_3", housing), 1)
112
				),
113
				StructureTemplatePool.Projection.RIGID
114
			)
115
		);
116
		Pools.register(
117
			context,
118
			"bastion/units/fillers/stage_0",
119
			new StructureTemplatePool(
120
				empty, ImmutableList.of(Pair.of(StructurePoolElement.single("bastion/units/fillers/stage_0", housing), 1)), StructureTemplatePool.Projection.RIGID
121
			)
122
		);
123
		Pools.register(
124
			context,
125
			"bastion/units/edges",
126
			new StructureTemplatePool(
127
				empty, ImmutableList.of(Pair.of(StructurePoolElement.single("bastion/units/edges/edge_0", housing), 1)), StructureTemplatePool.Projection.RIGID
128
			)
129
		);
130
		Pools.register(
131
			context,
132
			"bastion/units/wall_units",
133
			new StructureTemplatePool(
134
				empty, ImmutableList.of(Pair.of(StructurePoolElement.single("bastion/units/wall_units/unit_0", housing), 1)), StructureTemplatePool.Projection.RIGID
135
			)
136
		);
137
		Pools.register(
138
			context,
139
			"bastion/units/edge_wall_units",
140
			new StructureTemplatePool(
141
				empty, ImmutableList.of(Pair.of(StructurePoolElement.single("bastion/units/wall_units/edge_0_large", housing), 1)), StructureTemplatePool.Projection.RIGID
142
			)
143
		);
144
		Pools.register(
145
			context,
146
			"bastion/units/ramparts",
147
			new StructureTemplatePool(
148
				empty,
149
				ImmutableList.of(
150
					Pair.of(StructurePoolElement.single("bastion/units/ramparts/ramparts_0", housing), 1),
151
					Pair.of(StructurePoolElement.single("bastion/units/ramparts/ramparts_1", housing), 1),
152
					Pair.of(StructurePoolElement.single("bastion/units/ramparts/ramparts_2", housing), 1)
153
				),
154
				StructureTemplatePool.Projection.RIGID
155
			)
156
		);
157
		Pools.register(
158
			context,
159
			"bastion/units/large_ramparts",
160
			new StructureTemplatePool(
161
				empty, ImmutableList.of(Pair.of(StructurePoolElement.single("bastion/units/ramparts/ramparts_0", housing), 1)), StructureTemplatePool.Projection.RIGID
162
			)
163
		);
164
		Pools.register(
165
			context,
166
			"bastion/units/rampart_plates",
167
			new StructureTemplatePool(
168
				empty, ImmutableList.of(Pair.of(StructurePoolElement.single("bastion/units/rampart_plates/plate_0", housing), 1)), StructureTemplatePool.Projection.RIGID
169
			)
170
		);
171
	}
172
}
173

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