# hbm:legacy_piece

Terrain alignment and height offset for a child jigsaw piece.

**since NTM 1.0.2**

A vanilla single-template pool element with placement fields read by [`hbm:legacy_jigsaw`](https://movblock.mov/ntm-next/wiki/world-generation/structures/legacy_jigsaw.md). With `align_to_terrain: true`, the structure grounds this piece on its own rotated footprint. Otherwise, the piece moves with the first unaligned piece. Other structure types place it as a vanilla single-template element.

## Fields

| Field | Meaning and default | Range |
| - | - | - |
| `element_type` | `hbm:legacy_piece`. | |
| `location` | Structure-template ID. | |
| `processors` | Vanilla processor-list ID or inline processor list. | |
| `projection` | Vanilla jigsaw projection: rigid or terrain_matching. | |
| `override_liquid_settings` (Optional) | Optional vanilla liquid-setting override. | |
| `height_offset` (Optional) | Y offset added to the footprint's average terrain height; default 0. | `i32` |
| `align_to_terrain` (Optional) | Grounds this piece independently when placed by `hbm:legacy_jigsaw`; default false. | |

## Example:

An element in `data/example/worldgen/template_pool/ruins/rooms.json`:

```json
{
  "element_type": "hbm:legacy_piece",
  "location": "example:ruins/room",
  "processors": "hbm:no_rules",
  "projection": "rigid",
  "height_offset": -1,
  "align_to_terrain": true
}
```
