# Recipe conditions

Loader conditions and recipe removal.

## Recipe conditions

A condition controls whether a recipe loads. For example, this one requires the `expensive_mode` flag:

> **Fabric**
>
> ```json
> {
>   "fabric:load_conditions": [
>     {"condition": "hbm:flag", "name": "expensive_mode"}
>   ]
> }
> ```
>
> For additional conditions, see the [Fabric resource-condition reference](https://docs.fabricmc.net/develop/resource-conditions).

> **NeoForge**
>
> ```json
> {
>   "neoforge:conditions": [
>     {"type": "hbm:flag", "name": "expensive_mode"}
>   ]
> }
> ```
>
> For additional conditions, see the [NeoForge data-load-condition reference](https://docs.neoforged.net/docs/resources/server/conditions/).

These are field fragments to include in a complete recipe.

**A false condition on a same-ID override does not restore the bundled recipe.** The higher-priority file has already replaced it; skipping that file can leave the recipe absent. Use a different resource ID for an additional conditional recipe, or explicitly design which replacement should exist for each configuration.

## Flags

| Field | Meaning |
| - | - |
| `condition` (Fabric) or `type` (NeoForge) | `hbm:flag`. |
| `name` | Flag name from the table below; a leading `!` negates it, as in `!expensive_mode`. Another name fails the recipe file. |

| Flag | True when |
| - | - |
| `enable_528` | `mode_528.enabled` |
| `enable_528_pressurized` | `mode_528.enabled` and `mode_528.pressurized_recipes` |
| `lbsm` | `lbsm.enabled` and not `mode_528.enabled` |
| `lbsm_simple_armor` | `lbsm` and `lbsm.simple_armor_recipes` |
| `lbsm_simple_tools` | `lbsm` and `lbsm.simple_tool_recipes` |
| `lbsm_simple_crafting` | `lbsm` and `lbsm.simple_crafting` |
| `lbsm_simple_chemistry` | `lbsm` and `lbsm.simple_chemistry` |
| `lbsm_simple_centrifuge` | `lbsm` and `lbsm.simple_centrifuge` |
| `lbsm_simple_medicine` | `lbsm` and `lbsm.simple_medicine` |
| `expensive_mode` | `expensive.enabled` |

The configuration entries are in `config/hbm-content.toml` on NeoForge and in the `content` section of `config/hbm.jsonc` on Fabric.

## Disable an existing recipe

Place the complete file shown for your loader at the recipe's original resource path. A pack intended for both loaders can combine the two condition fields in one file.

*NTM 1.0.0–1.0.4 · Fabric:*

```json
{
  "fabric:load_conditions": [
    {"condition": "fabric:not", "value": {"condition": "fabric:true"}}
  ]
}
```

*NTM 1.0.0–1.0.4 · NeoForge:*

```json
{
  "neoforge:conditions": [
    {"type": "neoforge:never"}
  ]
}
```

An item without a named shredder recipe falls back to scrap[since NTM 1.0.1:  unless its components are changed; a changed item is not shredded].
