Quern (Atum 2)
Description
Converts an input item into an output itemstack after a given number of rotations, which are done via a player right clicking the Quern.
Identifier
Refer to this via any of the following:
mods.atum.quern/* Used as page default */
mods.atum.Quern
Adding Recipes
Recipe Builder
Just like other recipe types, the Quern also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.atum.quern.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>)
int
. Sets the amount of rotation required to convert the input into the output. Requires greater than 0. (Default0
).groovyrotations(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
orcom.teammetallurgy.atum.api.recipe.quern.IQuernRecipe
).groovyregister()
Example
mods.atum.quern.recipeBuilder()
.input(item('minecraft:diamond'))
.output(item('minecraft:clay'))
.rotations(1)
.register()
mods.atum.quern.recipeBuilder()
.input(item('minecraft:gold_ingot'))
.output(item('minecraft:clay') * 4)
.rotations(5)
.register()
Removing Recipes
Removes all recipes that match the given input:
groovymods.atum.quern.removeByInput(IIngredient)
Removes all recipes that match the given output:
groovymods.atum.quern.removeByOutput(IIngredient)
Removes all registered recipes:
groovymods.atum.quern.removeAll()
Example
mods.atum.quern.removeByInput(item('minecraft:blaze_rod'))
mods.atum.quern.removeByOutput(item('minecraft:sugar'))
mods.atum.quern.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.atum.quern.streamRecipes()