Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"values": [
"minestuck:prospit"
]
}
Original file line number Diff line number Diff line change
@@ -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
}
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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.*;

Expand All @@ -40,6 +44,9 @@ public static void registerStructures(BootstrapContext<Structure> 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)));
Expand Down Expand Up @@ -85,6 +92,25 @@ public static void registerStructureSets(BootstrapContext<StructureSet> context)
new RandomSpreadStructurePlacement(40, 10, RandomSpreadType.LINEAR, 1481098009)));
}

private static JigsawStructure jigsaw(HolderGetter<Biome> biomes, HolderGetter<StructureTemplatePool> templatePools, TagKey<Biome> biome, ResourceKey<StructureTemplatePool> startPool, Optional<Heightmap.Types> 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<StructureSet> key(String path)
{
return ResourceKey.create(Registries.STRUCTURE_SET, ResourceLocation.fromNamespaceAndPath(Minestuck.MOD_ID, path));
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/com/mraof/minestuck/util/MSTags.java
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,9 @@ public static class Biomes
// Overworld
public static final TagKey<Biome> HAS_FROG_TEMPLE = tag("has_structure/frog_temple");

//Prospit
public static final TagKey<Biome> HAS_PROSPIT_DREAM_TOWER = tag("has_structure/prospit_dream_tower");

// Land
public static final TagKey<Biome> LAND_NORMAL = tag("land/normal");
public static final TagKey<Biome> LAND_OCEAN = tag("land/ocean");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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<Structure> PROSPIT_DREAM_TOWER = key("prospit_dream_tower");
public static final ResourceKey<StructureTemplatePool> PROSPIT_DREAM_TOWER_START_POOL = templateKey("prospit/dream_tower/base");

// Land
public static final Supplier<StructurePlacementType<LandGatePlacement>> LAND_GATE_PLACEMENT =
PLACEMENT_REGISTER.register("land_gate", () -> () -> LandGatePlacement.CODEC);
Expand Down Expand Up @@ -187,7 +192,12 @@ public static <S extends Structure> StructureType<S> asType(MapCodec<S> codec)

private static ResourceKey<Structure> 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<StructureTemplatePool> templateKey(String name)
{
return ResourceKey.create(Registries.TEMPLATE_POOL, Minestuck.id(name));
}

private static StructurePieceType contextless(StructurePieceType.ContextlessType type)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
Expand All @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -84,7 +84,7 @@
"vein_toggle": 0
},
"ore_veins_enabled": false,
"sea_level": 0,
"sea_level": -64,
"spawn_target": [],
"surface_rule": {
"type": "minecraft:sequence",
Expand Down
Original file line number Diff line number Diff line change
@@ -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"
}
}
]
}
Original file line number Diff line number Diff line change
@@ -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"
}
}
]
}
Original file line number Diff line number Diff line change
@@ -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"
}
}
]
}
Loading