Skip to content

Commit 9c69f62

Browse files
committed
Add Dragon Spiral Tower
1 parent ef30602 commit 9c69f62

File tree

17 files changed

+101
-11
lines changed

17 files changed

+101
-11
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# 1.0.0
22
- Add ModMenu Integration (Fabric Only)
3+
- Add Dragon Spiral Tower
34

45
# 1.1.3-Beta
56
- Add Haunted Mansion Shrine

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
@@ -17,6 +17,22 @@
1717
},
1818
"trigger": "minecraft:location"
1919
},
20+
"dragon_spiral": {
21+
"conditions": {
22+
"player": [
23+
{
24+
"condition": "minecraft:entity_properties",
25+
"entity": "this",
26+
"predicate": {
27+
"location": {
28+
"structure": "generations_structures:shrines/dragon_spiral"
29+
}
30+
}
31+
}
32+
]
33+
},
34+
"trigger": "minecraft:location"
35+
},
2036
"fiery_shrine": {
2137
"conditions": {
2238
"player": [
@@ -208,6 +224,9 @@
208224
],
209225
[
210226
"haunted_mansion"
227+
],
228+
[
229+
"dragon_spiral"
211230
]
212231
],
213232
"sends_telemetry_event": true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"values": [
3+
"#minecraft:is_forest",
4+
{
5+
"id": "#c:forest",
6+
"required": false
7+
}
8+
]
9+
}

common/src/main/generated/resources/data/generations_structures/tags/worldgen/biome/has_structure/fiery_shrine.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@
88
{
99
"id": "#c:desert",
1010
"required": false
11-
},
12-
{
13-
"id": "biomesoplenty:volcanic_plains",
14-
"required": false
1511
}
1612
]
1713
}

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
@@ -39,6 +39,10 @@
3939
{
4040
"id": "generations_structures:shrines/haunted_mansion",
4141
"required": false
42+
},
43+
{
44+
"id": "generations_structures:shrines/dragon_spiral",
45+
"required": false
4246
}
4347
]
4448
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"type": "minecraft:jigsaw",
3+
"biomes": "#generations_structures:has_structure/dragon_spiral",
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/dragon_spiral",
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": 509787274,
5+
"separation": 350,
6+
"spacing": 2000
7+
},
8+
"structures": [
9+
{
10+
"structure": "generations_structures:shrines/dragon_spiral",
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/dragon_spiral",
7+
"processors": "minecraft:empty",
8+
"projection": "rigid"
9+
},
10+
"weight": 1
11+
}
12+
],
13+
"fallback": "minecraft:empty"
14+
}

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
@@ -117,6 +117,11 @@ public class GenerationsStructureSettings {
117117
context.lookup(Registries.TEMPLATE_POOL).getOrThrow(GenerationsTemplatePools.HAUNTED_MANSION), 1,
118118
ConstantHeight.of(VerticalAnchor.absolute(1)), Heightmap.Types.WORLD_SURFACE_WG));
119119

