Skip to content

Commit 1b8bb08

Browse files
committed
Add Kyogre Ocean Under Water Variant Shrine
1 parent c5d8d58 commit 1b8bb08

11 files changed

Lines changed: 143 additions & 2 deletions

File tree

common/src/main/generated/resources/data/generations_structures/advancements/generations_structures/shrines.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,22 @@
192192
]
193193
},
194194
"trigger": "minecraft:location"
195+
},
196+
"under_water_kyogre_ocean": {
197+
"conditions": {
198+
"player": [
199+
{
200+
"condition": "minecraft:entity_properties",
201+
"entity": "this",
202+
"predicate": {
203+
"location": {
204+
"structure": "generations_structures:shrines/under_water_kyogre_ocean"
205+
}
206+
}
207+
}
208+
]
209+
},
210+
"trigger": "minecraft:location"
195211
}
196212
},
197213
"display": {
@@ -246,6 +262,9 @@
246262
],
247263
[
248264
"kyogre_ocean"
265+
],
266+
[
267+
"under_water_kyogre_ocean"
249268
]
250269
],
251270
"sends_telemetry_event": true

common/src/main/generated/resources/data/generations_structures/tags/worldgen/structure/shrines.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@
4747
{
4848
"id": "generations_structures:shrines/kyogre_ocean",
4949
"required": false
50+
},
51+
{
52+
"id": "generations_structures:shrines/under_water_kyogre_ocean",
53+
"required": false
5054
}
5155
]
5256
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"processors": [
3+
{
4+
"processor_type": "minecraft:rule",
5+
"rules": [
6+
{
7+
"input_predicate": {
8+
"block": "minecraft:grass_block",
9+
"predicate_type": "minecraft:block_match"
10+
},
11+
"location_predicate": {
12+
"predicate_type": "minecraft:always_true"
13+
},
14+
"output_state": {
15+
"Name": "minecraft:gravel"
16+
}
17+
},
18+
{
19+
"input_predicate": {
20+
"block": "minecraft:dirt",
21+
"predicate_type": "minecraft:block_match"
22+
},
23+
"location_predicate": {
24+
"predicate_type": "minecraft:always_true"
25+
},
26+
"output_state": {
27+
"Name": "minecraft:gravel"
28+
}
29+
},
30+
{
31+
"input_predicate": {
32+
"block": "minecraft:water",
33+
"predicate_type": "minecraft:block_match"
34+
},
35+
"location_predicate": {
36+
"predicate_type": "minecraft:always_true"
37+
},
38+
"output_state": {
39+
"Name": "minecraft:gravel"
40+
}
41+
},
42+
{
43+
"input_predicate": {
44+
"block": "minecraft:air",
45+
"predicate_type": "minecraft:block_match"
46+
},
47+
"location_predicate": {
48+
"predicate_type": "minecraft:always_true"
49+
},
50+
"output_state": {
51+
"Name": "minecraft:water"
52+
}
53+
}
54+
]
55+
}
56+
]
57+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"type": "minecraft:jigsaw",
3+
"biomes": "#generations_structures:has_structure/kyogre_ocean",
4+
"max_distance_from_center": 80,
5+
"project_start_to_heightmap": "OCEAN_FLOOR_WG",
6+
"size": 1,
7+
"spawn_overrides": {},
8+
"start_height": {
9+
"absolute": 0
10+
},
11+
"start_pool": "generations_structures:shrines/kyogre_ocean_under_water",
12+
"step": "surface_structures",
13+
"terrain_adaptation": "beard_thin",
14+
"use_expansion_hack": false
15+
}

common/src/main/generated/resources/data/generations_structures/worldgen/structure_set/shrines/kyogre_ocean.json renamed to common/src/main/generated/resources/data/generations_structures/worldgen/structure_set/shrines/kyogre.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
{
1010
"structure": "generations_structures:shrines/kyogre_ocean",
1111
"weight": 1
12+
},
13+
{
14+
"structure": "generations_structures:shrines/under_water_kyogre_ocean",
15+
"weight": 1
1216
}
1317
]
1418
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"elements": [
3+
{
4+
"element": {
5+
"element_type": "minecraft:single_pool_element",
6+
"location": "generations_structures:shrines/kyogre_ocean",
7+
"processors": "generations_structures:shrines/under_water_kyogre_ocean_processor_list",
8+
"projection": "rigid"
9+
},
10+
"weight": 1
11+
}
12+
],
13+
"fallback": "generations_structures:shrines/kyogre_ocean_under_water"
14+
}

common/src/main/java/generations/gg/generations/structures/generationsstructures/processors/GenerationsProcessorLists.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,17 @@ public class GenerationsProcessorLists {
240240

241241
)));
242242

