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.

The only mandatory field for generators is the structureType setting, which tells the plugin if the building is meant to spawn in the sky, shallow underground, deep underground, surface or surface liquid.


isEnabled

Sets whether the generator is enabled.


structureType

Sets what kind of structure the build is. Note that you can make a list of several types!

You can specify multiple structure types for a single generator:

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.

The following are valid structure type values:


surface

structureType: 
- SURFACE

Surface structures spawn at the surface of the world. The only exception is the Nether environment, where it spawns at points the plugin deems to be sufficiently surface-like.


sky

structureType: 
- SKY

Sky structures spawn between 80 to 120 blocks above the air, configurable in config.yml. The only exception is the Nether environment, where it spawns at points the plugin deems to be sufficiently air-like.


underground_shallow

structureType: 
- UNDERGROUND_SHALLOW

Underground shallow structures spawn between y=0 and y=60 in the overworld, y=60 and y=120 in the nether and any valid underground height in the End.

**Note: ** You will notice there are two underground settings. This is because only having one results in having a very sparse underground, as Minecraft has a lot of underground space and players will often times miss underground structure simply because they didn't mine into them. This also guarantees that there is an even spread across different depths.


underground_deep

structureType: 
- UNDERGROUND_DEEP

Underground deep structures spawn between y=-64 and y=0 in the overworld, y=0 and y=60 in the nether and do not spawn in the End.


liquid_surface

structureType: 
- LIQUID_SURFACE

Liquid surface structures will spawn on liquids. In the case of the overworld, they will spawn on water, and almost always on oceans. In the case of the Nether, they will spawn in the lava lakes. They will not spawn in the End.


lowestYLevel

Sets the lowest Y level (altitude) the structure will spawn in. Default: -59.


highestYLevel

Sets the highest Y level (altitude) the structure will spawn in. Default: 320.

Default Y-Level Ranges by Dimension:

Structure spawning uses different default altitude ranges per dimension, configurable in config.yml:

  • Overworld/Custom Worlds: Y=-60 to Y=320 (settings: lowestYNormalCustom / highestYNormalCustom)
  • Nether: Y=4 to Y=120 (settings: lowestYNether / highestYNether)
  • End: Y=0 to Y=320 (settings: lowestYEnd / highestYEnd)
  • Sky Structures (Overworld): Y=80 to Y=120 (configurable via normalCustomAirBuildingMinAltitude / normalCustomAirBuildingMaxAltitude)
  • Sky Structures (End): Y=80 to Y=120 (configurable via endAirBuildMinAltitude / endAirBuildMaxAltitude)

These global defaults can be overridden per-generator using lowestYLevel and highestYLevel in generator configurations.


validWorlds

Sets the list of worlds the structure will spawn in. If no list is present, it will use all worlds allowed by the plugin, unless otherwise limited (such as by the environment type or biomes).


validWorldEnvironments

Sets the list of world environments the structure will spawn in. If no list is present, it will use all world environments allowed by the plugin. Valid values: NORMAL, NETHER, THE_END and CUSTOM.


validBiomes

Sets the list of valid biomes the structure will spawn in. If no list is defined, it will assume every biome is valid!.

This requires using biomes in the namespace:key format (e.g., minecraft:plains, minecraft:desert). You can find the list of valid biomes as defined by the Spigot API. The plugin automatically includes custom biomes that are mapped to vanilla biomes through the CustomBiomeCompatibility system.

Custom Biome Support:

BetterStructures automatically supports custom biomes from world generators like Terralith, Iris, Terra, and TerraformGenerator.

When you specify a vanilla biome in validBiomes, the plugin automatically includes compatible custom biomes:

validBiomes:
- minecraft:plains
- minecraft:forest

This configuration will spawn structures in:

  • The vanilla biomes (minecraft:plains, minecraft:forest)
  • All custom biomes mapped to these vanilla types (e.g., terralith:blooming_plains)

No extra configuration needed - custom biome support is automatic.


treasureFilename

Sets the treasure file that the generator will use. This sets what spawns in the chests for all builds that use this generator, unless a different value is set in a schematic configuration's treasureFile setting.