120+
public static final ResourceKey<Structure> DRAGON_SPIRAL = register("shrines/dragon_spiral", (context) ->
121+
createJigsaw(structure(context.lookup(Registries.BIOME).getOrThrow(GenerationsBiomeTags.HAS_DRAGON_SPIRAL), TerrainAdjustment.BEARD_THIN),
122+
context.lookup(Registries.TEMPLATE_POOL).getOrThrow(GenerationsTemplatePools.DRAGON_SPIRAL), 1,
123+
ConstantHeight.of(VerticalAnchor.absolute(1)), Heightmap.Types.WORLD_SURFACE_WG));
124+
120125
public static final ResourceKey<Structure> ISLANDS = register("islands", (context) ->
121126
createJigsaw(structure(context.lookup(Registries.BIOME).getOrThrow(GenerationsBiomeTags.HAS_ISLANDS), TerrainAdjustment.NONE),
122127
context.lookup(Registries.TEMPLATE_POOL).getOrThrow(GenerationsTemplatePools.ISLANDS), 1,

common/src/main/java/generations/gg/generations/structures/generationsstructures/tags/GenerationsBiomeTags.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ public final class GenerationsBiomeTags {
5454
/** the tag for biomes that can have a haunted mansion */
5555
public static final TagKey<Biome> HAS_HAUNTED_MANSION = create("has_structure/haunted_mansion");
5656

57+
/** the tag for biomes that can have a dragon spiral tower */
58+
public static final TagKey<Biome> HAS_DRAGON_SPIRAL = create("has_structure/dragon_spiral");
59+
5760
/**
5861
* Creates a new {@link TagKey} for the given name.
5962
* @param name The name of the tag.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ public static void init() {
7171
register("shrines/tapu", GenerationsStructureSettings.TAPU_SHRINE, 2000, 350, 647365027);
7272

7373
register("shrines/haunted_mansion", GenerationsStructureSettings.HAUNTED_MANSION, 2000, 350, 282258907);
74+
75+
register("shrines/dragon_spiral", GenerationsStructureSettings.DRAGON_SPIRAL, 2000, 350, 509787274);
7476
}
7577

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

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ public class GenerationsTemplatePools {
6060

6161
public static final ResourceKey<StructureTemplatePool> HAUNTED_MANSION = registerSimple("shrines/haunted_mansion", GenerationsStructureSettings.HAUNTED_MANSION, GenerationsProcessorLists.HAUNTED_MANSION_PROCESSOR_LIST);
6262

63+
public static final ResourceKey<StructureTemplatePool> DRAGON_SPIRAL = registerSimple("shrines/dragon_spiral", GenerationsStructureSettings.DRAGON_SPIRAL, ProcessorLists.EMPTY);
64+
6365
public static final ResourceKey<StructureTemplatePool> PLAINS_VILLAGE_POKECENTER_STREETS = register("village/plains/streets/pokecenter", context -> createTemplatePool(getPool(context, VanillaVillages.PLAINS.getVillagePool("streets")), ImmutableList.of(
6466
createPoolElement(context, GenerationsStructuresKeys.PLAINS_POKECENTER_STREET_CORNER_01, ProcessorLists.STREET_PLAINS, 1),
6567
createPoolElement(context, GenerationsStructuresKeys.PLAINS_POKECENTER_STREET_STRAIGHT_05, ProcessorLists.STREET_PLAINS, 1)

forge/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ dependencies {
7575
//BiomeMod Integration
7676
modLocalRuntime("com.github.glitchfiend:TerraBlender-forge:$minecraftVersion-${project.properties["terrablender_version"]}")
7777
modCompileOnly("com.github.glitchfiend:BiomesOPlenty-forge:$minecraftVersion-${project.properties["BOP_version"]}")
78-
//modLocalRuntime("com.github.glitchfiend:GlitchCore-forge:$minecraftVersion-${project.properties["GlitchCore_version"]}")
78+
modLocalRuntime("com.github.glitchfiend:GlitchCore-forge:$minecraftVersion-${project.properties["GlitchCore_version"]}")
7979
modRuntimeOnly(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))
8080
modApi("net.potionstudios:Oh-The-Biomes-Weve-Gone-Forge:${project.properties["BWG_version"]}")
8181
implementation("com.eliotlash.mclib:mclib:20")

forge/src/main/java/generations/gg/generations/structures/generationsstructures/forge/datagen/ForgeDatagen.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ protected void addTags(HolderLookup.@NotNull Provider provider) {
154154
.addOptionalTag(Tags.Biomes.IS_SPOOKY)
155155
.addOptionalTag(fabricTagMaker("floral_forests"))
156156
.add(Biomes.DARK_FOREST, Biomes.FLOWER_FOREST);
157+
158+
tag(GenerationsBiomeTags.HAS_DRAGON_SPIRAL)
159+
.addTag(BiomeTags.IS_FOREST)
160+
.addOptionalTag(fabricTagMaker("forest"));
157161
}
158162
}
159163

@@ -185,7 +189,8 @@ protected void addTags(HolderLookup.@NotNull Provider provider) {
185189
.addOptional(GenerationsStructureSettings.FORCES_OF_NATURE_SHRINE.location())
186190
.addOptional(GenerationsStructureSettings.GROUDON_SHRINE.location())
187191
.addOptional(GenerationsStructureSettings.TAPU_SHRINE.location())
188-
.addOptional(GenerationsStructureSettings.HAUNTED_MANSION.location());
192+
.addOptional(GenerationsStructureSettings.HAUNTED_MANSION.location())
193+
.addOptional(GenerationsStructureSettings.DRAGON_SPIRAL.location());
189194
tag(GenerationsStructureTags.GENERATIONS_STRUCTURES)
190195
.addTag(GenerationsStructureTags.POKESHOP)
191196
.addTag(GenerationsStructureTags.LOOT_BALLOONS)
@@ -197,7 +202,7 @@ protected void addTags(HolderLookup.@NotNull Provider provider) {
197202
}
198203

199204
private static ResourceLocation fabricTagMaker(String name) {
200-
return new ResourceLocation("c", name);
205+
return ResourceLocation.fromNamespaceAndPath("c", name);
201206
}
202207

203208
private static class GenerationsStructureAdvancementProvider implements ForgeAdvancementProvider.AdvancementGenerator {
@@ -246,8 +251,9 @@ public void generate(HolderLookup.@NotNull Provider arg, @NotNull Consumer<Advan
246251
.addCriterion("groudon_shrine", PlayerTrigger.TriggerInstance.located(LocationPredicate.inStructure(GenerationsStructureSettings.GROUDON_SHRINE)))
247252
.addCriterion("tapu_shrine", PlayerTrigger.TriggerInstance.located(LocationPredicate.inStructure(GenerationsStructureSettings.TAPU_SHRINE)))
248253
.addCriterion("haunted_mansion", PlayerTrigger.TriggerInstance.located(LocationPredicate.inStructure(GenerationsStructureSettings.HAUNTED_MANSION)))
254+
.addCriterion("dragon_spiral", PlayerTrigger.TriggerInstance.located(LocationPredicate.inStructure(GenerationsStructureSettings.DRAGON_SPIRAL)))
249255
.display(
250-
GenerationsShrines.LUNAR_SHRINE.getOrNull(),
256+
GenerationsShrines.LUNAR_SHRINE.get(),
251257
translateAble("title.shrines"),
252258
translateAble("description.shrines"),
253259
GenerationsCore.id("textures/block/blue_poke_brick.png"),

forge/src/main/resources/META-INF/mods.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ logoFile = "icon.png"
3131
[[dependencies.generations_structures]]
3232
modId = "generations_core"
3333
mandatory = true
34-
versionRange="[4.0.1-Beta,)"
34+
versionRange="[1.0.0,)"
3535
ordering = "AFTER"
3636
side = "BOTH"
3737

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ maven_group=generations.gg.generations.structures.generationsstructures
99
fabric_loader_version=0.16.10
1010
fabric_api_version=0.92.3
1111

12-
forge_version=47.3.27
12+
forge_version=47.4.0
1313
neoforge_version=47.1.106
1414

1515
use_neoforge=false
1616

1717
parchment=2023.09.03
1818

19-
generations-core_version=1.0.0
19+
generations-core_version=1.0.0-maven
2020
architectury_version=9.2.14
2121
botarium_version=2.3.4
2222
devauth_version=1.2.1

0 commit comments

Comments
 (0)