Skip to content

Structure Generator

Jupiter Dev edited this page Jun 10, 2025 · 1 revision

Structures

This page explains how to use the Structure generator in mDirt to add custom structures to your Minecraft datapack.


Creating a New Structure

  1. In the Menu Bar, go to New Element β†’ Structure
  2. 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 islands
  • LAKES β€” Lava lakes
  • LOCAL_MODIFICATIONS β€” Amethyst geodes, icebergs
  • UNDERGROUND_STRUCTURES β€” Dungeons, overworld fossils
  • SURFACE_STRUCTURES β€” Desert wells, ice patches
  • STRONGHOLDS β€” Not used in vanilla
  • UNDERGROUND_ORES β€” Ore veins, gravel/dirt/clay disks
  • UNDERGROUND_DECORATION β€” Infested blocks, Nether ores
  • FLUID_SPRINGS β€” Lavafalls and waterfalls
  • VEGETAL_DECORATION β€” Trees, bamboo, kelp, etc.
  • TOP_LAYER_MODIFICATION β€” Surface freezing

Terrain Adaptation

Determines how the structure adapts to the terrain. Options:

  • none β€” No terrain adaptation
  • beard_thin β€” Used by Pillager outposts, villages
  • beard_box β€” Used by Ancient cities
  • bury β€” Used by Strongholds
  • encapsulate β€” 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
Clone this wiki locally