Skip to main content

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

KeyDefaultMandatoryDescription
isEnabledtrueWhether the generator is enabled
structureType-Where structures spawn (see table below)
lowestYLevel-59Minimum Y level for spawning
highestYLevel320Maximum Y level for spawning
validWorldsAll allowedList of worlds where structures can spawn
validWorldEnvironmentsAll allowedNORMAL, NETHER, THE_END
validBiomesV2All biomesList 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!

TypeOverworldNetherEndDescription
SURFACESurfaceSurface-like pointsSurfaceSpawns at the surface of the world
SKYY 80-120Air-like pointsY 80-120Spawns in the sky (configurable in config.yml)
UNDERGROUND_SHALLOWY 0-60Y 60-120Valid heightsShallow underground structures
UNDERGROUND_DEEPY -64 to 0Y 0-60❌ Does not spawnDeep underground structures
LIQUID_SURFACEWater (oceans)Lava lakes❌ Does not spawnSpawns on liquid surfaces
DUNGEONUsed 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):

DimensionDefault RangeConfig Settings
Overworld/CustomY=-60 to Y=320lowestYNormalCustom / highestYNormalCustom
NetherY=4 to Y=120lowestYNether / highestYNether
EndY=0 to Y=320lowestYEnd / highestYEnd
Sky (Overworld)Y=80 to Y=120normalCustomAirBuildingMinAltitude / Max...
Sky (End)Y=80 to Y=120endAirBuildMinAltitude / 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.