Chemical (Mekanism)

Use the chemical requirement in a KubeJS recipe

This requirement requires Custom Machinery Mekanism to be installed.

Use one of these methods to add a Chemical Requirement to the recipe.

.requireChemical(chemical)
.requireChemical(chemical, "tankID")

.requireChemicalPerTick(chemical)
.requireChemicalPerTick(chemical, "tankID")

.produceChemical(chemical)
.produceChemical(chemical, "tankID")

.produceChemicalPerTick(chemical)
.produceChemicalPerTick(chemical, "tankID")
  • The chemical param must be the ID of the chemical: "namespace:id" example : "mekanism:sulfuric_acid" You can also specify an amount (in mB) : "500x mekanism:sulfuric_acid" If no amount is specified the default is 1000mB.

  • The tank param must be a string corresponding to a tank id defined in a custom machine json Chemical Component tank property.

Example

This recipe will consume 1000mB of steam gas to produce 100mB of white pigment :

ServerEvents.recipes(event => {

  event.recipes.custommachinery.custom_machine("custommachinery:power_crusher", 100)
  .requireChemical("mekanism:steam")
  .produceChemical("100x mekanism:white")
})

Last updated