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 :

  • "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

"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.

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 :

{
    "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 :

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

Last updated