# Consumable treatments

Bind item use or consumption to ordered treatment actions.

**since NTM 1.0.1**

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

The registry loads with the world and syncs to clients. Actions execute on the server for players in list order. Each item belongs to one rule; overlapping selectors fail world startup. Replace the original resource ID to change a shipped treatment. Reopen singleplayer or restart the server after editing rules or their tags.

## Fields

| Field | Meaning and default |
| - | - |
| `targets` | Item ID, `#namespace:tag`, or item-ID list. |
| `trigger` | `consume` runs after the item's normal consumption finishes. `use` replaces the item's own use action: it runs immediately, consumes one held item and returns `remainder`. |
| `block_when_potion_sick` (Optional) | Blocks starting use while potion sickness is active; default false. |
| `remainder` (Optional) | Item ID returned by a `use` treatment; omission returns no item. Rejected with `consume`, which uses the item's vanilla remainder component. |
| `sound` (Optional) | Sound-event ID or vanilla sound-event object played before actions. |
| `actions` | Ordered treatment actions; each entry selects its format with type. |
| `actions.type` | Action format: counter, effect, remove_effects, damage, or potion_sickness. Each format has its own fields in the treatment action reference. |

`consume` requires an item that already supports consumption through its item behavior or components. A treatment assignment supplies the additional actions.

## Action formats

- [Counter](https://movblock.mov/ntm-next/wiki/consumable-treatments/counter.md): adjust radiation, digamma or lung-disease counters.
- [Effect](https://movblock.mov/ntm-next/wiki/consumable-treatments/effect.md): apply or extend a mob effect.
- [Remove effects](https://movblock.mov/ntm-next/wiki/consumable-treatments/remove-effects.md): remove selected mob effects.
- [Damage](https://movblock.mov/ntm-next/wiki/consumable-treatments/damage.md): apply damage with optional repetition and chance.
- [Potion sickness](https://movblock.mov/ntm-next/wiki/consumable-treatments/potion-sickness.md): add potion sickness.

## Example:

File: `data/example/hbm/consumable_treatment/apple.json`.

```json
{
  "targets": "minecraft:apple",
  "trigger": "consume",
  "block_when_potion_sick": true,
  "actions": [
    {"type": "potion_sickness", "seconds": 5},
    {"type": "counter", "counter": "radiation", "operation": "add", "amount": -10.0}
  ]
}
```
