Fey Crafter (Roots 3)
Description
The Fey Crafter is a crafting mechanism that requires an activated Grove Stone nearby to take 5 item inputs and return an item output.
Danger
When reloading recipes with the Fey Crafter, you may encounter a ConcurrentModificationException
!
Identifier
Refer to this via any of the following:
mods.roots.fey_crafter/* Used as page default */
mods.roots.feycrafter
mods.roots.feyCrafter
mods.roots.FeyCrafter
Adding Recipes
Recipe Builder
Just like other recipe types, the Fey Crafter also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.roots.fey_crafter.recipeBuilder()
ResourceLocation
. Sets the Resource Location of the recipe.groovyname(String) name(ResourceLocation)
IngredientList<IIngredient>
. Sets the item inputs of the recipe. Requires exactly 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>)
int
. Sets the amount of experience output when completing the recipe. Requires greater than or equal to 0. (Default0
).groovyxp(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
orepicsquid.roots.recipe.FeyCraftingRecipe
).groovyregister()
Example
mods.roots.fey_crafter.recipeBuilder()
.name('clay_craft')
.input(item('minecraft:stone'),item('minecraft:stone'),item('minecraft:stone'),item('minecraft:stone'),item('minecraft:stone')) // Must be exactly 5
.output(item('minecraft:clay'))
.xp(100)
.register()
Removing Recipes
Removes the Fey Crafter recipe with the given name:
groovymods.roots.fey_crafter.removeByName(ResourceLocation)
Removes the Fey Crafter recipe with the given output itemstack:
groovymods.roots.fey_crafter.removeByOutput(ItemStack)
Removes all registered recipes:
groovymods.roots.fey_crafter.removeAll()
Example
mods.roots.fey_crafter.removeByName(resource('roots:unending_bowl'))
mods.roots.fey_crafter.removeByOutput(item('minecraft:gravel'))
mods.roots.fey_crafter.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.fey_crafter.streamRecipes()