# World generation

NTM features, structures, processors and placement rules.

Worldgen definitions load when the world opens. Reopen the world after changing them and inspect newly generated terrain. Vanilla formats are covered by the [Minecraft Wiki data pack reference](https://minecraft.wiki/w/Data_pack).

## File paths

| File under `data/<namespace>/` | Role |
| - | - |
| `worldgen/configured_feature/<id>.json` | Feature type and configuration |
| `worldgen/placed_feature/<id>.json` | Configured feature and ordered placement modifiers |
| `worldgen/structure/<id>.json` | Structure type and settings |
| `worldgen/structure_set/<id>.json` | Weighted structure candidates and placement |
| `worldgen/processor_list/<id>.json` | Template processors |
| `worldgen/template_pool/<id>.json` | Jigsaw elements and fallback pool |
| `structure/<id>.nbt` | Binary structure template |

> **since NTM 1.0.2**
>
> ## Template block-entity data
>
> Structure-template NBT uses named bobblehead/plushie kinds and launch-pad sizes:
>
> | Block entity | Field | Value |
> | - | - | - |
> | `hbm:bobblehead` | `type` | Kind ID such as `"strength"`; previously an ordinal byte |
> | `hbm:plushie` | `type` | Kind ID such as `"yomi"`; previously an ordinal byte |
> | `hbm:large_launch_table` | `padSize` | Size name: `"ANY"`, `"NONE"`, `"SIZE_10"`, `"SIZE_15"` or `"SIZE_20"`; previously an ordinal integer |
>
> Convert numeric values in custom templates to these names. Old numeric values fall back to `"none"` for trinkets or `"SIZE_10"` for launch tables. Existing saved chunks have an automatic version-6 migration; structure templates do not use that migration.

## Type references

- [Configured features](https://movblock.mov/ntm-next/wiki/world-generation/features.md)
- [Structures](https://movblock.mov/ntm-next/wiki/world-generation/structures.md)
- [Template processors](https://movblock.mov/ntm-next/wiki/world-generation/processors.md)
- [Placement modifiers](https://movblock.mov/ntm-next/wiki/world-generation/placement-modifiers.md)
- [Pool elements](https://movblock.mov/ntm-next/wiki/world-generation/pool-elements.md)

## Biome attachment

NTM attaches placed features to vanilla biome tags and named vanilla biomes. Editing a tag changes every feature attached to it. [Worldgen examples](https://movblock.mov/ntm-next/wiki/world-generation/features.md) link to the generated definitions.

> **NeoForge**
>
> The generated `neoforge/biome_modifier/<id>.json` files attach placed features. Override `hbm:add/<feature>` to change its biome selection. See the [NeoForge biome-modifier reference](https://docs.neoforged.net/docs/worldgen/biomemodifier/).

> **NeoForge; since NTM 1.0.1**
>
> `hbm:add/stratum_gneiss` attaches `hbm:stratum_gneiss`, `hbm:ore_cave_sulfur`, `hbm:ore_cave_asbestos`, `hbm:stratum_hematite`, `hbm:stratum_bauxite` and `hbm:stratum_malachite` in that order. The last five have no modifier of their own.

## Generation switches

The switches are the `worldgen` group of [`hbm:world_config`](https://movblock.mov/ntm-next/wiki/game-settings/world_config.md#worldgen).

## Placed-feature modifiers

The [placement modifier reference](https://movblock.mov/ntm-next/wiki/world-generation/placement-modifiers.md) documents `hbm:light_blocking_height`, `hbm:world_config`[since NTM 1.0.3:  and `hbm:ore_host`] alongside vanilla modifiers:

```json
{"type": "hbm:light_blocking_height"}
```

`hbm:light_blocking_height` places at the light-blocking terrain surface.

```json
{"type": "hbm:world_config", "switches": ["overworld_ores", "coltan_spawn"]}
```

`hbm:world_config` places a feature while every switch named in `switches` is on: `overworld_ores`, `nether_ores`, `end_ores`, `coltan_spawn` or `nether_plutonium`[since NTM 1.0.4: , `coltan_deposit`]. Modifier order affects attempted positions.

> **since NTM 1.0.3**
>
> ## Bunker template IDs
>
> Bunker rooms use closed-room templates; placement opens the selected branch doorways afterward. Their structure-template and processor-list IDs change together:
>
> | Previous ID | ID from 1.0.3 |
> | - | - |
> | `hbm:component/laboratory_*` | `hbm:component/laboratory` |
> | `hbm:component/fun_junction_*` | `hbm:component/fun_junction` |
> | `hbm:component/bathroom_l_path` / `bathroom_l_no_path` | `hbm:component/bathroom_l` |
> | `hbm:component/bedroom_l_path` / `bedroom_l_no_path` | `hbm:component/bedroom_l` |
> | `hbm:component/starting_hub_*` | `hbm:component/starting_hub` |
> | `hbm:component/bunker_corridor_<a>_<b>_path` / `_no_path` | `hbm:component/bunker_corridor_<a>_<b>` |
> | `hbm:component/power_room_<n>_path` / `_no_path` | `hbm:component/power_room_<n>` |
>
> `a` and `b` range from 0 to 5; `n` ranges from 0 to 2. These families replace 98 branch-specific templates and processor lists with 44 definitions of each. Move overrides to the new IDs and use a closed-room layout. Custom machine templates also follow the [multiblock footprint rule](https://movblock.mov/ntm-next/wiki/world-generation/processors/multiblock_assembly.md#template-footprint-cells).

## Verify generation

Use `/locate` for structure placement and `/place` for forced placement. Generate new chunks to check biome attachment, then inspect blocks, block entities, loot and orientation.
