Alchemy (Embers)
Description
Convert input items into an output item on a Exchange Tablet.
Identifier
Refer to this via any of the following:
mods.embers.alchemy/* Used as page default */
mods.embers.Alchemy
Editing Values
Returns the name of the aspect of an item:
groovymods.embers.alchemy.getAspect(IIngredient)
Example
mods.embers.alchemy.getAspect(item('embers:aspectus_iron'))
Adding Recipes
Register the given Aspect with the given IIngredient:
groovymods.embers.alchemy.addAspect(String, IIngredient)
Example
mods.embers.alchemy.addAspect('copper',item('minecraft:gold_ingot'))
mods.embers.alchemy.addAspect('glass',item('minecraft:glass'))
Recipe Builder
Just like other recipe types, the Alchemy also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.embers.alchemy.recipeBuilder()
IngredientList<IIngredient>
. Sets the item inputs of the recipe. Requires greater than or equal to 1 and less than or equal to 5.groovyinput(IIngredient) input(IIngredient...) input(Collection<IIngredient>)
ItemStackList
. Sets the item outputs of the recipe. Requires exactly 1.groovyoutput(ItemStack) output(ItemStack...) output(Collection<ItemStack>)
AspectList.AspectRangeList
. Sets what aspects are part of the recipe and their minimum/maximum value. Requires not empty.groovysetAspect(String, int, int)
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. (returnsnull
orteamroots.embers.recipe.AlchemyRecipe
).groovyregister()
Example
mods.embers.alchemy.recipeBuilder()
.input(item('minecraft:clay'),item('minecraft:clay'),item('minecraft:clay'),item('minecraft:clay'))
.output(item('minecraft:gravel'))
.setAspect('dawnstone', 2, 17)
.setAspect('glass', 1, 8)
.register()
mods.embers.alchemy.recipeBuilder()
.input(item('minecraft:gravel'),ore('dyeGreen'),ore('dyeGreen'),ore('dyeGreen'),item('minecraft:rotten_flesh'))
.output(item('minecraft:grass'))
.setAspect('iron', 2, 17)
.setAspect('copper', 1, 8)
.register()
Removing Recipes
Remove the given Aspect:
groovymods.embers.alchemy.removeAspect(String)
Removes all recipes with the center item matching the given IIngredient:
groovymods.embers.alchemy.removeByCenter(IIngredient)
Removes all recipes that match the given output:
groovymods.embers.alchemy.removeByOutput(IIngredient)
Removes all registered recipes:
groovymods.embers.alchemy.removeAll()
Example
mods.embers.alchemy.removeAspect('copper')
mods.embers.alchemy.removeByCenter(item('minecraft:wool'))
mods.embers.alchemy.removeByOutput(item('embers:ember_pipe'))
mods.embers.alchemy.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:
groovymods.embers.alchemy.streamRecipes()