Stone Anvil (Primal Tech)
Description
Converts an input item into an output itemstack after being interacted with by a player using a Stone Mallet.
Identifier
Refer to this via any of the following:
mods.primal_tech.stone_anvil/* Used as page default */
mods.primal_tech.stoneanvil
mods.primal_tech.stoneAnvil
mods.primal_tech.StoneAnvil
mods.primaltech.stone_anvil
mods.primaltech.stoneanvil
mods.primaltech.stoneAnvil
mods.primaltech.StoneAnvil
Adding Recipes
Add the given recipe to the recipe list:
groovymods.primal_tech.stone_anvil.add(StoneAnvilRecipes)
Adds recipes in the format
output
,input
:groovymods.primal_tech.stone_anvil.add(ItemStack, IIngredient)
Recipe Builder
Just like other recipe types, the Stone Anvil also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.primal_tech.stone_anvil.recipeBuilder()
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
orprimal_tech.recipes.StoneAnvilRecipes
).groovyregister()
Example
mods.primal_tech.stone_anvil.recipeBuilder()
.input(item('minecraft:diamond'))
.output(item('minecraft:clay'))
.register()
mods.primal_tech.stone_anvil.recipeBuilder()
.input(item('minecraft:gold_ingot'))
.output(item('minecraft:diamond') * 4)
.register()
Removing Recipes
Removes the given recipe from the recipe list:
groovymods.primal_tech.stone_anvil.remove(StoneAnvilRecipes)
Removes all recipes that match the given input:
groovymods.primal_tech.stone_anvil.removeByInput(IIngredient)
Removes all recipes that match the given output:
groovymods.primal_tech.stone_anvil.removeByOutput(IIngredient)
Removes all registered recipes:
groovymods.primal_tech.stone_anvil.removeAll()
Example
mods.primal_tech.stone_anvil.removeByInput(item('primal_tech:flint_block'))
mods.primal_tech.stone_anvil.removeByOutput(item('minecraft:flint'))
mods.primal_tech.stone_anvil.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.primal_tech.stone_anvil.streamRecipes()