Skip to content

Seed Reprocessor (Mystical Agriculture)

Description

Converts an input itemstack into an output itemstack, taking a set amount of time based on the machine and consuming fuel.

Identifier

Refer to this via any of the following:

groovy
mods.mysticalagriculture.reprocessor/* Used as page default */
mods.mysticalagriculture.Reprocessor

Adding Recipes

Recipe Builder

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

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

mods.mysticalagriculture.reprocessor.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 greater than or equal to 1 and less than or equal to 2.

    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 com.blakebr0.mysticalagriculture.crafting.ReprocessorRecipe).

    groovy
    register()
Example
groovy
mods.mysticalagriculture.reprocessor.recipeBuilder()
    .input(item('minecraft:clay'))
    .output(item('minecraft:diamond') * 3)
    .register()

mods.mysticalagriculture.reprocessor.recipeBuilder()
    .input(item('minecraft:diamond'))
    .output(item('minecraft:gold_ingot'))
    .register()

Removing Recipes

  • Removes all recipes that match the given input:

    groovy
    mods.mysticalagriculture.reprocessor.removeByInput(IIngredient)
  • Removes all recipes that match the given output:

    groovy
    mods.mysticalagriculture.reprocessor.removeByOutput(IIngredient)
  • Removes all registered recipes:

    groovy
    mods.mysticalagriculture.reprocessor.removeAll()
Example
groovy
mods.mysticalagriculture.reprocessor.removeByInput(item('mysticalagriculture:stone_seeds'))
mods.mysticalagriculture.reprocessor.removeByOutput(item('mysticalagriculture:dirt_essence'))
mods.mysticalagriculture.reprocessor.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.mysticalagriculture.reprocessor.streamRecipes()

Contributors

Changelog

© 2024 CleanroomMC. All Rights Reserved.