Custom structure types extend Minecraft’s structure generation system with additional functionality.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ProfessorFichte/More-RPG-Classes/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The More RPG Library provides the ConditionalJigsawStructure type, which extends the standard jigsaw structure with mod dependency checking. This allows structures to only generate when specific mods are loaded.ConditionalJigsawStructure
Registry ID:more_rpg_classes:conditional_jigsawSource:
net.more_rpg_classes.worldgen.structure.ConditionalJigsawStructure
Description
A jigsaw-based structure that only generates when a specified mod is loaded. This is particularly useful for add-on mods that want to add structures that depend on specific mod content.Configuration
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
type | String | Yes | - | Must be "more_rpg_classes:conditional_jigsaw" |
mod_id | String | Yes | - | Mod ID that must be loaded for structure to generate |
start_pool | String | Yes | - | Registry ID of the starting structure pool |
start_jigsaw_name | String | No | - | Name of the jigsaw block to start from |
size | Integer | Yes | - | Maximum depth of jigsaw generation (0-128) |
start_height | HeightProvider | Yes | - | Height provider for structure placement |
use_expansion_hack | Boolean | No | false | Whether to use the expansion hack for better terrain adaptation |
project_start_to_heightmap | String | No | - | Heightmap type to project start position to (e.g., "WORLD_SURFACE_WG") |
max_distance_from_center | Integer | Yes | - | Maximum distance pieces can generate from center (1-128) |
dimension_padding | Object | No | NONE | Padding to prevent structures from generating near dimension boundaries |
liquid_settings | String | No | "IGNORE_WATERLOGGING" | How to handle water ("IGNORE_WATERLOGGING" or "APPLY_WATERLOGGING") |
How It Works
- Mod Check: When the structure attempts to generate, it checks if the specified
mod_idis loaded using Fabric Loader - Early Exit: If the mod is not loaded, returns
Optional.empty(), preventing generation - Standard Generation: If the mod is loaded, proceeds with standard jigsaw structure generation
Height Providers
Thestart_height parameter accepts various height providers:
Absolute Height
Uniform Range
Biased to Bottom
Heightmap Types
Theproject_start_to_heightmap parameter accepts these values:
| Type | Description |
|---|---|
WORLD_SURFACE_WG | World surface during world generation |
WORLD_SURFACE | World surface including structures |
OCEAN_FLOOR_WG | Ocean floor during world generation |
OCEAN_FLOOR | Ocean floor including structures |
MOTION_BLOCKING | Blocks that block motion or contain fluids |
MOTION_BLOCKING_NO_LEAVES | Like MOTION_BLOCKING but ignores leaves |
Dimension Padding
Prevents structures from generating too close to dimension boundaries:Liquid Settings
Controls how water is handled:"IGNORE_WATERLOGGING"- Does not waterlog blocks (default)"APPLY_WATERLOGGING"- Waterlogs waterloggable blocks when placed in water
Use Cases
Add-on Mod Structures
The ConditionalJigsawStructure is specifically designed for add-on mods (like LNE Add-Ons) that want to add structures depending on whether the base mod is loaded:Datapack Compatibility
For datapacks that add content depending on other mods:Integration with Structure Processors
ConditionalJigsawStructure works seamlessly with the custom structure processors:path_processors.json contains:
Implementation Details
Mod Loading Check
The structure uses Fabric Loader’s API to check for mod presence:CODEC Definition
The structure uses Mojang’s Codec system for serialization:Registration
The structure type is registered inModStructureTypes:
Version History
- v2.5.17 - Fixed some issues with ConditionalJigsawStructure and PathAdaptationProcessor
- v2.5.16 - Added ConditionalJigsawStructure for LNE Add-On support
Related
- Structure Processors - Processors for adaptive terrain generation
- ModStructureTypes.java
- ConditionalJigsawStructure.java