BastionHoglinStablePools .java

net.minecraft.data.worldgen.BastionHoglinStablePools (class, 198 lines): members: bootstrap. strings: "bastion/hoglin_stable/mirrored_starting_pieces".

net.minecraft.data.worldgenclass198 linescommon9.4 KB

API Surface (1)

void bootstrap(final BootstrapContext<StructureTemplatePool> context)

String literals (54)

"bastion/hoglin_stable/starting_pieces"
"bastion/hoglin_stable/mirrored_starting_pieces"
"bastion/hoglin_stable/wall_bases"
"bastion/hoglin_stable/walls/wall_base"
"bastion/hoglin_stable/walls"
"bastion/hoglin_stable/walls/side_wall_0"
"bastion/hoglin_stable/walls/side_wall_1"
"bastion/hoglin_stable/stairs"
"bastion/hoglin_stable/stairs/stairs_1_0"
"bastion/hoglin_stable/stairs/stairs_1_1"
"bastion/hoglin_stable/stairs/stairs_1_2"
"bastion/hoglin_stable/stairs/stairs_1_3"
"bastion/hoglin_stable/stairs/stairs_1_4"
"bastion/hoglin_stable/stairs/stairs_2_0"
"bastion/hoglin_stable/stairs/stairs_2_1"
"bastion/hoglin_stable/stairs/stairs_2_2"
"bastion/hoglin_stable/stairs/stairs_2_3"
"bastion/hoglin_stable/stairs/stairs_2_4"
"bastion/hoglin_stable/stairs/stairs_3_0"
"bastion/hoglin_stable/stairs/stairs_3_1"
"bastion/hoglin_stable/stairs/stairs_3_2"
"bastion/hoglin_stable/stairs/stairs_3_3"
"bastion/hoglin_stable/stairs/stairs_3_4"
"bastion/hoglin_stable/small_stables/inner"

Code Graph: Dependencies (8)

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

Full Source

