# Container upgrade

The matching carrier supplies the retained item contents.

Container upgrades use [shaped crafting](https://movblock.mov/ntm-next/26.3/wiki/recipes/crafting-shaped.md) with `input_state.<symbol>.preserve: result`. The selected pattern occurrence supplies the retained component changes; `result.count` is 1.

## Example

Source path: `data/hbm/recipe/crate_desh.json`

```json
{
  "type": "hbm:crafting_shaped",
  "input_state": {
    "S": {
      "preserve": "result"
    }
  },
  "key": {
    "D": "hbm:plate_desh",
    "S": "hbm:crate_steel"
  },
  "pattern": [
    " D ",
    "DSD",
    " D "
  ],
  "result": {
    "id": "hbm:crate_desh"
  }
}
```
