Skip to content

Crystallizer (Mekanism)

Description

Converts an input gasstack into an output itemstack.

Identifier

Refer to this via any of the following:

groovy
mods.mekanism.crystallizer/* Used as page default */
mods.mekanism.Crystallizer

Adding Recipes

  • Adds recipes in the format input, output:

    groovy
    mods.mekanism.crystallizer.add(GasStack, ItemStack)
Example
groovy
mods.mekanism.crystallizer.add(gas('cleanGold'), item('minecraft:gold_ingot'))

Recipe Builder

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

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

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

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

    groovy
    output(ItemStack)
    output(ItemStack...)
    output(Collection<ItemStack>)
  • 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.CrystallizerRecipe).

    groovy
    register()
Example
groovy
mods.mekanism.crystallizer.recipeBuilder()
    .gasInput(gas('cleanGold'))
    .output(item('minecraft:gold_ingot'))
    .register()

Removing Recipes

  • Removes all recipes that match the given input:

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

    groovy
    mods.mekanism.crystallizer.removeAll()
Example
groovy
mods.mekanism.crystallizer.removeByInput(gas('cleanGold'))
mods.mekanism.crystallizer.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.crystallizer.streamRecipes()

© 2024 CleanroomMC. All Rights Reserved.