Skip to content

Chemical Dissolver (Alchemistry)

Description

Converts an input itemstack into any number of output itemstacks, divided in any manner between different chances, with the ability to run multiple rolls to produce additional outputs.

Identifier

Refer to this via any of the following:

groovy
mods.alchemistry.dissolver/* Used as page default */
mods.alchemistry.Dissolver
mods.alchemistry.chemical_dissolver
mods.alchemistry.chemicaldissolver
mods.alchemistry.chemicalDissolver
mods.alchemistry.ChemicalDissolver

Adding Recipes

Recipe Builder

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

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

mods.alchemistry.dissolver.recipeBuilder()
  • IngredientList<IIngredient>. Sets the item inputs of the recipe. Requires exactly 1.

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

    groovy
    output(ItemStack)
  • int. Sets the number of rolls to produce outputs. Requires greater than or equal to 1. (Default 1).

    groovy
    rolls(int)
  • boolean. Sets if the recipe will also create a Chemical Combiner to invert the process. Only properly works on some recipes. (Default false).

    groovy
    reversible()
    reversible(boolean)
  • List<ProbabilityGroup>. Sets the probability sets rolled to produce output. Requires greater than or equal to 1.

    groovy
    output(Collection)
    output(ItemStack[])
    output(ItemStack...)
    output(Collection<ItemStack>)
    probabilityOutput(ItemStack...)
    probabilityOutput(double, ItemStack...)
    probabilityOutput(Collection<ItemStack>)
    probabilityOutput(double, Collection<ItemStack>)
  • boolean. Sets if there is guaranteed to always be one and exactly one set output, or if each set is rolled individually. (Default false).

    groovy
    relativeProbability()
    relativeProbability(boolean)
  • 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 al132.alchemistry.recipes.DissolverRecipe).

    groovy
    register()
Example
groovy
mods.alchemistry.dissolver.recipeBuilder()
    .input(item('minecraft:gold_ingot'))
    .probabilityOutput(item('minecraft:clay'))
    .reversible()
    .rolls(1)
    .register()

mods.alchemistry.dissolver.recipeBuilder()
    .input(item('minecraft:diamond'))
    .probabilityOutput(30, item('minecraft:clay'))
    .probabilityOutput(30, item('minecraft:clay'))
    .probabilityOutput(30, item('minecraft:clay'))
    .rolls(10)
    .register()

Removing Recipes

  • Removes all recipes that match the given input:

    groovy
    mods.alchemistry.dissolver.removeByInput(IIngredient)
  • Removes all registered recipes:

    groovy
    mods.alchemistry.dissolver.removeAll()
Example
groovy
mods.alchemistry.dissolver.removeByInput(item('alchemistry:compound:1'))
mods.alchemistry.dissolver.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.alchemistry.dissolver.streamRecipes()

Contributors

Changelog

© 2024 CleanroomMC. All Rights Reserved.