# hbmspace:surface_depth

Surface-rule condition on depth below the surface.

The condition holds when the depth below the surface is at most `1 + d`, with per-column depth $d = \lfloor n \times 8.25 / \mathrm{divisor} + \mathrm{divisor} + r \times \mathrm{jitter} \rfloor$ from the vanilla `minecraft:surface` noise `n` and a positional random `r`. Use it as `if_true` of a `minecraft:condition` rule in `material_rule`.

## Fields

| Field | Meaning and default | Range |
| - | - | - |
| `type` | `hbmspace:surface_depth`. | |
| `divisor` | Divides the surface noise; 3 reproduces vanilla depth. | `[1, 64]` |
| `jitter` | Random addition to the depth. | `[0, 1]` |

## Example

From `data/hbmspace/worldgen/noise_settings/duna.json`:

```json
{"type": "hbmspace:surface_depth", "divisor": 6.0, "jitter": 0.85}
```
