Structure Generator - Faith-and-Code-Technologies/mDirt GitHub Wiki
Structures
This page explains how to use the Structure generator in mDirt to add custom structures to your Minecraft datapack.
Creating a New Structure
- In the Menu Bar, go to New Element → Structure
- The main area will update with fields for configuring your structure.
Filling Out the Fields
Name
- The internal ID for your structure (e.g.,
ruby_vein
) - Must:
- Be all lowercase
- Contain no spaces
- Use underscores (
_
) between words
Structure
- Upload the
.nbt
file of your custom structure. - This should be exported from Minecraft using the
/structure save
command or structure block.
Step
Defines when in world generation your structure will spawn. Options:
RAW_GENERATION
— Small End islandsLAKES
— Lava lakesLOCAL_MODIFICATIONS
— Amethyst geodes, icebergsUNDERGROUND_STRUCTURES
— Dungeons, overworld fossilsSURFACE_STRUCTURES
— Desert wells, ice patchesSTRONGHOLDS
— Not used in vanillaUNDERGROUND_ORES
— Ore veins, gravel/dirt/clay disksUNDERGROUND_DECORATION
— Infested blocks, Nether oresFLUID_SPRINGS
— Lavafalls and waterfallsVEGETAL_DECORATION
— Trees, bamboo, kelp, etc.TOP_LAYER_MODIFICATION
— Surface freezing
Terrain Adaptation
Determines how the structure adapts to the terrain. Options:
none
— No terrain adaptationbeard_thin
— Used by Pillager outposts, villagesbeard_box
— Used by Ancient citiesbury
— Used by Strongholdsencapsulate
— Used by Trial Chambers
Start Height
- Sets the vertical placement of the structure using an offset.
- This offset is relative to the selected heightmap below.
Project Start to Heightmap
- Choose a heightmap to project the Start Height against.
- Examples:
WORLD_SURFACE
OCEAN_FLOOR
MOTION_BLOCKING
MOTION_BLOCKING_NO_LEAVES
Spacing
- The average distance between two attempts to generate the structure.
- Higher values = rarer structures.
Separation
- The minimum number of chunks between two structure spawn attempts.
- Must be strictly less than
Spacing
.
Biomes
- A list of biomes where this structure can generate.
- Shown as a set of checkboxes in the UI.
- You can check as many as you'd like — mDirt will only generate this structure in the selected biomes.
- Examples include:
Plains
Desert
Savanna