Skip to content

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:

groovy
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.

    groovy
    name(String)
    name(ResourceLocation)
  • IngredientList<IIngredient>. Sets the item inputs of the recipe. Requires exactly 1.

    groovy
    input(IIngredient)
    input(IIngredient...)
    input(Collection<IIngredient>)
  • ItemStackList. Sets the item outputs of the recipe. Requires exactly 1.

    groovy
    output(ItemStack)
    output(ItemStack...)
    output(Collection<ItemStack>)
  • int. Sets the amount of rotation required to convert the input into the output. Requires greater than 0. (Default 0).

    groovy
    rotations(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. (returns null or com.teammetallurgy.atum.api.recipe.quern.IQuernRecipe).

    groovy
    register()
Example
groovy
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:

    groovy
    mods.atum.quern.removeByInput(IIngredient)
  • Removes all recipes that match the given output:

    groovy
    mods.atum.quern.removeByOutput(IIngredient)
  • Removes all registered recipes:

    groovy
    mods.atum.quern.removeAll()
Example
groovy
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:

    groovy
    mods.atum.quern.streamRecipes()

Contributors

Changelog

© 2024 CleanroomMC. All Rights Reserved.