BastionHoglinStablePools.java198 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 BastionHoglinStablePools {
13
	public static void bootstrap(final BootstrapContext<StructureTemplatePool> context) {
14
		HolderGetter<StructureProcessorList> processorLists = context.lookup(Registries.PROCESSOR_LIST);
15
		Holder<StructureProcessorList> stableDegradation = processorLists.getOrThrow(ProcessorLists.STABLE_DEGRADATION);
16
		Holder<StructureProcessorList> sideWallDegradation = processorLists.getOrThrow(ProcessorLists.SIDE_WALL_DEGRADATION);
17
		HolderGetter<StructureTemplatePool> pools = context.lookup(Registries.TEMPLATE_POOL);
18
		Holder<StructureTemplatePool> empty = pools.getOrThrow(Pools.EMPTY);
19
		Pools.register(
20
			context,
21
			"bastion/hoglin_stable/starting_pieces",
22
			new StructureTemplatePool(
23
				empty,
24
				ImmutableList.of(
25
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/starting_pieces/starting_stairs_0", stableDegradation), 1),
26
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/starting_pieces/starting_stairs_1", stableDegradation), 1),
27
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/starting_pieces/starting_stairs_2", stableDegradation), 1),
28
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/starting_pieces/starting_stairs_3", stableDegradation), 1),
29
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/starting_pieces/starting_stairs_4", stableDegradation), 1)
30
				),
31
				StructureTemplatePool.Projection.RIGID
32
			)
33
		);
34
		Pools.register(
35
			context,
36
			"bastion/hoglin_stable/mirrored_starting_pieces",
37
			new StructureTemplatePool(
38
				empty,
39
				ImmutableList.of(
40
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/starting_pieces/stairs_0_mirrored", stableDegradation), 1),
41
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/starting_pieces/stairs_1_mirrored", stableDegradation), 1),
42
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/starting_pieces/stairs_2_mirrored", stableDegradation), 1),
43
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/starting_pieces/stairs_3_mirrored", stableDegradation), 1),
44
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/starting_pieces/stairs_4_mirrored", stableDegradation), 1)
45
				),
46
				StructureTemplatePool.Projection.RIGID
47
			)
48
		);
49
		Pools.register(
50
			context,
51
			"bastion/hoglin_stable/wall_bases",
52
			new StructureTemplatePool(
53
				empty,
54
				ImmutableList.of(Pair.of(StructurePoolElement.single("bastion/hoglin_stable/walls/wall_base", stableDegradation), 1)),
55
				StructureTemplatePool.Projection.RIGID
56
			)
57
		);
58
		Pools.register(
59
			context,
60
			"bastion/hoglin_stable/walls",
61
			new StructureTemplatePool(
62
				empty,
63
				ImmutableList.of(
64
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/walls/side_wall_0", sideWallDegradation), 1),
65
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/walls/side_wall_1", sideWallDegradation), 1)
66
				),
67
				StructureTemplatePool.Projection.RIGID
68
			)
69
		);
70
		Pools.register(
71
			context,
72
			"bastion/hoglin_stable/stairs",
73
			new StructureTemplatePool(
74
				empty,
75
				ImmutableList.of(
76
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/stairs/stairs_1_0", stableDegradation), 1),
77
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/stairs/stairs_1_1", stableDegradation), 1),
78
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/stairs/stairs_1_2", stableDegradation), 1),
79
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/stairs/stairs_1_3", stableDegradation), 1),
80
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/stairs/stairs_1_4", stableDegradation), 1),
81
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/stairs/stairs_2_0", stableDegradation), 1),
82
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/stairs/stairs_2_1", stableDegradation), 1),
83
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/stairs/stairs_2_2", stableDegradation), 1),
84
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/stairs/stairs_2_3", stableDegradation), 1),
85
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/stairs/stairs_2_4", stableDegradation), 1),
86
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/stairs/stairs_3_0", stableDegradation), 1),
87
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/stairs/stairs_3_1", stableDegradation), 1),
88
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/stairs/stairs_3_2", stableDegradation), 1),
89
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/stairs/stairs_3_3", stableDegradation), 1),
90
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/stairs/stairs_3_4", stableDegradation), 1)
91
				),
92
				StructureTemplatePool.Projection.RIGID
93
			)
94
		);
95
		Pools.register(
96
			context,
97
			"bastion/hoglin_stable/small_stables/inner",
98
			new StructureTemplatePool(
99
				empty,
100
				ImmutableList.of(
101
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/small_stables/inner_0", stableDegradation), 1),
102
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/small_stables/inner_1", stableDegradation), 1),
103
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/small_stables/inner_2", stableDegradation), 1),
104
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/small_stables/inner_3", stableDegradation), 1)
105
				),
106
				StructureTemplatePool.Projection.RIGID
107
			)
108
		);
109
		Pools.register(
110
			context,
111
			"bastion/hoglin_stable/small_stables/outer",
112
			new StructureTemplatePool(
113
				empty,
114
				ImmutableList.of(
115
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/small_stables/outer_0", stableDegradation), 1),
116
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/small_stables/outer_1", stableDegradation), 1),
117
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/small_stables/outer_2", stableDegradation), 1),
118
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/small_stables/outer_3", stableDegradation), 1)
119
				),
120
				StructureTemplatePool.Projection.RIGID
121
			)
122
		);
123
		Pools.register(
124
			context,
125
			"bastion/hoglin_stable/large_stables/inner",
126
			new StructureTemplatePool(
127
				empty,
128
				ImmutableList.of(
129
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/large_stables/inner_0", stableDegradation), 1),
130
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/large_stables/inner_1", stableDegradation), 1),
131
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/large_stables/inner_2", stableDegradation), 1),
132
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/large_stables/inner_3", stableDegradation), 1),
133
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/large_stables/inner_4", stableDegradation), 1)
134
				),
135
				StructureTemplatePool.Projection.RIGID
136
			)
137
		);
138
		Pools.register(
139
			context,
140
			"bastion/hoglin_stable/large_stables/outer",
141
			new StructureTemplatePool(
142
				empty,
143
				ImmutableList.of(
144
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/large_stables/outer_0", stableDegradation), 1),
145
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/large_stables/outer_1", stableDegradation), 1),
146
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/large_stables/outer_2", stableDegradation), 1),
147
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/large_stables/outer_3", stableDegradation), 1),
148
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/large_stables/outer_4", stableDegradation), 1)
149
				),
150
				StructureTemplatePool.Projection.RIGID
151
			)
152
		);
153
		Pools.register(
154
			context,
155
			"bastion/hoglin_stable/posts",
156
			new StructureTemplatePool(
157
				empty,
158
				ImmutableList.of(
159
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/posts/stair_post", stableDegradation), 1),
160
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/posts/end_post", stableDegradation), 1)
161
				),
162
				StructureTemplatePool.Projection.RIGID
163
			)
164
		);
165
		Pools.register(
166
			context,
167
			"bastion/hoglin_stable/ramparts",
168
			new StructureTemplatePool(
169
				empty,
170
				ImmutableList.of(
171
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/ramparts/ramparts_1", stableDegradation), 1),
172
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/ramparts/ramparts_2", stableDegradation), 1),
173
					Pair.of(StructurePoolElement.single("bastion/hoglin_stable/ramparts/ramparts_3", stableDegradation), 1)
174
				),
175
				StructureTemplatePool.Projection.RIGID
176
			)
177
		);
178
		Pools.register(
179
			context,
180
			"bastion/hoglin_stable/rampart_plates",
181
			new StructureTemplatePool(
182
				empty,
183
				ImmutableList.of(Pair.of(StructurePoolElement.single("bastion/hoglin_stable/rampart_plates/rampart_plate_1", stableDegradation), 1)),
184
				StructureTemplatePool.Projection.RIGID
185
			)
186
		);
187
		Pools.register(
188
			context,
189
			"bastion/hoglin_stable/connectors",
190
			new StructureTemplatePool(
191
				empty,
192
				ImmutableList.of(Pair.of(StructurePoolElement.single("bastion/hoglin_stable/connectors/end_post_connector", stableDegradation), 1)),
193
				StructureTemplatePool.Projection.RIGID
194
			)
195
		);
196
	}
197
}
198

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