Chrysopoeia (Roots 3)
Description
Chrysopoeia is a spell that transmutes items held in the main hand.
Identifier
Refer to this via any of the following:
mods.roots.chrysopoeia/* Used as page default */
mods.roots.Chrysopoeia
Adding Recipes
Recipe Builder
Just like other recipe types, the Chrysopoeia also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.roots.chrysopoeia.recipeBuilder()
ResourceLocation
. Sets the Resource Location of the recipe.groovyname(String) name(ResourceLocation)
IngredientList<IIngredient>
. Sets the item inputs of the recipe. Requires exactly 1.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>)
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
orepicsquid.roots.recipe.ChrysopoeiaRecipe
).groovyregister()
Example
mods.roots.chrysopoeia.recipeBuilder()
.name('clay_transmute')
.input(item('minecraft:gold_ingot'))
.output(item('minecraft:clay'))
.register()
mods.roots.chrysopoeia.recipeBuilder()
.input(item('minecraft:diamond') * 3)
.output(item('minecraft:gold_ingot') * 3)
.register()
Removing Recipes
Removes the Chrysopoeia recipe with the given input itemstack:
groovymods.roots.chrysopoeia.removeByInput(ItemStack)
Removes the Chrysopoeia recipe with the given name:
groovymods.roots.chrysopoeia.removeByName(ResourceLocation)
Removes the Chrysopoeia recipe with the given output itemstack:
groovymods.roots.chrysopoeia.removeByOutput(ItemStack)
Removes all registered recipes:
groovymods.roots.chrysopoeia.removeAll()
Example
mods.roots.chrysopoeia.removeByInput(item('minecraft:rotten_flesh'))
mods.roots.chrysopoeia.removeByName(resource('roots:gold_from_silver'))
mods.roots.chrysopoeia.removeByOutput(item('minecraft:iron_nugget'))
mods.roots.chrysopoeia.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.roots.chrysopoeia.streamRecipes()