> For the complete documentation index, see [llms.txt](https://frinn.gitbook.io/custom-machinery-1.21/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://frinn.gitbook.io/custom-machinery-1.21/creating-custom-machines/machine-components/item-component/energy.md).

# Energy

The variant that fill/drain energy items.

Use this variant to make the slot able to fill/drain energy from the machine internal buffer to/from an energy container item placed in that slot.

The fill/drain behavior is determined by the "mode" property of the item component :&#x20;

* "input" will transfer the energy from the item to the machine buffer.
* "output" will transfer the energy from the machine buffer to the item.

### ID

```json
"type": "custommachinery:item_energy"
```

### Accepted items

Any energy container items (most mods cells or batteries) that match the filter defined in the item component "whitelist" and "blacklist" properties.

### Example

A simple energy slot that transfer the energy from the item to the machine internal buffer :&#x20;

```json
{
    "type": "custommachinery:item_energy",
    "id": "energyInput",
    "mode": "input"
}
```
