Skip to content

Commit 3ccbc06

Browse files
committed
Add Burnt Tower
1 parent 1b8bb08 commit 3ccbc06

File tree

15 files changed

+259
-2
lines changed

15 files changed

+259
-2
lines changed

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
@@ -1,6 +1,22 @@
11
{
22
"parent": "generations_structures:generations_structures/root",
33
"criteria": {
4+
"burnt_tower": {
5+
"conditions": {
6+
"player": [
7+
{
8+
"condition": "minecraft:entity_properties",
9+
"entity": "this",
10+
"predicate": {
11+
"location": {
12+
"structure": "generations_structures:shrines/burnt_tower"
13+
}
14+
}
15+
}
16+
]
17+
},
18+
"trigger": "minecraft:location"
19+
},
420
"creation_trio_shrine": {
521
"conditions": {
622
"player": [
@@ -265,6 +281,9 @@
265281
],
266282
[
267283
"under_water_kyogre_ocean"
284+
],
285+
[
286+
"burnt_tower"
268287
]
269288
],
270289
"sends_telemetry_event": true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"values": [
3+
"#minecraft:is_forest",
4+
{
5+
"id": "#forge:is_plains",
6+
"required": false
7+
},
8+
{
9+
"id": "#c:plains",
10+
"required": false
11+
}
12+
]
13+
}

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
@@ -51,6 +51,10 @@
5151
{
5252
"id": "generations_structures:shrines/under_water_kyogre_ocean",
5353
"required": false
54+
},
55+
{
56+
"id": "generations_structures:shrines/burnt_tower",
57+
"required": false
5458
}
5559
]
5660
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
{
2+
"processors": [
3+
{
4+
"processor_type": "minecraft:rule",
5+
"rules": [
6+
{
7+
"input_predicate": {
8+
"block": "minecraft:stone",
9+
"predicate_type": "minecraft:random_block_match",
10+
"probability": 0.25
11+
},
12+
"location_predicate": {
13+
"predicate_type": "minecraft:always_true"
14+
},
15+
"output_state": {
16+
"Name": "minecraft:cobblestone"
17+
}
18+
},
19+
{
20+
"input_predicate": {
21+
"block": "minecraft:stone",
22+
"predicate_type": "minecraft:random_block_match",
23+
"probability": 0.25
24+
},
25+
"location_predicate": {
26+
"predicate_type": "minecraft:always_true"
27+
},
28+
"output_state": {
29+
"Name": "minecraft:andesite"
30+
}
31+
}
32+
]
33+
},
34+
{
35+
"processor_type": "moreprocessors:same_state_rule",
36+
"rules": [
37+
{
38+
"input_predicate": {
39+
"block": "minecraft:stone_slab",
40+
"predicate_type": "minecraft:random_block_match",
41+
"probability": 0.25
42+
},
43+
"location_predicate": {
44+
"predicate_type": "minecraft:always_true"
45+
},
46+
"output_location": "minecraft:cobblestone_slab"
47+
},
48+
{
49+
"input_predicate": {
50+
"block": "minecraft:stone_slab",
51+
"predicate_type": "minecraft:random_block_match",
52+
"probability": 0.25
53+
},
54+
"location_predicate": {
55+
"predicate_type": "minecraft:always_true"
56+
},
57+
"output_location": "minecraft:andesite_slab"
58+
},
59+
{
60+
"input_predicate": {
61+
"block": "minecraft:stone_brick_stairs",
62+
"predicate_type": "minecraft:random_block_match",
63+
"probability": 0.25
64+
},
65+
"location_predicate": {
66+
"predicate_type": "minecraft:always_true"
67+
},
68+
"output_location": "minecraft:cobblestone_stairs"
69+
},
70+
{
71+
"input_predicate": {
72+
"block": "minecraft:stone_brick_stairs",
73+
"predicate_type": "minecraft:random_block_match",
74+
"probability": 0.25
75+
},
76+
"location_predicate": {
77+
"predicate_type": "minecraft:always_true"
78+
},
79+
"output_location": "minecraft:andesite_stairs"
80+
}
81+
]
82+
},
83+
{
84+
"processor_type": "moreprocessors:compat_rule",
85+
"rules": [
86+
{
87+
"input_predicate": {
88+
"block": "minecraft:stone",
89+
"predicate_type": "minecraft:random_block_match",
90+
"probability": 0.25
91+
},
92+
"location_predicate": {
93+
"predicate_type": "minecraft:always_true"
94+
},
95+
"output_location": "biomeswevegone:rocky_stone",
96+
"output_state": {
97+
"Name": "biomeswevegone:rocky_stone"
98+
}
99+
}
100+
]
101+
},
102+
{
103+
"processor_type": "moreprocessors:same_state_compat_rule",
104+
"rules": [
105+
{
106+
"input_predicate": {
107+
"block": "minecraft:stone_slab",
108+
"predicate_type": "minecraft:block_match"
109+
},
110+
"location_predicate": {
111+
"predicate_type": "minecraft:always_true"
112+
},
113+
"output_location": "biomeswevegone:rocky_stone_slab"
114+
},
115+
{
116+
"input_predicate": {
117+
"block": "minecraft:stone_stairs",
118+
"predicate_type": "minecraft:block_match"
119+
},
120+
"location_predicate": {
121+
"predicate_type": "minecraft:always_true"
122+
},
123+
"output_location": "biomeswevegone:rocky_stone_stairs"
124+
}
125+
]
126+
}
127+
]
128+
}

common/src/main/generated/resources/data/generations_structures/worldgen/processor_list/shrines/under_water_kyogre_ocean_processor_list.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@
4848
"predicate_type": "minecraft:always_true"
4949
},
5050
"output_state": {
51-
"Name": "minecraft:water"
51+
"Name": "minecraft:water",
52+
"Properties": {
53+
"level": "0"
54+
}
5255
}
5356
}
5457
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"type": "minecraft:jigsaw",
3+
"biomes": "#generations_structures:has_structure/burnt_tower",
4+
"max_distance_from_center": 80,
5+
"project_start_to_heightmap": "WORLD_SURFACE_WG",
6+
"size": 1,
7+
"spawn_overrides": {},
8+
"start_height": {
9+
"absolute": 1
10+
},
11+
"start_pool": "generations_structures:shrines/burnt_tower",
12+
"step": "surface_structures",
13+
"terrain_adaptation": "beard_thin",
14+
"use_expansion_hack": false
15+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"placement": {
3+
"type": "minecraft:random_spread",
4+
"salt": 781579117,
5+
"separation": 350,
6+
"spacing": 2000
7+
},
8+
"structures": [
9+
{
10+
"structure": "generations_structures:shrines/burnt_tower",
11+
"weight": 1
12+
}
13+
]
14+
}
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/burnt_tower",
7+
"processors": "generations_structures:shrines/burnt_tower_processor_list",
8+
"projection": "rigid"
9+
},
10+
"weight": 1
11+
}
12+
],
13+
"fallback": "minecraft:empty"
14+
}

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

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,34 @@ public class GenerationsProcessorLists {
251251
)
252252
)));
253253

