Creating Generators
Generators
Generators are the most powerful part of the configuration system for BetterStructures. By default there are 31 generators which collectively manage over 200 builds currently distributed by BetterStructures, and while you can create your own generators, you can also use existing ones as a shortcut.
Generators tell the plugin where exactly things should spawn and define loot tables. The default generators are also named in ways that should be very easy to guess what they do.
Generator Configuration Options
| Key | Default | Mandatory | Description |
|---|---|---|---|
isEnabled | true | ❌ | Whether the generator is enabled |
structureType | - | ✅ | Where structures spawn (see table below) |
lowestYLevel | -59 | ❌ | Minimum Y level for spawning |
highestYLevel | 320 | ❌ | Maximum Y level for spawning |
validWorlds | All allowed | ❌ | List of worlds where structures can spawn |
validWorldEnvironments | All allowed | ❌ | NORMAL, NETHER, THE_END |
validBiomesV2 | All biomes | ❌ | List of valid biomes (namespace:key format) |
treasureFilename | - | ❌ | Treasure file for chest loot |
structureType
Sets what kind of structure the build is. You can specify multiple structure types for a single generator!
| Type | Overworld | Nether | End | Description |
|---|---|---|---|---|
SURFACE | Surface | Surface-like points | Surface | Spawns at the surface of the world |
SKY | Y 80-120 | Air-like points | Y 80-120 | Spawns in the sky (configurable in config.yml) |
UNDERGROUND_SHALLOW | Y 0-60 | Y 60-120 | Valid heights | Shallow underground structures |
UNDERGROUND_DEEP | Y -64 to 0 | Y 0-60 | ❌ Does not spawn | Deep underground structures |
LIQUID_SURFACE | Water (oceans) | Lava lakes | ❌ Does not spawn | Spawns on liquid surfaces |
DUNGEON | ✅ | ✅ | ✅ | Used for modular dungeon placement |
Multiple Structure Types Example
structureType:
- SURFACE
- UNDERGROUND_SHALLOW
This allows the same generator to spawn structures in multiple locations, such as both on the surface and in shallow underground areas.
Note: There are two underground settings because Minecraft has a lot of underground space. Having both ensures even distribution across depths and prevents players from missing structures.
Y-Level Ranges by Dimension
Default altitude ranges per dimension (configurable in config.yml):
| Dimension | Default Range | Config Settings |
|---|---|---|
| Overworld/Custom | Y=-60 to Y=320 | lowestYNormalCustom / highestYNormalCustom |
| Nether | Y=4 to Y=120 | lowestYNether / highestYNether |
| End | Y=0 to Y=320 | lowestYEnd / highestYEnd |
| Sky (Overworld) | Y=80 to Y=120 | normalCustomAirBuildingMinAltitude / Max... |
| Sky (End) | Y=80 to Y=120 | endAirBuildMinAltitude / Max... |
These defaults can be overridden per-generator using lowestYLevel and highestYLevel.
Custom Biome Support
BetterStructures automatically supports custom biomes from world generators like Terralith, Iris, Terra, and TerraformGenerator.
When you specify a vanilla biome in validBiomesV2, the plugin automatically includes compatible custom biomes:
validBiomesV2:
- minecraft:plains
- minecraft:forest
This spawns structures in the vanilla biomes AND all custom biomes mapped to these types (e.g., terralith:blooming_plains).
treasureFilename
Sets the treasure file for chest loot. This applies to all builds using this generator, unless overridden in the schematic configuration.