243+
public static final ResourceKey<StructureProcessorList> UNDER_WATER_KYOGRE_OCEAN_PROCESSOR_LIST = register("shrines/under_water_kyogre_ocean", context -> new StructureProcessorList(ImmutableList.of(
244+
new RuleProcessor(
245+
ImmutableList.of(
246+
new ProcessorRule(new BlockMatchTest(Blocks.GRASS_BLOCK), AlwaysTrueTest.INSTANCE, Blocks.GRAVEL.defaultBlockState()),
247+
new ProcessorRule(new BlockMatchTest(Blocks.DIRT), AlwaysTrueTest.INSTANCE, Blocks.GRAVEL.defaultBlockState()),
248+
new ProcessorRule(new BlockMatchTest(Blocks.WATER), AlwaysTrueTest.INSTANCE, Blocks.GRAVEL.defaultBlockState()),
249+
new ProcessorRule(new BlockMatchTest(Blocks.AIR), AlwaysTrueTest.INSTANCE, Blocks.WATER.defaultBlockState())
250+
)
251+
)
252+
)));
253+
243254
public static final ResourceKey<StructureProcessorList> MEOWTH_BALLOON_PROCESSOR_LIST = register("meowth_balloon", context -> new StructureProcessorList(ImmutableList.of(
244255
new SameStateRuleProcessor(
245256
ImmutableList.of(

common/src/main/java/generations/gg/generations/structures/generationsstructures/structures/GenerationsStructureSettings.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,11 @@ public class GenerationsStructureSettings {
127127
context.lookup(Registries.TEMPLATE_POOL).getOrThrow(GenerationsTemplatePools.KYOGRE_OCEAN), 1,
128128
ConstantHeight.of(VerticalAnchor.absolute(-2)), Heightmap.Types.WORLD_SURFACE_WG));
129129

130+
public static final ResourceKey<Structure> UNDER_WATER_KYOGRE_OCEAN = register("shrines/under_water_kyogre_ocean", (context) ->
131+
createJigsaw(structure(context.lookup(Registries.BIOME).getOrThrow(GenerationsBiomeTags.HAS_KYOGRE_OCEAN), TerrainAdjustment.BEARD_THIN),
132+
context.lookup(Registries.TEMPLATE_POOL).getOrThrow(GenerationsTemplatePools.UNDER_WATER_KYOGRE_OCEAN), 1,
133+
ConstantHeight.of(VerticalAnchor.absolute(0)), Heightmap.Types.OCEAN_FLOOR_WG));
134+
130135
public static final ResourceKey<Structure> ISLANDS = register("islands", (context) ->
131136
createJigsaw(structure(context.lookup(Registries.BIOME).getOrThrow(GenerationsBiomeTags.HAS_ISLANDS), TerrainAdjustment.NONE),
132137
context.lookup(Registries.TEMPLATE_POOL).getOrThrow(GenerationsTemplatePools.ISLANDS), 1,

common/src/main/java/generations/gg/generations/structures/generationsstructures/worldgen/structure_set/GenerationsStructureSets.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,11 @@ public static void init() {
7474

7575
register("shrines/dragon_spiral", GenerationsStructureSettings.DRAGON_SPIRAL, 2000, 350, 509787274);
7676

77-
register("shrines/kyogre_ocean", GenerationsStructureSettings.KYOGRE_OCEAN, 2000, 350, 162114187);
77+
register("shrines/kyogre",
78+
structureHolderGetter -> new StructureSet(ImmutableList.of(
79+
createStructureSelectionEntry(structureHolderGetter, GenerationsStructureSettings.KYOGRE_OCEAN),
80+
createStructureSelectionEntry(structureHolderGetter, GenerationsStructureSettings.UNDER_WATER_KYOGRE_OCEAN)
81+
), createRandomLinearSpreadPlacement(2000, 350, 162114187)));
7882
}
7983

8084
private static void register(String id, StructureSetFactory factory) {

common/src/main/java/generations/gg/generations/structures/generationsstructures/worldgen/template_pool/GenerationsTemplatePools.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ public class GenerationsTemplatePools {
6363
public static final ResourceKey<StructureTemplatePool> DRAGON_SPIRAL = registerSimple("shrines/dragon_spiral", GenerationsStructureSettings.DRAGON_SPIRAL, ProcessorLists.EMPTY);
6464

6565
public static final ResourceKey<StructureTemplatePool> KYOGRE_OCEAN = registerSimple("shrines/kyogre_ocean", GenerationsStructureSettings.KYOGRE_OCEAN, ProcessorLists.EMPTY);
66+
67+
public static final ResourceKey<StructureTemplatePool> UNDER_WATER_KYOGRE_OCEAN = register("shrines/kyogre_ocean_under_water", context -> createTemplatePool(
68+
getPool(context, create("shrines/kyogre_ocean_under_water")), ImmutableList.of(
69+
createPoolElement(context, GenerationsStructureSettings.KYOGRE_OCEAN, GenerationsProcessorLists.UNDER_WATER_KYOGRE_OCEAN_PROCESSOR_LIST)
70+
))
71+
);
6672

6773
public static final ResourceKey<StructureTemplatePool> PLAINS_VILLAGE_POKECENTER_STREETS = register("village/plains/streets/pokecenter", context -> createTemplatePool(getPool(context, VanillaVillages.PLAINS.getVillagePool("streets")), ImmutableList.of(
6874
createPoolElement(context, GenerationsStructuresKeys.PLAINS_POKECENTER_STREET_CORNER_01, ProcessorLists.STREET_PLAINS, 1),

0 commit comments

Comments
 (0)