AncientCityStructurePools .java

net.minecraft.data.worldgen.AncientCityStructurePools (class, 153 lines): members: bootstrap. strings: "ancient_city/walls/intact_horizontal_wall_bridge".

net.minecraft.data.worldgenclass153 linescommon10.0 KB

API Surface (1)

void bootstrap(final BootstrapContext<StructureTemplatePool> context)

String literals (48)

"ancient_city/structures"
"ancient_city/structures/barracks"
"ancient_city/structures/chamber_1"
"ancient_city/structures/chamber_2"
"ancient_city/structures/chamber_3"
"ancient_city/structures/sauna_1"
"ancient_city/structures/small_statue"
"ancient_city/structures/large_ruin_1"
"ancient_city/structures/tall_ruin_1"
"ancient_city/structures/tall_ruin_2"
"ancient_city/structures/tall_ruin_3"
"ancient_city/structures/tall_ruin_4"
"ancient_city/structures/camp_1"
"ancient_city/structures/camp_2"
"ancient_city/structures/camp_3"
"ancient_city/structures/medium_ruin_1"
"ancient_city/structures/medium_ruin_2"
"ancient_city/structures/small_ruin_1"
"ancient_city/structures/small_ruin_2"
"ancient_city/structures/large_pillar_1"
"ancient_city/structures/medium_pillar_1"
"ancient_city/structures/ice_box_1"
"ancient_city/sculk"
"ancient_city/walls"

Full Source

