# Item hazards

Item hazard assignments and fields.

File: `data/<namespace>/hbm/hazard/<path>.json`.

## Example:

```json
{
  "targets": "minecraft:stick",
  "entries": [{"type": "hbm:radiation", "level": 0.1}],
  "priority": 1000,
  "mutex": 0
}
```

`targets` selects an item ID, `#namespace:tag`, or an item-ID list. Target hazardous blocks through their item.

## Fields

| Field | Meaning and default | Range |
| - | - | - |
| `targets` | Item ID, item tag, or ID list receiving the hazards. | |
| `entries` | Hazard contributions; an empty list clears this binding. | |
| `entries.type` | Registered hazard behavior. | |
| `entries.level` | Base intensity interpreted by that hazard type. | finite `f64` |
| `priority` (Optional) | Binding order; lower integers apply first; default `1000`. | `i32` |
| `mutex` (Optional) | Bit mask suppressing later bindings that share already-seen bits; default `0`. | `i32` |

## Hazard types

| Hazard type | Effect of `level` |
| - | - |
| `hbm:radiation` | Base radiation in rad/s before inventory and protection modifiers |
| `hbm:contaminating` | Radiation added to the surrounding field by a dropped item |
| `hbm:digamma` | Digamma contamination rate |
| `hbm:hot` | Fire exposure intensity |
| `hbm:blinding` | Blindness duration intensity |
| `hbm:asbestos` | Asbestos exposure intensity |
| `hbm:coal` | Coal-dust exposure intensity |
| `hbm:hydroactive` | Explosion strength on water contact |
| `hbm:explosive` | Explosion strength |
| `hbm:toxic` | Poison-effect severity |
| `hbm:cold` | Cold-exposure intensity |

The `disable_*` switches in the `hazards` group of [`radiation_config`](https://movblock.mov/ntm-next/wiki/game-settings/radiation_config.md) turn off the `asbestos`, `coal`, `hot`, `explosive`, `hydroactive`, `blinding`, `cold` and `toxic` types individually.

## Binding overrides

**Override the original resource ID when changing an existing binding.** Each item and each tag accepts one assignment; a second assignment naming the same item or tag fails world startup. A direct item assignment replaces that item's built-in binding, including component-dependent reactor-fuel hazards. An item's direct binding and the bindings of its tags contribute together, ordered by priority, then tag before direct, then tag or item ID.

Shipped bindings target `#hbm:hazard/<name>` tags and material tags such as `#c:ingots/uranium`. Adding an item to such a tag applies that binding.

## Stack-dependent radiation

An empty entry list clears its binding. Other tag bindings and stack-dependent radiation continue to apply:

- A positive `hbm:haz_radiation` item component adds a radiation entry of that level.
- Storage crates, Safes and Toolboxes add the summed radiation of their stored items; a Plastic Bag doubles it and a Containment Box takes its square root.

> **since NTM 1.0.1**
>
> - Other items add the summed radiation of items in their container, bundle or charged-projectile components or stored block inventory.

Items in `#c:ores/uranium` or `#c:ores/thorium` carry no hazards.
