Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skaia cathedral #641

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

## [Unreleased]

### Added
- Skaian Cathedral Structure

### Contributors

- ThalliumSulfate, ambiguousChronology(ShadowLink)

## [1.20.1-1.12.1.0] - 2024-09-08

### Added
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"values" : [
"minestuck:skaia"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"type": "minecraft:jigsaw",
"biomes": "minestuck:skaia",
"step": "surface_structures",
"spawn_overrides": {},
"terrain_adaptation": "none",
"start_pool": "minestuck:skaiancathedral/front",
"size": 7,
"start_height": {
"absolute": -6
},
"project_start_to_heightmap": "WORLD_SURFACE_WG",
"max_distance_from_center": 80,
"use_expansion_hack": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"structures": [
{
"structure": "minestuck:skaiancathedral",
"weight": 1
}
],
"placement": {
"type": "minecraft:random_spread",
"salt": 1481098009,
"frequency": 0.5,
"spacing": 20,
"separation": 10
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,21 @@
import net.minecraft.core.HolderGetter;
import net.minecraft.core.registries.Registries;
import net.minecraft.data.worldgen.BootstapContext;
import net.minecraft.data.worldgen.Structures;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.biome.Biome;
import net.minecraft.world.level.levelgen.GenerationStep;
import net.minecraft.world.level.levelgen.Heightmap;
import net.minecraft.world.level.levelgen.VerticalAnchor;
import net.minecraft.world.level.levelgen.heightproviders.ConstantHeight;
import net.minecraft.world.level.levelgen.structure.Structure;
import net.minecraft.world.level.levelgen.structure.StructureSet;
import net.minecraft.world.level.levelgen.structure.TerrainAdjustment;
import net.minecraft.world.level.levelgen.structure.placement.RandomSpreadStructurePlacement;
import net.minecraft.world.level.levelgen.structure.placement.RandomSpreadType;
import net.minecraft.world.level.levelgen.structure.pools.StructureTemplatePool;
import net.minecraft.world.level.levelgen.structure.structures.JigsawStructure;

import java.util.Map;

Expand All @@ -29,6 +35,7 @@ public final class MSStructureProvider
public static void registerStructures(BootstapContext<Structure> context)
{
HolderGetter<Biome> biomes = context.lookup(Registries.BIOME);
HolderGetter<StructureTemplatePool> pools = context.lookup(Registries.TEMPLATE_POOL);

// Overworld
context.register(FROG_TEMPLE, new FrogTempleStructure(new Structure.StructureSettings(biomes.getOrThrow(MSTags.Biomes.HAS_FROG_TEMPLE),
Expand All @@ -52,6 +59,11 @@ public static void registerStructures(BootstapContext<Structure> context)
// Skaia
context.register(SkaiaCastle.KEY, new CastleStructure(new Structure.StructureSettings(biomes.getOrThrow(MSTags.Biomes.HAS_SKAIA_CASTLE),
Map.of(), GenerationStep.Decoration.SURFACE_STRUCTURES, TerrainAdjustment.NONE)));

context.register(SKAIAN_CATHEDRAL, new JigsawStructure(Structures.structure(biomes.getOrThrow(MSTags.Biomes.SKAIA),
Map.of(), GenerationStep.Decoration.SURFACE_STRUCTURES, TerrainAdjustment.NONE), pools.getOrThrow(ResourceKey.create(Registries.TEMPLATE_POOL,
Minestuck.id("skaiancathedral/front"))), 7, ConstantHeight.of(VerticalAnchor.absolute(-6)),
false, Heightmap.Types.WORLD_SURFACE_WG));
}

public static void registerStructureSets(BootstapContext<StructureSet> context)
Expand All @@ -69,6 +81,9 @@ public static void registerStructureSets(BootstapContext<StructureSet> context)
// Skaia
context.register(key("skaia_castle"), new StructureSet(structures.getOrThrow(SkaiaCastle.KEY),
new RandomSpreadStructurePlacement(50, 40, RandomSpreadType.LINEAR, 6729346)));

context.register(key("skaiancathedral"), new StructureSet(structures.getOrThrow(SKAIAN_CATHEDRAL),
new RandomSpreadStructurePlacement(20, 10, RandomSpreadType.LINEAR, 1481098009)));
}

private static ResourceKey<StructureSet> key(String path)
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/mraof/minestuck/util/MSTags.java
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ public static class Biomes

// Skaia
public static final TagKey<Biome> HAS_SKAIA_CASTLE = tag("has_structure/skaia_castle");
public static final TagKey<Biome> SKAIA = tag("skaia");

private static TagKey<Biome> tag(String name)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ private static void init()
PIECE_REGISTER.register("pink_tower", () -> template(PinkTowerPiece::new));

// Skaia
public static final ResourceKey<Structure> SKAIAN_CATHEDRAL = key("skaiancathedral");

public static final class SkaiaCastle
{
public static final Supplier<StructureType<CastleStructure>> TYPE =
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"fallback": "minecraft:empty",
"elements": [
{
"weight": 1,
"element": {
"element_type": "minecraft:single_pool_element",
"projection": "rigid",
"location": "minestuck:skaiancathedral/cathedral_back",
"processors": "minecraft:empty"
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"fallback": "minecraft:empty",
"elements": [
{
"weight": 1,
"element": {
"element_type": "minecraft:single_pool_element",
"projection": "rigid",
"location": "minestuck:skaiancathedral/cathedral_entrance",
"processors": "minecraft:empty"
}
}
]
}