Chemical (Mekanism)

Make the machine consume or produce any mekanism chemicals

This requirement requires Custom Machinery Mekanism to be installed.

Chemical requirement is used to define Mekanism chemicals 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 the chemical you want the recipe to consume/produce.

This requirement is available in both input and output modes.

In input mode : When starting to craft the recipe, the machine will consume the desired amount of the specified chemical from the input tank it's in.

In output mode : When finishing to craft the recipe, the machine will produce the desired amount of the specified chemical and put it in the first disponible tank.

If the requirement is _per_tick the specified amount will be consumed/produced each tick instead of once.

All of Mekanism chemicals types are supported :

  • Gas

  • Infusion

  • Pigment

  • Slurry

The type of chemical is defined in the type property (see below).

Properties

The chemical requirements has 4 mandatory properties and 2 optional properties.

Mandatory properties

"type": "custommachinery:gas" //Mandatory to define a gas requirement.
OR
"type": "custommachinery:gas_per_tick" //Mandatory to define a gas per tick requirement.
OR
"type": "custommachinery:infusion" //Mandatory to define an infusion requirement.
OR
"type": "custommachinery:infusion_per_tick" //Mandatory to define an infusion per tick requirement.
OR
"type": "custommachinery:pigment" //Mandatory to define a pigment requirement.
OR
"type": "custommachinery:pigment_per_tick" //Mandatory to define a pigment per tick requirement.
OR
"type": "custommachinery:slurry" //Mandatory to define a slurry requirement.
OR
"type": "custommachinery:slurry_per_tick" //Mandatory to define a slurry per tick requirement.
Mode

Name : mode

Description :

Define the I/O mode of the requirement.

  • input The requirement will consume the specified amount of the specified chemical.

  • output The requirement will produce the specified amount of the specified chemical.

Example :

"mode": "input"
Chemical

Name : chemical

Description :

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

It must be specified like namespace:registry_name with "namespace" being either "mekanism" if the fluid is from Mekanism or another mod ID if the chemical is from an addon.

Example :

"chemical": "mekanism:sulfuric_acid"

The chemical consumed/produced by the recipe will be Mekanism sulfuric acid (gas).

Amount

Name : amount

Description :

A positive integer that define the amount of the specified chemical 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 chemical.

Example :

"amount": 1000

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

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 chemical in. The tank id must be exactly the same as the one specified in the Chemical Component ID property or it will not work. If the requirement mode is "output" the produced chemical will be put in the specified tank.

Default : empty

The chemical can be put in any tank.

Example :

"tank": "input1"

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

Example

A gas chemical requirement that will make the custom machine recipe produce 500mB of Mekanism sulfuric acid with 50% chance :

{
    "type": "custommachinery:gas",
    "mode": "output",
    "chemical": "mekanism:sulfuric_acid",
    "amount": 500,
    "chance": 0.5
}

Last updated