diff --git a/CHANGELOG.md b/CHANGELOG.md index 92b83e6008..80a67ebbc9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ### Added - Translated key for item tags used in JEI +- Added currently unplaced prospit tower structure ### Fixed @@ -19,7 +20,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ### Contributors for this release -- medsal15 +- medsal15, ScarabOasis, Dweblenod ## [1.21.1-1.13.1.0] - 2025-07-26 diff --git a/src/main/generated/resources/data/minestuck/tags/worldgen/biome/has_structure/prospit_dream_tower.json b/src/main/generated/resources/data/minestuck/tags/worldgen/biome/has_structure/prospit_dream_tower.json new file mode 100644 index 0000000000..a0f2238e28 --- /dev/null +++ b/src/main/generated/resources/data/minestuck/tags/worldgen/biome/has_structure/prospit_dream_tower.json @@ -0,0 +1,5 @@ +{ + "values": [ + "minestuck:prospit" + ] +} \ No newline at end of file diff --git a/src/main/generated/resources/data/minestuck/worldgen/structure/prospit_dream_tower.json b/src/main/generated/resources/data/minestuck/worldgen/structure/prospit_dream_tower.json new file mode 100644 index 0000000000..c4e9a17a40 --- /dev/null +++ b/src/main/generated/resources/data/minestuck/worldgen/structure/prospit_dream_tower.json @@ -0,0 +1,14 @@ +{ + "type": "minecraft:jigsaw", + "biomes": "#minestuck:has_structure/prospit_dream_tower", + "liquid_settings": "ignore_waterlogging", + "max_distance_from_center": 128, + "size": 20, + "spawn_overrides": {}, + "start_height": { + "absolute": 0 + }, + "start_pool": "minestuck:prospit/dream_tower/base", + "step": "surface_structures", + "use_expansion_hack": false +} \ No newline at end of file diff --git a/src/main/java/com/mraof/minestuck/data/tag/MinestuckBiomeTagsProvider.java b/src/main/java/com/mraof/minestuck/data/tag/MinestuckBiomeTagsProvider.java index d2f13b70ae..9d5c5860a8 100644 --- a/src/main/java/com/mraof/minestuck/data/tag/MinestuckBiomeTagsProvider.java +++ b/src/main/java/com/mraof/minestuck/data/tag/MinestuckBiomeTagsProvider.java @@ -28,6 +28,8 @@ protected void addTags(HolderLookup.Provider provider) { this.tag(HAS_FROG_TEMPLE).addTag(BiomeTags.IS_OVERWORLD); + this.tag(HAS_PROSPIT_DREAM_TOWER).add(MSBiomes.PROSPIT); + this.tag(LAND_NORMAL).add(MSBiomes.DEFAULT_LAND.NORMAL, MSBiomes.NO_RAIN_LAND.NORMAL, MSBiomes.SNOW_LAND.NORMAL, MSBiomes.HIGH_HUMID_LAND.NORMAL); this.tag(LAND_OCEAN).add(MSBiomes.DEFAULT_LAND.OCEAN, MSBiomes.NO_RAIN_LAND.OCEAN, MSBiomes.SNOW_LAND.OCEAN, MSBiomes.HIGH_HUMID_LAND.OCEAN); this.tag(LAND_ROUGH).add(MSBiomes.DEFAULT_LAND.ROUGH, MSBiomes.NO_RAIN_LAND.ROUGH, MSBiomes.SNOW_LAND.ROUGH, MSBiomes.HIGH_HUMID_LAND.ROUGH); diff --git a/src/main/java/com/mraof/minestuck/data/worldgen/MSStructureProvider.java b/src/main/java/com/mraof/minestuck/data/worldgen/MSStructureProvider.java index bab281759e..73c9f3d3a7 100644 --- a/src/main/java/com/mraof/minestuck/data/worldgen/MSStructureProvider.java +++ b/src/main/java/com/mraof/minestuck/data/worldgen/MSStructureProvider.java @@ -12,6 +12,7 @@ import net.minecraft.data.worldgen.BootstrapContext; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; +import net.minecraft.tags.TagKey; import net.minecraft.world.level.biome.Biome; import net.minecraft.world.level.levelgen.GenerationStep; import net.minecraft.world.level.levelgen.Heightmap; @@ -24,8 +25,11 @@ 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 net.minecraft.world.level.levelgen.structure.templatesystem.LiquidSettings; +import java.util.List; import java.util.Map; +import java.util.Optional; import static com.mraof.minestuck.world.gen.structure.MSStructures.*; @@ -40,6 +44,9 @@ public static void registerStructures(BootstrapContext context) context.register(FROG_TEMPLE, new FrogTempleStructure(new Structure.StructureSettings(biomes.getOrThrow(MSTags.Biomes.HAS_FROG_TEMPLE), Map.of(), GenerationStep.Decoration.SURFACE_STRUCTURES, TerrainAdjustment.NONE))); + //Prospit + context.register(PROSPIT_DREAM_TOWER, jigsaw(biomes, pools, MSTags.Biomes.HAS_PROSPIT_DREAM_TOWER, PROSPIT_DREAM_TOWER_START_POOL, Optional.empty())); + // Land context.register(LAND_GATE, new GateStructure(new Structure.StructureSettings(biomes.getOrThrow(MSTags.Biomes.HAS_LAND_GATE), Map.of(), GenerationStep.Decoration.SURFACE_STRUCTURES, TerrainAdjustment.NONE))); @@ -85,6 +92,25 @@ public static void registerStructureSets(BootstrapContext context) new RandomSpreadStructurePlacement(40, 10, RandomSpreadType.LINEAR, 1481098009))); } + private static JigsawStructure jigsaw(HolderGetter biomes, HolderGetter templatePools, TagKey biome, ResourceKey startPool, Optional heightmap) + { + return new JigsawStructure( + new Structure.StructureSettings.Builder(biomes.getOrThrow(biome)) + .generationStep(GenerationStep.Decoration.SURFACE_STRUCTURES) + .build(), + templatePools.getOrThrow(startPool), + Optional.empty(), + 20, + ConstantHeight.of(VerticalAnchor.absolute(0)), + false, + heightmap, + 128, + List.of(), + JigsawStructure.DEFAULT_DIMENSION_PADDING, + LiquidSettings.IGNORE_WATERLOGGING + ); + } + private static ResourceKey key(String path) { return ResourceKey.create(Registries.STRUCTURE_SET, ResourceLocation.fromNamespaceAndPath(Minestuck.MOD_ID, path)); diff --git a/src/main/java/com/mraof/minestuck/util/MSTags.java b/src/main/java/com/mraof/minestuck/util/MSTags.java index 8c7b5fdbed..8d90695ff8 100644 --- a/src/main/java/com/mraof/minestuck/util/MSTags.java +++ b/src/main/java/com/mraof/minestuck/util/MSTags.java @@ -217,6 +217,9 @@ public static class Biomes // Overworld public static final TagKey HAS_FROG_TEMPLE = tag("has_structure/frog_temple"); + //Prospit + public static final TagKey HAS_PROSPIT_DREAM_TOWER = tag("has_structure/prospit_dream_tower"); + // Land public static final TagKey LAND_NORMAL = tag("land/normal"); public static final TagKey LAND_OCEAN = tag("land/ocean"); diff --git a/src/main/java/com/mraof/minestuck/world/gen/structure/MSStructures.java b/src/main/java/com/mraof/minestuck/world/gen/structure/MSStructures.java index cf4ced054c..2a2c737749 100644 --- a/src/main/java/com/mraof/minestuck/world/gen/structure/MSStructures.java +++ b/src/main/java/com/mraof/minestuck/world/gen/structure/MSStructures.java @@ -16,6 +16,7 @@ import net.minecraft.world.level.levelgen.structure.StructureType; import net.minecraft.world.level.levelgen.structure.pieces.StructurePieceType; import net.minecraft.world.level.levelgen.structure.placement.StructurePlacementType; +import net.minecraft.world.level.levelgen.structure.pools.StructureTemplatePool; import net.neoforged.neoforge.registries.DeferredRegister; import java.util.function.Supplier; @@ -39,6 +40,10 @@ public final class MSStructures FROG_TEMPLE_PIECE = PIECE_REGISTER.register("frog_temple", () -> contextless(FrogTemplePiece::new)), FROG_TEMPLE_PILLAR_PIECE = PIECE_REGISTER.register("frog_temple/pillar", () -> contextless(FrogTemplePillarPiece::new)); + //Prospit + public static final ResourceKey PROSPIT_DREAM_TOWER = key("prospit_dream_tower"); + public static final ResourceKey PROSPIT_DREAM_TOWER_START_POOL = templateKey("prospit/dream_tower/base"); + // Land public static final Supplier> LAND_GATE_PLACEMENT = PLACEMENT_REGISTER.register("land_gate", () -> () -> LandGatePlacement.CODEC); @@ -187,7 +192,12 @@ public static StructureType asType(MapCodec codec) private static ResourceKey key(String name) { - return ResourceKey.create(Registries.STRUCTURE, ResourceLocation.fromNamespaceAndPath(Minestuck.MOD_ID, name)); + return ResourceKey.create(Registries.STRUCTURE, Minestuck.id(name)); + } + + private static ResourceKey templateKey(String name) + { + return ResourceKey.create(Registries.TEMPLATE_POOL, Minestuck.id(name)); } private static StructurePieceType contextless(StructurePieceType.ContextlessType type) diff --git a/src/main/java/com/mraof/minestuck/world/gen/structure/wfc/ProspitWFCDemoStructure.java b/src/main/java/com/mraof/minestuck/world/gen/structure/wfc/ProspitWFCDemoStructure.java index c79febd868..96b2ebf7ab 100644 --- a/src/main/java/com/mraof/minestuck/world/gen/structure/wfc/ProspitWFCDemoStructure.java +++ b/src/main/java/com/mraof/minestuck/world/gen/structure/wfc/ProspitWFCDemoStructure.java @@ -32,7 +32,7 @@ public final class ProspitWFCDemoStructure public static final int WIDTH_IN_PIECES = 16, HEIGHT_IN_PIECES = 14; public static final WFCUtil.Dimensions WFC_DIMENSIONS = new WFCUtil.Dimensions(WIDTH_IN_PIECES, HEIGHT_IN_PIECES, WIDTH_IN_PIECES); public static final int WIDTH_IN_CHUNKS = (CELL_SIZE.width() * WIDTH_IN_PIECES) / 16; - public static final int BOTTOM_Y = 1; + public static final int BOTTOM_Y = 0; public static void init() { diff --git a/src/main/resources/data/minestuck/structure/prospit/dream_tower/base.nbt b/src/main/resources/data/minestuck/structure/prospit/dream_tower/base.nbt new file mode 100644 index 0000000000..8b64a818ff Binary files /dev/null and b/src/main/resources/data/minestuck/structure/prospit/dream_tower/base.nbt differ diff --git a/src/main/resources/data/minestuck/structure/prospit/dream_tower/middle.nbt b/src/main/resources/data/minestuck/structure/prospit/dream_tower/middle.nbt new file mode 100644 index 0000000000..714880c291 Binary files /dev/null and b/src/main/resources/data/minestuck/structure/prospit/dream_tower/middle.nbt differ diff --git a/src/main/resources/data/minestuck/structure/prospit/dream_tower/upper.nbt b/src/main/resources/data/minestuck/structure/prospit/dream_tower/upper.nbt new file mode 100644 index 0000000000..d24ed6f3a9 Binary files /dev/null and b/src/main/resources/data/minestuck/structure/prospit/dream_tower/upper.nbt differ diff --git a/src/main/resources/data/minestuck/worldgen/noise_settings/prospit.json b/src/main/resources/data/minestuck/worldgen/noise_settings/prospit.json index 99146cb7ff..569f549009 100644 --- a/src/main/resources/data/minestuck/worldgen/noise_settings/prospit.json +++ b/src/main/resources/data/minestuck/worldgen/noise_settings/prospit.json @@ -12,8 +12,8 @@ "disable_mob_generation": true, "legacy_random_source": true, "noise": { - "height": 96, - "min_y": 0, + "height": 64, + "min_y": -64, "size_horizontal": 1, "size_vertical": 2 }, @@ -39,9 +39,9 @@ "argument1": { "type": "minecraft:y_clamped_gradient", "from_value": 0, - "from_y": -8, + "from_y": -48, "to_value": 1, - "to_y": 48 + "to_y": -16 }, "argument2": { "type": "minecraft:add", @@ -54,9 +54,9 @@ "argument1": { "type": "minecraft:y_clamped_gradient", "from_value": 1, - "from_y": 48, + "from_y": -16, "to_value": 0, - "to_y": 64 + "to_y": 0 }, "argument2": { "type": "minecraft:add", @@ -84,7 +84,7 @@ "vein_toggle": 0 }, "ore_veins_enabled": false, - "sea_level": 0, + "sea_level": -64, "spawn_target": [], "surface_rule": { "type": "minecraft:sequence", diff --git a/src/main/resources/data/minestuck/worldgen/template_pool/prospit/dream_tower/base.json b/src/main/resources/data/minestuck/worldgen/template_pool/prospit/dream_tower/base.json new file mode 100644 index 0000000000..8bcd40cb90 --- /dev/null +++ b/src/main/resources/data/minestuck/worldgen/template_pool/prospit/dream_tower/base.json @@ -0,0 +1,14 @@ +{ + "fallback": "minecraft:empty", + "elements": [ + { + "weight": 1, + "element": { + "location": "minestuck:prospit/dream_tower/base", + "processors": "minecraft:empty", + "projection": "rigid", + "element_type": "minecraft:single_pool_element" + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/minestuck/worldgen/template_pool/prospit/dream_tower/middle.json b/src/main/resources/data/minestuck/worldgen/template_pool/prospit/dream_tower/middle.json new file mode 100644 index 0000000000..e1e0400407 --- /dev/null +++ b/src/main/resources/data/minestuck/worldgen/template_pool/prospit/dream_tower/middle.json @@ -0,0 +1,14 @@ +{ + "fallback": "minecraft:empty", + "elements": [ + { + "weight": 1, + "element": { + "location": "minestuck:prospit/dream_tower/middle", + "processors": "minecraft:empty", + "projection": "rigid", + "element_type": "minecraft:single_pool_element" + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/minestuck/worldgen/template_pool/prospit/dream_tower/upper.json b/src/main/resources/data/minestuck/worldgen/template_pool/prospit/dream_tower/upper.json new file mode 100644 index 0000000000..9832b4d54e --- /dev/null +++ b/src/main/resources/data/minestuck/worldgen/template_pool/prospit/dream_tower/upper.json @@ -0,0 +1,14 @@ +{ + "fallback": "minecraft:empty", + "elements": [ + { + "weight": 1, + "element": { + "location": "minestuck:prospit/dream_tower/upper", + "processors": "minecraft:empty", + "projection": "rigid", + "element_type": "minecraft:single_pool_element" + } + } + ] +} \ No newline at end of file