AncientCityStructurePools.java153 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.data.worldgen.placement.CavePlacements;
9
import net.minecraft.world.level.levelgen.placement.PlacedFeature;
10
import net.minecraft.world.level.levelgen.structure.pools.StructurePoolElement;
11
import net.minecraft.world.level.levelgen.structure.pools.StructureTemplatePool;
12
import net.minecraft.world.level.levelgen.structure.templatesystem.StructureProcessorList;
13
14
public class AncientCityStructurePools {
15
	public static void bootstrap(final BootstrapContext<StructureTemplatePool> context) {
16
		HolderGetter<PlacedFeature> placedFeatures = context.lookup(Registries.PLACED_FEATURE);
17
		Holder<PlacedFeature> sculkPatchAncientCity = placedFeatures.getOrThrow(CavePlacements.SCULK_PATCH_ANCIENT_CITY);
18
		HolderGetter<StructureProcessorList> processorLists = context.lookup(Registries.PROCESSOR_LIST);
19
		Holder<StructureProcessorList> ancientCityGenericDegradation = processorLists.getOrThrow(ProcessorLists.ANCIENT_CITY_GENERIC_DEGRADATION);
20
		Holder<StructureProcessorList> ancientCityWallsDegradation = processorLists.getOrThrow(ProcessorLists.ANCIENT_CITY_WALLS_DEGRADATION);
21
		HolderGetter<StructureTemplatePool> pools = context.lookup(Registries.TEMPLATE_POOL);
22
		Holder<StructureTemplatePool> empty = pools.getOrThrow(Pools.EMPTY);
23
		Pools.register(
24
			context,
25
			"ancient_city/structures",
26
			new StructureTemplatePool(
27
				empty,
28
				ImmutableList.of(
29
					Pair.of(StructurePoolElement.empty(), 7),
30
					Pair.of(StructurePoolElement.single("ancient_city/structures/barracks", ancientCityGenericDegradation), 4),
31
					Pair.of(StructurePoolElement.single("ancient_city/structures/chamber_1", ancientCityGenericDegradation), 4),
32
					Pair.of(StructurePoolElement.single("ancient_city/structures/chamber_2", ancientCityGenericDegradation), 4),
33
					Pair.of(StructurePoolElement.single("ancient_city/structures/chamber_3", ancientCityGenericDegradation), 4),
34
					Pair.of(StructurePoolElement.single("ancient_city/structures/sauna_1", ancientCityGenericDegradation), 4),
35
					Pair.of(StructurePoolElement.single("ancient_city/structures/small_statue", ancientCityGenericDegradation), 4),
36
					Pair.of(StructurePoolElement.single("ancient_city/structures/large_ruin_1", ancientCityGenericDegradation), 1),
37
					Pair.of(StructurePoolElement.single("ancient_city/structures/tall_ruin_1", ancientCityGenericDegradation), 1),
38
					Pair.of(StructurePoolElement.single("ancient_city/structures/tall_ruin_2", ancientCityGenericDegradation), 1),
39
					Pair.of(StructurePoolElement.single("ancient_city/structures/tall_ruin_3", ancientCityGenericDegradation), 2),
40
					Pair.of(StructurePoolElement.single("ancient_city/structures/tall_ruin_4", ancientCityGenericDegradation), 2),
41
					Pair.of(
42
						StructurePoolElement.list(
43
							ImmutableList.of(
44
								StructurePoolElement.single("ancient_city/structures/camp_1", ancientCityGenericDegradation),
45
								StructurePoolElement.single("ancient_city/structures/camp_2", ancientCityGenericDegradation),
46
								StructurePoolElement.single("ancient_city/structures/camp_3", ancientCityGenericDegradation)
47
							)
48
						),
49
						1
50
					),
51
					Pair.of(StructurePoolElement.single("ancient_city/structures/medium_ruin_1", ancientCityGenericDegradation), 1),
52
					Pair.of(StructurePoolElement.single("ancient_city/structures/medium_ruin_2", ancientCityGenericDegradation), 1),
53
					Pair.of(StructurePoolElement.single("ancient_city/structures/small_ruin_1", ancientCityGenericDegradation), 1),
54
					Pair.of(StructurePoolElement.single("ancient_city/structures/small_ruin_2", ancientCityGenericDegradation), 1),
55
					Pair.of(StructurePoolElement.single("ancient_city/structures/large_pillar_1", ancientCityGenericDegradation), 1),
56
					Pair.of(StructurePoolElement.single("ancient_city/structures/medium_pillar_1", ancientCityGenericDegradation), 1),
57
					Pair.of(StructurePoolElement.list(ImmutableList.of(StructurePoolElement.single("ancient_city/structures/ice_box_1"))), 1)
58
				),
59
				StructureTemplatePool.Projection.RIGID
60
			)
61
		);
62
		Pools.register(
63
			context,
64
			"ancient_city/sculk",
65
			new StructureTemplatePool(
66
				empty,
67
				ImmutableList.of(Pair.of(StructurePoolElement.feature(sculkPatchAncientCity), 6), Pair.of(StructurePoolElement.empty(), 1)),
68
				StructureTemplatePool.Projection.RIGID
69
			)
70
		);
71
		Pools.register(
72
			context,
73
			"ancient_city/walls",
74
			new StructureTemplatePool(
75
				empty,
76
				ImmutableList.of(
77
					Pair.of(StructurePoolElement.single("ancient_city/walls/intact_corner_wall_1", ancientCityWallsDegradation), 1),
78
					Pair.of(StructurePoolElement.single("ancient_city/walls/intact_intersection_wall_1", ancientCityWallsDegradation), 1),
79
					Pair.of(StructurePoolElement.single("ancient_city/walls/intact_lshape_wall_1", ancientCityWallsDegradation), 1),
80
					Pair.of(StructurePoolElement.single("ancient_city/walls/intact_horizontal_wall_1", ancientCityWallsDegradation), 1),
81
					Pair.of(StructurePoolElement.single("ancient_city/walls/intact_horizontal_wall_2", ancientCityWallsDegradation), 1),
82
					Pair.of(StructurePoolElement.single("ancient_city/walls/intact_horizontal_wall_stairs_1", ancientCityWallsDegradation), 1),
83
					Pair.of(StructurePoolElement.single("ancient_city/walls/intact_horizontal_wall_stairs_2", ancientCityWallsDegradation), 1),
84
					Pair.of(StructurePoolElement.single("ancient_city/walls/intact_horizontal_wall_stairs_3", ancientCityWallsDegradation), 1),
85
					Pair.of(StructurePoolElement.single("ancient_city/walls/intact_horizontal_wall_stairs_4", ancientCityWallsDegradation), 4),
86
					Pair.of(StructurePoolElement.single("ancient_city/walls/intact_horizontal_wall_passage_1", ancientCityWallsDegradation), 3),
87
					Pair.of(StructurePoolElement.single("ancient_city/walls/ruined_corner_wall_1", ancientCityWallsDegradation), 1),
88
					Pair.of(StructurePoolElement.single("ancient_city/walls/ruined_corner_wall_2", ancientCityWallsDegradation), 1),
89
					Pair.of(StructurePoolElement.single("ancient_city/walls/ruined_horizontal_wall_stairs_1", ancientCityWallsDegradation), 2),
90
					Pair.of(StructurePoolElement.single("ancient_city/walls/ruined_horizontal_wall_stairs_2", ancientCityWallsDegradation), 2),
91
					Pair.of(StructurePoolElement.single("ancient_city/walls/ruined_horizontal_wall_stairs_3", ancientCityWallsDegradation), 3),
92
					Pair.of(StructurePoolElement.single("ancient_city/walls/ruined_horizontal_wall_stairs_4", ancientCityWallsDegradation), 3)
93
				),
94
				StructureTemplatePool.Projection.RIGID
95
			)
96
		);
97
		Pools.register(
98
			context,
99
			"ancient_city/walls/no_corners",
100
			new StructureTemplatePool(
101
				empty,
102
				ImmutableList.of(
103
					Pair.of(StructurePoolElement.single("ancient_city/walls/intact_horizontal_wall_1", ancientCityWallsDegradation), 1),
104
					Pair.of(StructurePoolElement.single("ancient_city/walls/intact_horizontal_wall_2", ancientCityWallsDegradation), 1),
105
					Pair.of(StructurePoolElement.single("ancient_city/walls/intact_horizontal_wall_stairs_1", ancientCityWallsDegradation), 1),
106
					Pair.of(StructurePoolElement.single("ancient_city/walls/intact_horizontal_wall_stairs_2", ancientCityWallsDegradation), 1),
107
					Pair.of(StructurePoolElement.single("ancient_city/walls/intact_horizontal_wall_stairs_3", ancientCityWallsDegradation), 1),
108
					Pair.of(StructurePoolElement.single("ancient_city/walls/intact_horizontal_wall_stairs_4", ancientCityWallsDegradation), 1),
109
					Pair.of(StructurePoolElement.single("ancient_city/walls/intact_horizontal_wall_stairs_5", ancientCityWallsDegradation), 1),
110
					Pair.of(StructurePoolElement.single("ancient_city/walls/intact_horizontal_wall_bridge", ancientCityWallsDegradation), 1)
111
				),
112
				StructureTemplatePool.Projection.RIGID
113
			)
114
		);
115
		Pools.register(
116
			context,
117
			"ancient_city/city_center/walls",
118
			new StructureTemplatePool(
119
				empty,
120
				ImmutableList.of(
121
					Pair.of(StructurePoolElement.single("ancient_city/city_center/walls/bottom_1", ancientCityGenericDegradation), 1),
122
					Pair.of(StructurePoolElement.single("ancient_city/city_center/walls/bottom_2", ancientCityGenericDegradation), 1),
123
					Pair.of(StructurePoolElement.single("ancient_city/city_center/walls/bottom_left_corner", ancientCityGenericDegradation), 1),
124
					Pair.of(StructurePoolElement.single("ancient_city/city_center/walls/bottom_right_corner_1", ancientCityGenericDegradation), 1),
125
					Pair.of(StructurePoolElement.single("ancient_city/city_center/walls/bottom_right_corner_2", ancientCityGenericDegradation), 1),
126
					Pair.of(StructurePoolElement.single("ancient_city/city_center/walls/left", ancientCityGenericDegradation), 1),
127
					Pair.of(StructurePoolElement.single("ancient_city/city_center/walls/right", ancientCityGenericDegradation), 1),
128
					Pair.of(StructurePoolElement.single("ancient_city/city_center/walls/top", ancientCityGenericDegradation), 1),
129
					Pair.of(StructurePoolElement.single("ancient_city/city_center/walls/top_right_corner", ancientCityGenericDegradation), 1),
130
					Pair.of(StructurePoolElement.single("ancient_city/city_center/walls/top_left_corner", ancientCityGenericDegradation), 1)
131
				),
132
				StructureTemplatePool.Projection.RIGID
133
			)
134
		);
135
		Pools.register(
136
			context,
137
			"ancient_city/city/entrance",
138
			new StructureTemplatePool(
139
				empty,
140
				ImmutableList.of(
141
					Pair.of(StructurePoolElement.single("ancient_city/city/entrance/entrance_connector", ancientCityGenericDegradation), 1),
142
					Pair.of(StructurePoolElement.single("ancient_city/city/entrance/entrance_path_1", ancientCityGenericDegradation), 1),
143
					Pair.of(StructurePoolElement.single("ancient_city/city/entrance/entrance_path_2", ancientCityGenericDegradation), 1),
144
					Pair.of(StructurePoolElement.single("ancient_city/city/entrance/entrance_path_3", ancientCityGenericDegradation), 1),
145
					Pair.of(StructurePoolElement.single("ancient_city/city/entrance/entrance_path_4", ancientCityGenericDegradation), 1),
146
					Pair.of(StructurePoolElement.single("ancient_city/city/entrance/entrance_path_5", ancientCityGenericDegradation), 1)
147
				),
148
				StructureTemplatePool.Projection.RIGID
149
			)
150
		);
151
	}
152
}
153

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