Skip to content

Washer (Mekanism)

Description

Converts an input gasstack into an output gasstack at the cost of 5mb of water.

Identifier

Refer to this via any of the following:

groovy
mods.mekanism.washer/* Used as page default */
mods.mekanism.Washer
mods.mekanism.chemical_washer
mods.mekanism.chemicalwasher
mods.mekanism.chemicalWasher
mods.mekanism.ChemicalWasher

Adding Recipes

  • Adds recipes in the format input, output:

    groovy
    mods.mekanism.washer.add(GasStack, GasStack)
Example
groovy
mods.mekanism.washer.add(gas('water'), gas('hydrogen'))

Recipe Builder

Just like other recipe types, the Washer also uses a recipe builder.

Don't know what a builder is? Check the builder info page out.

mods.mekanism.washer.recipeBuilder()
  • GasStackList. Sets the gas inputs of the recipe. Requires exactly 1.

    groovy
    gasInput(GasStack)
    gasInput(GasStack...)
    gasInput(Collection<GasStack>)
  • GasStackList. Sets the gas outputs of the recipe. Requires exactly 1.

    groovy
    gasOutput(GasStack)
    gasOutput(GasStack...)
    gasOutput(Collection<GasStack>)
  • First validates the builder, returning null and outputting errors to the log file if the validation failed, then registers the builder and returns the registered object. (returns null or mekanism.common.recipe.machines.WasherRecipe).

    groovy
    register()
Example
groovy
mods.mekanism.washer.recipeBuilder()
    .gasInput(gas('water') * 10)
    .gasOutput(gas('hydrogen') * 20)
    .register()

Removing Recipes

  • Removes all recipes that match the given input:

    groovy
    mods.mekanism.washer.removeByInput(GasStack)
  • Removes all registered recipes:

    groovy
    mods.mekanism.washer.removeAll()
Example
groovy
mods.mekanism.washer.removeByInput(gas('iron'))
mods.mekanism.washer.removeAll()

Getting the value of recipes

  • Iterates through every entry in the registry, with the ability to call remove on any element to remove it:

    groovy
    mods.mekanism.washer.streamRecipes()

© 2024 CleanroomMC. All Rights Reserved.