---
description: The variant that fill/drain energy items.
---

# Energy

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"
}
```
