# Irradiation transformations

Entity conversions triggered by accumulated radiation.

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

This server registry loads with the world. Rules are checked each tick once a living entity's accumulated radiation reaches `minimum_dose`. A successful roll creates `result` at the original position and rotation and discards the original entity. Other entity data is not transferred. A failed roll applies `failure_damage` and skips ordinary radiation sickness handling for that tick; surviving targets can roll again on subsequent ticks.

Rules run while contamination is enabled, for living targets with positive accumulated dose that are alive and susceptible to radiation damage. Creative and spectator players are excluded.

Each entity type belongs to one rule. Overlapping selectors fail world startup. Replace the original resource ID to change a shipped conversion. Reopen singleplayer or restart the server after editing rules or their tags.

## Fields

| Field | Meaning and default | Range |
| - | - | - |
| `targets` | Entity-type ID, `#namespace:tag`, or entity-type ID list. | |
| `minimum_dose` | Accumulated radiation threshold in RAD. | `[0, f64::MAX]` |
| `result` | Replacement entity-type ID. | |
| `one_in` (Optional) | One successful roll per this many outcomes; default 1. | `[1, i32::MAX]` |
| `failure_damage` (Optional) | Radiation damage on a failed roll; default 0. | `[0, f32::MAX]` |

## Example:

Override `hbm:cow` at `data/hbm/hbm/irradiation_transformation/cow.json` to raise its conversion threshold:

```json
{
  "targets": "minecraft:cow",
  "minimum_dose": 100.0,
  "result": "minecraft:mooshroom"
}
```