254+
public static final ResourceKey<StructureProcessorList> BURNT_TOWER_PROCESSOR_LIST = register("shrines/burnt_tower", context -> new StructureProcessorList(ImmutableList.of(
255+
new RuleProcessor(
256+
ImmutableList.of(
257+
new ProcessorRule(new RandomBlockMatchTest(Blocks.STONE, 0.25f), AlwaysTrueTest.INSTANCE, Blocks.COBBLESTONE.defaultBlockState()),
258+
new ProcessorRule(new RandomBlockMatchTest(Blocks.STONE, 0.25f), AlwaysTrueTest.INSTANCE, Blocks.ANDESITE.defaultBlockState())
259+
)
260+
),
261+
new SameStateRuleProcessor(
262+
ImmutableList.of(
263+
new SameStateProcessorRule(new RandomBlockMatchTest(Blocks.STONE_SLAB, 0.25f), Blocks.COBBLESTONE_SLAB),
264+
new SameStateProcessorRule(new RandomBlockMatchTest(Blocks.STONE_SLAB, 0.25f), Blocks.ANDESITE_SLAB),
265+
new SameStateProcessorRule(new RandomBlockMatchTest(Blocks.STONE_BRICK_STAIRS, 0.25f), Blocks.COBBLESTONE_STAIRS),
266+
new SameStateProcessorRule(new RandomBlockMatchTest(Blocks.STONE_BRICK_STAIRS, 0.25f), Blocks.ANDESITE_STAIRS)
267+
)
268+
),
269+
new CompatRuleProcessor(
270+
ImmutableList.of(
271+
new CompatProcessorRule(new RandomBlockMatchTest(Blocks.STONE, 0.25f), BWGBlocks.ROCKY_STONE_SET.getBase())
272+
)
273+
),
274+
new SameStateCompatRuleProcessor(
275+
ImmutableList.of(
276+
new SameStateCompatProcessorRule(new BlockMatchTest(Blocks.STONE_SLAB), BWGBlocks.ROCKY_STONE_SET.getSlab()),
277+
new SameStateCompatProcessorRule(new BlockMatchTest(Blocks.STONE_STAIRS), BWGBlocks.ROCKY_STONE_SET.getStairs())
278+
)
279+
)
280+
)));
281+
254282
public static final ResourceKey<StructureProcessorList> MEOWTH_BALLOON_PROCESSOR_LIST = register("meowth_balloon", context -> new StructureProcessorList(ImmutableList.of(
255283
new SameStateRuleProcessor(
256284
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
@@ -132,6 +132,11 @@ public class GenerationsStructureSettings {
132132
context.lookup(Registries.TEMPLATE_POOL).getOrThrow(GenerationsTemplatePools.UNDER_WATER_KYOGRE_OCEAN), 1,
133133
ConstantHeight.of(VerticalAnchor.absolute(0)), Heightmap.Types.OCEAN_FLOOR_WG));
134134

135+
public static final ResourceKey<Structure> BURNT_TOWER = register("shrines/burnt_tower", (context) ->
136+
createJigsaw(structure(context.lookup(Registries.BIOME).getOrThrow(GenerationsBiomeTags.HAS_BURNT_TOWER), TerrainAdjustment.BEARD_THIN),
137+
context.lookup(Registries.TEMPLATE_POOL).getOrThrow(GenerationsTemplatePools.BURNT_TOWER), 1,
138+
ConstantHeight.of(VerticalAnchor.absolute(1)), Heightmap.Types.WORLD_SURFACE_WG));
139+
135140
public static final ResourceKey<Structure> ISLANDS = register("islands", (context) ->
136141
createJigsaw(structure(context.lookup(Registries.BIOME).getOrThrow(GenerationsBiomeTags.HAS_ISLANDS), TerrainAdjustment.NONE),
137142
context.lookup(Registries.TEMPLATE_POOL).getOrThrow(GenerationsTemplatePools.ISLANDS), 1,

0 commit comments

Comments
 (0)