Fluid component

Add a fluid tank inside the machine.

This is the component that will let your machine interact with the Forge Fluid system (like tanks, pipes and so).

It is compatible with any other mods that use the same system (so about all of them) so any pipes will be able to pump fluids in and out of the machine.

Basically adding this component to the machine json will add a fluid tank to the machine.

You can add as much as you want fluid components to your machine.

Each component will act as a separate fluid tank.

Fluid component is defined with "type": "custommachinery:fluid" in the json.

Properties

The fluid component has 3 mandatory properties and 7 optional properties :

Mandatory properties

"type": "custommachinery:fluid" //Mandatory to define a fluid component.
Capacity

Name : capacity

Description :

A positive integer value that define the amount of fluid that can be stored in the tank (Volume in Forge mB, with 1000mB being 1 Bucket of fluid)

Example :

"capacity": 10000 //This component will be able to store 10000mB.
Id

Name : id

Desccription :

A string that define the id of the tank (used in the gui element and recipes), the String must be all lowercase with letters and numbers only (no spaces or special characters).

Example :

"id": "tank1"

Optional properties

Max input

Name : maxInput

Description :

A positive integer that represent the max mB that can be input in the tank during a single tick.

Default :

The capacity of the tank.

Example :

"maxInput": 1000 //The machine can accept 1000mB/tick.
Max output

Name : maxOutput

Description :

A positive integer that represent the max mB that can be output from the tank during a single tick.

Default :

The capacity of the tank.

Example :

"maxOutput": 1000 //The machine can give 1000mB/tick.
Filter

Name : filter

Description :

A blacklist of fluids that the tank can't accept.

The fluids must be referenced by their registry name like minecraft:water or minecraft:lava.

By default the blacklist is empty so all fluids are accepted.

You can also use tag here with the # prefix like #minecraft:water

Default :

No filter, so all fluids are accepted by the tank.

Example :

"filter": "#minecraft:water" //The tank will accept all fluids that are not in the vanilla water tag.
Whitelist

Name : whitelist

Description :

A boolean, if true the filter property will act as a whitelist instead of a blacklist, meaning that only fluids specified in the whitelist will be accepted by the fluid component.

Default : false

The filter property is a blacklist.

Example :

"whitelist": true //The filter property is a whitelist.
Mode

Name : mode

Description :

The IO mode of the tank, used only by recipes to know which tanks are inputs and outputs.

Available modes are (input/output/both/none).

While crafting the machine will search for fluids to consume in input tanks and put the recipe results in the output tanks.

For changing I/O mode of a tank for external interaction, such as buckets and pipes see the Config property below.

Default : both

Example :

"mode": "input" //Set the tank as an input tank.
Config
Unique

Name : unique

Description :

A boolean property (true/false) that define if the fluid component can accept a fluid that is already in another fluid component in the same machine.

If the component is set as "unique" a player won't be able to insert a fluid that is already in another tank, even if that tank is full (basically prevent overfill).

Default : false

The fluid component won't care if the fluid is already in another tank.

Example :

The fluid component won't accept fluids that already are in another component.

"unique": true

Example

An example of Fluid Component that can store 10000mB of lava only, send 1000mB/tick and receive 666mB/tick.

{
    "type": "custommachinery:fluid",
    "capacity": 10000,
    "id": "lavatank",
    "maxInput": 666,
    "maxOutput": 1000,
    "filter": ["minecraft:lava"],
    "whitelist": true
}

Last updated