> 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/fluid.md).

# Fluid

The variant that fill/drain tanks items.

Use this variant to make the slot able to fill/drain fluid from one or many machine's internal tanks to/from a tank item (including buckets) placed in that slot.

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

* "input" will drain the fluid container item content to the machine internal tank.
* "output" will fill the fluid container item from the machine internal tank.

### ID

```json
"type": "custommachinery:item_fluid"
```

### Optional property

A `"tanks"` property can be specified directly inside the item component json.

This property can define a tank id or an array of tank id that the item can be filled/drained from/to.

The id of the tanks must be the same as defined in the [fluid component "id" property](/custom-machinery-1.21/creating-custom-machines/machine-components/fluid-component.md#name-id).

If the `"tanks"` property is not specified the item will be filled/drained from/to all the machine internal tanks.

### Accepted items

Any fluid container items (including buckets) that match the filter defined in the item component "whitelist" and "blacklist" properties.

### Example

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

```json
{
    "type": "custommachinery:item_fluid",
    "id": "fluidInput",
    "mode": "input",
}
```

A fluid slot that transfer the fluid from the machine internal tank with id "water" to the item :&#x20;

```json
{
    "type": "custommachinery:item_fluid",
    "id": "fluidOutput",
    "mode": "output",
    "tanks": "water"
}
```
