Skip to content

Petal Apothecary (Botania)

Description

Converts item inputs into an item output consuming water and a seed.

Identifier

Refer to this via any of the following:

groovy
mods.botania.apothecary/* Used as page default */
mods.botania.Apothecary
mods.botania.petal_apothecary
mods.botania.petalapothecary
mods.botania.petalApothecary
mods.botania.PetalApothecary

Adding Recipes

  • Adds recipes in the format output, inputs:

    groovy
    mods.botania.apothecary.add(ItemStack, IIngredient...)

Recipe Builder

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

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

mods.botania.apothecary.recipeBuilder()
  • IngredientList<IIngredient>. Sets the item inputs of the recipe. Requires greater than or equal to 1 and less than or equal to 20.

    groovy
    input(IIngredient)
    input(IIngredient...)
    input(Collection<IIngredient>)
  • 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 vazkii.botania.api.recipe.RecipePetals).

    groovy
    register()
Example
groovy
mods.botania.apothecary.recipeBuilder()
    .input(ore('blockGold'), ore('ingotIron'), item('minecraft:apple'))
    .output(item('minecraft:golden_apple'))
    .register()

Removing Recipes

  • Removes all recipes that match the given input:

    groovy
    mods.botania.apothecary.removeByInput(IIngredient...)
  • Removes all recipes that match the given input:

    groovy
    mods.botania.apothecary.removeByInputs(IIngredient...)
  • Removes all recipes that match the given output:

    groovy
    mods.botania.apothecary.removeByOutput(IIngredient)
  • Removes all registered recipes:

    groovy
    mods.botania.apothecary.removeAll()
Example
groovy
mods.botania.apothecary.removeByInput(ore('runeFireB'))
mods.botania.apothecary.removeByInputs(ore('petalYellow'), ore('petalBrown'))
mods.botania.apothecary.removeByOutput(item('botania:specialflower').withNbt(['type': 'puredaisy']))
mods.botania.apothecary.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.botania.apothecary.streamRecipes()

贡献者

页面历史

© 2024 CleanroomMC. All Rights Reserved.