diff --git a/common/src/main/generated/resources/data/generations_structures/tags/worldgen/biome/has_structure/lugia_shrine.json b/common/src/main/generated/resources/data/generations_structures/tags/worldgen/biome/has_structure/lugia_shrine.json new file mode 100644 index 0000000..1d9d4ad --- /dev/null +++ b/common/src/main/generated/resources/data/generations_structures/tags/worldgen/biome/has_structure/lugia_shrine.json @@ -0,0 +1,6 @@ +{ + "values": [ + "#minecraft:is_mountain", + "#minecraft:is_forest" + ] +} \ No newline at end of file diff --git a/common/src/main/generated/resources/data/generations_structures/tags/worldgen/structure/shrines.json b/common/src/main/generated/resources/data/generations_structures/tags/worldgen/structure/shrines.json index 394f5e3..c6c1cf5 100644 --- a/common/src/main/generated/resources/data/generations_structures/tags/worldgen/structure/shrines.json +++ b/common/src/main/generated/resources/data/generations_structures/tags/worldgen/structure/shrines.json @@ -11,6 +11,10 @@ { "id": "generations_structures:shrines/static_shrine", "required": false + }, + { + "id": "generations_structures:shrines/lugia_shrine", + "required": false } ] } \ No newline at end of file diff --git a/common/src/main/generated/resources/data/generations_structures/worldgen/structure/shrines/lugia_shrine.json b/common/src/main/generated/resources/data/generations_structures/worldgen/structure/shrines/lugia_shrine.json new file mode 100644 index 0000000..408986c --- /dev/null +++ b/common/src/main/generated/resources/data/generations_structures/worldgen/structure/shrines/lugia_shrine.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:jigsaw", + "biomes": "#generations_structures:has_structure/lugia_shrine", + "max_distance_from_center": 40, + "project_start_to_heightmap": "WORLD_SURFACE_WG", + "size": 1, + "spawn_overrides": {}, + "start_height": { + "absolute": 1 + }, + "start_pool": "generations_structures:shrines/lugia_shrine", + "step": "surface_structures", + "terrain_adaptation": "beard_thin", + "use_expansion_hack": false +} \ No newline at end of file diff --git a/common/src/main/generated/resources/data/generations_structures/worldgen/structure_set/lugia_shrine.json b/common/src/main/generated/resources/data/generations_structures/worldgen/structure_set/lugia_shrine.json new file mode 100644 index 0000000..4c183ba --- /dev/null +++ b/common/src/main/generated/resources/data/generations_structures/worldgen/structure_set/lugia_shrine.json @@ -0,0 +1,14 @@ +{ + "placement": { + "type": "minecraft:random_spread", + "salt": 751341351, + "separation": 500, + "spacing": 4096 + }, + "structures": [ + { + "structure": "generations_structures:shrines/lugia_shrine", + "weight": 1 + } + ] +} \ No newline at end of file diff --git a/common/src/main/generated/resources/data/generations_structures/worldgen/template_pool/shrines/lugia_shrine.json b/common/src/main/generated/resources/data/generations_structures/worldgen/template_pool/shrines/lugia_shrine.json new file mode 100644 index 0000000..f1a5751 --- /dev/null +++ b/common/src/main/generated/resources/data/generations_structures/worldgen/template_pool/shrines/lugia_shrine.json @@ -0,0 +1,14 @@ +{ + "elements": [ + { + "element": { + "element_type": "minecraft:single_pool_element", + "location": "generations_structures:shrines/lugia_shrine", + "processors": "minecraft:empty", + "projection": "rigid" + }, + "weight": 1 + } + ], + "fallback": "minecraft:empty" +} \ No newline at end of file diff --git a/common/src/main/java/generations/gg/generations/structures/generationsstructures/structures/GenerationsStructureSettings.java b/common/src/main/java/generations/gg/generations/structures/generationsstructures/structures/GenerationsStructureSettings.java index d3893cb..b1f8003 100644 --- a/common/src/main/java/generations/gg/generations/structures/generationsstructures/structures/GenerationsStructureSettings.java +++ b/common/src/main/java/generations/gg/generations/structures/generationsstructures/structures/GenerationsStructureSettings.java @@ -130,6 +130,22 @@ public static void bootstrap(BootstapContext context) { 40 )); + registerStructure(context, GenerationsStructuresKeys.LUGIA_SHRINE, createJigsaw( + new Structure.StructureSettings( + biomeHolderGetter.getOrThrow(GenerationsBiomeTags.HAS_LUGIA_SHRINE), + Map.of(), + GenerationStep.Decoration.SURFACE_STRUCTURES, + TerrainAdjustment.BEARD_THIN + ), + poolHolderGetter.getOrThrow(GenerationsTemplatePools.LUGIA_SHRINE), + Optional.empty(), + 1, + ConstantHeight.of(VerticalAnchor.absolute(1)), + false, + Optional.of(Heightmap.Types.WORLD_SURFACE_WG), + 40 + )); + registerStructure(context, GenerationsStructuresKeys.ISLANDS, createJigsaw( new Structure.StructureSettings( biomeHolderGetter.getOrThrow(GenerationsBiomeTags.HAS_ISLANDS), diff --git a/common/src/main/java/generations/gg/generations/structures/generationsstructures/structures/GenerationsStructuresKeys.java b/common/src/main/java/generations/gg/generations/structures/generationsstructures/structures/GenerationsStructuresKeys.java index 90188f3..a4a7a6b 100644 --- a/common/src/main/java/generations/gg/generations/structures/generationsstructures/structures/GenerationsStructuresKeys.java +++ b/common/src/main/java/generations/gg/generations/structures/generationsstructures/structures/GenerationsStructuresKeys.java @@ -41,6 +41,7 @@ public interface GenerationsStructuresKeys { ResourceKey FROZEN_SHRINE = createKey("shrines/frozen_shrine"); ResourceKey FIERY_SHRINE = createKey("shrines/fiery_shrine"); ResourceKey STATIC_SHRINE = createKey("shrines/static_shrine"); + ResourceKey LUGIA_SHRINE = createKey("shrines/lugia_shrine"); /** * Holds the ResourceKeys for the village roads. diff --git a/common/src/main/java/generations/gg/generations/structures/generationsstructures/tags/GenerationsBiomeTags.java b/common/src/main/java/generations/gg/generations/structures/generationsstructures/tags/GenerationsBiomeTags.java index 3588618..41a5944 100644 --- a/common/src/main/java/generations/gg/generations/structures/generationsstructures/tags/GenerationsBiomeTags.java +++ b/common/src/main/java/generations/gg/generations/structures/generationsstructures/tags/GenerationsBiomeTags.java @@ -36,6 +36,9 @@ public class GenerationsBiomeTags { /** the tag for biomes that can have a static shrine */ public static final TagKey HAS_STATIC_SHRINE = create("has_structure/static_shrine"); + /** the tag for biomes that can have a Lugia shrine */ + public static final TagKey HAS_LUGIA_SHRINE = create("has_structure/lugia_shrine"); + /** * Creates a new {@link TagKey} for the given name. * @param name The name of the tag. diff --git a/common/src/main/java/generations/gg/generations/structures/generationsstructures/worldgen/structure_set/GenerationsStructureSets.java b/common/src/main/java/generations/gg/generations/structures/generationsstructures/worldgen/structure_set/GenerationsStructureSets.java index d8c131c..1592c05 100644 --- a/common/src/main/java/generations/gg/generations/structures/generationsstructures/worldgen/structure_set/GenerationsStructureSets.java +++ b/common/src/main/java/generations/gg/generations/structures/generationsstructures/worldgen/structure_set/GenerationsStructureSets.java @@ -27,6 +27,7 @@ public class GenerationsStructureSets { public static ResourceKey FROZEN_SHRINE = create("frozen_shrine"); public static ResourceKey FIERY_SHRINE = create("fiery_shrine"); public static ResourceKey STATIC_SHRINE = create("static_shrine"); + public static ResourceKey LUGIA_SHRINE = create("lugia_shrine"); public static ResourceKey ISLANDS = create("islands"); /** @@ -66,6 +67,9 @@ public static void bootstrap(BootstapContext context) { register(context, STATIC_SHRINE, GenerationsStructuresKeys.STATIC_SHRINE, new RandomSpreadStructurePlacement(4096, 500, RandomSpreadType.LINEAR, 442038945)); + + register(context, LUGIA_SHRINE, GenerationsStructuresKeys.LUGIA_SHRINE, + new RandomSpreadStructurePlacement(4096, 500, RandomSpreadType.LINEAR, 751341351)); } /** diff --git a/common/src/main/java/generations/gg/generations/structures/generationsstructures/worldgen/template_pool/GenerationsTemplatePools.java b/common/src/main/java/generations/gg/generations/structures/generationsstructures/worldgen/template_pool/GenerationsTemplatePools.java index 884c4b4..335bcc7 100644 --- a/common/src/main/java/generations/gg/generations/structures/generationsstructures/worldgen/template_pool/GenerationsTemplatePools.java +++ b/common/src/main/java/generations/gg/generations/structures/generationsstructures/worldgen/template_pool/GenerationsTemplatePools.java @@ -36,6 +36,7 @@ public class GenerationsTemplatePools { public static final ResourceKey FROZEN_SHRINE = create("shrines/frozen_shrine"); public static final ResourceKey FIERY_SHRINE = create("shrines/fiery_shrine"); public static final ResourceKey STATIC_SHRINE = create("shrines/static_shrine"); + public static final ResourceKey LUGIA_SHRINE = create("shrines/lugia_shrine"); public static void bootstrap(BootstapContext context) { @@ -97,6 +98,10 @@ public static void bootstrap(BootstapContext context) { register(context, STATIC_SHRINE, Pools.EMPTY, ImmutableList.of( Pair.of(StructurePoolElement.single(GenerationsStructuresKeys.STATIC_SHRINE.location().toString(), getProcessor(context, GenerationsProcessorLists.STATIC_SHRINE_PROCESSOR_LIST)), 1) ), StructureTemplatePool.Projection.RIGID); + + register(context, LUGIA_SHRINE, Pools.EMPTY, ImmutableList.of( + Pair.of(StructurePoolElement.single(GenerationsStructuresKeys.LUGIA_SHRINE.location().toString(), getProcessor(context, ProcessorLists.EMPTY)), 1) + ), StructureTemplatePool.Projection.RIGID); } private static ResourceKey create(String name) { diff --git a/common/src/main/resources/data/generations_structures/structures/shrines/lugia_shrine.nbt b/common/src/main/resources/data/generations_structures/structures/shrines/lugia_shrine.nbt new file mode 100644 index 0000000..46acb89 Binary files /dev/null and b/common/src/main/resources/data/generations_structures/structures/shrines/lugia_shrine.nbt differ diff --git a/forge/src/main/java/generations/gg/generations/structures/generationsstructures/forge/datagen/ForgeDatagen.java b/forge/src/main/java/generations/gg/generations/structures/generationsstructures/forge/datagen/ForgeDatagen.java index 18318fa..9f1a918 100644 --- a/forge/src/main/java/generations/gg/generations/structures/generationsstructures/forge/datagen/ForgeDatagen.java +++ b/forge/src/main/java/generations/gg/generations/structures/generationsstructures/forge/datagen/ForgeDatagen.java @@ -100,6 +100,10 @@ protected void addTags(HolderLookup.@NotNull Provider provider) { tag(GenerationsBiomeTags.HAS_STATIC_SHRINE) .addTag(BiomeTags.IS_SAVANNA); + + tag(GenerationsBiomeTags.HAS_LUGIA_SHRINE) + .addTag(BiomeTags.IS_MOUNTAIN) + .addTag(BiomeTags.IS_FOREST); } } @@ -128,7 +132,8 @@ protected void addTags(HolderLookup.@NotNull Provider provider) { tag(GenerationsStructureTags.SHRINES) .addOptional(GenerationsStructuresKeys.FROZEN_SHRINE.location()) .addOptional(GenerationsStructuresKeys.FIERY_SHRINE.location()) - .addOptional(GenerationsStructuresKeys.STATIC_SHRINE.location()); + .addOptional(GenerationsStructuresKeys.STATIC_SHRINE.location()) + .addOptional(GenerationsStructuresKeys.LUGIA_SHRINE.location()); } }