Fluid per tick

Make the recipe consume or produce fluids every tick

Fluid per tick requirement is used to define fluid inputs and outputs in a custom machine recipe.

To use it you need to provide the registry name and the amount (in mB, with 1000mB being 1 Bucket of fluid) of the fluid you want the recipe to consume/produce.

This requirement is available in both input and output modes.

In input mode : The machine will consume the desired amount of the specified fluid from the input tank it's in.

In output mode : The machine will produce the desired amount of the specified fluid and put it in the first disponible tank.

The requirement type of fluid per tick requirement is : "custommachinery:fluid_per_tick".

Properties

The fluid per tick requirement has 4 mandatory properties and 2 optional properties.

Mandatory properties

"type": "custommachinery:fluid_per_tick" //Mandatory to define a fluid per tick requirement.
Mode

Name : mode

Description :

Define the I/O mode of the requirement.

  • input The requirement will consume fluid at the start of the crafting process.

  • output The requirement will produce fluid at the end of the crafting process.

Example :

"mode": "input"

The requirement will consume fluid at the start of the crafting process.

Fluid

Name : fluid

Description :

The registry name of the fluid you want to be consumed/produced by the recipe.

It must be specified like namespace:fluid_registry_name with "namespace" being either "minecraft" if the fluid is from vanilla (only "minecraft:water" and "minecraft:lava") or a mod ID if the fluid is from a mod (ex : "mekanism:steam").

If the requirement mode is input you can use a tag here using the # prefix like #minecraft:water.

If the requirement mode is output you can't use a tag, only fluids are allowed !

Example :

"fluid": "minecraft:lava"

The fluid consumed/produced by the recipe will be vanilla lava.

"fluid": "#minecraft:water"

The recipe will accept any fluid that are in the minecraft:water tag.

Amount

Name : amount

Description :

A positive integer that define the amount of the specified fluid you want to be consumed/produced.

It can be any positive number but remember that the machine need enough tank capacity to input/output the fluid.

Example :

"amount": 1000

The recipe will consume/produce 1000mB of the specified fluid.

Optional properties

Chance

Name : chance

Description :

A double between 0.0 and 1.0 that define the chance of the requirement to be processed.

Default : 1

The requirement will always be processed.

Example :

"chance": 0.7

The requirement will have 70% chance to be processed.

Tank

Name : tank

Description :

The tank id of a tank you want to force the player to put the fluid in. The tank id must be exactly the same as the one specified in the Fluid Component ID property or it will not work. If the requirement mode is "output" the produced fluid will be put in the specified tank.

Default : empty

The fluid can be put in any tank.

Example :

"tank": "input1"

The fluid will be input/output only in the tank with id input1.

Example

A fluid requirement that will make the custom machine recipe consume 20mB of water with 50% chance :

{
    "type": "custommachinery:fluid_per_tick",
    "mode": "input",
    "fluid": "minecraft:water",
    "amount": 20,
    "chance": 0.5
}

Last updated